Changeset View
Changeset View
Standalone View
Standalone View
app/titlebar.h
Show All 18 Lines | |||||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | 21 | | |||
22 | #ifndef TITLEBAR_H | 22 | #ifndef TITLEBAR_H | ||
23 | #define TITLEBAR_H | 23 | #define TITLEBAR_H | ||
24 | 24 | | |||
25 | 25 | | |||
26 | #include <QWidget> | 26 | #include <QWidget> | ||
27 | #include <QMouseEvent> | ||||
27 | 28 | | |||
28 | 29 | | |||
29 | class MainWindow; | 30 | class MainWindow; | ||
30 | class Skin; | 31 | class Skin; | ||
31 | 32 | | |||
32 | class QPushButton; | 33 | class QPushButton; | ||
33 | 34 | | |||
34 | 35 | | |||
Show All 15 Lines | 37 | { | |||
50 | 51 | | |||
51 | public Q_SLOTS: | 52 | public Q_SLOTS: | ||
52 | void setTitle(const QString& title); | 53 | void setTitle(const QString& title); | ||
53 | 54 | | |||
54 | 55 | | |||
55 | protected: | 56 | protected: | ||
56 | void resizeEvent(QResizeEvent*) override; | 57 | void resizeEvent(QResizeEvent*) override; | ||
57 | void paintEvent(QPaintEvent*) override; | 58 | void paintEvent(QPaintEvent*) override; | ||
59 | void mousePressEvent(QMouseEvent*) override; | ||||
60 | void mouseReleaseEvent(QMouseEvent*) override; | ||||
58 | 61 | | |||
59 | 62 | | |||
60 | private: | 63 | private: | ||
61 | void moveButtons(); | 64 | void moveButtons(); | ||
62 | 65 | | |||
63 | MainWindow* m_mainWindow; | 66 | MainWindow* m_mainWindow; | ||
64 | Skin* m_skin; | 67 | Skin* m_skin; | ||
65 | 68 | | |||
66 | QPushButton* m_focusButton; | 69 | QPushButton* m_focusButton; | ||
67 | QPushButton* m_menuButton; | 70 | QPushButton* m_menuButton; | ||
68 | QPushButton* m_quitButton; | 71 | QPushButton* m_quitButton; | ||
69 | 72 | | |||
70 | QString m_title; | 73 | QString m_title; | ||
71 | }; | 74 | }; | ||
72 | 75 | | |||
73 | #endif | 76 | #endif |