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 sigDocumentAboutToClose (KoCanvasBase *canvas)
 
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)
 
KisCanvas2 * canvasBase () const
 
KisCanvasController * canvasController () 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
 
KisDocument * document () const
 
bool gamutCheck ()
 gamutCheck
 
QString getTitle ()
 
KisInputManager * globalInputManager () const
 
KisImageWSP image () const
 
bool isCurrent () const
 
 KisView (KisDocument *document, KisViewManager *viewManager, QWidget *parent=0)
 
KisMainWindow * mainWindow () const
 
void notifyCurrentStateChanged (bool isCurrent)
 
 Private (KisView *_q, KisDocument *document, KisViewManager *viewManager)
 
void removeStatusBarItem (QWidget *widget)
 
KisView * replaceBy (KisDocument *document)
 
KisCanvasResourceProvider * resourceProvider () 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 ()
 
KisCoordinatesConverter * viewConverter () const
 
KisViewManager * viewManager () const
 
KisZoomManager * zoomManager () const
 
 ~KisView () override
 

Public Attributes

KisKActionCollection * actionCollection {nullptr}
 
KisSynchronizedConnection< KisNodeSP, KisNodeAdditionFlags > addNodeConnection
 
KisCanvas2 canvas
 
KisCanvasController canvasController
 
KisNodeSP currentNode
 
QPointer< KisDocument > document
 
KisSignalCompressor floatingMessageCompressor
 
bool gamutCheck {false}
 
bool inOperation {false}
 
bool isCurrent {false}
 
KisPaintingAssistantsDecorationSP paintingAssistantsDecoration
 
KisReferenceImagesDecorationSP referenceImagesDecoration
 
KisSynchronizedConnection< KisNodeSP > removeNodeConnection
 
QPointer< KisFloatingMessage > savedFloatingMessage
 
KisScreenMigrationTracker screenMigrationTracker
 
bool showFloatingMessage {true}
 
bool softProofing {false}
 
QMdiSubWindow * subWindow {nullptr}
 
QWidget * tempActiveWidget {nullptr}
 
KisCoordinatesConverter viewConverter
 
QPointer< KisViewManager > viewManager
 
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
KisCanvas2 * canvas
 
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:1128
Private *const d
Definition KisView.h:270
void slotScreenOrResolutionChanged()
Definition KisView.cpp:1213
QStatusBar * statusBar() const
Definition KisView.cpp:1105
QPointer< KisViewManager > viewManager
Definition KisView.cpp:129
void slotSavingStatusMessage(const QString &text, int timeout, bool isAutoSaving=false)
Definition KisView.cpp:1111
QPointer< KisDocument > document
Definition KisView.cpp:121
void slotLoadingFinished()
Definition KisView.cpp:1413
void slotUpdateDocumentTitle()
Definition KisView.cpp:1271
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 d->canvasController.setToolManager(0);
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:319
KisImageWSP image() const
Definition KisView.cpp:439

References Private::canvas, d, KisCanvas2::disconnectImage(), image(), KisPart::instance(), 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 434 of file KisView.cpp.

435{
436 return &d->canvas;
437}

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 1142 of file KisView.cpp.

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

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

◆ closeView()

void KisView::closeView ( )

Definition at line 1453 of file KisView.cpp.

1454{
1455 d->subWindow->close();
1456}

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 1136 of file KisView.cpp.

1137{
1138 UnitActionGroup* unitActions = new UnitActionGroup(d->document, addPixelUnit, this);
1139 return unitActions->actions();
1140}

References d.

◆ currentLayer()

KisLayerSP KisView::currentLayer ( ) const

Definition at line 1331 of file KisView.cpp.

1332{
1333 KisNodeSP node;
1334 KisMaskSP mask = currentMask();
1335 if (mask) {
1336 node = mask->parent();
1337 }
1338 else {
1339 node = d->currentNode;
1340 }
1341 return qobject_cast<KisLayer*>(node.data());
1342}
KisMaskSP currentMask() const
Definition KisView.cpp:1344

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

◆ currentMask()

KisMaskSP KisView::currentMask ( ) const

Definition at line 1344 of file KisView.cpp.

1345{
1346 return dynamic_cast<KisMask*>(d->currentNode.data());
1347}

References d.

◆ currentNode()

KisNodeSP KisView::currentNode ( ) const

◆ currentScreen()

QScreen * KisView::currentScreen ( ) const

Returns the current screen that the view belongs to

Definition at line 1227 of file KisView.cpp.

1228{
1229 return d->screenMigrationTracker.currentScreen();
1230}

References d.

◆ document()

KisDocument * KisView::document ( ) const

Retrieves the document object of this view.

◆ dragEnterEvent()

void KisView::dragEnterEvent ( QDragEnterEvent * event)
overrideprotected

Definition at line 453 of file KisView.cpp.

454{
455 dbgUI << Q_FUNC_INFO
456 << "Formats: " << event->mimeData()->formats()
457 << "Urls: " << event->mimeData()->urls()
458 << "Has images: " << event->mimeData()->hasImage();
459
460 if (shouldAcceptDrag(event)) {
461 event->accept();
462 setFocus(); // activate view if it should accept the drop
463 } else {
464 event->ignore();
465 }
466}
bool shouldAcceptDrag(const QDropEvent *event) const
Definition KisView.cpp:1458
#define dbgUI
Definition kis_debug.h:56

References dbgUI, and shouldAcceptDrag().

◆ dragMoveEvent()

void KisView::dragMoveEvent ( QDragMoveEvent * event)
overrideprotected

Definition at line 1068 of file KisView.cpp.

1069{
1070 dbgUI << Q_FUNC_INFO
1071 << "Formats: " << event->mimeData()->formats()
1072 << "Urls: " << event->mimeData()->urls()
1073 << "Has images: " << event->mimeData()->hasImage();
1074
1075 if (shouldAcceptDrag(event)) {
1076 event->accept();
1077 } else {
1078 event->ignore();
1079 }
1080}

References dbgUI, and shouldAcceptDrag().

◆ dropEvent()

