1 Star 0 Fork 1.8K

clickto/ndd

forked from 爬山虎/ndd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
encodeconvert.h 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include <QWidget>
#include <QFuture>
#include <functional>
#include <QMap>
#include "ui_encodeconvert.h"
#include "rcglobal.h"
typedef struct EncodeThreadParameter_ {
QString filepath;
CODE_ID code;
QTreeWidgetItem* item;
EncodeThreadParameter_(QString filePath_)
{
filepath = filePath_;
code = CODE_ID::UNKOWN;
}
}EncodeThreadParameter;
class EncodeConvert : public QWidget
{
Q_OBJECT
public:
EncodeConvert(QWidget *parent = Q_NULLPTR);
~EncodeConvert();
private:
int allfile(QTreeWidgetItem* root_, QString path_);
int loadDir(QString rootDirPath);
bool isSupportExt(int index, QString ext);
QFuture<EncodeThreadParameter*> commitTask(std::function<EncodeThreadParameter* (EncodeThreadParameter*)> fun, EncodeThreadParameter* parameter);
QFuture<EncodeThreadParameter_*> checkFileCode(QString filePath, QTreeWidgetItem* item);
static CODE_ID convertFileToCode(QString& filePath, CODE_ID srcCode, CODE_ID dstDode);
static CODE_ID getComboBoxCode(int index);
QFuture<EncodeThreadParameter_*> convertFileCode(QString filePath, QTreeWidgetItem* item);
void scanFileCode();
protected:
void dragEnterEvent(QDragEnterEvent* event) override;
void dropEvent(QDropEvent* e) override;
public slots:
void slot_scanFileCode();
void slot_userDefineExt();
private slots:
void slot_selectFile();
void slot_startConvert();
void slot_convertFileFinish();
void slot_itemClicked(QTreeWidgetItem* item, int column);
private:
void setItemIntervalBackground();
void setItemBackground(QTreeWidgetItem* item, const QColor& color);
private:
Ui::EncodeConvert ui;
QList<fileAttriNode> m_fileAttris;
QString m_fileDirPath;
int m_commitCmpFileNums;
int m_finishCmpFileNums;
int m_extComBoxNum;
QList< QMap<QString, bool>* > m_supportFileExt;
QMenu* m_menu;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/clickto/notepad--.git
git@gitee.com:clickto/notepad--.git
clickto
notepad--
ndd
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385