Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/KSMainWindow.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | { | 42 | { | ||
43 | Q_OBJECT | 43 | Q_OBJECT | ||
44 | 44 | | |||
45 | public: | 45 | public: | ||
46 | 46 | | |||
47 | explicit KSMainWindow(const Platform::GrabModes &theGrabModes, const Platform::ShutterModes &theShutterModes, QWidget *parent = nullptr); | 47 | explicit KSMainWindow(const Platform::GrabModes &theGrabModes, const Platform::ShutterModes &theShutterModes, QWidget *parent = nullptr); | ||
48 | virtual ~KSMainWindow() = default; | 48 | virtual ~KSMainWindow() = default; | ||
49 | 49 | | |||
50 | private: | | |||
51 | | ||||
52 | enum class QuitBehavior { | | |||
53 | QuitImmediately, | | |||
54 | QuitExternally | | |||
55 | }; | | |||
56 | void quit(const QuitBehavior quitBehavior = QuitBehavior::QuitImmediately); | | |||
57 | | ||||
58 | enum class MessageDuration { | 50 | enum class MessageDuration { | ||
59 | AutoHide, | 51 | AutoHide, | ||
60 | Persistent | 52 | Persistent | ||
61 | }; | 53 | }; | ||
54 | | ||||
62 | void showInlineMessage(const QString& message, | 55 | void showInlineMessage(const QString& message, | ||
63 | const KMessageWidget::MessageType messageType, | 56 | const KMessageWidget::MessageType messageType, | ||
64 | const MessageDuration messageDuration = MessageDuration::AutoHide, | 57 | const MessageDuration messageDuration = MessageDuration::AutoHide, | ||
65 | const QList<QAction*>& actions = {}); | 58 | const QList<QAction*>& actions = {}); | ||
66 | 59 | | |||
60 | private: | ||||
61 | | ||||
62 | enum class QuitBehavior { | ||||
63 | QuitImmediately, | ||||
64 | QuitExternally | ||||
65 | }; | ||||
66 | void quit(const QuitBehavior quitBehavior = QuitBehavior::QuitImmediately); | ||||
67 | | ||||
67 | private Q_SLOTS: | 68 | private Q_SLOTS: | ||
68 | 69 | | |||
69 | void captureScreenshot(Spectacle::CaptureMode theCaptureMode, int theTimeout, bool theIncludePointer, bool theIncludeDecorations); | 70 | void captureScreenshot(Spectacle::CaptureMode theCaptureMode, int theTimeout, bool theIncludePointer, bool theIncludeDecorations); | ||
70 | void showPrintDialog(); | 71 | void showPrintDialog(); | ||
71 | void openScreenshotsFolder(); | 72 | void openScreenshotsFolder(); | ||
72 | void showPreferencesDialog(); | 73 | void showPreferencesDialog(); | ||
73 | void showImageSharedFeedback(bool error, const QString &message); | 74 | void showImageSharedFeedback(bool error, const QString &message); | ||
74 | void sendToClipboard(); | 75 | void sendToClipboard(); | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |