|
Krita Source Code Documentation
|
#include <NodeDelegate.h>
Inheritance diagram for NodeDelegate:Classes | |
| class | Private |
Public Slots | |
| void | slotConfigChanged () |
Signals | |
| void | resetVisibilityStasis () |
Public Member Functions | |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| void | drawBranches (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| bool | editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override |
| NodeDelegate (NodeView *view, QObject *parent=0) | |
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| void | slotUpdateIcon () |
| void | toggleSolo (const QModelIndex &index) |
| void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| ~NodeDelegate () override | |
Protected Member Functions | |
| bool | eventFilter (QObject *object, QEvent *event) override |
Private Types | |
| typedef KisNodeModel | Model |
| typedef NodeView | View |
Private Slots | |
| void | slotResetState () |
Private Member Functions | |
| void | changeSelectionAndCurrentIndex (const QModelIndex &index) |
| QRect | decorationClickRect (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawAnimatedDecoration (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawColorLabel (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawDecoration (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawExpandButton (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawFrame (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawIcons (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawProgressBar (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawSelectedButton (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index, QStyle *style) const |
| void | drawText (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawThumbnail (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | drawVisibilityIcon (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| QRect | filterColorClickRect (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| QRect | iconsRect (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| QRect | textRect (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| QRect | thumbnailClickRect (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| QRect | visibilityClickRect (const QStyleOptionViewItem &option, const QModelIndex &index) const |
Static Private Member Functions | |
| static QStyleOptionViewItem | getOptions (const QStyleOptionViewItem &option, const QModelIndex &index) |
Private Attributes | |
| Private *const | d |
See KisNodeModel and NodeView.
A delegate provides the gui machinery, using Qt's model/view terminology. This class is owned by NodeView to do the work of generating the graphical representation of each item.
Definition at line 22 of file NodeDelegate.h.
|
private |
Definition at line 50 of file NodeDelegate.h.
|
private |
Definition at line 51 of file NodeDelegate.h.
|
explicit |
Definition at line 89 of file NodeDelegate.cpp.
References connect(), d, KisConfigNotifier::instance(), resetVisibilityStasis(), slotConfigChanged(), slotResetState(), and NodeDelegate::Private::view.
|
override |
|
private |
Definition at line 1166 of file NodeDelegate.cpp.
References d, and NodeDelegate::Private::view.
|
override |
Definition at line 1190 of file NodeDelegate.cpp.
References d, and NodeDelegate::Private::edit.
|
private |
Definition at line 818 of file NodeDelegate.cpp.
References d, KisNodeViewColorScheme::relDecorationRect(), NodeDelegate::Private::rowHeight, and NodeDelegate::Private::thumbnailGeometry.
|
private |
Definition at line 932 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), decorationClickRect(), KisNodeViewColorScheme::decorationMargin(), KisNodeViewColorScheme::decorationSize(), KisNodeModel::IsAnimatedRole, kisGrowRect(), KisIconUtils::loadIcon(), and p.
| void NodeDelegate::drawBranches | ( | QPainter * | p, |
| const QStyleOptionViewItem & | option, | ||
| const QModelIndex & | index ) const |
Definition at line 151 of file NodeDelegate.cpp.
References KisPaintingTweaks::blendColors(), d, drawFrame(), KisNodeViewColorScheme::gridColor(), KisNodeViewColorScheme::iconSize(), KisNodeViewColorScheme::instance(), p, p2, p3, and NodeDelegate::Private::view.
|
private |
Definition at line 211 of file NodeDelegate.cpp.
References KisPaintingTweaks::blendColors(), KisNodeViewColorScheme::colorFromLabelIndex(), KisNodeModel::ColorLabelIndexRole, iconsRect(), and p.
|
private |
Definition at line 882 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), decorationClickRect(), KisNodeViewColorScheme::decorationMargin(), KisNodeViewColorScheme::decorationSize(), kisGrowRect(), and p.
|
private |
Definition at line 909 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), decorationClickRect(), KisNodeViewColorScheme::decorationMargin(), KisNodeViewColorScheme::decorationSize(), kisGrowRect(), KisIconUtils::loadIcon(), and p.
|
private |
Definition at line 226 of file NodeDelegate.cpp.
References d, KisNodeViewColorScheme::gridColor(), iconsRect(), p, thumbnailClickRect(), NodeDelegate::Private::view, and visibilityClickRect().
|
private |
Definition at line 731 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), KisLayerPropertiesIcons::colorOverlay, d, filterColorClickRect(), KisNodeModel::FilterMaskColorRole, KisNodeViewColorScheme::gridColor(), KisNodeViewColorScheme::iconMargin(), KisNodeViewColorScheme::iconSize(), iconsRect(), KoID::id(), KisBaseNode::Property::id, KisNodeModel::LayerColorOverlayColorRole, KisBaseNode::Property::offIcon, KisBaseNode::Property::onIcon, p, KisNodeModel::PropertiesRole, NodeDelegate::Private::rightmostProperties(), NodeDelegate::Private::rowHeight, KisBaseNode::Property::state, and NodeDelegate::Private::view.
|
private |
The progress bar will display under the layer name area. The bars have accurate data, so we probably don't need to also show the actual number for % complete
Definition at line 1319 of file NodeDelegate.cpp.
References iconsRect(), p, KisNodeModel::ProgressRole, thumbnailClickRect(), and value().
|
private |
Definition at line 963 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), d, kisGrowRect(), p, KisNodeViewColorScheme::thumbnailMargin(), and NodeDelegate::Private::view.
|
private |
Definition at line 363 of file NodeDelegate.cpp.
References KisConfig::INFOTEXT_NONE, KisNodeModel::InfoTextRole, KisConfig::layerInfoTextOpacity(), KisConfig::layerInfoTextStyle(), p, KisNodeViewColorScheme::textMargin(), textRect(), and KisConfig::useInlineLayerInfoText().
|
private |
Definition at line 282 of file NodeDelegate.cpp.
References KisNodeModel::BeginThumbnailRole, KisNodeViewColorScheme::border(), NodeDelegate::Private::checkers, d, KisNodeViewColorScheme::gridColor(), kisGrowRect(), p, KritaUtils::renderExactRect(), thumbnailClickRect(), KisNodeViewColorScheme::thumbnailMargin(), NodeDelegate::Private::thumbnailSize, and NodeDelegate::Private::view.
|
private |
Definition at line 838 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), d, NodeDelegate::Private::findVisibilityProperty(), kisGrowRect(), p, KisNodeModel::PropertiesRole, NodeDelegate::Private::view, visibilityClickRect(), KisNodeViewColorScheme::visibilityMargin(), and KisNodeViewColorScheme::visibilitySize().
|
override |
Definition at line 1038 of file NodeDelegate.cpp.
References KisNodeModel::AlternateActiveRole, changeSelectionAndCurrentIndex(), d, decorationClickRect(), filterColorClickRect(), KisNodeModel::FilterMaskColorRole, KisNodeModel::FilterMaskPropertiesRole, NodeDelegate::Private::findVisibilityProperty(), KisConfig::hidePopups(), KoID::id(), KisLayerPropertiesIcons::layerColorSpaceMismatch, KisLayerPropertiesIcons::layerError, KisNodeModel::PropertiesRole, NodeDelegate::Private::propForMousePos(), NodeView::SELECTED_COL, SELECTION_ADD, SELECTION_INTERSECT, SELECTION_REPLACE, SELECTION_SUBTRACT, KisNodeModel::SelectOpaqueRole, KoItemToolTip::showTip(), thumbnailClickRect(), NodeDelegate::Private::tip, NodeDelegate::Private::toggleProperty(), NodeDelegate::Private::view, NodeView::VISIBILITY_COL, and visibilityClickRect().
|
overrideprotected |
Definition at line 1225 of file NodeDelegate.cpp.
References d, and NodeDelegate::Private::edit.
|
private |
Definition at line 1416 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::iconMargin(), KisNodeViewColorScheme::iconSize(), and iconsRect().
|
staticprivate |
Definition at line 1298 of file NodeDelegate.cpp.
References v.
|
private |
Definition at line 318 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), d, KisNodeViewColorScheme::iconMargin(), KisNodeViewColorScheme::iconSize(), NodeDelegate::Private::numProperties(), and NodeDelegate::Private::rowHeight.
|
override |
Definition at line 115 of file NodeDelegate.cpp.
References drawAnimatedDecoration(), drawColorLabel(), drawDecoration(), drawExpandButton(), drawFrame(), drawIcons(), drawProgressBar(), drawSelectedButton(), drawText(), drawThumbnail(), drawVisibilityIcon(), getOptions(), p, NodeView::SELECTED_COL, KisNodeModel::ShouldGrayOutRole, and NodeView::VISIBILITY_COL.
|
signal |
|
override |
Definition at line 1201 of file NodeDelegate.cpp.
|
override |
Definition at line 106 of file NodeDelegate.cpp.
References d, NodeDelegate::Private::rowHeight, NodeView::VISIBILITY_COL, and KisNodeViewColorScheme::visibilityColumnWidth().
|
slot |
Definition at line 1360 of file NodeDelegate.cpp.
References NodeDelegate::Private::checkers, KisConfig::checkersColor1(), NodeDelegate::Private::checkersColor1, KisConfig::checkersColor2(), NodeDelegate::Private::checkersColor2, d, KisNodeViewColorScheme::instance(), KisNodeViewColorScheme::relThumbnailRect(), KisNodeViewColorScheme::rowHeight(), NodeDelegate::Private::rowHeight, NodeDelegate::Private::thumbnailGeometry, KisNodeViewColorScheme::thumbnailSize(), and NodeDelegate::Private::thumbnailSize.
|
privateslot |
Definition at line 1400 of file NodeDelegate.cpp.
References d, NodeDelegate::Private::findVisibilityProperty(), KisNodeModel::PropertiesRole, NodeDelegate::Private::resetPropertyStateRecursive(), NodeDelegate::Private::stasisIsDirty(), and NodeDelegate::Private::view.
| void NodeDelegate::slotUpdateIcon | ( | ) |
Definition at line 1395 of file NodeDelegate.cpp.
References KisLayerPropertiesIcons::instance(), and KisLayerPropertiesIcons::updateIcons().
|
private |
Definition at line 341 of file NodeDelegate.cpp.
References KisNodeViewColorScheme::border(), decorationClickRect(), and iconsRect().
|
private |
Definition at line 264 of file NodeDelegate.cpp.
References d, and NodeDelegate::Private::thumbnailGeometry.
| void NodeDelegate::toggleSolo | ( | const QModelIndex & | index | ) |
Definition at line 1215 of file NodeDelegate.cpp.
References d, NodeDelegate::Private::findVisibilityProperty(), KisNodeModel::PropertiesRole, and NodeDelegate::Private::toggleProperty().
|
override |
Definition at line 1209 of file NodeDelegate.cpp.
|
private |
Definition at line 798 of file NodeDelegate.cpp.
References d, KisNodeViewColorScheme::relVisibilityRect(), and NodeDelegate::Private::rowHeight.
|
private |
Definition at line 53 of file NodeDelegate.h.