void KisView::dropEvent ( QDropEvent * event)
overrideprotected

Definition at line 468 of file KisView.cpp.

469{
470 dbgUI << Q_FUNC_INFO;
471 dbgUI << "\t Formats: " << event->mimeData()->formats();
472 dbgUI << "\t Urls: " << event->mimeData()->urls();
473 dbgUI << "\t Has images: " << event->mimeData()->hasImage();
474
475 if (!shouldAcceptDrag(event)) {
476 return;
477 }
478
479 KisImageWSP kisimage = image();
480 Q_ASSERT(kisimage);
481
482 QPoint imgCursorPos = canvasBase()->coordinatesConverter()->widgetToImage(event->pos()).toPoint();
483 QRect imageBounds = kisimage->bounds();
484 boost::optional<QPoint> forcedCenter;
485
486 if (event->keyboardModifiers() & Qt::ShiftModifier && imageBounds.contains(imgCursorPos)) {
487 forcedCenter = imgCursorPos;
488 }
489
490 if (event->mimeData()->hasFormat("application/x-krita-node-internal-pointer")) {
491 KisShapeController *kritaShapeController =
492 dynamic_cast<KisShapeController*>(d->document->shapeController());
493
494 bool copyNode = true;
495 QList<KisNodeSP> nodes;
496
497 if (forcedCenter) {
498 nodes = KisMimeData::loadNodesFastAndRecenter(*forcedCenter, event->mimeData(), KisMimeData::MimeFromDragAndDrop, kisimage, kritaShapeController, copyNode);
499 } else {
500 nodes = KisMimeData::loadNodesFast(event->mimeData(), KisMimeData::MimeFromDragAndDrop, kisimage, kritaShapeController, copyNode);
501 }
502
503 Q_FOREACH (KisNodeSP node, nodes) {
504 if (node) {
506 if (!viewManager()->nodeManager()->activeLayer()) {
507 adapter.addNode(node, kisimage->rootLayer() , 0);
508 } else {
509 adapter.addNode(node,
510 viewManager()->nodeManager()->activeLayer()->parent(),
511 viewManager()->nodeManager()->activeLayer());
512 }
513 }
514 }
515 } else if (event->mimeData()->hasImage() || event->mimeData()->hasUrls()) {
516 const QMimeData *mData = event->mimeData();
517
518 // Opening a window on wayland causes the clipboard to be cleared, so we need to cache all the data we may need beforehand
519 QList<QUrl> urls = mData->urls();
520 const QImage qimage = KisClipboard::instance()->getImageWithFallback(mData, false);
521
522 KisCanvasDrop dlgAction;
523
524 const auto callPos = QCursor::pos();
525
526 const KisCanvasDrop::Action action = dlgAction.dropAs(*mData, callPos);
527
529 const QPair<bool, KisClipboard::PasteFormatBehaviour> source =
531
532 if (!source.first) {
533 dbgUI << "Paste event cancelled";
534 return;
535 }
536
538 const auto url = std::find_if(
539 urls.constBegin(),
540 urls.constEnd(),
541 [&](const QUrl &url) {
542 if (source.second
543 == KisClipboard::PASTE_FORMAT_DOWNLOAD) {
544 return !url.isLocalFile();
545 } else if (source.second
547 return url.isLocalFile();
548 } else {
549 return false;
550 }
551 });
552
553 if (url != urls.constEnd()) {
554 QScopedPointer<QTemporaryFile> tmp(new QTemporaryFile());
555 tmp->setAutoRemove(true);
556
557 const QUrl localUrl = [&]() -> QUrl {
558 if (!url->isLocalFile()) {
559 // download the file and substitute the url
560 KisRemoteFileFetcher fetcher;
561 tmp->setFileName(url->fileName());
562
563 if (!fetcher.fetchFile(*url, tmp.data())) {
564 warnUI << "Fetching" << *url << "failed";
565 return {};
566 }
567 return QUrl::fromLocalFile(tmp->fileName());
568 }
569 return *url;
570 }();
571
572 if (localUrl.isLocalFile()) {
573 this->mainWindow()
574 ->viewManager()
575 ->imageManager()
576 ->importImage(localUrl);
577 this->activateWindow();
578 return;
579 }
580 }
581 }
582
583 KisImageSP clipImage = KisClipboard::instance()->clipFromBoardContentsWithData(qimage, urls, true, -1, source);
584 if (clipImage) {
585 const auto pos = this->viewConverter()
586 ->imageToDocument(imgCursorPos)
587 .toPoint();
588
589 KisPaintDeviceSP clip = new KisPaintDevice(*clipImage->projection());
590 clip->moveTo(pos.x(), pos.y());
591
593 this->image());
594
595 KisPaintLayerSP layer = new KisPaintLayer(
596 this->image(),
597 this->image()->nextLayerName() + " " + i18n("(pasted)"),
599 clip);
601 this->mainWindow()->viewManager());
602 adapter.addNode(
603 layer,
604 this->mainWindow()->viewManager()->activeNode()->parent(),
605 this->mainWindow()->viewManager()->activeNode());
606 this->activateWindow();
607 return;
608 }
609 } else if (action == KisCanvasDrop::INSERT_AS_REFERENCE_IMAGE) {
610
611 KisImageSP clipImage = KisClipboard::instance()->clipFromBoardContentsWithData(qimage, urls, true);
612 if (clipImage) {
613 KisPaintDeviceSP clip = new KisPaintDevice(*clipImage->projection());
614
616 this->image());
617
618 auto *reference =
620 *this->viewConverter(),
621 this);
622
623 if (reference) {
624 if (!urls.isEmpty()) {
625 const auto url = std::find_if(urls.constBegin(), urls.constEnd(), std::mem_fn(&QUrl::isLocalFile));
626 if (url != urls.constEnd()) {
627 reference->setFilename((*url).toLocalFile());
628 }
629 }
630 const auto pos = this->canvasBase()
632 ->widgetToImage(event->pos());
633 reference->setPosition(
634 (*this->viewConverter()).imageToDocument(pos));
635 this->canvasBase()
637 ->addReferenceImage(reference);
638 d->viewManager->toolManager()->switchToolRequested(
639 "ToolReferenceImages");
640 return;
641 }
642 }
643 } else if (action != KisCanvasDrop::NONE) {
644 // multiple URLs detected OR about to open a document
645
646 for (QUrl url : urls) { // do copy it
647 QScopedPointer<QTemporaryFile> tmp(new QTemporaryFile());
648 tmp->setAutoRemove(true);
649
650 if (!url.isLocalFile()) {
651 // download the file and substitute the url
652 KisRemoteFileFetcher fetcher;
653 tmp->setFileName(url.fileName());
654
655 if (!fetcher.fetchFile(url, tmp.data())) {
656 qWarning() << "Fetching" << url << "failed";
657 continue;
658 }
659 url = QUrl::fromLocalFile(tmp->fileName());
660 }
661
662 if (url.isLocalFile()) {
663 if (action == KisCanvasDrop::INSERT_MANY_LAYERS) {
664 this->mainWindow()
665 ->viewManager()
666 ->imageManager()
667 ->importImage(url);
668 this->activateWindow();
669 } else if (action == KisCanvasDrop::INSERT_MANY_FILE_LAYERS
670 || action
673 this->mainWindow()->viewManager());
674 QFileInfo fileInfo(url.toLocalFile());
675
676 QString type =
678 QStringList mimes =
681
682 if (!mimes.contains(type)) {
683 QString msg =
686 .errorMessage();
687 QMessageBox::warning(
688 this,
689 i18nc("@title:window", "Krita"),
690 i18n("Could not open %2.\nReason: %1.",
691 msg,
692 url.toDisplayString()));
693 continue;
694 }
695
696 KisFileLayer *fileLayer =
697 new KisFileLayer(this->image(),
698 "",
699 url.toLocalFile(),
701 "Bicubic",
702 fileInfo.fileName(),
704
705 KisLayerSP above =
706 this->mainWindow()->viewManager()->activeLayer();
707 KisNodeSP parent = above ? above->parent()
708 : this->mainWindow()
709 ->viewManager()
710 ->image()
711 ->root();
712
713 adapter.addNode(fileLayer, parent, above);
714 } else if (action == KisCanvasDrop::OPEN_IN_NEW_DOCUMENT
715 || action
717 if (this->mainWindow()) {
718 this->mainWindow()->openDocument(
719 url.toLocalFile(),
721 }
722 } else if (action
724 || action
725 == KisCanvasDrop::
726 INSERT_AS_REFERENCE_IMAGE) {
727 auto *reference =
728 KisReferenceImage::fromFile(url.toLocalFile(),
729 *this->viewConverter(),
730 this);
731
732 if (reference) {
733 const auto pos = this->canvasBase()
735 ->widgetToImage(event->pos());
736 reference->setPosition(
737 (*this->viewConverter()).imageToDocument(pos));
738 this->canvasBase()
740 ->addReferenceImage(reference);
741
742 d->viewManager->toolManager()->switchToolRequested(
743 "ToolReferenceImages");
744 }
745 }
746 }
747 }
748 }
749 } else if (event->mimeData()->hasColor() || event->mimeData()->hasFormat("krita/x-colorsetentry")) {
750 if (!image()) {
751 return;
752 }
753
754 // Cannot fill on non-painting layers (vector layer, clone layer, file layer, group layer)
755 if (d->viewManager->activeNode().isNull() ||
756 d->viewManager->activeNode()->inherits("KisShapeLayer") ||
757 d->viewManager->activeNode()->inherits("KisCloneLayer") ||
758 !d->viewManager->activeDevice()) {
759 showFloatingMessage(i18n("You cannot drag and drop colors on the selected layer type."), QIcon());
760 return;
761 }
762
763 // Cannot fill if the layer is not editable
764 if (!d->viewManager->activeNode()->isEditable()) {
765 QString message;
766 if (!d->viewManager->activeNode()->visible() && d->viewManager->activeNode()->userLocked()) {
767 message = i18n("Layer is locked and invisible.");
768 } else if (d->viewManager->activeNode()->userLocked()) {
769 message = i18n("Layer is locked.");
770 } else if(!d->viewManager->activeNode()->visible()) {
771 message = i18n("Layer is invisible.");
772 }
773 showFloatingMessage(message, KisIconUtils::loadIcon("object-locked"));
774 return;
775 }
776
777 // The cursor is outside the image
778 if (!image()->wrapAroundModePermitted() && !image()->bounds().contains(imgCursorPos)) {
779 return;
780 }
781
784 kundo2_i18n("Flood Fill Layer"), false, image().data()
785 );
786 strategy->setSupportsWrapAroundMode(true);
787 KisStrokeId fillStrokeId = image()->startStroke(strategy);
788 KIS_SAFE_ASSERT_RECOVER_RETURN(fillStrokeId);
789
790 QSharedPointer<QRect> dirtyRect = QSharedPointer<QRect>(new QRect);
791
792 KisResourcesSnapshotSP resources =
793 new KisResourcesSnapshot(image(), d->viewManager->activeNode(), d->viewManager->canvasResourceProvider()->resourceManager());
794
795 if (event->mimeData()->hasColor()) {
796 resources->setFGColorOverride(KoColor(event->mimeData()->colorData().value<QColor>(), image()->colorSpace()));
797 } else {
798 QByteArray byteData = event->mimeData()->data("krita/x-colorsetentry");
800 resources->setFGColorOverride(s.color());
801 }
802
803 // Use same options as the fill tool
804 KConfigGroup configGroup = KSharedConfig::openConfig()->group("KritaFill/KisToolFill");
805 QString fillMode = configGroup.readEntry<QString>("whatToFill", "");
806 if (fillMode.isEmpty()) {
807 if (configGroup.readEntry<bool>("fillSelection", false)) {
808 fillMode = "fillSelection";
809 } else {
810 fillMode = "fillContiguousRegion";
811 }
812 }
813 const bool useCustomBlendingOptions = configGroup.readEntry<bool>("useCustomBlendingOptions", false);
814 const qreal customOpacity =
815 qBound(0, configGroup.readEntry<int>("customOpacity", 100), 100) / 100.0;
816 QString customCompositeOp = configGroup.readEntry<QString>("customCompositeOp", COMPOSITE_OVER);
817 if (KoCompositeOpRegistry::instance().getKoID(customCompositeOp).id().isNull()) {
818 customCompositeOp = COMPOSITE_OVER;
819 }
820
821 if (event->keyboardModifiers() == Qt::ShiftModifier) {
822 if (fillMode == "fillSimilarRegions") {
823 fillMode = "fillSelection";
824 } else {
825 fillMode = "fillSimilarRegions";
826 }
827 } else if (event->keyboardModifiers() == Qt::AltModifier) {
828 if (fillMode == "fillContiguousRegion") {
829 fillMode = "fillSelection";
830 } else {
831 fillMode = "fillContiguousRegion";
832 }
833 }
834
835 if (fillMode == "fillSelection") {
836 FillProcessingVisitor *visitor = new FillProcessingVisitor(nullptr,
837 selection(),
838 resources);
839 visitor->setSeedPoint(imgCursorPos);
840 visitor->setSelectionOnly(true);
841 visitor->setUseCustomBlendingOptions(useCustomBlendingOptions);
842 if (useCustomBlendingOptions) {
843 visitor->setCustomOpacity(customOpacity);
844 visitor->setCustomCompositeOp(customCompositeOp);
845 }
846 visitor->setOutDirtyRect(dirtyRect);
847
848 image()->addJob(
849 fillStrokeId,
851 KUndo2CommandSP(new KisProcessingCommand(visitor, d->viewManager->activeNode())),
852 false,
855 )
856 );
857 } else {
858 const int threshold = configGroup.readEntry("thresholdAmount", 8);
859 const int opacitySpread = configGroup.readEntry("opacitySpread", 100);
860 const bool antiAlias = configGroup.readEntry("antiAlias", true);
861 const int grow = configGroup.readEntry("growSelection", 0);
862 const bool stopGrowingAtDarkestPixel = configGroup.readEntry<bool>("stopGrowingAtDarkestPixel", false);
863 const int feather = configGroup.readEntry("featherAmount", 0);
864 const int closeGap = configGroup.readEntry("closeGapAmount", 0);
865 QString sampleLayersMode = configGroup.readEntry("sampleLayersMode", "");
866 if (sampleLayersMode.isEmpty()) {
867 if (configGroup.readEntry("sampleMerged", false)) {
868 sampleLayersMode = "allLayers";
869 } else {
870 sampleLayersMode = "currentLayer";
871 }
872 }
873 QList<int> colorLabels;
874 {
875 const QStringList colorLabelsStr = configGroup.readEntry<QString>("colorLabels", "").split(',', Qt::SkipEmptyParts);
876
877 for (const QString &colorLabelStr : colorLabelsStr) {
878 bool ok;
879 const int colorLabel = colorLabelStr.toInt(&ok);
880 if (ok) {
881 colorLabels << colorLabel;
882 }
883 }
884 }
885
886 KisPaintDeviceSP referencePaintDevice = nullptr;
887 if (sampleLayersMode == "allLayers") {
888 referencePaintDevice = image()->projection();
889 } else if (sampleLayersMode == "currentLayer") {
890 referencePaintDevice = d->viewManager->activeNode()->paintDevice();
891 } else if (sampleLayersMode == "colorLabeledLayers") {
892 referencePaintDevice = KisMergeLabeledLayersCommand::createRefPaintDevice(image(), "Fill Tool Reference Result Paint Device");
893 image()->addJob(
894 fillStrokeId,
897 referencePaintDevice,
898 colorLabels,
900 false,
903 )
904 );
905 }
906
907 QSharedPointer<KoColor> referenceColor(new KoColor);
908 if (sampleLayersMode == "colorLabeledLayers") {
909 // We need to obtain the reference color from the reference paint
910 // device, but it is produced in a stroke, so we must get the color
911 // after the device is ready. So we get it in the stroke
912 image()->addJob(
913 fillStrokeId,
916 [referenceColor, referencePaintDevice, imgCursorPos]() -> KUndo2Command*
917 {
918 *referenceColor = referencePaintDevice->pixel(imgCursorPos);
919 return 0;
920 }
921 )),
922 false,
925 )
926 );
927 } else {
928 // Here the reference device is already ready, so we obtain the
929 // reference color directly
930 *referenceColor = referencePaintDevice->pixel(imgCursorPos);
931 }
932
933 if (fillMode == "fillContiguousRegion") {
934 const KisFillPainter::RegionFillingMode regionFillingMode =
935 configGroup.readEntry("contiguousFillMode", "") == "boundaryFill"
938 KoColor regionFillingBoundaryColor;
939 if (regionFillingMode == KisFillPainter::RegionFillingMode_BoundaryFill) {
940 const QString xmlColor = configGroup.readEntry("contiguousFillBoundaryColor", QString());
941 QDomDocument doc;
942 if (doc.setContent(xmlColor)) {
943 QDomElement e = doc.documentElement().firstChild().toElement();
944 QString channelDepthID = doc.documentElement().attribute("channeldepth", Integer16BitsColorDepthID.id());
945 bool ok;
946 if (e.hasAttribute("space") || e.tagName().toLower() == "srgb") {
947 regionFillingBoundaryColor = KoColor::fromXML(e, channelDepthID, &ok);
948 } else if (doc.documentElement().hasAttribute("space") || doc.documentElement().tagName().toLower() == "srgb"){
949 regionFillingBoundaryColor = KoColor::fromXML(doc.documentElement(), channelDepthID, &ok);
950 }
951 }
952 }
953 const bool useSelectionAsBoundary = configGroup.readEntry("useSelectionAsBoundary", false);
954 const bool blendingOptionsAreNoOp = useCustomBlendingOptions
955 ? (qFuzzyCompare(customOpacity, OPACITY_OPAQUE_F) &&
956 customCompositeOp == COMPOSITE_OVER)
957 : (qFuzzyCompare(resources->opacity(), OPACITY_OPAQUE_F) &&
958 resources->compositeOpId() == COMPOSITE_OVER);
959 const bool useFastMode = !resources->activeSelection() &&
960 blendingOptionsAreNoOp &&
961 opacitySpread == 100 &&
962 useSelectionAsBoundary == false &&
963 !antiAlias && grow == 0 && feather == 0 &&
964 closeGap == 0 &&
965 sampleLayersMode == "currentLayer";
966
967 FillProcessingVisitor *visitor = new FillProcessingVisitor(referencePaintDevice,
968 selection(),
969 resources);
970 visitor->setSeedPoint(imgCursorPos);
971 visitor->setUseFastMode(useFastMode);
972 visitor->setUseSelectionAsBoundary(useSelectionAsBoundary);
973 visitor->setFeather(feather);
974 visitor->setSizeMod(grow);
975 visitor->setStopGrowingAtDarkestPixel(stopGrowingAtDarkestPixel);
976 visitor->setRegionFillingMode(regionFillingMode);
977 if (regionFillingMode == KisFillPainter::RegionFillingMode_BoundaryFill) {
978 visitor->setRegionFillingBoundaryColor(regionFillingBoundaryColor);
979 }
980 visitor->setFillThreshold(threshold);
981 visitor->setOpacitySpread(opacitySpread);
982 visitor->setCloseGap(closeGap);
983 visitor->setAntiAlias(antiAlias);
984 visitor->setUseCustomBlendingOptions(useCustomBlendingOptions);
985 if (useCustomBlendingOptions) {
986 visitor->setCustomOpacity(customOpacity);
987 visitor->setCustomCompositeOp(customCompositeOp);
988 }
989 visitor->setOutDirtyRect(dirtyRect);
990
991 image()->addJob(
992 fillStrokeId,
994 KUndo2CommandSP(new KisProcessingCommand(visitor, d->viewManager->activeNode())),
995 false,
998 )
999 );
1000 } else {
1001 KisSelectionSP fillMask = new KisSelection;
1004
1005 {
1007 KisFillPainter painter;
1008 QRect bounds = image()->bounds();
1009 if (selection) {
1010 bounds = bounds.intersected(selection->projection()->selectedRect());
1011 }
1012
1013 painter.setFillThreshold(threshold);
1014 painter.setOpacitySpread(opacitySpread);
1015 painter.setAntiAlias(antiAlias);
1016 painter.setSizemod(grow);
1017 painter.setStopGrowingAtDarkestPixel(stopGrowingAtDarkestPixel);
1018 painter.setFeather(feather);
1019
1022 fillMask->pixelSelection(), referenceColor, referencePaintDevice,
1023 bounds, selection ? selection->projection() : nullptr, progressHelper
1024 );
1025
1026 for (KisStrokeJobData *job : jobs) {
1027 image()->addJob(fillStrokeId, job);
1028 }
1029 }
1030
1031 {
1032 FillProcessingVisitor *visitor = new FillProcessingVisitor(nullptr,
1033 fillMask,
1034 resources);
1035
1036 visitor->setSeedPoint(imgCursorPos);
1037 visitor->setSelectionOnly(true);
1038 visitor->setProgressHelper(progressHelper);
1039 visitor->setOutDirtyRect(dirtyRect);
1040
1041 image()->addJob(
1042 fillStrokeId,
1045 false,
1048 )
1049 );
1050 }
1051 }
1052 }
1053
1054 image()->addJob(
1055 fillStrokeId,
1057 KUndo2CommandSP(new KisUpdateCommand(d->viewManager->activeNode(), dirtyRect, image().data())),
1058 false,
1061 )
1062 );
1063
1064 image()->endStroke(fillStrokeId);
1065 }
1066}
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)
QPair< bool, PasteFormatBehaviour > askUserForSourceWithData(QImage qimage, const QList< QUrl > urls, bool useClipboardFallback=false) const
static KisClipboard * instance()
QImage getImageWithFallback(const QMimeData *cbData, bool useClipboardFallback=false) const
KisImageSP clipFromBoardContentsWithData(QImage image, const QList< QUrl > urls, bool showPopup, int overridePasteBehaviour=-1, 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, MimeSource mimeSource, KisImageSP image, KisShapeController *shapeController, bool &copyNode)
static KisNodeList loadNodesFast(const QMimeData *data, MimeSource mimeSource, 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:434
KisMainWindow * mainWindow() const
Definition KisView.cpp:1095
bool showFloatingMessage
Definition KisView.cpp:134
KisCoordinatesConverter viewConverter
Definition KisView.cpp:125
KisNodeSP currentNode
Definition KisView.cpp:130
KisSelectionSP selection()
Definition KisView.cpp:1349
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
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:101
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...
KisNodeWSP parent
Definition kis_node.cpp:86
KisPixelSelectionSP projection() const
KisPixelSelectionSP pixelSelection

References KisViewManager::activeLayer(), KisImportCatcher::adaptClipToImageColorSpace(), KisNodeCommandsAdapter::addNode(), KisReferenceImagesDecoration::addReferenceImage(), KisClipboard::askUserForSourceWithData(), KisImage::bounds(), canvasBase(), KisClipboard::clipFromBoardContentsWithData(), KisCanvas2::coordinatesConverter, d, dbgUI, KisCanvasDrop::dropAs(), KisImportExportErrorCode::errorMessage(), KisRemoteFileFetcher::fetchFile(), ImportExportCodes::FileFormatNotSupported, KisReferenceImage::fromFile(), KisReferenceImage::fromPaintDevice(), KisClipboard::getImageWithFallback(), 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, KisClipboard::instance(), KisMimeData::loadNodesFast(), KisMimeData::loadNodesFastAndRecenter(), mainWindow(), KisMimeData::MimeFromDragAndDrop, 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, KisImage::projection(), KisCanvas2::referenceImagesDecoration(), KisNodeFacade::root, KisImage::rootLayer(), shouldAcceptDrag(), source(), KisImportExportManager::supportedMimeTypes(), 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.

◆ getTitle()

QString KisView::getTitle ( )

Definition at line 1249 of file KisView.cpp.

1249 {
1250
1251 QString title = d->document->caption();
1252
1253 if (!d->document->isReadWrite()) {
1254 title += " " + i18n("Write Protected");
1255 }
1256
1257 if (d->document->isRecovered()) {
1258 title += " " + i18n("Recovered");
1259 }
1260
1261 // show the file size for the document
1263
1264 if (fileSizeStats.imageSize) {
1265 title += QString(" (").append( KFormat().formatByteSize(qreal(fileSizeStats.imageSize))).append( ") ");
1266 }
1267
1268 return title;
1269}
Statistics fetchMemoryStatistics(KisImageSP image) const

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

◆ 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 429 of file KisView.cpp.

430{
431 return d->viewManager ? d->viewManager->inputManager() : 0;
432}

References d.

◆ image()

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

Definition at line 439 of file KisView.cpp.

440{
441 if (d->document) {
442 return d->document->image();
443 }
444 return 0;
445}

References d.

◆ isCurrent()

bool KisView::isCurrent ( ) const

◆ mainWindow()

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

Definition at line 1095 of file KisView.cpp.

1096{
1097 return d->viewManager->mainWindow();
1098}

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
301 viewManager()->selectionManager()->selectionChanged();
302}
Central object to manage canvas input.
void detachPriorityEventFilter(QObject *filter)
detachPriorityEventFilter
void attachPriorityEventFilter(QObject *filter, int priority=0)
attachPriorityEventFilter
KisInputManager * globalInputManager() const
Definition KisView.cpp:429
bool isCurrent
Definition KisView.cpp:133

