Krita Source Code Documentation
Loading...
Searching...
No Matches
KisView Class Reference

#include <KisView.h>

+ Inheritance diagram for KisView:

Classes

class  StatusBarItem
 

Public Slots

bool queryClose ()
 
void slotClearStatusText ()
 
void slotGamutCheck (bool gamutCheck)
 slotGamutCheck set whether or not we're gamutchecking in this view. Will be setting the same in the vans belonging to the view.
 
void slotImageResolutionChanged ()
 
void slotImageSizeChanged (const QPointF &oldStillPoint, const QPointF &newStillPoint)
 
void slotLoadingFinished ()
 
void slotMigratedToScreen (QScreen *screen)
 
void slotSavingStatusMessage (const QString &text, int timeout, bool isAutoSaving=false)
 
void slotScreenOrResolutionChanged ()
 
void slotSoftProofing (bool softProofing)
 slotSoftProofing set whether or not we're softproofing in this view. Will be setting the same in the canvas belonging to the view.
 
void slotThemeChanged (QPalette pal)
 
void slotUpdateDocumentTitle ()
 

Signals

void sigColorSpaceChanged (const KoColorSpace *cs)
 
void sigProfileChanged (const KoColorProfile *profile)
 
void sigSizeChanged (const QPointF &oldStillPoint, const QPointF &newStillPoint)
 

Public Member Functions

void addStatusBarItem (QWidget *widget, int stretch=0, bool permanent=false)
 
KisCanvas2canvasBase () const
 
KisCanvasControllercanvasController () const
 
bool canvasIsMirrored () const
 
void closeView ()
 
QList< QAction * > createChangeUnitActions (bool addPixelUnit=false)
 create a list of actions that when activated will change the unit on the document.
 
KisLayerSP currentLayer () const
 
KisMaskSP currentMask () const
 
KisNodeSP currentNode () const
 
QScreen * currentScreen () const
 
KisDocumentdocument () const
 
bool gamutCheck ()
 gamutCheck
 
KisInputManagerglobalInputManager () const
 
KisImageWSP image () const
 
bool isCurrent () const
 
 KisView (KisDocument *document, KisViewManager *viewManager, QWidget *parent=0)
 
KisMainWindowmainWindow () const
 
void notifyCurrentStateChanged (bool isCurrent)
 
 Private (KisView *_q, KisDocument *document, KisViewManager *viewManager)
 
void removeStatusBarItem (QWidget *widget)
 
KisViewreplaceBy (KisDocument *document)
 
KisCanvasResourceProviderresourceProvider () const
 
void restoreViewState (const KisPropertiesConfiguration &config)
 
void saveViewState (KisPropertiesConfiguration &config) const
 
KisSelectionSP selection ()
 
void setCurrentNode (KisNodeSP node)
 
void setShowFloatingMessage (bool show)
 
void setSubWindow (QMdiSubWindow *subWindow)
 
void setViewManager (KisViewManager *view)
 
void showFloatingMessage (const QString &message, const QIcon &icon, int timeout=4500, KisFloatingMessage::Priority priority=KisFloatingMessage::Medium, int alignment=Qt::AlignCenter|Qt::TextWordWrap)
 
bool softProofing ()
 softProofing
 
QStatusBar * statusBar () const
 
void syncLastActiveNodeToDocument ()
 
KisCoordinatesConverterviewConverter () const
 
KisViewManagerviewManager () const
 
KisZoomManagerzoomManager () const
 
 ~KisView () override
 

Public Attributes

KisKActionCollectionactionCollection {nullptr}
 
KisSynchronizedConnection< KisNodeSP, KisNodeAdditionFlags > addNodeConnection
 
KisCanvas2 canvas
 
KisCanvasController canvasController
 
KisNodeSP currentNode
 
QPointer< KisDocumentdocument
 
KisSignalCompressor floatingMessageCompressor
 
bool gamutCheck {false}
 
bool inOperation {false}
 
bool isCurrent {false}
 
KisPaintingAssistantsDecorationSP paintingAssistantsDecoration
 
KisReferenceImagesDecorationSP referenceImagesDecoration
 
KisSynchronizedConnection< KisNodeSPremoveNodeConnection
 
QPointer< KisFloatingMessagesavedFloatingMessage
 
KisScreenMigrationTracker screenMigrationTracker
 
bool showFloatingMessage {true}
 
bool softProofing {false}
 
QMdiSubWindow * subWindow {nullptr}
 
QWidget * tempActiveWidget {nullptr}
 
KisCoordinatesConverter viewConverter
 
KisViewManagerviewManager {nullptr}
 
KisZoomManager zoomManager
 

Protected Member Functions

void closeEvent (QCloseEvent *event) override
 
void dragEnterEvent (QDragEnterEvent *event) override
 
void dragMoveEvent (QDragMoveEvent *event) override
 
void dropEvent (QDropEvent *event) override
 
QString newObjectName ()
 

Private Slots

void slotContinueAddNode (KisNodeSP newActiveNode, KisNodeAdditionFlags flags)
 
void slotContinueRemoveNode (KisNodeSP newActiveNode)
 
void slotImageNodeRemoved (KisNodeSP node)
 

Private Member Functions

bool shouldAcceptDrag (const QDropEvent *event) const
 
- Private Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Private Attributes

Private *const d
 
- Private Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Static Private Attributes

static bool s_firstView = true
 

Detailed Description

This class is used to display a KisDocument.

Multiple views can be attached to one document at a time.

Definition at line 102 of file KisView.cpp.

Constructor & Destructor Documentation

◆ KisView()

KisView::KisView ( KisDocument * document,
KisViewManager * viewManager,
QWidget * parent = 0 )

Creates a new view for the document.

Definition at line 202 of file KisView.cpp.

203 : QWidget(parent)
204 , d(new Private(this, document, viewManager))
205{
206 Q_ASSERT(document);
207 setObjectName(newObjectName());
208
209 d->document = document;
210
211 setFocusPolicy(Qt::StrongFocus);
212
213 QStatusBar * sb = statusBar();
214 if (sb) { // No statusbar in e.g. konqueror
215 connect(d->document, SIGNAL(statusBarMessage(QString,int)),
216 this, SLOT(slotSavingStatusMessage(QString,int)));
217 connect(d->document, SIGNAL(clearStatusBarMessage()),
218 this, SLOT(slotClearStatusText()));
219 }
220
221 d->canvas.setup();
222
223 KisConfig cfg(false);
224
225 d->canvasController.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
226 d->canvasController.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
227 d->canvasController.setCanvas(&d->canvas);
228
229 d->zoomManager.setup(d->actionCollection);
230
231 setAcceptDrops(true);
232
233 connect(d->document, SIGNAL(sigLoadingFinished()), this, SLOT(slotLoadingFinished()));
234
235 d->referenceImagesDecoration = new KisReferenceImagesDecoration(this, document, /* viewReady = */ false);
236 d->canvas.addDecoration(d->referenceImagesDecoration);
237 d->referenceImagesDecoration->setVisible(true);
238
239 d->paintingAssistantsDecoration = new KisPaintingAssistantsDecoration(this);
240 d->canvas.addDecoration(d->paintingAssistantsDecoration);
241 d->paintingAssistantsDecoration->setVisible(true);
242
243 d->showFloatingMessage = cfg.showCanvasMessages();
245
246 connect(document, SIGNAL(sigReadWriteChanged(bool)), this, SLOT(slotUpdateDocumentTitle()));
247 connect(document, SIGNAL(sigRecoveredChanged(bool)), this, SLOT(slotUpdateDocumentTitle()));
248 connect(document, SIGNAL(sigPathChanged(QString)), this, SLOT(slotUpdateDocumentTitle()));
250 SIGNAL(sigUpdateMemoryStatistics()),
252 connect(document, SIGNAL(modified(bool)), this, SLOT(setWindowModified(bool)));
254 setWindowModified(document->isModified());
255}
void addDecoration(KisCanvasDecorationSP deco)
The KisReferenceImagesDecoration class draws the reference images on the canvas. The document stores ...
QString newObjectName()
Definition KisView.cpp:93
void slotClearStatusText()
Definition KisView.cpp:1122
Private *const d
Definition KisView.h:264
void slotScreenOrResolutionChanged()
Definition KisView.cpp:1204
QStatusBar * statusBar() const
Definition KisView.cpp:1099
KisViewManager * viewManager
Definition KisView.cpp:129
void slotSavingStatusMessage(const QString &text, int timeout, bool isAutoSaving=false)
Definition KisView.cpp:1105
QPointer< KisDocument > document
Definition KisView.cpp:121
void slotLoadingFinished()
Definition KisView.cpp:1397
void slotUpdateDocumentTitle()
Definition KisView.cpp:1240
static KisMemoryStatisticsServer * instance()
KisCanvas2 * canvas

References KisCanvas2::addDecoration(), Private::canvas, d, document, KisMemoryStatisticsServer::instance(), newObjectName(), KisCanvas2::setup(), KisConfig::showCanvasMessages(), slotClearStatusText(), slotLoadingFinished(), slotSavingStatusMessage(), slotScreenOrResolutionChanged(), slotUpdateDocumentTitle(), and statusBar().

◆ ~KisView()

KisView::~KisView ( )
override

KisCanvas2 maintains direct connections to the image, so we should disconnect it from the image before the destruction process starts

Definition at line 257 of file KisView.cpp.

