-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainwindow.h
81 lines (73 loc) · 1.65 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
75
76
77
78
79
80
81
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSystemTrayIcon>
#include <QProcess>
#include <wallpaperthread.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
// void setApp(QApplication *app);
private slots:
void setUp(QString cycleTime);
void changeWallpaper();
void exitApp();
void closeEvent(QCloseEvent *e);
void changeEvent(QEvent *e);
void setAutoClear(bool flag);
void setAutoStart(bool flag);
void saveWallpaper();
void aboutMe();
void iconIsActived(QSystemTrayIcon::ActivationReason e);
void changeSource(QString site);
void changeKeyword(QString key);
signals:
void exit();
private:
QString macOSXAppBundlePath();
QString macOSXAppBundleName();
Ui::MainWindow *ui;
QSystemTrayIcon *mSysTrayIcon;
QMenu *trayMenu;
QMenu *setting;
QAction *refresh;
QAction *clear;
QAction *quit;
QAction *save;
QAction *autoStart;
QAction *about;
QProcess *proc;
QString filePath;
QIcon icon;
WallpaperThread *thread;
QAction *halfAnHour;
QAction *oneHour;
QAction *twoHours;
QAction *fourHours;
QApplication *myApp;
//设置源
QMenu *sites;
QAction *site1;
QAction *site2;
QAction *site3;
//关键字
QMenu *keywords;
QAction *all;
QAction *wallpaper;
QAction *people;
QAction *textures;
QAction *nature;
QAction *architecture;
QAction *film;
QAction *animals;
QAction *travel;
QAction *food;
QAction *nasa;
};
#endif // MAINWINDOW_H