Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/KSMainWindow.h
Show All 25 Lines | |||||
26 | #include <QToolButton> | 26 | #include <QToolButton> | ||
27 | #include <QDialogButtonBox> | 27 | #include <QDialogButtonBox> | ||
28 | 28 | | |||
29 | #include <KMessageWidget> | 29 | #include <KMessageWidget> | ||
30 | 30 | | |||
31 | #include "PlatformBackends/ImageGrabber.h" | 31 | #include "PlatformBackends/ImageGrabber.h" | ||
32 | #include "ExportMenu.h" | 32 | #include "ExportMenu.h" | ||
33 | #include "KSWidget.h" | 33 | #include "KSWidget.h" | ||
34 | #include "SpectacleConfig.h" | ||||
34 | 35 | | |||
35 | class KSMainWindow : public QDialog | 36 | class KSMainWindow : public QDialog | ||
36 | { | 37 | { | ||
37 | Q_OBJECT | 38 | Q_OBJECT | ||
38 | 39 | | |||
39 | public: | 40 | public: | ||
40 | 41 | | |||
41 | explicit KSMainWindow(bool onClickAvailable, QWidget *parent = 0); | 42 | explicit KSMainWindow(bool onClickAvailable, QWidget *parent = 0); | ||
42 | ~KSMainWindow(); | 43 | ~KSMainWindow(); | ||
43 | 44 | | |||
44 | private slots: | 45 | private slots: | ||
45 | 46 | | |||
46 | void captureScreenshot(ImageGrabber::GrabMode mode, int timeout, bool includePointer, bool includeDecorations); | 47 | void captureScreenshot(ImageGrabber::GrabMode mode, int timeout, bool includePointer, bool includeDecorations); | ||
47 | void showPrintDialog(); | 48 | void showPrintDialog(); | ||
48 | void showPreferencesDialog(); | 49 | void showPreferencesDialog(); | ||
49 | void showImageSharedFeedback(bool error, const QString &message); | 50 | void showImageSharedFeedback(bool error, const QString &message); | ||
50 | void sendToClipboard(); | 51 | void sendToClipboard(); | ||
51 | void init(); | 52 | void init(); | ||
52 | void buildSaveMenu(); | 53 | void buildSaveMenu(); | ||
53 | void save(); | 54 | void save(); | ||
54 | void saveAs(); | 55 | void saveAs(); | ||
55 | void saveAndExit(); | | |||
56 | 56 | | |||
57 | public slots: | 57 | public slots: | ||
58 | 58 | | |||
59 | void setScreenshotAndShow(const QPixmap &pixmap); | 59 | void setScreenshotAndShow(const QPixmap &pixmap); | ||
60 | void setScreenshotWindowTitle(QUrl location); | 60 | void setScreenshotWindowTitle(QUrl location); | ||
61 | 61 | | |||
62 | signals: | 62 | signals: | ||
63 | 63 | | |||
Show All 12 Lines | |||||
76 | QToolButton *mConfigureButton; | 76 | QToolButton *mConfigureButton; | ||
77 | QPushButton *mToolsButton; | 77 | QPushButton *mToolsButton; | ||
78 | QPushButton *mSendToButton; | 78 | QPushButton *mSendToButton; | ||
79 | QToolButton *mClipboardButton; | 79 | QToolButton *mClipboardButton; | ||
80 | QToolButton *mSaveButton; | 80 | QToolButton *mSaveButton; | ||
81 | QMenu *mSaveMenu; | 81 | QMenu *mSaveMenu; | ||
82 | KMessageWidget *mMessageWidget; | 82 | KMessageWidget *mMessageWidget; | ||
83 | QMenu *mToolsMenu; | 83 | QMenu *mToolsMenu; | ||
84 | ExportMenu *mExportMenu; | 84 | ExportMenu *mExportMenu; | ||
rkflx: Why are you transforming this into a member variable instead of keeping it a local variable? | |||||
85 | bool mOnClickAvailable; | 85 | bool mOnClickAvailable; | ||
86 | }; | 86 | }; | ||
87 | 87 | | |||
88 | #endif // KSMAINWINDOW_H | 88 | #endif // KSMAINWINDOW_H |
Why are you transforming this into a member variable instead of keeping it a local variable? SpectacleConfig::instance() is a static returning only a reference anyway.