258{
259 if (d->viewManager) {
260 if (d->viewManager->filterManager()->isStrokeRunning()) {
261 d->viewManager->filterManager()->cancelDialog();
262 }
263
264 d->viewManager->mainWindow()->notifyChildViewDestroyed(this);
265 }
266
268
274
275 KoToolManager::instance()->removeCanvasController(&d->canvasController);
276 d->canvasController.setCanvas(0);
277
279 delete d;
280}
void disconnectImage()
void requestStrokeCancellation()
static KisPart * instance()
Definition KisPart.cpp:131
void removeView(KisView *view)
Definition KisPart.cpp:320
KisImageWSP image() const
Definition KisView.cpp:432
void removeCanvasController(KoCanvasController *controller)
static KoToolManager * instance()
Return the toolmanager singleton.

References Private::canvas, d, KisCanvas2::disconnectImage(), image(), KoToolManager::instance(), KisPart::instance(), KoToolManager::removeCanvasController(), KisPart::removeView(), and KisImage::requestStrokeCancellation().

Member Function Documentation

◆ addStatusBarItem()

void KisView::addStatusBarItem ( QWidget * widget,
int stretch = 0,
bool permanent = false )

This adds a widget to the statusbar for this view. If you use this method instead of using statusBar() directly, KisView will take care of removing the items when the view GUI is deactivated and readding them when it is reactivated. The parameters are the same as QStatusBar::addWidget().

◆ canvasBase()

KisCanvas2 * KisView::canvasBase ( ) const
Returns
the canvas object

Definition at line 427 of file KisView.cpp.

428{
429 return &d->canvas;
430}

References Private::canvas, and d.

◆ canvasController()

KisCanvasController * KisView::canvasController ( ) const

The CanvasController decorates the canvas with scrollbars and knows where to start painting on the canvas widget, i.e., the document offset.

◆ canvasIsMirrored()

bool KisView::canvasIsMirrored ( ) const

Definition at line 332 of file KisView.cpp.

333{
334 return d->canvas.xAxisMirrored() || d->canvas.yAxisMirrored();
335}
bool xAxisMirrored() const
Bools indicating canvasmirroring.
bool yAxisMirrored() const

References Private::canvas, d, KisCanvas2::xAxisMirrored(), and KisCanvas2::yAxisMirrored().

◆ closeEvent()

void KisView::closeEvent ( QCloseEvent * event)
overrideprotected

Definition at line 1136 of file KisView.cpp.

1137{
1138 // Check whether we're the last view
1139 int viewCount = KisPart::instance()->viewCount(document());
1140 if (viewCount > 1) {
1141 // there are others still, so don't bother the user
1142 event->accept();
1143 return;
1144 }
1145
1146 if (queryClose()) {
1147 event->accept();
1148 return;
1149 }
1150
1151 event->ignore();
1152
1153}
int viewCount(KisDocument *doc) const
Definition KisPart.cpp:356
bool queryClose()
Definition KisView.cpp:1155

References document, KisPart::instance(), queryClose(), and KisPart::viewCount().

◆ closeView()

void KisView::closeView ( )

Definition at line 1437 of file KisView.cpp.

1438{
1439 d->subWindow->close();
1440}

References d.

◆ createChangeUnitActions()

QList< QAction * > KisView::createChangeUnitActions ( bool addPixelUnit = false)

create a list of actions that when activated will change the unit on the document.

Definition at line 1130 of file KisView.cpp.

1131{
1132 UnitActionGroup* unitActions = new UnitActionGroup(d->document, addPixelUnit, this);
1133 return unitActions->actions();
1134}

References d.

◆ currentLayer()

KisLayerSP KisView::currentLayer ( ) const

Definition at line 1315 of file KisView.cpp.

1316{
1317 KisNodeSP node;
1318 KisMaskSP mask = currentMask();
1319 if (mask) {
1320 node = mask->parent();
1321 }
1322 else {
1323 node = d->currentNode;
1324 }
1325 return qobject_cast<KisLayer*>(node.data());
1326}
KisMaskSP currentMask() const
Definition KisView.cpp:1328
KisNodeWSP parent
Definition kis_node.cpp:86

References currentMask(), d, KisSharedPtr< T >::data(), and KisNode::parent.

◆ currentMask()

KisMaskSP KisView::currentMask ( ) const

Definition at line 1328 of file KisView.cpp.

1329{
1330 return dynamic_cast<KisMask*>(d->currentNode.data());
1331}

References d.

◆ currentNode()

KisNodeSP KisView::currentNode ( ) const

◆ currentScreen()

QScreen * KisView::currentScreen ( ) const

Returns the current screen that the view belongs to

Definition at line 1218 of file KisView.cpp.

1219{
1220 return d->screenMigrationTracker.currentScreen();
1221}

References d.

◆ document()

KisDocument * KisView::document ( ) const

Retrieves the document object of this view.

◆ dragEnterEvent()

void KisView::dragEnterEvent ( QDragEnterEvent * event)
overrideprotected

Definition at line 446 of file KisView.cpp.

447{
448 dbgUI << Q_FUNC_INFO
449 << "Formats: " << event->mimeData()->formats()
450 << "Urls: " << event->mimeData()->urls()
451 << "Has images: " << event->mimeData()->hasImage();
452
453 if (shouldAcceptDrag(event)) {
454 event->accept();
455 setFocus(); // activate view if it should accept the drop
456 } else {
457 event->ignore();
458 }
459}
bool shouldAcceptDrag(const QDropEvent *event) const
Definition KisView.cpp:1442
#define dbgUI
Definition kis_debug.h:52

References dbgUI, and shouldAcceptDrag().

◆ dragMoveEvent()

void KisView::dragMoveEvent ( QDragMoveEvent * event)
overrideprotected

Definition at line 1062 of file KisView.cpp.

1063{
1064 dbgUI << Q_FUNC_INFO
1065 << "Formats: " << event->mimeData()->formats()
1066 << "Urls: " << event->mimeData()->urls()
1067 << "Has images: " << event->mimeData()->hasImage();
1068
1069 if (shouldAcceptDrag(event)) {
1070 event->accept();
1071 } else {
1072 event->ignore();
1073 }
1074}

References dbgUI, and shouldAcceptDrag().

◆ dropEvent()

void KisView::dropEvent ( QDropEvent * event)
overrideprotected

Definition at line 461 of file KisView.cpp.