References KisInputManager::attachPriorityEventFilter(), d, KisInputManager::detachPriorityEventFilter(), globalInputManager(), isCurrent, and viewManager.

◆ Private()

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

Definition at line 105 of file KisView.cpp.

108 : actionCollection(viewManager->actionCollection())
109 , viewConverter()
110 , canvasController(_q, viewManager->mainWindow(), viewManager->actionCollection())
111 , canvas(&viewConverter, viewManager->canvasResourceProvider()->resourceManager(), viewManager->mainWindow(), _q, document->shapeController())
112 , zoomManager(_q, &this->viewConverter, &this->canvasController)
113 , viewManager(viewManager)
116 {
117 }
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 1161 of file KisView.cpp.

1162{
1163 if (!document())
1164 return true;
1165
1166 document()->waitForSavingToComplete();
1167
1168 if (document()->isModified()) {
1169 QString name;
1170 name = QFileInfo(document()->path()).fileName();
1171
1172 if (name.isEmpty())
1173 name = i18n("Untitled");
1174
1175 int res = QMessageBox::warning(this,
1176 i18nc("@title:window", "Krita"),
1177 i18n("<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>", name),
1178 QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes);
1179
1180 switch (res) {
1181 case QMessageBox::Yes : {
1182 bool isNative = (document()->mimeType() == document()->nativeFormatMimeType());
1183 if (!viewManager()->mainWindow()->saveDocument(document(), !isNative, false))
1184 return false;
1185 break;
1186 }
1187 case QMessageBox::No : {
1188 KisImageSP image = document()->image();
1190 viewManager()->blockUntilOperationsFinishedForced(image);
1191
1192 document()->removeAutoSaveFiles(document()->localFilePath(), document()->isRecovered());
1193 document()->setModified(false); // Now when queryClose() is called by closeEvent it won't do anything.
1194 break;
1195 }
1196 default : // case QMessageBox::Cancel :
1197 return false;
1198 }
1199 }
1200
1201
1203
1204 return true;
1205
1206}
void sigDocumentAboutToClose(KoCanvasBase *canvas)

