Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleCore.h
Show All 36 Lines | 30 | { | |||
---|---|---|---|---|---|
37 | 37 | | |||
38 | enum StartMode { | 38 | enum StartMode { | ||
39 | GuiMode = 0, | 39 | GuiMode = 0, | ||
40 | DBusMode = 1, | 40 | DBusMode = 1, | ||
41 | BackgroundMode = 2 | 41 | BackgroundMode = 2 | ||
42 | }; | 42 | }; | ||
43 | 43 | | |||
44 | explicit SpectacleCore(StartMode startMode, ImageGrabber::GrabMode grabMode, QString &saveFileName, | 44 | explicit SpectacleCore(StartMode startMode, ImageGrabber::GrabMode grabMode, QString &saveFileName, | ||
45 | qint64 delayMsec, bool notifyOnGrab, QObject *parent = nullptr); | 45 | qint64 delayMsec, bool notifyOnGrab, bool copyToClipboard, QObject *parent = nullptr); | ||
46 | ~SpectacleCore(); | 46 | ~SpectacleCore(); | ||
47 | 47 | | |||
48 | QString filename() const; | 48 | QString filename() const; | ||
49 | void setFilename(const QString &filename); | 49 | void setFilename(const QString &filename); | ||
50 | ImageGrabber::GrabMode grabMode() const; | 50 | ImageGrabber::GrabMode grabMode() const; | ||
51 | void setGrabMode(ImageGrabber::GrabMode grabMode); | 51 | void setGrabMode(ImageGrabber::GrabMode grabMode); | ||
52 | 52 | | |||
53 | Q_SIGNALS: | 53 | Q_SIGNALS: | ||
Show All 22 Lines | |||||
76 | ExportManager *mExportManager; | 76 | ExportManager *mExportManager; | ||
77 | StartMode mStartMode; | 77 | StartMode mStartMode; | ||
78 | bool mNotify; | 78 | bool mNotify; | ||
79 | QString mFileNameString; | 79 | QString mFileNameString; | ||
80 | QUrl mFileNameUrl; | 80 | QUrl mFileNameUrl; | ||
81 | ImageGrabber *mImageGrabber; | 81 | ImageGrabber *mImageGrabber; | ||
82 | KSMainWindow *mMainWindow; | 82 | KSMainWindow *mMainWindow; | ||
83 | bool isGuiInited; | 83 | bool isGuiInited; | ||
84 | bool copyToClipboard; | ||||
davidre: Please use a more descriptive name, copyToClipboard should be fine. | |||||
I initially thought of using the name copyToClipboard, but then I saw that the notify boolean was called mNotify, so I followed that. I'll rename it. kdautovic: I initially thought of using the name copyToClipboard, but then I saw that the notify boolean… | |||||
IMO (I didn't write the code) the difference is that notify is verb. In my head I read if (notify) as "if we should notify". Clipboard is a noun and for me if (clipboard) looks like checking if the clipboard pointer is not null. davidre: IMO (I didn't write the code) the difference is that notify is verb. In my head I read `if… | |||||
kdautovic: That makes sense. Okay, I'll rename it tomorrow. | |||||
84 | }; | 85 | }; | ||
85 | 86 | | |||
86 | #endif // KSCORE_H | 87 | #endif // KSCORE_H |
Please use a more descriptive name, copyToClipboard should be fine.