462{
463 dbgUI << Q_FUNC_INFO;
464 dbgUI << "\t Formats: " << event->mimeData()->formats();
465 dbgUI << "\t Urls: " << event->mimeData()->urls();
466 dbgUI << "\t Has images: " << event->mimeData()->hasImage();
467
468 if (!shouldAcceptDrag(event)) {
469 return;
470 }
471
472 KisImageWSP kisimage = image();
473 Q_ASSERT(kisimage);
474
475 QPoint imgCursorPos = canvasBase()->coordinatesConverter()->widgetToImage(event->pos()).toPoint();
476 QRect imageBounds = kisimage->bounds();
477 boost::optional<QPoint> forcedCenter;
478
479 if (event->keyboardModifiers() & Qt::ShiftModifier && imageBounds.contains(imgCursorPos)) {
480 forcedCenter = imgCursorPos;
481 }
482
483 if (event->mimeData()->hasFormat("application/x-krita-node-internal-pointer")) {
484 KisShapeController *kritaShapeController =
485 dynamic_cast<KisShapeController*>(d->document->shapeController());
486
487 bool copyNode = true;
488 QList<KisNodeSP> nodes;
489
490 if (forcedCenter) {
491 nodes = KisMimeData::loadNodesFastAndRecenter(*forcedCenter, event->mimeData(), kisimage, kritaShapeController, copyNode);
492 } else {
493 nodes = KisMimeData::loadNodesFast(event->mimeData(), kisimage, kritaShapeController, copyNode);
494 }
495
496 Q_FOREACH (KisNodeSP node, nodes) {
497 if (node) {
499 if (!viewManager()->nodeManager()->activeLayer()) {
500 adapter.addNode(node, kisimage->rootLayer() , 0);
501 } else {
502 adapter.addNode(node,
503 viewManager()->nodeManager()->activeLayer()->parent(),
504 viewManager()->nodeManager()->activeLayer());
505 }
506 }
507 }
508 } else if (event->mimeData()->hasImage() || event->mimeData()->hasUrls()) {
509 const auto *data = event->mimeData();
510
511 KisCanvasDrop dlgAction;
512
513 const auto callPos = QCursor::pos();
514
515 const KisCanvasDrop::Action action = dlgAction.dropAs(*data, callPos);
516
518 const QPair<bool, KisClipboard::PasteFormatBehaviour> source =
520
521 if (!source.first) {
522 dbgUI << "Paste event cancelled";
523 return;
524 }
525
527 const QList<QUrl> &urls = data->urls();
528 const auto url = std::find_if(
529 urls.constBegin(),
530 urls.constEnd(),
531 [&](const QUrl &url) {
532 if (source.second
533 == KisClipboard::PASTE_FORMAT_DOWNLOAD) {
534 return !url.isLocalFile();
535 } else if (source.second
537 return url.isLocalFile();
538 } else {
539 return false;
540 }
541 });
542
543 if (url != urls.constEnd()) {
544 QScopedPointer<QTemporaryFile> tmp(new QTemporaryFile());
545 tmp->setAutoRemove(true);
546
547 const QUrl localUrl = [&]() -> QUrl {
548 if (!url->isLocalFile()) {
549 // download the file and substitute the url
550 KisRemoteFileFetcher fetcher;
551 tmp->setFileName(url->fileName());
552
553 if (!fetcher.fetchFile(*url, tmp.data())) {
554 warnUI << "Fetching" << *url << "failed";
555 return {};
556 }
557 return QUrl::fromLocalFile(tmp->fileName());
558 }
559 return *url;
560 }();
561
562 if (localUrl.isLocalFile()) {
563 this->mainWindow()
564 ->viewManager()
565 ->imageManager()
566 ->importImage(localUrl);
567 this->activateWindow();
568 return;
569 }
570 }
571 }
572
573 KisPaintDeviceSP clip =
575 QRect(),
576 true,
577 -1,
578 false,
579 source);
580 if (clip) {
581 const auto pos = this->viewConverter()
582 ->imageToDocument(imgCursorPos)
583 .toPoint();
584
585 clip->moveTo(pos.x(), pos.y());
586
588 this->image());
589
590 KisPaintLayerSP layer = new KisPaintLayer(
591 this->image(),
592 this->image()->nextLayerName() + " " + i18n("(pasted)"),
594 clip);
596 this->mainWindow()->viewManager());
597 adapter.addNode(
598 layer,
599 this->mainWindow()->viewManager()->activeNode()->parent(),
600 this->mainWindow()->viewManager()->activeNode());
601 this->activateWindow();
602 return;
603 }
604 } else if (action == KisCanvasDrop::INSERT_AS_REFERENCE_IMAGE) {
605 KisPaintDeviceSP clip =
606 KisClipboard::instance()->clipFromMimeData(data, QRect(), true);
607 if (clip) {
609 this->image());
610
611 auto *reference =
613 *this->viewConverter(),
614 this);
615
616 if (reference) {
617 if (data->hasUrls()) {
618 const auto &urls = data->urls();
619 const auto url = std::find_if(urls.constBegin(), urls.constEnd(), std::mem_fn(&QUrl::isLocalFile));
620 if (url != urls.constEnd()) {
621 reference->setFilename((*url).toLocalFile());
622 }
623 }
624 const auto pos = this->canvasBase()
626 ->widgetToImage(event->pos());
627 reference->setPosition(
628 (*this->viewConverter()).imageToDocument(pos));
629 this->canvasBase()
631 ->addReferenceImage(reference);
633 "ToolReferenceImages");
634 return;
635 }
636 }
637 } else if (action != KisCanvasDrop::NONE) {
638 // multiple URLs detected OR about to open a document
639
640 for (QUrl url : data->urls()) { // do copy it
641 QScopedPointer<QTemporaryFile> tmp(new QTemporaryFile());
642 tmp->setAutoRemove(true);
643
644 if (!url.isLocalFile()) {
645 // download the file and substitute the url
646 KisRemoteFileFetcher fetcher;
647 tmp->setFileName(url.fileName());
648
649 if (!fetcher.fetchFile(url, tmp.data())) {
650 qWarning() << "Fetching" << url << "failed";
651 continue;
652 }
653 url = QUrl::fromLocalFile(tmp->fileName());
654 }
655
656 if (url.isLocalFile()) {
657 if (action == KisCanvasDrop::INSERT_MANY_LAYERS) {
658 this->mainWindow()
659 ->viewManager()
660 ->imageManager()
661 ->importImage(url);
662 this->activateWindow();
663 } else if (action == KisCanvasDrop::INSERT_MANY_FILE_LAYERS
664 || action
667 this->mainWindow()->viewManager());
668 QFileInfo fileInfo(url.toLocalFile());
669
670 QString type =
672 QStringList mimes =
675
676 if (!mimes.contains(type)) {
677 QString msg =
680 .errorMessage();
681 QMessageBox::warning(
682 this,
683 i18nc("@title:window", "Krita"),
684 i18n("Could not open %2.\nReason: %1.",
685 msg,
686 url.toDisplayString()));
687 continue;
688 }
689
690 KisFileLayer *fileLayer =
691 new KisFileLayer(this->image(),
692 "",
693 url.toLocalFile(),
695 "Bicubic",
696 fileInfo.fileName(),
698
699 KisLayerSP above =
700 this->mainWindow()->viewManager()->activeLayer();
701 KisNodeSP parent = above ? above->parent()
702 : this->mainWindow()
703 ->viewManager()
704 ->image()
705 ->root();
706
707 adapter.addNode(fileLayer, parent, above);
708 } else if (action == KisCanvasDrop::OPEN_IN_NEW_DOCUMENT
709 || action
711 if (this->mainWindow()) {
712 this->mainWindow()->openDocument(
713 url.toLocalFile(),
715 }
716 } else if (action
718 || action
719 == KisCanvasDrop::
720 INSERT_AS_REFERENCE_IMAGE) {
721 auto *reference =
722 KisReferenceImage::fromFile(url.toLocalFile(),
723 *this->viewConverter(),
724 this);
725
726 if (reference) {
727 const auto pos = this->canvasBase()
729 ->widgetToImage(event->pos());
730 reference->setPosition(
731 (*this->viewConverter()).imageToDocument(pos));
732 this->canvasBase()
734 ->addReferenceImage(reference);
735
737 "ToolReferenceImages");
738 }
739 }
740 }
741 }
742 }
743 } else if (event->mimeData()->hasColor() || event->mimeData()->hasFormat("krita/x-colorsetentry")) {
744 if (!image()) {
745 return;
746 }
747
748 // Cannot fill on non-painting layers (vector layer, clone layer, file layer, group layer)
749 if (d->viewManager->activeNode().isNull() ||
750 d->viewManager->activeNode()->inherits("KisShapeLayer") ||
751 d->viewManager->activeNode()->inherits("KisCloneLayer") ||
752 !d->viewManager->activeDevice()) {
753 showFloatingMessage(i18n("You cannot drag and drop colors on the selected layer type."), QIcon());
754 return;
755 }
756
757 // Cannot fill if the layer is not editable
758 if (!d->viewManager->activeNode()->isEditable()) {
759 QString message;
760 if (!d->viewManager->activeNode()->visible() && d->viewManager->activeNode()->userLocked()) {
761 message = i18n("Layer is locked and invisible.");
762 } else if (d->viewManager->activeNode()->userLocked()) {
763 message = i18n("Layer is locked.");
764 } else if(!d->viewManager->activeNode()->visible()) {
765 message = i18n("Layer is invisible.");
766 }
767 showFloatingMessage(message, KisIconUtils::loadIcon("object-locked"));
768 return;
769 }
770
771 // The cursor is outside the image
772 if (!image()->wrapAroundModePermitted() && !image()->bounds().contains(imgCursorPos)) {
773 return;
774 }
775
778 kundo2_i18n("Flood Fill Layer"), false, image().data()
779 );
780 strategy->setSupportsWrapAroundMode(true);
781 KisStrokeId fillStrokeId = image()->startStroke(strategy);
782 KIS_SAFE_ASSERT_RECOVER_RETURN(fillStrokeId);
783
784 QSharedPointer<QRect> dirtyRect = QSharedPointer<QRect>(new QRect);
785
786 KisResourcesSnapshotSP resources =
787 new KisResourcesSnapshot(image(), d->viewManager->activeNode(), d->viewManager->canvasResourceProvider()->resourceManager());
788
789 if (event->mimeData()->hasColor()) {
790 resources->setFGColorOverride(KoColor(event->mimeData()->colorData().value<QColor>(), image()->colorSpace()));
791 } else {
792 QByteArray byteData = event->mimeData()->data("krita/x-colorsetentry");
794 resources->setFGColorOverride(s.color());
795 }
796
797 // Use same options as the fill tool
798 KConfigGroup configGroup = KSharedConfig::openConfig()->group("KritaFill/KisToolFill");
799 QString fillMode = configGroup.readEntry<QString>("whatToFill", "");
800 if (fillMode.isEmpty()) {
801 if (configGroup.readEntry<bool>("fillSelection", false)) {
802 fillMode = "fillSelection";
803 } else {
804 fillMode = "fillContiguousRegion";
805 }
806 }
807 const bool useCustomBlendingOptions = configGroup.readEntry<bool>("useCustomBlendingOptions", false);
808 const qreal customOpacity =
809 qBound(0, configGroup.readEntry<int>("customOpacity", 100), 100) / 100.0;
810 QString customCompositeOp = configGroup.readEntry<QString>("customCompositeOp", COMPOSITE_OVER);
811 if (KoCompositeOpRegistry::instance().getKoID(customCompositeOp).id().isNull()) {
812 customCompositeOp = COMPOSITE_OVER;
813 }
814
815 if (event->keyboardModifiers() == Qt::ShiftModifier) {
816 if (fillMode == "fillSimilarRegions") {
817 fillMode = "fillSelection";
818 } else {
819 fillMode = "fillSimilarRegions";
820 }
821 } else if (event->keyboardModifiers() == Qt::AltModifier) {
822 if (fillMode == "fillContiguousRegion") {
823 fillMode = "fillSelection";
824 } else {
825 fillMode = "fillContiguousRegion";
826 }
827 }
828
829 if (fillMode == "fillSelection") {
830 FillProcessingVisitor *visitor = new FillProcessingVisitor(nullptr,
831 selection(),
832 resources);
833 visitor->setSeedPoint(imgCursorPos);
834 visitor->setSelectionOnly(true);
835 visitor->setUseCustomBlendingOptions(useCustomBlendingOptions);
836 if (useCustomBlendingOptions) {
837 visitor->setCustomOpacity(customOpacity);
838 visitor->setCustomCompositeOp(customCompositeOp);
839 }
840 visitor->setOutDirtyRect(dirtyRect);
841
842 image()->addJob(
843 fillStrokeId,
845 KUndo2CommandSP(new KisProcessingCommand(visitor, d->viewManager->activeNode())),
846 false,
849 )
850 );
851 } else {
852 const int threshold = configGroup.readEntry("thresholdAmount", 8);
853 const int opacitySpread = configGroup.readEntry("opacitySpread", 100);
854 const bool antiAlias = configGroup.readEntry("antiAlias", true);
855 const int grow = configGroup.readEntry("growSelection", 0);
856 const bool stopGrowingAtDarkestPixel = configGroup.readEntry<bool>("stopGrowingAtDarkestPixel", false);
857 const int feather = configGroup.readEntry("featherAmount", 0);
858 const int closeGap = configGroup.readEntry("closeGapAmount", 0);
859 QString sampleLayersMode = configGroup.readEntry("sampleLayersMode", "");
860 if (sampleLayersMode.isEmpty()) {
861 if (configGroup.readEntry("sampleMerged", false)) {
862 sampleLayersMode = "allLayers";
863 } else {
864 sampleLayersMode = "currentLayer";
865 }
866 }
867 QList<int> colorLabels;
868 {
869 const QStringList colorLabelsStr = configGroup.readEntry<QString>("colorLabels", "").split(',', Qt::SkipEmptyParts);
870
871 for (const QString &colorLabelStr : colorLabelsStr) {
872 bool ok;
873 const int colorLabel = colorLabelStr.toInt(&ok);
874 if (ok) {
875 colorLabels << colorLabel;
876 }
877 }
878 }
879
880 KisPaintDeviceSP referencePaintDevice = nullptr;
881 if (sampleLayersMode == "allLayers") {
882 referencePaintDevice = image()->projection();
883 } else if (sampleLayersMode == "currentLayer") {
884 referencePaintDevice = d->viewManager->activeNode()->paintDevice();
885 } else if (sampleLayersMode == "colorLabeledLayers") {
886 referencePaintDevice = KisMergeLabeledLayersCommand::createRefPaintDevice(image(), "Fill Tool Reference Result Paint Device");
887 image()->addJob(
888 fillStrokeId,
891 referencePaintDevice,
892 colorLabels,
894 false,
897 )
898 );
899 }
900
901 QSharedPointer<KoColor> referenceColor(new KoColor);
902 if (sampleLayersMode == "colorLabeledLayers") {
903 // We need to obtain the reference color from the reference paint
904 // device, but it is produced in a stroke, so we must get the color
905 // after the device is ready. So we get it in the stroke
906 image()->addJob(
907 fillStrokeId,
910 [referenceColor, referencePaintDevice, imgCursorPos]() -> KUndo2Command*
911 {
912 *referenceColor = referencePaintDevice->pixel(imgCursorPos);
913 return 0;
914 }
915 )),
916 false,
919 )
920 );
921 } else {
922 // Here the reference device is already ready, so we obtain the
923 // reference color directly
924 *referenceColor = referencePaintDevice->pixel(imgCursorPos);
925 }
926
927 if (fillMode == "fillContiguousRegion") {
928 const KisFillPainter::RegionFillingMode regionFillingMode =
929 configGroup.readEntry("contiguousFillMode", "") == "boundaryFill"
932 KoColor regionFillingBoundaryColor;
933 if (regionFillingMode == KisFillPainter::RegionFillingMode_BoundaryFill) {
934 const QString xmlColor = configGroup.readEntry("contiguousFillBoundaryColor", QString());
935 QDomDocument doc;
936 if (doc.setContent(xmlColor)) {
937 QDomElement e = doc.documentElement().firstChild().toElement();
938 QString channelDepthID = doc.documentElement().attribute("channeldepth", Integer16BitsColorDepthID.id());
939 bool ok;
940 if (e.hasAttribute("space") || e.tagName().toLower() == "srgb") {
941 regionFillingBoundaryColor = KoColor::fromXML(e, channelDepthID, &ok);
942 } else if (doc.documentElement().hasAttribute("space") || doc.documentElement().tagName().toLower() == "srgb"){
943 regionFillingBoundaryColor = KoColor::fromXML(doc.documentElement(), channelDepthID, &ok);
944 }
945 }
946 }
947 const bool useSelectionAsBoundary = configGroup.readEntry("useSelectionAsBoundary", false);
948 const bool blendingOptionsAreNoOp = useCustomBlendingOptions
949 ? (qFuzzyCompare(customOpacity, OPACITY_OPAQUE_F) &&
950 customCompositeOp == COMPOSITE_OVER)
951 : (qFuzzyCompare(resources->opacity(), OPACITY_OPAQUE_F) &&
952 resources->compositeOpId() == COMPOSITE_OVER);
953 const bool useFastMode = !resources->activeSelection() &&
954 blendingOptionsAreNoOp &&
955 opacitySpread == 100 &&
956 useSelectionAsBoundary == false &&
957 !antiAlias && grow == 0 && feather == 0 &&
958 closeGap == 0 &&
959 sampleLayersMode == "currentLayer";
960
961 FillProcessingVisitor *visitor = new FillProcessingVisitor(referencePaintDevice,
962 selection(),
963 resources);
964 visitor->setSeedPoint(imgCursorPos);
965 visitor->setUseFastMode(useFastMode);
966 visitor->setUseSelectionAsBoundary(useSelectionAsBoundary);
967 visitor->setFeather(feather);
968 visitor->setSizeMod(grow);
969 visitor->setStopGrowingAtDarkestPixel(stopGrowingAtDarkestPixel);
970 visitor->setRegionFillingMode(regionFillingMode);
971 if (regionFillingMode == KisFillPainter::RegionFillingMode_BoundaryFill) {
972 visitor->setRegionFillingBoundaryColor(regionFillingBoundaryColor);
973 }
974 visitor->setFillThreshold(threshold);
975 visitor->setOpacitySpread(opacitySpread);
976 visitor->setCloseGap(closeGap);
977 visitor->setAntiAlias(antiAlias);
978 visitor->setUseCustomBlendingOptions(useCustomBlendingOptions);
979 if (useCustomBlendingOptions) {
980 visitor->setCustomOpacity(customOpacity);
981 visitor->setCustomCompositeOp(customCompositeOp);
982 }
983 visitor->setOutDirtyRect(dirtyRect);
984
985 image()->addJob(
986 fillStrokeId,
988 KUndo2CommandSP(new KisProcessingCommand(visitor, d->viewManager->activeNode())),
989 false,
992 )
993 );
994 } else {
995 KisSelectionSP fillMask = new KisSelection;
998
999 {
1001 KisFillPainter painter;
1002 QRect bounds = image()->bounds();
1003 if (selection) {
1004 bounds = bounds.intersected(selection->projection()->selectedRect());
1005 }
1006
1007 painter.setFillThreshold(threshold);
1008 painter.setOpacitySpread(opacitySpread);
1009 painter.setAntiAlias(antiAlias);
1010 painter.setSizemod(grow);
1011 painter.setStopGrowingAtDarkestPixel(stopGrowingAtDarkestPixel);
1012 painter.setFeather(feather);
1013
1016 fillMask->pixelSelection(), referenceColor, referencePaintDevice,
1017 bounds, selection ? selection->projection() : nullptr, progressHelper
1018 );
1019
1020 for (KisStrokeJobData *job : jobs) {
1021 image()->addJob(fillStrokeId, job);
1022 }
1023 }
1024
1025 {
1026 FillProcessingVisitor *visitor = new FillProcessingVisitor(nullptr,
1027 fillMask,
1028 resources);
1029
1030 visitor->setSeedPoint(imgCursorPos);
1031 visitor->setSelectionOnly(true);
1032 visitor->setProgressHelper(progressHelper);
1033 visitor->setOutDirtyRect(dirtyRect);
1034
1035 image()->addJob(
1036 fillStrokeId,
1039 false,
1042 )
1043 );
1044 }
1045 }
1046 }
1047
1048 image()->addJob(
1049 fillStrokeId,
1051 KUndo2CommandSP(new KisUpdateCommand(d->viewManager->activeNode(), dirtyRect, image().data())),
1052 false,
1055 )
1056 );
1057
1058 image()->endStroke(fillStrokeId);
1059 }
1060}
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
const qreal OPACITY_OPAQUE_F
const quint8 OPACITY_OPAQUE_U8
const QString COMPOSITE_OVER
void setOutDirtyRect(QSharedPointer< QRect > outDirtyRect)
void setStopGrowingAtDarkestPixel(bool stopGrowingAtDarkestPixel)
void setUseFastMode(bool useFastMode)
void setUseCustomBlendingOptions(bool useCustomBlendingOptions)
void setSeedPoint(const QPoint &seedPoint)
void setCustomCompositeOp(const QString &customCompositeOp)
void setProgressHelper(QSharedPointer< ProgressHelper > progressHelper)
void setOpacitySpread(int opacitySpread)
void setAntiAlias(bool antiAlias)
void setSelectionOnly(bool selectionOnly)
void setFillThreshold(int fillThreshold)
void setRegionFillingBoundaryColor(const KoColor &regionFillingBoundaryColor)
void setCustomOpacity(qreal customOpacity)
void setRegionFillingMode(KisFillPainter::RegionFillingMode regionFillingMode)
void setUseSelectionAsBoundary(bool useSelectionAsBoundary)
KisReferenceImagesDecorationSP referenceImagesDecoration() const
KisCoordinatesConverter * coordinatesConverter
Action dropAs(const QMimeData &data, QPoint pos)
static KisClipboard * instance()
QPair< bool, PasteFormatBehaviour > askUserForSource(const QMimeData *data, bool useClipboardFallback=false) const
KisPaintDeviceSP clipFromMimeData(const QMimeData *data, const QRect &imageBounds, bool showPopup, int overridePasteBehaviour=-1, KisTimeSpan *clipRange=nullptr, bool useClipboardFallback=false) const
KisPaintDeviceSP clipFromBoardContents(const QMimeData *data, const QRect &imageBounds, bool showPopup, int overridePasteBehaviour=-1, bool useClipboardFallback=false, QPair< bool, PasteFormatBehaviour > source={ false, PasteFormatBehaviour::PASTE_FORMAT_ASK}) const
_Private::Traits< T >::Result widgetToImage(const T &obj) const
_Private::Traits< T >::Result imageToDocument(const T &obj) const
The KisFileLayer class loads a particular file as a layer into the layer stack.
void setSizemod(int sizemod)
void setFillThreshold(int threshold)
void setFeather(int feather)
QVector< KisStrokeJobData * > createSimilarColorsSelectionJobs(KisPixelSelectionSP outSelection, const QSharedPointer< KoColor > referenceColor, KisPaintDeviceSP referenceDevice, const QRect &rect, KisPixelSelectionSP mask, QSharedPointer< KisProcessingVisitor::ProgressHelper > progressHelper=nullptr)
void setAntiAlias(bool antiAlias)
void setStopGrowingAtDarkestPixel(bool stopGrowingAtDarkestPixel)
void setOpacitySpread(int opacitySpread)
qint32 importImage(const QUrl &url, const QString &layerType="KisPaintLayer")
KisGroupLayerSP rootLayer() const
KisPaintDeviceSP projection() const
void addJob(KisStrokeId id, KisStrokeJobData *data) override
KisStrokeId startStroke(KisStrokeStrategy *strokeStrategy) override
QRect bounds() const override
void endStroke(KisStrokeId id) override
static void adaptClipToImageColorSpace(KisPaintDeviceSP dev, KisImageSP image)
static QStringList supportedMimeTypes(Direction direction)
bool openDocument(const QString &path, OpenFlags flags)
KisViewManager * viewManager
static KisPaintDeviceSP createRefPaintDevice(KisImageSP originalImage, QString name="Merge Labeled Layers Reference Paint Device")
@ GroupSelectionPolicy_SelectIfColorLabeled
Groups will be taken into account only if they have set an explicit color label. This ignores groups ...
static KisNodeList loadNodesFastAndRecenter(const QPoint &preferredCenter, const QMimeData *data, KisImageSP image, KisShapeController *shapeController, bool &copyNode)
static KisNodeList loadNodesFast(const QMimeData *data, KisImageSP image, KisShapeController *shapeController, bool &copyNode)
static QString mimeTypeForFile(const QString &file, bool checkExistingFiles=true)
Find the mimetype for the given filename. The filename must include a suffix.
bool pixel(qint32 x, qint32 y, QColor *c) const
void moveTo(qint32 x, qint32 y)
static KisReferenceImage * fromFile(const QString &filename, const KisCoordinatesConverter &converter, QWidget *parent)
static KisReferenceImage * fromPaintDevice(KisPaintDeviceSP src, const KisCoordinatesConverter &converter, QWidget *parent)
void addReferenceImage(KisReferenceImage *referenceImage)
The KisRemoteFileFetcher class can fetch a remote file and blocks until the file is downloaded.
bool fetchFile(const QUrl &remote, QIODevice *io)
fetch the image. Shows a progress dialog
The KisResourcesSnapshot class takes a snapshot of the various resources like colors and settings use...
void setFGColorOverride(const KoColor &color)
KisSelectionSP activeSelection() const
KoColor color() const
Definition KisSwatch.h:30
static KisSwatch fromByteArray(QByteArray &data, QString &groupName, int &originalRow, int &originalColumn)
Definition KisSwatch.cpp:57
KisImageManager * imageManager()
KisLayerSP activeLayer()
Convenience method to get at the active layer.
KisImageWSP image() const
Return the image this view is displaying.
KisCanvas2 * canvasBase() const
Definition KisView.cpp:427
KisMainWindow * mainWindow() const
Definition KisView.cpp:1089
bool showFloatingMessage
Definition KisView.cpp:134
KisCoordinatesConverter viewConverter
Definition KisView.cpp:125
KisNodeSP currentNode
Definition KisView.cpp:130
KisSelectionSP selection()
Definition KisView.cpp:1333
static KoColor fromXML(const QDomElement &elt, const QString &channelDepthId)
Definition KoColor.cpp:350
static const KoCompositeOpRegistry & instance()
KoID getKoID(const QString &compositeOpID) const
QString id() const
Definition KoID.cpp:63
void switchToolRequested(const QString &id)
static bool qFuzzyCompare(half p1, half p2)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
#define bounds(x, a, b)
#define warnUI
Definition kis_debug.h:94
QSharedPointer< KUndo2Command > KUndo2CommandSP
Definition kis_types.h:262
KUndo2MagicString kundo2_i18n(const char *text)
QList< KoSubpath * > split(const KoPathShape &path)
ChildIterator< value_type, is_const > parent(const ChildIterator< value_type, is_const > &it)
Definition KisForest.h:327
QIcon loadIcon(const QString &name)
The LambdaCommand struct is a shorthand for creation of AggregateCommand commands using C++ lambda fe...
KisPixelSelectionSP projection() const
KisPixelSelectionSP pixelSelection

