Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/KisDocument.cpp
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | |||||
114 | #include "kis_image_barrier_lock_adapter.h" | 114 | #include "kis_image_barrier_lock_adapter.h" | ||
115 | #include "KisReferenceImagesLayer.h" | 115 | #include "KisReferenceImagesLayer.h" | ||
116 | 116 | | |||
117 | #include <mutex> | 117 | #include <mutex> | ||
118 | #include "kis_config_notifier.h" | 118 | #include "kis_config_notifier.h" | ||
119 | #include "kis_async_action_feedback.h" | 119 | #include "kis_async_action_feedback.h" | ||
120 | #include "KisCloneDocumentStroke.h" | 120 | #include "KisCloneDocumentStroke.h" | ||
121 | 121 | | |||
122 | #include <KisMirrorAxisConfig.h> | ||||
123 | | ||||
122 | 124 | | |||
123 | // Define the protocol used here for embedded documents' URL | 125 | // Define the protocol used here for embedded documents' URL | ||
124 | // This used to "store" but QUrl didn't like it, | 126 | // This used to "store" but QUrl didn't like it, | ||
125 | // so let's simply make it "tar" ! | 127 | // so let's simply make it "tar" ! | ||
126 | #define STORE_PROTOCOL "tar" | 128 | #define STORE_PROTOCOL "tar" | ||
127 | // The internal path is a hack to make QUrl happy and for document children | 129 | // The internal path is a hack to make QUrl happy and for document children | ||
128 | #define INTERNAL_PROTOCOL "intern" | 130 | #define INTERNAL_PROTOCOL "intern" | ||
129 | #define INTERNAL_PREFIX "intern:/" | 131 | #define INTERNAL_PREFIX "intern:/" | ||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 250 | Private(const Private &rhs, KisDocument *q) | |||
249 | : docInfo(new KoDocumentInfo(*rhs.docInfo, q)) | 251 | : docInfo(new KoDocumentInfo(*rhs.docInfo, q)) | ||
250 | , unit(rhs.unit) | 252 | , unit(rhs.unit) | ||
251 | , importExportManager(new KisImportExportManager(q)) | 253 | , importExportManager(new KisImportExportManager(q)) | ||
252 | , mimeType(rhs.mimeType) | 254 | , mimeType(rhs.mimeType) | ||
253 | , outputMimeType(rhs.outputMimeType) | 255 | , outputMimeType(rhs.outputMimeType) | ||
254 | , autoSaveTimer(new QTimer(q)) | 256 | , autoSaveTimer(new QTimer(q)) | ||
255 | , undoStack(new UndoStack(q)) | 257 | , undoStack(new UndoStack(q)) | ||
256 | , guidesConfig(rhs.guidesConfig) | 258 | , guidesConfig(rhs.guidesConfig) | ||
259 | , mirrorAxisConfig(rhs.mirrorAxisConfig) | ||||
257 | , m_bAutoDetectedMime(rhs.m_bAutoDetectedMime) | 260 | , m_bAutoDetectedMime(rhs.m_bAutoDetectedMime) | ||
258 | , m_url(rhs.m_url) | 261 | , m_url(rhs.m_url) | ||
259 | , m_file(rhs.m_file) | 262 | , m_file(rhs.m_file) | ||
260 | , modified(rhs.modified) | 263 | , modified(rhs.modified) | ||
261 | , readwrite(rhs.readwrite) | 264 | , readwrite(rhs.readwrite) | ||
262 | , firstMod(rhs.firstMod) | 265 | , firstMod(rhs.firstMod) | ||
263 | , lastMod(rhs.lastMod) | 266 | , lastMod(rhs.lastMod) | ||
264 | , nserver(new KisNameServer(*rhs.nserver)) | 267 | , nserver(new KisNameServer(*rhs.nserver)) | ||
Show All 30 Lines | |||||
295 | bool modifiedAfterAutosave = false; | 298 | bool modifiedAfterAutosave = false; | ||
296 | bool isAutosaving = false; | 299 | bool isAutosaving = false; | ||
297 | bool disregardAutosaveFailure = false; | 300 | bool disregardAutosaveFailure = false; | ||
298 | int autoSaveFailureCount = 0; | 301 | int autoSaveFailureCount = 0; | ||
299 | 302 | | |||
300 | KUndo2Stack *undoStack = 0; | 303 | KUndo2Stack *undoStack = 0; | ||
301 | 304 | | |||
302 | KisGuidesConfig guidesConfig; | 305 | KisGuidesConfig guidesConfig; | ||
306 | KisMirrorAxisConfig mirrorAxisConfig; | ||||
303 | 307 | | |||
304 | bool m_bAutoDetectedMime = false; // whether the mimetype in the arguments was detected by the part itself | 308 | bool m_bAutoDetectedMime = false; // whether the mimetype in the arguments was detected by the part itself | ||
305 | QUrl m_url; // local url - the one displayed to the user. | 309 | QUrl m_url; // local url - the one displayed to the user. | ||
306 | QString m_file; // Local file - the only one the part implementation should deal with. | 310 | QString m_file; // Local file - the only one the part implementation should deal with. | ||
307 | 311 | | |||
308 | QMutex savingMutex; | 312 | QMutex savingMutex; | ||
309 | 313 | | |||
310 | bool modified = false; | 314 | bool modified = false; | ||
▲ Show 20 Lines • Show All 1210 Lines • ▼ Show 20 Line(s) | |||||
1521 | void KisDocument::setGuidesConfig(const KisGuidesConfig &data) | 1525 | void KisDocument::setGuidesConfig(const KisGuidesConfig &data) | ||
1522 | { | 1526 | { | ||
1523 | if (d->guidesConfig == data) return; | 1527 | if (d->guidesConfig == data) return; | ||
1524 | 1528 | | |||
1525 | d->guidesConfig = data; | 1529 | d->guidesConfig = data; | ||
1526 | emit sigGuidesConfigChanged(d->guidesConfig); | 1530 | emit sigGuidesConfigChanged(d->guidesConfig); | ||
1527 | } | 1531 | } | ||
1528 | 1532 | | |||
1533 | const KisMirrorAxisConfig& KisDocument::mirrorAxisConfig() const | ||||
1534 | { | ||||
1535 | return d->mirrorAxisConfig; | ||||
1536 | } | ||||
1537 | | ||||
1538 | void KisDocument::setMirrorAxisConfig(const KisMirrorAxisConfig &config) | ||||
1539 | { | ||||
1540 | if (d->mirrorAxisConfig == config) { | ||||
1541 | return; | ||||
1542 | } | ||||
1543 | | ||||
1544 | d->mirrorAxisConfig = config; | ||||
1545 | setModified(true); | ||||
1546 | | ||||
1547 | emit sigMirrorAxisConfigChanged(); | ||||
1548 | } | ||||
1549 | | ||||
1529 | void KisDocument::resetURL() { | 1550 | void KisDocument::resetURL() { | ||
1530 | setUrl(QUrl()); | 1551 | setUrl(QUrl()); | ||
1531 | setLocalFilePath(QString()); | 1552 | setLocalFilePath(QString()); | ||
1532 | } | 1553 | } | ||
1533 | 1554 | | |||
1534 | KoDocumentInfoDlg *KisDocument::createDocumentInfoDialog(QWidget *parent, KoDocumentInfo *docInfo) const | 1555 | KoDocumentInfoDlg *KisDocument::createDocumentInfoDialog(QWidget *parent, KoDocumentInfo *docInfo) const | ||
1535 | { | 1556 | { | ||
1536 | return new KoDocumentInfoDlg(parent, docInfo); | 1557 | return new KoDocumentInfoDlg(parent, docInfo); | ||
▲ Show 20 Lines • Show All 331 Lines • Show Last 20 Lines |