-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
74 lines (65 loc) · 1.87 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFileDialog>
#include <QList>
#include <QItemSelectionModel>
#include <QColorDialog>
#include <QInputDialog>
#include <QMessageBox>
#include <QMenu>
#include <QClipboard>
#include "themeitem.h"
#include "themeloader.h"
#include "themetablemodel.h"
#include "dialogs/aboutdialog.h"
#include "utils.h"
#include "themeitemdelegate.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
Ui::MainWindow *ui;
QList<ThemeItem *> *theme = nullptr;
QList<ThemeItem *> *findedThemeItems = nullptr;
QMenu *popupMenuTableColors = nullptr;
QLabel *mStatusBarText = nullptr;
bool wallpaperChanged = false;
ThemeTableModel *model = nullptr;
ThemeItem *mCurrentThemeItem = nullptr;
QItemSelectionModel *selectionModelTableViewColors = nullptr;
QString openedThemePath;
QString workingDirectory = ".";
QString wpPath = "";
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
void initMainMenu();
void initTableViewColors();
void saveTheme(QString filePath);
void setThemeChangeStatus();
void createTableColorsPopupMenu();
void initStatusBar();
bool isAnyModified();
private slots:
void openTheme();
void saveThemeAs();
void saveTheme();
void doubleClicked1(const QModelIndex &index);
void searchName(const QString text);
void aboutDialog();
void deleteWallpaper();
void selectWallpaper();
void addViewColor();
void deleteViewColor();
void clicked1(const QModelIndex &index);
void exitApp();
void customMenuRequested(QPoint pos);
void copyViewName();
void copyViewColor();
void resetColorToDefault();
};
#endif // MAINWINDOW_H