Changeset View
Changeset View
Standalone View
Standalone View
app/mainwindow.h
Show All 19 Lines | |||||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | 22 | | |||
23 | #ifndef MAINWINDOW_H | 23 | #ifndef MAINWINDOW_H | ||
24 | #define MAINWINDOW_H | 24 | #define MAINWINDOW_H | ||
25 | 25 | | |||
26 | #include <config-yakuake.h> | 26 | #include <config-yakuake.h> | ||
27 | 27 | | |||
28 | #include <QMainWindow> | 28 | #include <KMainWindow> | ||
shubham: remove #include <QMainWindow> | |||||
29 | 29 | | |||
30 | #include <QTimer> | 30 | #include <QTimer> | ||
31 | 31 | | |||
32 | 32 | | |||
33 | class FirstRunDialog; | 33 | class FirstRunDialog; | ||
34 | class SessionStack; | 34 | class SessionStack; | ||
35 | class Skin; | 35 | class Skin; | ||
36 | class TabBar; | 36 | class TabBar; | ||
37 | class Terminal; | 37 | class Terminal; | ||
38 | class TitleBar; | 38 | class TitleBar; | ||
39 | 39 | | |||
40 | class KHelpMenu; | 40 | class KHelpMenu; | ||
41 | class KActionCollection; | 41 | class KActionCollection; | ||
42 | 42 | | |||
43 | #if HAVE_KWAYLAND | 43 | #if HAVE_KWAYLAND | ||
44 | namespace KWayland { | 44 | namespace KWayland { | ||
45 | namespace Client { | 45 | namespace Client { | ||
46 | class PlasmaShell; | 46 | class PlasmaShell; | ||
47 | class PlasmaShellSurface; | 47 | class PlasmaShellSurface; | ||
48 | } | 48 | } | ||
49 | } | 49 | } | ||
50 | #endif | 50 | #endif | ||
51 | 51 | | |||
52 | class MainWindow : public QMainWindow | 52 | class MainWindow : public KMainWindow | ||
53 | { | 53 | { | ||
54 | Q_OBJECT | 54 | Q_OBJECT | ||
55 | Q_CLASSINFO("D-Bus Interface", "org.kde.yakuake") | 55 | Q_CLASSINFO("D-Bus Interface", "org.kde.yakuake") | ||
56 | 56 | | |||
57 | public: | 57 | public: | ||
58 | explicit MainWindow(QWidget* parent = 0); | 58 | explicit MainWindow(QWidget* parent = 0); | ||
59 | ~MainWindow(); | 59 | ~MainWindow(); | ||
60 | 60 | | |||
Show All 22 Lines | |||||
83 | 83 | | |||
84 | 84 | | |||
85 | Q_SIGNALS: | 85 | Q_SIGNALS: | ||
86 | void windowOpened(); | 86 | void windowOpened(); | ||
87 | void windowClosed(); | 87 | void windowClosed(); | ||
88 | 88 | | |||
89 | 89 | | |||
90 | protected: | 90 | protected: | ||
91 | void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE; | 91 | void paintEvent(QPaintEvent*) override; | ||
92 | void moveEvent(QMoveEvent*) Q_DECL_OVERRIDE; | 92 | void moveEvent(QMoveEvent*) override; | ||
93 | void changeEvent(QEvent* event) Q_DECL_OVERRIDE; | 93 | void changeEvent(QEvent* event) override; | ||
94 | bool event(QEvent* event) Q_DECL_OVERRIDE; | 94 | void closeEvent(QCloseEvent *event) override; | ||
95 | bool event(QEvent* event) override; | ||||
95 | 96 | | |||
96 | virtual bool queryClose(); | 97 | virtual bool queryClose() override; | ||
use override; tcanabrava: use override;
Q_DECL_OVERRIDE was needed when none of the compilers actually accepted c++11. | |||||
97 | 98 | | |||
98 | 99 | | |||
99 | private Q_SLOTS: | 100 | private Q_SLOTS: | ||
100 | void applySettings(); | 101 | void applySettings(); | ||
101 | void applySkin(); | 102 | void applySkin(); | ||
102 | void applyWindowProperties(); | 103 | void applyWindowProperties(); | ||
103 | 104 | | |||
104 | void applyWindowGeometry(); | 105 | void applyWindowGeometry(); | ||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |
remove #include <QMainWindow>