Changeset View
Changeset View
Standalone View
Standalone View
src/ExportManager.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 32 | { | |||
---|---|---|---|---|---|
50 | 50 | | |||
51 | public: | 51 | public: | ||
52 | 52 | | |||
53 | Q_PROPERTY(QString saveLocation READ saveLocation WRITE setSaveLocation NOTIFY saveLocationChanged) | 53 | Q_PROPERTY(QString saveLocation READ saveLocation WRITE setSaveLocation NOTIFY saveLocationChanged) | ||
54 | Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged) | 54 | Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged) | ||
55 | 55 | | |||
56 | void setSaveLocation(const QString &location); | 56 | void setSaveLocation(const QString &location); | ||
57 | QString saveLocation() const; | 57 | QString saveLocation() const; | ||
58 | QUrl lastSavePath() const; | ||||
59 | bool isFileExists(const QUrl &url) const; | ||||
58 | void setPixmap(const QPixmap &pixmap); | 60 | void setPixmap(const QPixmap &pixmap); | ||
59 | QPixmap pixmap() const; | 61 | QPixmap pixmap() const; | ||
60 | QString pixmapDataUri() const; | 62 | QString pixmapDataUri() const; | ||
61 | 63 | | |||
62 | signals: | 64 | signals: | ||
63 | 65 | | |||
64 | void errorMessage(const QString &str); | 66 | void errorMessage(const QString &str); | ||
65 | void saveLocationChanged(const QString &location); | 67 | void saveLocationChanged(const QString &location); | ||
Show All 17 Lines | |||||
83 | using FileNameAlreadyUsedCheck = bool (ExportManager::*)(const QUrl&) const; | 85 | using FileNameAlreadyUsedCheck = bool (ExportManager::*)(const QUrl&) const; | ||
84 | QString autoIncrementFilename(const QString &baseName, const QString &extension, | 86 | QString autoIncrementFilename(const QString &baseName, const QString &extension, | ||
85 | FileNameAlreadyUsedCheck isFileNameUsed); | 87 | FileNameAlreadyUsedCheck isFileNameUsed); | ||
86 | QString makeSaveMimetype(const QUrl &url); | 88 | QString makeSaveMimetype(const QUrl &url); | ||
87 | bool writeImage(QIODevice *device, const QByteArray &format); | 89 | bool writeImage(QIODevice *device, const QByteArray &format); | ||
88 | bool save(const QUrl &url); | 90 | bool save(const QUrl &url); | ||
89 | bool localSave(const QUrl &url, const QString &mimetype); | 91 | bool localSave(const QUrl &url, const QString &mimetype); | ||
90 | bool remoteSave(const QUrl &url, const QString &mimetype); | 92 | bool remoteSave(const QUrl &url, const QString &mimetype); | ||
91 | bool isFileExists(const QUrl &url) const; | | |||
92 | bool isTempFileAlreadyUsed(const QUrl &url) const; | 93 | bool isTempFileAlreadyUsed(const QUrl &url) const; | ||
93 | 94 | | |||
94 | QPixmap mSavePixmap; | 95 | QPixmap mSavePixmap; | ||
96 | QUrl mLastSavePath; | ||||
95 | QUrl mTempFile; | 97 | QUrl mTempFile; | ||
96 | QTemporaryDir *mTempDir; | 98 | QTemporaryDir *mTempDir; | ||
97 | QList<QUrl> mUsedTempFileNames; | 99 | QList<QUrl> mUsedTempFileNames; | ||
98 | }; | 100 | }; | ||
99 | 101 | | |||
100 | #endif // EXPORTMANAGER_H | 102 | #endif // EXPORTMANAGER_H |