mainWindow.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include <QStandardItemModel>
  3. #include <QStandardItem>
  4. #include <QMainWindow>
  5. #include <QObject>
  6. #include "IEngine.h"
  7. class Ui_MainWindow;
  8. namespace craftlab::fakeraid
  9. {
  10. struct DiffResult;
  11. }
  12. namespace craftlab::fakeraid::ui
  13. {
  14. class MainWindow : public QObject
  15. {
  16. Q_OBJECT
  17. public:
  18. MainWindow();
  19. ~MainWindow();
  20. public:
  21. void DisplaySourceWindow(bool canCancel, const std::vector<std::string>& previousPaths);
  22. void DisplaySourceWindow(bool canCancel);
  23. private Q_SLOTS:
  24. void MenuBarActionTrigerred(bool checked =false);
  25. private:
  26. bool PathExists(const IEngine& engine) const;
  27. void OnEngineUpdated();
  28. void ListFiles();
  29. void OnListViewDoubleClick(const FileAndSum& filename);
  30. void FileEdit(const File& f);
  31. bool IsFileCorrent(const File& file) const;
  32. void UpdateFileList();
  33. std::unique_ptr<QStandardItemModel> fileListItemModel;
  34. std::unique_ptr<QMainWindow> window;
  35. std::unique_ptr<IEngine> engine;
  36. std::unique_ptr<DiffResult> currentDiffResult;
  37. std::unique_ptr<Ui_MainWindow> ui;
  38. };
  39. }