Changeset View
Changeset View
Standalone View
Standalone View
src/ExportManager.h
Show All 15 Lines | |||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. | ||
18 | * | 18 | * | ||
19 | * SPDX-License-Identifier: LGPL-2.0-or-later | 19 | * SPDX-License-Identifier: LGPL-2.0-or-later | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #pragma once | 22 | #pragma once | ||
23 | 23 | | |||
24 | #include <SpectacleCommon.h> | 24 | #include "BackendInterfaces/ScreenshotInterface.h" | ||
25 | 25 | | |||
26 | #include <QObject> | 26 | #include <QObject> | ||
27 | #include <QIODevice> | 27 | #include <QIODevice> | ||
28 | #include <QMap> | 28 | #include <QMap> | ||
29 | #include <QPrinter> | 29 | #include <QPrinter> | ||
30 | #include <QPixmap> | 30 | #include <QPixmap> | ||
31 | #include <QDateTime> | 31 | #include <QDateTime> | ||
32 | #include <QUrl> | 32 | #include <QUrl> | ||
Show All 25 Lines | 38 | { | |||
58 | 58 | | |||
59 | QString defaultSaveLocation() const; | 59 | QString defaultSaveLocation() const; | ||
60 | bool isFileExists(const QUrl &url) const; | 60 | bool isFileExists(const QUrl &url) const; | ||
61 | void setPixmap(const QPixmap &pixmap); | 61 | void setPixmap(const QPixmap &pixmap); | ||
62 | QPixmap pixmap() const; | 62 | QPixmap pixmap() const; | ||
63 | void updatePixmapTimestamp(); | 63 | void updatePixmapTimestamp(); | ||
64 | void setTimestamp(const QDateTime ×tamp); | 64 | void setTimestamp(const QDateTime ×tamp); | ||
65 | QString windowTitle() const; | 65 | QString windowTitle() const; | ||
66 | Spectacle::CaptureMode captureMode() const; | 66 | CaptureMode captureMode() const; | ||
67 | void setCaptureMode(const Spectacle::CaptureMode &theCaptureMode); | 67 | void setCaptureMode(const CaptureMode &theCaptureMode); | ||
68 | QString formatFilename(const QString &nameTemplate); | 68 | QString formatFilename(const QString &nameTemplate); | ||
69 | 69 | | |||
70 | static const QMap<QString, KLocalizedString> filenamePlaceholders; | 70 | static const QMap<QString, KLocalizedString> filenamePlaceholders; | ||
71 | 71 | | |||
72 | Q_SIGNALS: | 72 | Q_SIGNALS: | ||
73 | 73 | | |||
74 | void errorMessage(const QString &str); | 74 | void errorMessage(const QString &str); | ||
75 | void pixmapChanged(const QPixmap &pixmap); | 75 | void pixmapChanged(const QPixmap &pixmap); | ||
Show All 26 Lines | |||||
102 | bool isTempFileAlreadyUsed(const QUrl &url) const; | 102 | bool isTempFileAlreadyUsed(const QUrl &url) const; | ||
103 | 103 | | |||
104 | QPixmap mSavePixmap; | 104 | QPixmap mSavePixmap; | ||
105 | QDateTime mPixmapTimestamp; | 105 | QDateTime mPixmapTimestamp; | ||
106 | QUrl mTempFile; | 106 | QUrl mTempFile; | ||
107 | QTemporaryDir *mTempDir; | 107 | QTemporaryDir *mTempDir; | ||
108 | QList<QUrl> mUsedTempFileNames; | 108 | QList<QUrl> mUsedTempFileNames; | ||
109 | QString mWindowTitle; | 109 | QString mWindowTitle; | ||
110 | Spectacle::CaptureMode mCaptureMode { Spectacle::CaptureMode::AllScreens }; | 110 | //TO DO: Assuming a default value here, seems like a bad idea (this mode might not even be available) | ||
111 | CaptureMode mCaptureMode { CaptureMode::AllScreens }; | ||||
111 | }; | 112 | }; |