You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.7 KiB
C++

#ifndef CMAINWINDOW_H
#define CMAINWINDOW_H
#include "cfile.h"
#include "csortfilterproxymodel.h"
#include <QMainWindow>
#include <QTreeView>
#include <QStandardItemModel>
#include <QProgressBar>
namespace Ui {
class cMainWindow;
}
class cMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit cMainWindow(QWidget *parent = nullptr);
~cMainWindow();
private slots:
void onLoadListFromFileLeft();
void onLoadListFromFileRight();
void onLoadListFromDirLeft();
void onLoadListFromDirRight();
void onLeftListSelected(const QItemSelection& selection, const QItemSelection& previous);
void onRightListSelected(const QItemSelection& selection, const QItemSelection& previous);
void onMatchDirChecked(bool checked);
void onMatchFileChecked(bool checked);
void onMatchDateTimeChecked(bool checked);
void onMatchSizeChecked(bool checked);
void onMarkDifference();
void onClearSelectionLeft();
void onClearSelectionRight();
private:
Ui::cMainWindow* ui;
QStandardItemModel* m_lpLeftListModel;
QStandardItemModel* m_lpRightListModel;
cSortFilterProxyModel* m_lpLeftListProxyModel;
cSortFilterProxyModel* m_lpRightListProxyModel;
cFileList m_listLeft;
cFileList m_listRight;
QProgressBar* m_lpProgressBar;
bool m_initializing;
bool m_loading;
void initUI();
void displayList(QTreeView* lpView, QStandardItemModel* lpModel, cFileList& fileList);
void createActions();
void createFileActions();
void createContextActions();
protected:
void closeEvent(QCloseEvent* event);
};
#endif // CMAINWINDOW_H