References KisViewManager::activeLayer(), KisImportCatcher::adaptClipToImageColorSpace(), KisNodeCommandsAdapter::addNode(), KisReferenceImagesDecoration::addReferenceImage(), KisClipboard::askUserForSource(), KisImage::bounds(), canvasBase(), KisClipboard::clipFromBoardContents(), KisClipboard::clipFromMimeData(), KisCanvas2::coordinatesConverter, d, dbgUI, KisCanvasDrop::dropAs(), KisImportExportErrorCode::errorMessage(), KisRemoteFileFetcher::fetchFile(), ImportExportCodes::FileFormatNotSupported, KisReferenceImage::fromFile(), KisReferenceImage::fromPaintDevice(), image(), KisViewManager::image(), KisViewManager::imageManager(), KisCoordinatesConverter::imageToDocument(), KisImportExportManager::Import, KisImageManager::importImage(), KisCanvasDrop::INSERT_AS_NEW_FILE_LAYER, KisCanvasDrop::INSERT_AS_NEW_LAYER, KisCanvasDrop::INSERT_AS_REFERENCE_IMAGE, KisCanvasDrop::INSERT_AS_REFERENCE_IMAGES, KisCanvasDrop::INSERT_MANY_FILE_LAYERS, KisCanvasDrop::INSERT_MANY_LAYERS, KoToolManager::instance(), KisClipboard::instance(), KisMimeData::loadNodesFast(), KisMimeData::loadNodesFastAndRecenter(), mainWindow(), KisMimeDatabase::mimeTypeForFile(), KisPaintDevice::moveTo(), KisFileLayer::None, KisMainWindow::None, KisCanvasDrop::NONE, OPACITY_OPAQUE_U8, KisCanvasDrop::OPEN_IN_NEW_DOCUMENT, KisCanvasDrop::OPEN_MANY_DOCUMENTS, KisMainWindow::openDocument(), KisNode::parent, KisClipboard::PASTE_FORMAT_CLIP, KisClipboard::PASTE_FORMAT_LOCAL, KisCanvas2::referenceImagesDecoration(), KisNodeFacade::root, KisImage::rootLayer(), shouldAcceptDrag(), source(), KisImportExportManager::supportedMimeTypes(), KoToolManager::switchToolRequested(), viewConverter, KisMainWindow::viewManager, viewManager, warnUI, and KisCoordinatesConverter::widgetToImage().

