#ifndef UTIL_H #define UTIL_H #include #include class Util : public QObject { Q_OBJECT public: Util(); public: static void InitLogger(const QString& logPath, const QString& mark); 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& call); void registerFileCall(const std::function& call); protected: QString err_; std::function pathCall_; std::function fileCall_; public: virtual bool GetHome() = 0; virtual bool GetDirFile(const QString& dir) = 0; }; #endif // UTIL_H