References Private::canvas, d, document, image(), KisImage::requestStrokeCancellation(), sigDocumentAboutToClose(), 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 1087 of file KisView.cpp.

1088{
1089 KisMainWindow *window = mainWindow();
1090 QMdiSubWindow *subWindow = d->subWindow;
1091 delete this;
1092 return window->newView(document, subWindow);
1093}
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 421 of file KisView.cpp.

422{
423 if (d->viewManager) {
424 return d->viewManager->canvasResourceProvider();
425 }
426 return 0;
427}

References d.

◆ restoreViewState()

void KisView::restoreViewState ( const KisPropertiesConfiguration & config)

Definition at line 1305 of file KisView.cpp.

1306{
1307 if (d->subWindow) {
1308 QByteArray geometry = QByteArray::fromBase64(config.getString("geometry", "").toLatin1());
1309 d->subWindow->restoreGeometry(QByteArray::fromBase64(geometry));
1310 }
1311
1312 qreal zoom = config.getFloat("zoom", 1.0f);
1313 int zoomMode = config.getInt("zoomMode", (int)KoZoomMode::ZOOM_PAGE);
1314 d->canvasController.setZoom((KoZoomMode::Mode)zoomMode, zoom);
1315 d->canvasController.restoreCanvasState(config);
1316}
@ 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 1288 of file KisView.cpp.