◆ gamutCheck()

bool KisView::gamutCheck ( )

gamutCheck

Returns
whether or not we're using gamut warnings in this view.

◆ globalInputManager()

KisInputManager * KisView::globalInputManager ( ) const

Filters events and sends them to canvas actions. Shared among all the views/canvases

NOTE: May be null while initialization!

Definition at line 422 of file KisView.cpp.

423{
424 return d->viewManager ? d->viewManager->inputManager() : 0;
425}

References d.

◆ image()

KisImageWSP KisView::image ( ) const
Returns
the image this view is displaying

Definition at line 432 of file KisView.cpp.

433{
434 if (d->document) {
435 return d->document->image();
436 }
437 return 0;
438}

References d.

◆ isCurrent()

bool KisView::isCurrent ( ) const

◆ mainWindow()

KisMainWindow * KisView::mainWindow ( ) const
Returns
the KisMainWindow in which this view is currently.

Definition at line 1089 of file KisView.cpp.

1090{
1091 return d->viewManager->mainWindow();
1092}

References d.

◆ newObjectName()

QString KisView::newObjectName ( )
protected

Generate a name for this view.

Definition at line 93 of file KisView.cpp.

94{
95 static int s_viewIFNumber = 0;
96 QString name; name.setNum(s_viewIFNumber++); name.prepend("view_");
97 return name;
98}
const char * name(StandardAction id)

◆ notifyCurrentStateChanged()

void KisView::notifyCurrentStateChanged ( bool isCurrent)

When current view is changed, currently selected node is also changed, therefore we should update selection overlay mask

Definition at line 282 of file KisView.cpp.

