Init commit.
This commit is contained in:
73
src/window.h
Normal file
73
src/window.h
Normal file
@@ -0,0 +1,73 @@
|
||||
#pragma once
|
||||
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
#ifndef QT_NO_SYSTEMTRAYICON
|
||||
|
||||
# include <QDialog>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QAction;
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QMenu;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
class QTextEdit;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
//! [0]
|
||||
class Window : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Window();
|
||||
|
||||
void setVisible(bool visible) override;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void setIcon(int index);
|
||||
void iconActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
void showMessage();
|
||||
void messageClicked();
|
||||
|
||||
private:
|
||||
void createIconGroupBox();
|
||||
void createMessageGroupBox();
|
||||
void createActions();
|
||||
void createTrayIcon();
|
||||
|
||||
QGroupBox *iconGroupBox;
|
||||
QLabel *iconLabel;
|
||||
QComboBox *iconComboBox;
|
||||
QCheckBox *showIconCheckBox;
|
||||
|
||||
QGroupBox *messageGroupBox;
|
||||
QLabel *typeLabel;
|
||||
QLabel *durationLabel;
|
||||
QLabel *durationWarningLabel;
|
||||
QLabel *titleLabel;
|
||||
QLabel *bodyLabel;
|
||||
QComboBox *typeComboBox;
|
||||
QSpinBox *durationSpinBox;
|
||||
QLineEdit *titleEdit;
|
||||
QTextEdit *bodyEdit;
|
||||
QPushButton *showMessageButton;
|
||||
|
||||
QAction *minimizeAction;
|
||||
QAction *maximizeAction;
|
||||
QAction *restoreAction;
|
||||
QAction *quitAction;
|
||||
|
||||
QSystemTrayIcon *trayIcon;
|
||||
QMenu *trayIconMenu;
|
||||
};
|
||||
//! [0]
|
||||
|
||||
#endif // QT_NO_SYSTEMTRAYICON
|
||||
Reference in New Issue
Block a user