Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/KSMainWindow.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 42 | { | |||
---|---|---|---|---|---|
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 | enum class MessageDuration { | 50 | enum class MessageDuration { | ||
51 | AutoHide, | 51 | AutoHide, | ||
52 | Persistent | 52 | Persistent | ||
53 | }; | 53 | }; | ||
54 | 54 | | |||
55 | void showInlineMessage(const QString& message, | | |||
56 | const KMessageWidget::MessageType messageType, | | |||
57 | const MessageDuration messageDuration = MessageDuration::AutoHide, | | |||
58 | const QList<QAction*>& actions = {}); | | |||
59 | | ||||
60 | private: | 55 | private: | ||
61 | 56 | | |||
62 | enum class QuitBehavior { | 57 | enum class QuitBehavior { | ||
63 | QuitImmediately, | 58 | QuitImmediately, | ||
64 | QuitExternally | 59 | QuitExternally | ||
65 | }; | 60 | }; | ||
66 | void quit(const QuitBehavior quitBehavior = QuitBehavior::QuitImmediately); | 61 | void quit(const QuitBehavior quitBehavior = QuitBehavior::QuitImmediately); | ||
62 | void showInlineMessage(const QString& message, | ||||
63 | const KMessageWidget::MessageType messageType, | ||||
64 | const MessageDuration messageDuration = MessageDuration::AutoHide, | ||||
65 | const QList<QAction*>& actions = {}); | ||||
67 | 66 | | |||
68 | private Q_SLOTS: | 67 | private Q_SLOTS: | ||
69 | 68 | | |||
70 | void captureScreenshot(Spectacle::CaptureMode theCaptureMode, int theTimeout, bool theIncludePointer, bool theIncludeDecorations); | 69 | void captureScreenshot(Spectacle::CaptureMode theCaptureMode, int theTimeout, bool theIncludePointer, bool theIncludeDecorations); | ||
71 | void showPrintDialog(); | 70 | void showPrintDialog(); | ||
72 | void openScreenshotsFolder(); | 71 | void openScreenshotsFolder(); | ||
73 | void showPreferencesDialog(); | 72 | void showPreferencesDialog(); | ||
74 | void showImageSharedFeedback(bool error, const QString &message); | 73 | void showImageSharedFeedback(bool error, const QString &message); | ||
75 | void sendToClipboard(); | 74 | void imageCopied(); | ||
76 | void init(); | 75 | void init(); | ||
77 | void setDefaultSaveAction(); | 76 | void setDefaultSaveAction(); | ||
78 | void save(); | 77 | void save(); | ||
79 | void saveAs(); | 78 | void saveAs(); | ||
80 | int windowWidth(const QPixmap &pixmap) const; | 79 | int windowWidth(const QPixmap &pixmap) const; | ||
81 | void restoreWindowTitle(); | 80 | void restoreWindowTitle(); | ||
82 | 81 | | |||
83 | public Q_SLOTS: | 82 | public Q_SLOTS: | ||
Show All 36 Lines |