283{
284 d->isCurrent = isCurrent;
285
286 if (!d->isCurrent && d->savedFloatingMessage) {
287 d->savedFloatingMessage->removeMessage();
288 }
289
290 KisInputManager *inputManager = globalInputManager();
291 if (d->isCurrent) {
292 inputManager->attachPriorityEventFilter(&d->canvasController);
293 } else {
294 inputManager->detachPriorityEventFilter(&d->canvasController);
295 }
296
302}
Central object to manage canvas input.
void detachPriorityEventFilter(QObject *filter)
detachPriorityEventFilter
void attachPriorityEventFilter(QObject *filter, int priority=0)
attachPriorityEventFilter
KisSelectionManager * selectionManager()
KisInputManager * globalInputManager() const
Definition KisView.cpp:422
bool isCurrent
Definition KisView.cpp:133

References KisInputManager::attachPriorityEventFilter(), d, KisInputManager::detachPriorityEventFilter(), globalInputManager(), isCurrent, KisSelectionManager::selectionChanged(), KisViewManager::selectionManager(), and viewManager.

◆ Private()

KisView::Private ( KisView * _q,
KisDocument * document,
KisViewManager * viewManager )
inline

Definition at line 105 of file KisView.cpp.

109 , viewConverter()
111 , canvas(&viewConverter, viewManager->canvasResourceProvider()->resourceManager(), viewManager->mainWindow(), _q, document->shapeController())
112 , zoomManager(_q, &this->viewConverter, &this->canvasController)
113 , viewManager(viewManager)
116 {
117 }
KoCanvasResourceProvider * resourceManager()
KisMainWindow * mainWindow() const
virtual KisKActionCollection * actionCollection() const
KisCanvasResourceProvider * canvasResourceProvider()
KisKActionCollection * actionCollection
Definition KisView.cpp:124
KisCanvasController canvasController
Definition KisView.cpp:126
KisScreenMigrationTracker screenMigrationTracker
Definition KisView.cpp:145
KisSignalCompressor floatingMessageCompressor
Definition KisView.cpp:136
KisZoomManager zoomManager
Definition KisView.cpp:128
KisCanvas2 canvas
Definition KisView.cpp:127

◆ queryClose

bool KisView::queryClose ( )
slot

Definition at line 1155 of file KisView.cpp.

1156{
1157 if (!document())
1158 return true;
1159
1160 document()->waitForSavingToComplete();
1161
1162 if (document()->isModified()) {
1163 QString name;
1164 name = QFileInfo(document()->path()).fileName();
1165
1166 if (name.isEmpty())
1167 name = i18n("Untitled");
1168
1169 int res = QMessageBox::warning(this,
1170 i18nc("@title:window", "Krita"),
1171 i18n("<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>", name),
1172 QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes);
1173
1174 switch (res) {
1175 case QMessageBox::Yes : {
1176 bool isNative = (document()->mimeType() == document()->nativeFormatMimeType());
1177 if (!viewManager()->mainWindow()->saveDocument(document(), !isNative, false))
1178 return false;
1179 break;
1180 }
1181 case QMessageBox::No : {
1182 KisImageSP image = document()->image();
1185
1186 document()->removeAutoSaveFiles(document()->localFilePath(), document()->isRecovered());
1187 document()->setModified(false); // Now when queryClose() is called by closeEvent it won't do anything.
1188 break;
1189 }
1190 default : // case QMessageBox::Cancel :
1191 return false;
1192 }
1193 }
1194
1195 return true;
1196
1197}
bool saveDocument(KisDocument *document, bool saveas, bool isExporting, bool isAdvancedExporting=false)
void blockUntilOperationsFinishedForced(KisImageSP image)
blockUntilOperationsFinished blocks the GUI of the application until execution of actions on image is...

References KisViewManager::blockUntilOperationsFinishedForced(), document, image(), KisViewManager::mainWindow(), KisImage::requestStrokeCancellation(), KisMainWindow::saveDocument(), and viewManager.

◆ removeStatusBarItem()

void KisView::removeStatusBarItem ( QWidget * widget)

Remove a widget from the statusbar for this view.

◆ replaceBy()

KisView * KisView::replaceBy ( KisDocument * document)

Deletes the view and creates a new one, displaying document, in the same sub-window.

Returns
the new view

Definition at line 1081 of file KisView.cpp.

1082{
1083 KisMainWindow *window = mainWindow();
1084 QMdiSubWindow *subWindow = d->subWindow;
1085 delete this;
1086 return window->newView(document, subWindow);
1087}
Main window for Krita.
KisView * newView(QObject *document, QMdiSubWindow *subWindow=0)
QMdiSubWindow * subWindow
Definition KisView.cpp:137

References d, mainWindow(), KisMainWindow::newView(), and subWindow.

◆ resourceProvider()

KisCanvasResourceProvider * KisView::resourceProvider ( ) const

Definition at line 414 of file KisView.cpp.

415{
416 if (d->viewManager) {
417 return d->viewManager->canvasResourceProvider();
418 }
419 return 0;
420}

References d.

◆ restoreViewState()

void KisView::restoreViewState ( const KisPropertiesConfiguration & config)

Definition at line 1289 of file KisView.cpp.

1290{
1291 if (d->subWindow) {
1292 QByteArray geometry = QByteArray::fromBase64(config.getString("geometry", "").toLatin1());
1293 d->subWindow->restoreGeometry(QByteArray::fromBase64(geometry));
1294 }
1295
1296 qreal zoom = config.getFloat("zoom", 1.0f);
1297 int zoomMode = config.getInt("zoomMode", (int)KoZoomMode::ZOOM_PAGE);
1298 d->canvasController.setZoom((KoZoomMode::Mode)zoomMode, zoom);
1299 d->canvasController.restoreCanvasState(config);
1300}
@ ZOOM_PAGE
zoom page
Definition KoZoomMode.h:25
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
QString getString(const QString &name, const QString &def=QString()) const
int getInt(const QString &name, int def=0) const
float getFloat(const QString &name, float def=0.0) const

References d, KisPropertiesConfiguration::getFloat(), KisPropertiesConfiguration::getInt(), KisPropertiesConfiguration::getString(), and KoZoomMode::ZOOM_PAGE.

◆ saveViewState()

void KisView::saveViewState ( KisPropertiesConfiguration & config) const

Definition at line 1272 of file KisView.cpp.

1273{
1274 config.setProperty("file", d->document->path());
1275 config.setProperty("window", mainWindow()->windowStateConfig().name());
1276
1277 if (d->subWindow) {
1278 config.setProperty("geometry", d->subWindow->saveGeometry().toBase64());
1279 }
1280
1281 const KoZoomState zoomState = d->canvasController.zoomState();
1282
1283 config.setProperty("zoomMode", zoomState.mode);
1284 config.setProperty("zoom", zoomState.zoom);
1285
1286 d->canvasController.saveCanvasState(config);
1287}
KoZoomMode::Mode mode
Definition KoZoomState.h:24
virtual void setProperty(const QString &name, const QVariant &value)

References d, mainWindow(), KoZoomState::mode, KisPropertiesConfiguration::setProperty(), and KoZoomState::zoom.

◆ selection()

KisSelectionSP KisView::selection ( )