1289{
1290 config.setProperty("file", d->document->path());
1291 config.setProperty("window", mainWindow()->windowStateConfig().name());
1292
1293 if (d->subWindow) {
1294 config.setProperty("geometry", d->subWindow->saveGeometry().toBase64());
1295 }
1296
1297 const KoZoomState zoomState = d->canvasController.zoomState();
1298
1299 config.setProperty("zoomMode", zoomState.mode);
1300 config.setProperty("zoom", zoomState.zoom);
1301
1302 d->canvasController.saveCanvasState(config);
1303}
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 1349 of file KisView.cpp.

1350{
1351 KisLayerSP layer = currentLayer();
1352 if (layer)
1353 return layer->selection(); // falls through to the global
1354 // selection, or 0 in the end
1355 if (image()) {
1356 return image()->globalSelection();
1357 }
1358 return 0;
1359}
KisSelectionSP globalSelection() const
Definition kis_image.cc:721
KisLayerSP currentLayer() const
Definition KisView.cpp:1331
virtual KisSelectionSP selection() const
Definition kis_layer.cc:509

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

◆ setCurrentNode()

void KisView::setCurrentNode ( KisNodeSP node)

Definition at line 1318 of file KisView.cpp.

1319{
1320 d->currentNode = node;
1322
1324}
void slotTrySwitchShapeManager()
void syncLastActiveNodeToDocument()
Definition KisView.cpp:1280

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}
KRITAUI_EXPORT void show()

