YourDefrag
SVN
|
00001 00009 #ifndef YDCMDAPPLICATION_H 00010 #define YDCMDAPPLICATION_H 00011 00012 #include <QString> 00013 #include <QCoreApplication> 00014 #include <QWaitCondition> 00015 #include <QMutex> 00016 #include <QStringList> 00017 #include <QFile> 00018 #include <QTextStream> 00019 00020 #include "YDWorkThread.h" 00021 00022 class YDCmdApplication: public QCoreApplication { 00023 00024 Q_OBJECT 00025 00026 public: 00027 YDCmdApplication(int &argc, char **argv); 00028 ~YDCmdApplication(); 00029 00030 void startDefrag(); 00031 int wait(); 00032 00033 public slots: 00034 void threadFinished(QThread *thread); 00035 void cleanup(); 00036 00037 private: 00038 YDWorkThreadList m_threadList; 00039 QWaitCondition m_end; 00040 QMutex m_mutex; 00041 QStringList m_args; 00042 QStringList m_tasks; 00043 QStringList m_excludes; 00044 QStringList m_spaceHogs; 00045 int m_verbose; 00046 int m_mode; 00047 int m_speed; 00048 int m_freeSpace; 00049 int m_write; 00050 int m_ignore; 00051 QFile *m_logFile; 00052 QTextStream *m_logStream; 00053 00054 virtual void showUsage(); 00055 void parseArguments(); 00056 void addAllDisks(); 00057 00058 static void handleSignal(int sigNum); 00059 }; 00060 00061 #endif/*YDCMDAPPLICATION_H*/