Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

84 Zeilen
2.4 KiB

  1. /*******************************************************************************
  2. * *
  3. * Société de Transports de Montréal. *
  4. * 2012 - 2013 *
  5. * *
  6. * Projet Zones Tests *
  7. * *
  8. * *
  9. * *
  10. *******************************************************************************/
  11. /*
  12. Description:
  13. Cette classe est responsable de la création d'une liste de tous lesfichiers
  14. ZTLog présents dans la base de données. À ne pas confondre avec les fichiers
  15. de passage.
  16. */
  17. /* ************************************************************************** */
  18. /* Revision:
  19. ### 20150227 JFM
  20. ### YYYYMMDD Description du besoin ou du bug
  21. Description du changement.
  22. */
  23. /* ************************************************************************** */
  24. #ifndef ZTLOGFILESMGR_H
  25. #define ZTLOGFILESMGR_H
  26. #include "ZTData.h"
  27. #include "GlobalDefine.h"
  28. #include <QList>
  29. #include <QDir>
  30. #include "DirParserThread.h"
  31. #include <QThread>
  32. #include <QTimer>
  33. class COutilZT;
  34. class CZTLogFilesMgr: public QObject
  35. {
  36. Q_OBJECT
  37. public:
  38. CZTLogFilesMgr();
  39. ~CZTLogFilesMgr();
  40. COutilZT *mProgramHandle;
  41. void DestroyZTLogFilesList();
  42. void ParseZTLogFiles(bool RebuildDatabase);
  43. bool ExtractLogInfo(QString LogFilePath);
  44. void SetLogDataDir(QString Dir){mLogDatabaseDir = Dir;}
  45. QList<CZTLogFileInfo> *GetZTLogsList(){return &mZTLogFilesList;}
  46. int GetZTLogFilesCount();
  47. int SaveDatabaseFile();
  48. private:
  49. QList<CZTLogFileInfo> mZTLogFilesList;
  50. QString mLogDatabaseDir;
  51. QThread *mDirParserThread;
  52. CDirParserThread *mDirParserWorkerThread;
  53. QTimer *mDatabaseParsingTimer;
  54. bool mSaveDBFile;
  55. int ParseDir(QDir dir);
  56. public slots:
  57. void NewZTLogParsed(QString,bool);
  58. void DirParsingFinished(int);
  59. void ParsingTimerExpired();
  60. void EmptyDirParsed();
  61. void ThreadQuit();
  62. void ThreadTerminated();
  63. };
  64. #endif // ZTLOGFILESMGR_H