References d.

◆ setSubWindow()

void KisView::setSubWindow ( QMdiSubWindow * subWindow)

Tells this view which subwindow it is part of.

Definition at line 1100 of file KisView.cpp.

1101{
1102 d->subWindow = subWindow;
1103}

References d, and subWindow.

◆ setViewManager()

void KisView::setViewManager ( KisViewManager * view)

Definition at line 337 of file KisView.cpp.

338{
339 // we never call this method with nullptr and the code here is not
340 // capable of detaching from the previous connections
342
343 d->viewManager = view;
344
345 if (!d->canvasController.toolManager()) {
346 d->canvasController.setToolManager(d->viewManager->toolManager());
347 }
348
349 KisShapeController* shapeController = dynamic_cast<KisShapeController*>(d->document->shapeController());
350 shapeController->setInitialShapeForCanvas(&d->canvas);
351
352 if (d->viewManager && d->viewManager->nodeManager()) {
353 d->viewManager->nodeManager()->nodesUpdated();
354 }
355
356 connect(image(), SIGNAL(sigSizeChanged(QPointF,QPointF)), this, SLOT(slotImageSizeChanged(QPointF,QPointF)));
357 connect(image(), SIGNAL(sigResolutionChanged(double,double)), this, SLOT(slotImageResolutionChanged()));
358
359 d->addNodeConnection.connectSync(image(), &KisImage::sigNodeAddedAsync,
361
362 // executed in a context of an image thread
363 connect(image(), SIGNAL(sigRemoveNodeAsync(KisNodeSP)),
365 Qt::DirectConnection);
366
367 d->removeNodeConnection.connectOutputSlot(this, &KisView::slotContinueRemoveNode);
368
369 d->viewManager->updateGUI();
370
371 d->canvasController.toolManager()->switchToolRequested("KritaShape/KisToolBrush");
372}
void sigNodeAddedAsync(KisNodeSP node, KisNodeAdditionFlags flags)
void setInitialShapeForCanvas(KisCanvas2 *canvas)
void slotContinueRemoveNode(KisNodeSP newActiveNode)
Definition KisView.cpp:404
void slotContinueAddNode(KisNodeSP newActiveNode, KisNodeAdditionFlags flags)
Definition KisView.cpp:379
void slotImageNodeRemoved(KisNodeSP node)
Definition KisView.cpp:399
void slotImageResolutionChanged()
Definition KisView.cpp:1440
void slotImageSizeChanged(const QPointF &oldStillPoint, const QPointF &newStillPoint)
Definition KisView.cpp:1447
void sigSizeChanged(const QPointF &oldStillPoint, const QPointF &newStillPoint)

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

◆ shouldAcceptDrag()

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

Definition at line 1458 of file KisView.cpp.

1459{
1460 const QMimeData *data = event->mimeData();
1461 if (data->hasFormat(QStringLiteral("application/x-krita-node-internal-pointer"))) {
1462 // Don't allow dragging layers onto their own canvas, that really only
1463 // gets triggered accidentally if you're a bit sloppy about selecting
1464 // or reordering layers and then you're left confused about the layer
1465 // duplicates that seem to show up at random. The user can override
1466 // this by explicitly holding down Ctrl if necessary. We always accept
1467 // the enter event so that this works properly, otherwise we don't get
1468 // any further drag events unless Ctrl was held to begin with.
1469 return event->type() == QEvent::DragEnter
1470 || event->keyboardModifiers().testFlag(Qt::ControlModifier)
1472 } else {
1473 return data->hasImage()
1474 || data->hasUrls()
1475 || data->hasFormat("krita/x-colorsetentry")
1476 || data->hasColor();
1477 }
1478}
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

◆ sigDocumentAboutToClose

void KisView::sigDocumentAboutToClose ( KoCanvasBase * canvas)
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 1128 of file KisView.cpp.

1129{
1130 QStatusBar *sb = statusBar();
1131 if (sb) {
1132 sb->clearMessage();
1133 }
1134}

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 379 of file KisView.cpp.

380{
381 Q_UNUSED(flags)
382
383
391 if (!d->isCurrent &&
392 (!d->currentNode || !d->currentNode->parent())) {
393
394 d->currentNode = newActiveNode;
395 }
396}

References d.

◆ slotContinueRemoveNode

void KisView::slotContinueRemoveNode ( KisNodeSP newActiveNode)
privateslot

Definition at line 404 of file KisView.cpp.

405{
406 if (!d->isCurrent) {
407 d->currentNode = newActiveNode;
408 }
409}

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 1380 of file KisView.cpp.

1381{
1382 d->gamutCheck = gamutCheck;
1383 QString message;
1384 if (canvasBase()->image()->colorSpace()->colorDepthId().id().contains("F"))
1385 {
1386 message = i18n("Gamut Warnings don't work in floating point.");
1387 viewManager()->showFloatingMessage(message,QIcon());
1388 return;
1389 }
1390
1391 if (gamutCheck){
1392 message = i18n("Gamut Warnings turned on.");
1393 if (!d->softProofing){
1394 message += "\n "+i18n("But Soft Proofing is still off.");
1395 }
1396 } else {
1397 message = i18n("Gamut Warnings turned off.");
1398 }
1399 viewManager()->showFloatingMessage(message,QIcon());
1401}
void slotGamutCheck()
bool gamutCheck
Definition KisView.cpp:140

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

◆ slotImageNodeRemoved

void KisView::slotImageNodeRemoved ( KisNodeSP node)
privateslot

Definition at line 399 of file KisView.cpp.

400{
401 d->removeNodeConnection.start(KritaUtils::nearestNodeAfterRemoval(node));
402}
KisNodeSP nearestNodeAfterRemoval(KisNodeSP node)

References d, and KritaUtils::nearestNodeAfterRemoval().

◆ slotImageResolutionChanged

void KisView::slotImageResolutionChanged ( )
slot

Definition at line 1440 of file KisView.cpp.

1441{
1442 d->canvasController.syncOnImageResolutionChange();
1443 d->zoomManager.syncOnImageResolutionChange();
1445}
void updateImageBoundsSnapping()

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

◆ slotImageSizeChanged

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

Definition at line 1447 of file KisView.cpp.

1448{
1449 d->canvasController.syncOnImageSizeChange(oldStillPoint, newStillPoint);
1451}

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

◆ slotLoadingFinished

void KisView::slotLoadingFinished ( )
slot

Cold-start of image size/resolution signals

Definition at line 1413 of file KisView.cpp.

1414{
1415 if (!document()) return;
1416
1421
1422 if (image()->locked()) {
1423 // If this is the first view on the image, the image will have been locked
1424 // so unlock it.
1425 image()->blockSignals(false);
1426 image()->unlock();
1427 }
1428
1430
1431 connect(image(), SIGNAL(sigColorSpaceChanged(const KoColorSpace*)), this, SIGNAL(sigColorSpaceChanged(const KoColorSpace*)));
1432 connect(image(), SIGNAL(sigProfileChanged(const KoColorProfile*)), this, SIGNAL(sigProfileChanged(const KoColorProfile*)));
1433 connect(image(), SIGNAL(sigSizeChanged(QPointF,QPointF)), this, SIGNAL(sigSizeChanged(QPointF,QPointF)));
1434
1435 connect(&d->screenMigrationTracker, SIGNAL(sigScreenChanged(QScreen*)), this, SLOT(slotMigratedToScreen(QScreen*)));
1436 connect(&d->screenMigrationTracker, SIGNAL(sigScreenOrResolutionChanged(QScreen*)), this, SLOT(slotScreenOrResolutionChanged()));
1438}
void initializeImage()
void unlock()
Definition kis_image.cc:831
void sigColorSpaceChanged(const KoColorSpace *cs)
void slotMigratedToScreen(QScreen *screen)
Definition KisView.cpp:1208
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 1208 of file KisView.cpp.

1209{
1210 d->canvas.slotScreenChanged(screen);
1211}
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 1111 of file KisView.cpp.

1112{
1113 QStatusBar *sb = statusBar();
1114 if (sb) {
1115 sb->showMessage(text, timeout);
1116 }
1117
1118 KisConfig cfg(true);
1119
1120 if (!sb || sb->isHidden() ||
1121 (!isAutoSaving && cfg.forceShowSaveMessages()) ||
1122 (cfg.forceShowAutosaveMessages() && isAutoSaving)) {
1123
1124 viewManager()->showFloatingMessage(text, QIcon());
1125 }
1126}

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

◆ slotScreenOrResolutionChanged

void KisView::slotScreenOrResolutionChanged ( )
slot

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

Definition at line 1213 of file KisView.cpp.

1214{
1219 d->canvasController.updateScreenResolution(this);
1220
1221 if (d->canvas.resourceManager() && d->screenMigrationTracker.currentScreen()) {
1222 int penWidth = qRound(d->screenMigrationTracker.currentScreen()->devicePixelRatio());
1223 d->canvas.resourceManager()->setDecorationThickness(qMax(penWidth, 1));
1224 }
1225}
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 1361 of file KisView.cpp.

1362{
1363 d->softProofing = softProofing;
1364 QString message;
1365 if (canvasBase()->image()->colorSpace()->colorDepthId().id().contains("F"))
1366 {
1367 message = i18n("Soft Proofing doesn't work in floating point.");
1368 viewManager()->showFloatingMessage(message,QIcon());
1369 return;
1370 }
1371 if (softProofing){
1372 message = i18n("Soft Proofing turned on.");
1373 } else {
1374 message = i18n("Soft Proofing turned off.");
1375 }
1376 viewManager()->showFloatingMessage(message,QIcon());
1378}
void slotSoftProofing()
bool softProofing
Definition KisView.cpp:139

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

◆ slotThemeChanged

void KisView::slotThemeChanged ( QPalette pal)
slot

Definition at line 1232 of file KisView.cpp.

1233{
1234 this->setPalette(pal);
1235 for (int i=0; i<this->children().size();i++) {
1236 QWidget *w = qobject_cast<QWidget*> ( this->children().at(i));
1237 if (w) {
1238 w->setPalette(pal);
1239 }
1240 }
1241 if (canvasBase()) {
1242 canvasBase()->canvasWidget()->setPalette(pal);
1243 }
1244 if (canvasController()) {
1245 canvasController()->setPalette(pal);
1246 }
1247}
KisAbstractCanvasWidget * canvasWidget

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

◆ slotUpdateDocumentTitle

void KisView::slotUpdateDocumentTitle ( )
slot

Definition at line 1271 of file KisView.cpp.

1272{
1273 QString title = getTitle();
1274
1275 title += "[*]";
1276
1277 this->setWindowTitle(title);
1278}
QString getTitle()
Definition KisView.cpp:1249

References getTitle().

◆ 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 1105 of file KisView.cpp.

1106{
1107 KisMainWindow *mw = mainWindow();
1108 return mw ? mw->statusBar() : 0;
1109}

References mainWindow().

◆ syncLastActiveNodeToDocument()

void KisView::syncLastActiveNodeToDocument ( )

Definition at line 1280 of file KisView.cpp.

1281{
1282 KisDocument *doc = document();
1283 if (doc) {
1284 doc->setPreActivatedNode(d->currentNode);
1285 }
1286}
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 270 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 272 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

Definition at line 129 of file KisView.cpp.

◆ zoomManager

KisZoomManager * KisView::zoomManager

Definition at line 128 of file KisView.cpp.


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