-
Notifications
You must be signed in to change notification settings - Fork 11
/
trayiconwindow.h
50 lines (39 loc) · 1.04 KB
/
trayiconwindow.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
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2020-2024 XMuli
// SPDX-GitHub: https://github.com/XMuli/shotx
// SPDX-Author: XMuli <xmulitech@gmail.com>
#ifndef TRAYICONWINDOW_H
#define TRAYICONWINDOW_H
#include <QSystemTrayIcon>
#include <QWidget>
#include "mainwindow.h"
#include "about.h"
//class QSystemTrayIcon;
class QMenu;
class QAction;
class ScreenShots;
class TrayIconWindow : public QWidget
{
Q_OBJECT
public:
TrayIconWindow();
~TrayIconWindow();
void init();
public slots:
void onActiveTray(QSystemTrayIcon::ActivationReason reason);
void onActMainWindow();
void onAbout();
void onCreateScreen();
protected:
void keyPressEvent(QKeyEvent *event) override;
private:
QMenu *m_menu;
// QAction *m_actMainWindow;
MainWindow *m_mainWindow;
QAction *m_actAbout;
About *m_aboutWindow;
QAction *m_actExit;
QSystemTrayIcon *m_trayIcon; // 托盘图标
ScreenShots *m_screenShot;
};
#endif // TRAYICONWINDOW_H