Convenience method to get at the active selection (the selection of the current layer, or, if that does not exist, the global selection.

Definition at line 1333 of file KisView.cpp.

1334{
1335 KisLayerSP layer = currentLayer();
1336 if (layer)
1337 return layer->selection(); // falls through to the global
1338 // selection, or 0 in the end
1339 if (image()) {
1340 return image()->globalSelection();
1341 }
1342 return 0;
1343}
KisSelectionSP globalSelection() const
Definition kis_image.cc:695
KisLayerSP currentLayer() const
Definition KisView.cpp:1315
virtual KisSelectionSP selection() const
Definition kis_layer.cc:503

References currentLayer(), KisImage::globalSelection(), image(), and KisLayer::selection().

◆ setCurrentNode()

void KisView::setCurrentNode ( KisNodeSP node)

Definition at line 1302 of file KisView.cpp.

1303{
1304 d->currentNode = node;
1306
1308}
void slotTrySwitchShapeManager()
void syncLastActiveNodeToDocument()
Definition KisView.cpp:1264

References Private::canvas, d, KisCanvas2::slotTrySwitchShapeManager(), and syncLastActiveNodeToDocument().

◆ setShowFloatingMessage()

void KisView::setShowFloatingMessage ( bool show)

Definition at line 309 of file KisView.cpp.

310{
311 d->showFloatingMessage = show;
312}

References d.

◆ setSubWindow()

void KisView::setSubWindow ( QMdiSubWindow * subWindow)

Tells this view which subwindow it is part of.

Definition at line 1094 of file KisView.cpp.

1095{
1096 d->subWindow = subWindow;
1097}

References d, and subWindow.

◆ setViewManager()

void KisView::setViewManager ( KisViewManager * view)

Definition at line 337 of file KisView.cpp.

338{
339 d->viewManager = view;
340
341 KoToolManager::instance()->addController(&d->canvasController);
342 KisShapeController* shapeController = dynamic_cast<KisShapeController*>(d->document->shapeController());
343 shapeController->setInitialShapeForCanvas(&d->canvas);
344
345 if (d->viewManager && d->viewManager->nodeManager()) {
346 d->viewManager->nodeManager()->nodesUpdated();
347 }
348
349 connect(image(), SIGNAL(sigSizeChanged(QPointF,QPointF)), this, SLOT(slotImageSizeChanged(QPointF,QPointF)));
350 connect(image(), SIGNAL(sigResolutionChanged(double,double)), this, SLOT(slotImageResolutionChanged()));
351
352 d->addNodeConnection.connectSync(image(), &KisImage::sigNodeAddedAsync,
354
355 // executed in a context of an image thread
356 connect(image(), SIGNAL(sigRemoveNodeAsync(KisNodeSP)),
358 Qt::DirectConnection);
359
360 d->removeNodeConnection.connectOutputSlot(this, &KisView::slotContinueRemoveNode);
361
362 d->viewManager->updateGUI();
363
364 KoToolManager::instance()->switchToolRequested("KritaShape/KisToolBrush");
365}
void sigNodeAddedAsync(KisNodeSP node, KisNodeAdditionFlags flags)
void setInitialShapeForCanvas(KisCanvas2 *canvas)
void slotContinueRemoveNode(KisNodeSP newActiveNode)
Definition KisView.cpp:397
void slotContinueAddNode(KisNodeSP newActiveNode, KisNodeAdditionFlags flags)
Definition KisView.cpp:372
void slotImageNodeRemoved(KisNodeSP node)
Definition KisView.cpp:392
void slotImageResolutionChanged()
Definition KisView.cpp:1424
void slotImageSizeChanged(const QPointF &oldStillPoint, const QPointF &newStillPoint)
Definition KisView.cpp:1431
void sigSizeChanged(const QPointF &oldStillPoint, const QPointF &newStillPoint)
void addController(KoCanvasController *controller)

References KoToolManager::addController(), Private::canvas, d, image(), KoToolManager::instance(), KisShapeController::setInitialShapeForCanvas(), KisImage::sigNodeAddedAsync(), sigSizeChanged(), slotContinueAddNode(), slotContinueRemoveNode(), slotImageNodeRemoved(), slotImageResolutionChanged(), slotImageSizeChanged(), and KoToolManager::switchToolRequested().

◆ shouldAcceptDrag()

bool KisView::shouldAcceptDrag ( const QDropEvent * event) const
private

Definition at line 1442 of file KisView.cpp.

1443{
1444 const QMimeData *data = event->mimeData();
1445 if (data->hasFormat(QStringLiteral("application/x-krita-node-internal-pointer"))) {
1446 // Don't allow dragging layers onto their own canvas, that really only
1447 // gets triggered accidentally if you're a bit sloppy about selecting
1448 // or reordering layers and then you're left confused about the layer
1449 // duplicates that seem to show up at random. The user can override
1450 // this by explicitly holding down Ctrl if necessary. We always accept
1451 // the enter event so that this works properly, otherwise we don't get
1452 // any further drag events unless Ctrl was held to begin with.
1453 return event->type() == QEvent::DragEnter
1454 || event->keyboardModifiers().testFlag(Qt::ControlModifier)
1456 } else {
1457 return data->hasImage()
1458 || data->hasUrls()
1459 || data->hasFormat("krita/x-colorsetentry")
1460 || data->hasColor();
1461 }
1462}
static bool isNodeMimeDataFromSameImage(const QMimeData *data, KisImageSP image)

References image(), and KisMimeData::isNodeMimeDataFromSameImage().

◆ showFloatingMessage()

void KisView::showFloatingMessage ( const QString & message,
const QIcon & icon,
int timeout = 4500,
KisFloatingMessage::Priority priority = KisFloatingMessage::Medium,
int alignment = Qt::AlignCenter|Qt::TextWordWrap )

◆ sigColorSpaceChanged

void KisView::sigColorSpaceChanged ( const KoColorSpace * cs)
signal

◆ sigProfileChanged

void KisView::sigProfileChanged ( const KoColorProfile * profile)
signal

◆ sigSizeChanged

void KisView::sigSizeChanged ( const QPointF & oldStillPoint,
const QPointF & newStillPoint )
signal

◆ slotClearStatusText

void KisView::slotClearStatusText ( )
slot

End of the message in the status bar (calls QStatusBar::clear())

Todo
rename to something more generic

Definition at line 1122 of file KisView.cpp.

1123{
1124 QStatusBar *sb = statusBar();
1125 if (sb) {
1126 sb->clearMessage();
1127 }
1128}

References statusBar().

◆ slotContinueAddNode

void KisView::slotContinueAddNode ( KisNodeSP newActiveNode,
KisNodeAdditionFlags flags )
privateslot

When deleting the last layer, root node got selected. We should fix it when the first layer is added back.

Here we basically reimplement what Qt's view/model do. But since they are not connected, we should do it manually.

Definition at line 372 of file KisView.cpp.

373{
374 Q_UNUSED(flags)
375
376
384 if (!d->isCurrent &&
385 (!d->currentNode || !d->currentNode->parent())) {
386
387 d->currentNode = newActiveNode;
388 }
389}

References d.

◆ slotContinueRemoveNode

void KisView::slotContinueRemoveNode ( KisNodeSP newActiveNode)
privateslot

Definition at line 397 of file KisView.cpp.

398{
399 if (!d->isCurrent) {
400 d->currentNode = newActiveNode;
401 }
402}

References d.

◆ slotGamutCheck

void KisView::slotGamutCheck ( bool gamutCheck)
slot

slotGamutCheck set whether or not we're gamutchecking in this view. Will be setting the same in the vans belonging to the view.

Definition at line 1364 of file KisView.cpp.

1365{
1366 d->gamutCheck = gamutCheck;
1367 QString message;
1368 if (canvasBase()->image()->colorSpace()->colorDepthId().id().contains("F"))
1369 {
1370 message = i18n("Gamut Warnings don't work in floating point.");
1371 viewManager()->showFloatingMessage(message,QIcon());
1372 return;
1373 }
1374
1375 if (gamutCheck){
1376 message = i18n("Gamut Warnings turned on.");
1377 if (!d->softProofing){
1378 message += "\n "+i18n("But Soft Proofing is still off.");
1379 }
1380 } else {
1381 message = i18n("Gamut Warnings turned off.");
1382 }
1383 viewManager()->showFloatingMessage(message,QIcon());
1385}
void slotGamutCheck()
void showFloatingMessage(const QString &message, const QIcon &icon, int timeout=4500, KisFloatingMessage::Priority priority=KisFloatingMessage::Medium, int alignment=Qt::AlignCenter|Qt::TextWordWrap)
shows a floating message in the top right corner of the canvas
bool gamutCheck
Definition KisView.cpp:140

References canvasBase(), d, gamutCheck, image(), KisViewManager::showFloatingMessage(), KisCanvas2::slotGamutCheck(), and viewManager.

◆ slotImageNodeRemoved

void KisView::slotImageNodeRemoved ( KisNodeSP node)
privateslot

Definition at line 392 of file KisView.cpp.

393{
394 d->removeNodeConnection.start(KritaUtils::nearestNodeAfterRemoval(node));
395}
KisNodeSP nearestNodeAfterRemoval(KisNodeSP node)

References d, and KritaUtils::nearestNodeAfterRemoval().

◆ slotImageResolutionChanged

void KisView::slotImageResolutionChanged ( )
slot

Definition at line 1424 of file KisView.cpp.

1425{
1426 d->canvasController.syncOnImageResolutionChange();
1427 d->zoomManager.syncOnImageResolutionChange();
1429}
void updateImageBoundsSnapping()

References d, KisZoomManager::updateImageBoundsSnapping(), and zoomManager.

◆ slotImageSizeChanged

void KisView::slotImageSizeChanged ( const QPointF & oldStillPoint,
const QPointF & newStillPoint )
slot

Definition at line 1431 of file KisView.cpp.

1432{
1433 d->canvasController.syncOnImageSizeChange(oldStillPoint, newStillPoint);
1435}

References d, KisZoomManager::updateImageBoundsSnapping(), and zoomManager.

◆ slotLoadingFinished

void KisView::slotLoadingFinished ( )
slot

Cold-start of image size/resolution signals

Definition at line 1397 of file KisView.cpp.

1398{
1399 if (!document()) return;
1400
1405
1406 if (image()->locked()) {
1407 // If this is the first view on the image, the image will have been locked
1408 // so unlock it.
1409 image()->blockSignals(false);
1410 image()->unlock();
1411 }
1412
1414
1415 connect(image(), SIGNAL(sigColorSpaceChanged(const KoColorSpace*)), this, SIGNAL(sigColorSpaceChanged(const KoColorSpace*)));
1416 connect(image(), SIGNAL(sigProfileChanged(const KoColorProfile*)), this, SIGNAL(sigProfileChanged(const KoColorProfile*)));
1417 connect(image(), SIGNAL(sigSizeChanged(QPointF,QPointF)), this, SIGNAL(sigSizeChanged(QPointF,QPointF)));
1418
1419 connect(&d->screenMigrationTracker, SIGNAL(sigScreenChanged(QScreen*)), this, SLOT(slotMigratedToScreen(QScreen*)));
1420 connect(&d->screenMigrationTracker, SIGNAL(sigScreenOrResolutionChanged(QScreen*)), this, SLOT(slotScreenOrResolutionChanged()));
1422}
void initializeImage()
void unlock()
Definition kis_image.cc:805
void sigColorSpaceChanged(const KoColorSpace *cs)
void slotMigratedToScreen(QScreen *screen)
Definition KisView.cpp:1199
void sigProfileChanged(const KoColorProfile *profile)

References canvasBase(), d, document, image(), KisCanvas2::initializeImage(), sigColorSpaceChanged(), sigProfileChanged(), sigSizeChanged(), slotImageResolutionChanged(), slotMigratedToScreen(), slotScreenOrResolutionChanged(), KisImage::unlock(), KisZoomManager::updateImageBoundsSnapping(), and zoomManager.

◆ slotMigratedToScreen

void KisView::slotMigratedToScreen ( QScreen * screen)
slot

Definition at line 1199 of file KisView.cpp.

1200{
1201 d->canvas.slotScreenChanged(screen);
1202}
void slotScreenChanged(QScreen *screen)

References Private::canvas, d, and KisCanvas2::slotScreenChanged().

◆ slotSavingStatusMessage

void KisView::slotSavingStatusMessage ( const QString & text,
int timeout,
bool isAutoSaving = false )
slot

Display a message in the status bar (calls QStatusBar::message())

Todo
rename to something more generic
Parameters
valuedetermines autosaving

Definition at line 1105 of file KisView.cpp.

1106{
1107 QStatusBar *sb = statusBar();
1108 if (sb) {
1109 sb->showMessage(text, timeout);
1110 }
1111
1112 KisConfig cfg(true);
1113
1114 if (!sb || sb->isHidden() ||
1115 (!isAutoSaving && cfg.forceShowSaveMessages()) ||
1116 (cfg.forceShowAutosaveMessages() && isAutoSaving)) {
1117
1118 viewManager()->showFloatingMessage(text, QIcon());
1119 }
1120}

References KisConfig::forceShowAutosaveMessages(), KisConfig::forceShowSaveMessages(), KisViewManager::showFloatingMessage(), statusBar(), and viewManager.

◆ slotScreenOrResolutionChanged

void KisView::slotScreenOrResolutionChanged ( )
slot

slotScreenOrResolutionChanged() is guaranteed to come after slotMigratedToScreen() when a migration happens

Definition at line 1204 of file KisView.cpp.

1205{
1210 d->canvasController.updateScreenResolution(this);
1211
1212 if (d->canvas.resourceManager() && d->screenMigrationTracker.currentScreen()) {
1213 int penWidth = qRound(d->screenMigrationTracker.currentScreen()->devicePixelRatio());
1214 d->canvas.resourceManager()->setDecorationThickness(qMax(penWidth, 1));
1215 }
1216}
QPointer< KoCanvasResourceProvider > resourceManager

References Private::canvas, d, and KoCanvasBase::resourceManager.

◆ slotSoftProofing

void KisView::slotSoftProofing ( bool softProofing)
slot

slotSoftProofing set whether or not we're softproofing in this view. Will be setting the same in the canvas belonging to the view.

Definition at line 1345 of file KisView.cpp.

1346{
1347 d->softProofing = softProofing;
1348 QString message;
1349 if (canvasBase()->image()->colorSpace()->colorDepthId().id().contains("F"))
1350 {
1351 message = i18n("Soft Proofing doesn't work in floating point.");
1352 viewManager()->showFloatingMessage(message,QIcon());
1353 return;
1354 }
1355 if (softProofing){
1356 message = i18n("Soft Proofing turned on.");
1357 } else {
1358 message = i18n("Soft Proofing turned off.");
1359 }
1360 viewManager()->showFloatingMessage(message,QIcon());
1362}
void slotSoftProofing()
bool softProofing
Definition KisView.cpp:139

References canvasBase(), d, image(), KisViewManager::showFloatingMessage(), KisCanvas2::slotSoftProofing(), softProofing, and viewManager.

◆ slotThemeChanged

void KisView::slotThemeChanged ( QPalette pal)
slot

Definition at line 1223 of file KisView.cpp.

1224{
1225 this->setPalette(pal);
1226 for (int i=0; i<this->children().size();i++) {
1227 QWidget *w = qobject_cast<QWidget*> ( this->children().at(i));
1228 if (w) {
1229 w->setPalette(pal);
1230 }
1231 }
1232 if (canvasBase()) {
1233 canvasBase()->canvasWidget()->setPalette(pal);
1234 }
1235 if (canvasController()) {
1236 canvasController()->setPalette(pal);
1237 }
1238}
KisAbstractCanvasWidget * canvasWidget

References canvasBase(), canvasController, and KisCanvas2::canvasWidget.

◆ slotUpdateDocumentTitle

void KisView::slotUpdateDocumentTitle ( )
slot

Definition at line 1240 of file KisView.cpp.

1241{
1242 QString title = d->document->caption();
1243
1244 if (!d->document->isReadWrite()) {
1245 title += " " + i18n("Write Protected");
1246 }
1247
1248 if (d->document->isRecovered()) {
1249 title += " " + i18n("Recovered");
1250 }
1251
1252 // show the file size for the document
1254
1255 if (fileSizeStats.imageSize) {
1256 title += QString(" (").append( KFormat().formatByteSize(qreal(fileSizeStats.imageSize))).append( ") ");
1257 }
1258
1259 title += "[*]";
1260
1261 this->setWindowTitle(title);
1262}
Statistics fetchMemoryStatistics(KisImageSP image) const

References d, KisMemoryStatisticsServer::fetchMemoryStatistics(), KisMemoryStatisticsServer::Statistics::imageSize, and KisMemoryStatisticsServer::instance().

◆ softProofing()

bool KisView::softProofing ( )

softProofing

Returns
whether or not we're softproofing in this view.

◆ statusBar()

QStatusBar * KisView::statusBar ( ) const
Returns
the statusbar of the KisMainWindow in which this view is currently.

Definition at line 1099 of file KisView.cpp.

1100{
1101 KisMainWindow *mw = mainWindow();
1102 return mw ? mw->statusBar() : 0;
1103}

References mainWindow().

◆ syncLastActiveNodeToDocument()

void KisView::syncLastActiveNodeToDocument ( )

Definition at line 1264 of file KisView.cpp.

1265{
1266 KisDocument *doc = document();
1267 if (doc) {
1268 doc->setPreActivatedNode(d->currentNode);
1269 }
1270}
void setPreActivatedNode(KisNodeSP activatedNode)

References d, document, and KisDocument::setPreActivatedNode().

◆ viewConverter()

KisCoordinatesConverter * KisView::viewConverter ( ) const

◆ viewManager()

KisViewManager * KisView::viewManager ( ) const

◆ zoomManager()

KisZoomManager * KisView::zoomManager ( ) const

The zoommanager handles everything action-related to zooming

Member Data Documentation

◆ actionCollection

KisKActionCollection* KisView::actionCollection {nullptr}

Definition at line 124 of file KisView.cpp.

124{nullptr};

◆ addNodeConnection

KisSynchronizedConnection<KisNodeSP, KisNodeAdditionFlags> KisView::addNodeConnection

Definition at line 142 of file KisView.cpp.

◆ canvas

KisCanvas2 KisView::canvas

Definition at line 127 of file KisView.cpp.

◆ canvasController

KisCanvasController * KisView::canvasController

Definition at line 126 of file KisView.cpp.

◆ currentNode

KisNodeSP KisView::currentNode

Definition at line 130 of file KisView.cpp.

◆ d

Private* const KisView::d
private

Definition at line 264 of file KisView.h.

◆ document

KisDocument * KisView::document

Definition at line 121 of file KisView.cpp.

◆ floatingMessageCompressor

KisSignalCompressor KisView::floatingMessageCompressor

Definition at line 136 of file KisView.cpp.

◆ gamutCheck

bool KisView::gamutCheck {false}

Definition at line 140 of file KisView.cpp.

140{false};

◆ inOperation

bool KisView::inOperation {false}

Definition at line 119 of file KisView.cpp.

119{false}; //in the middle of an operation (no screen refreshing)?

◆ isCurrent

bool KisView::isCurrent {false}

Definition at line 133 of file KisView.cpp.

133{false};

◆ paintingAssistantsDecoration

KisPaintingAssistantsDecorationSP KisView::paintingAssistantsDecoration

Definition at line 131 of file KisView.cpp.

◆ referenceImagesDecoration

KisReferenceImagesDecorationSP KisView::referenceImagesDecoration

Definition at line 132 of file KisView.cpp.

◆ removeNodeConnection

KisSynchronizedConnection<KisNodeSP> KisView::removeNodeConnection

Definition at line 143 of file KisView.cpp.

◆ s_firstView

bool KisView::s_firstView = true
staticprivate

Definition at line 266 of file KisView.h.

◆ savedFloatingMessage

QPointer<KisFloatingMessage> KisView::savedFloatingMessage

Definition at line 135 of file KisView.cpp.

◆ screenMigrationTracker

KisScreenMigrationTracker KisView::screenMigrationTracker

Definition at line 145 of file KisView.cpp.

◆ showFloatingMessage

void KisView::showFloatingMessage {true}

Definition at line 134 of file KisView.cpp.

134{true};

◆ softProofing

bool KisView::softProofing {false}

Definition at line 139 of file KisView.cpp.

139{false};

◆ subWindow

QMdiSubWindow* KisView::subWindow {nullptr}

Definition at line 137 of file KisView.cpp.

137{nullptr};

◆ tempActiveWidget

QWidget* KisView::tempActiveWidget {nullptr}

Definition at line 122 of file KisView.cpp.

122{nullptr};

◆ viewConverter

KisCoordinatesConverter * KisView::viewConverter

Definition at line 125 of file KisView.cpp.

◆ viewManager

KisViewManager * KisView::viewManager {nullptr}

Definition at line 129 of file KisView.cpp.

129{nullptr};

◆ zoomManager

KisZoomManager * KisView::zoomManager

Definition at line 128 of file KisView.cpp.


The documentation for this class was generated from the following files: