-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimSystemTray.h
More file actions
38 lines (36 loc) · 814 Bytes
/
Copy pathSimSystemTray.h
File metadata and controls
38 lines (36 loc) · 814 Bytes
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
#ifndef SIMSYSTEMTRAY_H
#define SIMSYSTEMTRAY_H
#include <QSystemTrayIcon>
#include <QMenu>
#include <QAction>
#include <QWidgetAction>
#include <QLabel>
//实现SIM程序自定义托盘菜单
class SimSystemTray: public QSystemTrayIcon
{
Q_OBJECT
public:
SimSystemTray(QWidget *parent=0) ;
void showMyself();
signals:
void selfStart();
void restore();
void setting();
//void exitSIM();
protected:
bool eventFilter(QObject *, QEvent *);
private:
QMenu* trayMenu;
//定义顶部
QWidget * topWidget;
QWidgetAction * topWidgetAction;
QLabel * topLabel;
//
QAction * selfStartAction;
QAction * restoreAction;
QAction * settingAction;
QAction * exitAction;
void createTopWidget();
void createContextMenu();
};
#endif // SIMSYSTEMTRAY_H