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:1118
Private *const d
Definition KisView.h:264
void slotScreenOrResolutionChanged()
Definition KisView.cpp:1200
QStatusBar * statusBar() const
Definition KisView.cpp:1095
KisViewManager * viewManager
Definition KisView.cpp:129
void slotSavingStatusMessage(const QString &text, int timeout, bool isAutoSaving=false)
Definition KisView.cpp:1101
QPointer< KisDocument > document
Definition KisView.cpp:121
void slotLoadingFinished()
Definition KisView.cpp:1393
void slotUpdateDocumentTitle()
Definition KisView.cpp:1236
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 1132 of file KisView.cpp.

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

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

◆ closeView()

void KisView::closeView ( )

Definition at line 1433 of file KisView.cpp.

1434{
1435 d->subWindow->close();
1436}

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

1127{
1128 UnitActionGroup* unitActions = new UnitActionGroup(d->document, addPixelUnit, this);
1129 return unitActions->actions();
1130}

References d.

◆ currentLayer()

KisLayerSP KisView::currentLayer ( ) const

Definition at line 1311 of file KisView.cpp.

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

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

◆ currentMask()

KisMaskSP KisView::currentMask ( ) const

Definition at line 1324 of file KisView.cpp.

1325{
1326 return dynamic_cast<KisMask*>(d->currentNode.data());
1327}

References d.

◆ currentNode()

KisNodeSP KisView::currentNode ( ) const

◆ currentScreen()

QScreen * KisView::currentScreen ( ) const

Returns the current screen that the view belongs to

Definition at line 1214 of file KisView.cpp.

1215{
1216 return d->screenMigrationTracker.currentScreen();
1217}

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:1438
#define dbgUI
Definition kis_debug.h:52

References dbgUI, and shouldAcceptDrag().

◆ dragMoveEvent()

void KisView::dragMoveEvent ( QDragMoveEvent * event)
overrideprotected

Definition at line 1058 of file KisView.cpp.

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

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

1086{
1087 return d->viewManager->mainWindow();
1088}

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

1152{
1153 if (!document())
1154 return true;
1155
1156 document()->waitForSavingToComplete();
1157
1158 if (document()->isModified()) {
1159 QString name;
1160 name = QFileInfo(document()->path()).fileName();
1161
1162 if (name.isEmpty())
1163 name = i18n("Untitled");
1164
1165 int res = QMessageBox::warning(this,
1166 i18nc("@title:window", "Krita"),
1167 i18n("<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>", name),
1168 QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes);
1169
1170 switch (res) {
1171 case QMessageBox::Yes : {
1172 bool isNative = (document()->mimeType() == document()->nativeFormatMimeType());
1173 if (!viewManager()->mainWindow()->saveDocument(document(), !isNative, false))
1174 return false;
1175 break;
1176 }
1177 case QMessageBox::No : {
1178 KisImageSP image = document()->image();
1181
1182 document()->removeAutoSaveFiles(document()->localFilePath(), document()->isRecovered());
1183 document()->setModified(false); // Now when queryClose() is called by closeEvent it won't do anything.
1184 break;
1185 }
1186 default : // case QMessageBox::Cancel :
1187 return false;
1188 }
1189 }
1190
1191 return true;
1192
1193}
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 1077 of file KisView.cpp.

1078{
1079 KisMainWindow *window = mainWindow();
1080 QMdiSubWindow *subWindow = d->subWindow;
1081 delete this;
1082 return window->newView(document, subWindow);
1083}
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 1285 of file KisView.cpp.

1286{
1287 if (d->subWindow) {
1288 QByteArray geometry = QByteArray::fromBase64(config.getString("geometry", "").toLatin1());
1289 d->subWindow->restoreGeometry(QByteArray::fromBase64(geometry));
1290 }
1291
1292 qreal zoom = config.getFloat("zoom", 1.0f);
1293 int zoomMode = config.getInt("zoomMode", (int)KoZoomMode::ZOOM_PAGE);
1294 d->canvasController.setZoom((KoZoomMode::Mode)zoomMode, zoom);
1295 d->canvasController.restoreCanvasState(config);
1296}
@ 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 1268 of file KisView.cpp.

1269{
1270 config.setProperty("file", d->document->path());
1271 config.setProperty("window", mainWindow()->windowStateConfig().name());
1272
1273 if (d->subWindow) {
1274 config.setProperty("geometry", d->subWindow->saveGeometry().toBase64());
1275 }
1276
1277 const KoZoomState zoomState = d->canvasController.zoomState();
1278
1279 config.setProperty("zoomMode", zoomState.mode);
1280 config.setProperty("zoom", zoomState.zoom);
1281
1282 d->canvasController.saveCanvasState(config);
1283}
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 1329 of file KisView.cpp.

1330{
1331 KisLayerSP layer = currentLayer();
1332 if (layer)
1333 return layer->selection(); // falls through to the global
1334 // selection, or 0 in the end
1335 if (image()) {
1336 return image()->globalSelection();
1337 }
1338 return 0;
1339}
KisSelectionSP globalSelection() const
Definition kis_image.cc:695
KisLayerSP currentLayer() const
Definition KisView.cpp:1311
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 1298 of file KisView.cpp.

1299{
1300 d->currentNode = node;
1302
1304}
void slotTrySwitchShapeManager()
void syncLastActiveNodeToDocument()
Definition KisView.cpp:1260

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

