gui: add basic gui code.
This commit is contained in:
22
Util/Util.h
22
Util/Util.h
@@ -2,6 +2,7 @@
|
||||
#define UTIL_H
|
||||
|
||||
#include <QObject>
|
||||
#include <InfoDirFile.h>
|
||||
|
||||
class Util : public QObject
|
||||
{
|
||||
@@ -14,4 +15,25 @@ public:
|
||||
static void ConsoleMsgHander(QtMsgType type, const QMessageLogContext& context, const QString& msg);
|
||||
};
|
||||
|
||||
class DirFileHelper
|
||||
{
|
||||
public:
|
||||
DirFileHelper() = default;
|
||||
virtual ~DirFileHelper() = default;
|
||||
|
||||
public:
|
||||
QString GetErr() const;
|
||||
void registerPathCall(const std::function<void(const QString& path)>& call);
|
||||
void registerFileCall(const std::function<void(const DirFileInfoVec& vec)>& call);
|
||||
|
||||
protected:
|
||||
QString err_;
|
||||
std::function<void(const QString& path)> pathCall_;
|
||||
std::function<void(const DirFileInfoVec& info)> fileCall_;
|
||||
|
||||
public:
|
||||
virtual bool GetHome() = 0;
|
||||
virtual bool GetDirFile(const QString& dir) = 0;
|
||||
};
|
||||
|
||||
#endif // UTIL_H
|
||||
Reference in New Issue
Block a user