1091{
1092 d->subWindow = subWindow;
1093}

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:1420
void slotImageSizeChanged(const QPointF &oldStillPoint, const QPointF &newStillPoint)
Definition KisView.cpp:1427
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 1438 of file KisView.cpp.

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

1119{
1120 QStatusBar *sb = statusBar();
1121 if (sb) {
1122 sb->clearMessage();
1123 }
1124}

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

1361{
1362 d->gamutCheck = gamutCheck;
1363 QString message;
1364 if (canvasBase()->image()->colorSpace()->colorDepthId().id().contains("F"))
1365 {
1366 message = i18n("Gamut Warnings don't work in floating point.");
1367 viewManager()->showFloatingMessage(message,QIcon());
1368 return;
1369 }
1370
1371 if (gamutCheck){
1372 message = i18n("Gamut Warnings turned on.");
1373 if (!d->softProofing){
1374 message += "\n "+i18n("But Soft Proofing is still off.");
1375 }
1376 } else {
1377 message = i18n("Gamut Warnings turned off.");
1378 }
1379 viewManager()->showFloatingMessage(message,QIcon());
1381}
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 1420 of file KisView.cpp.

1421{
1422 d->canvasController.syncOnImageResolutionChange();
1423 d->zoomManager.syncOnImageResolutionChange();
1425}
void updateImageBoundsSnapping()

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

◆ slotImageSizeChanged

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

Definition at line 1427 of file KisView.cpp.

1428{
1429 d->canvasController.syncOnImageSizeChange(oldStillPoint, newStillPoint);
1431}

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

◆ slotLoadingFinished

void KisView::slotLoadingFinished ( )
slot

Cold-start of image size/resolution signals

Definition at line 1393 of file KisView.cpp.

1394{
1395 if (!document()) return;
1396
1401
1402 if (image()->locked()) {
1403 // If this is the first view on the image, the image will have been locked
1404 // so unlock it.
1405 image()->blockSignals(false);
1406 image()->unlock();
1407 }
1408
1410
1411 connect(image(), SIGNAL(sigColorSpaceChanged(const KoColorSpace*)), this, SIGNAL(sigColorSpaceChanged(const KoColorSpace*)));
1412 connect(image(), SIGNAL(sigProfileChanged(const KoColorProfile*)), this, SIGNAL(sigProfileChanged(const KoColorProfile*)));
1413 connect(image(), SIGNAL(sigSizeChanged(QPointF,QPointF)), this, SIGNAL(sigSizeChanged(QPointF,QPointF)));
1414
1415 connect(&d->screenMigrationTracker, SIGNAL(sigScreenChanged(QScreen*)), this, SLOT(slotMigratedToScreen(QScreen*)));
1416 connect(&d->screenMigrationTracker, SIGNAL(sigScreenOrResolutionChanged(QScreen*)), this, SLOT(slotScreenOrResolutionChanged()));
1418}
void initializeImage()
void unlock()
Definition kis_image.cc:805
void sigColorSpaceChanged(const KoColorSpace *cs)
void slotMigratedToScreen(QScreen *screen)
Definition KisView.cpp:1195
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 1195 of file KisView.cpp.

1196{
1197 d->canvas.slotScreenChanged(screen);
1198}
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 1101 of file KisView.cpp.

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

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

1201{
1206 d->canvasController.updateScreenResolution(this);
1207
1208 if (d->canvas.resourceManager() && d->screenMigrationTracker.currentScreen()) {
1209 int penWidth = qRound(d->screenMigrationTracker.currentScreen()->devicePixelRatio());
1210 d->canvas.resourceManager()->setDecorationThickness(qMax(penWidth, 1));
1211 }
1212}
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 1341 of file KisView.cpp.

1342{
1343 d->softProofing = softProofing;
1344 QString message;
1345 if (canvasBase()->image()->colorSpace()->colorDepthId().id().contains("F"))
1346 {
1347 message = i18n("Soft Proofing doesn't work in floating point.");
1348 viewManager()->showFloatingMessage(message,QIcon());
1349 return;
1350 }
1351 if (softProofing){
1352 message = i18n("Soft Proofing turned on.");
1353 } else {
1354 message = i18n("Soft Proofing turned off.");
1355 }
1356 viewManager()->showFloatingMessage(message,QIcon());
1358}
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 1219 of file KisView.cpp.

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

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

◆ slotUpdateDocumentTitle

void KisView::slotUpdateDocumentTitle ( )
slot

Definition at line 1236 of file KisView.cpp.

1237{
1238 QString title = d->document->caption();
1239
1240 if (!d->document->isReadWrite()) {
1241 title += " " + i18n("Write Protected");
1242 }
1243
1244 if (d->document->isRecovered()) {
1245 title += " " + i18n("Recovered");
1246 }
1247
1248 // show the file size for the document
1250
1251 if (fileSizeStats.imageSize) {
1252 title += QString(" (").append( KFormat().formatByteSize(qreal(fileSizeStats.imageSize))).append( ") ");
1253 }
1254
1255 title += "[*]";
1256
1257 this->setWindowTitle(title);
1258}
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 1095 of file KisView.cpp.

1096{
1097 KisMainWindow *mw = mainWindow();
1098 return mw ? mw->statusBar() : 0;
1099}

References mainWindow().

◆ syncLastActiveNodeToDocument()

void KisView::syncLastActiveNodeToDocument ( )

Definition at line 1260 of file KisView.cpp.

1261{
1262 KisDocument *doc = document();
1263 if (doc) {
1264 doc->setPreActivatedNode(d->currentNode);
1265 }
1266}
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: