Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/KisNodeView.cpp
Context not available. | |||||
28 | #include <kconfiggroup.h> | 28 | #include <kconfiggroup.h> | ||
---|---|---|---|---|---|
29 | #include <kis_icon.h> | 29 | #include <kis_icon.h> | ||
30 | #include <ksharedconfig.h> | 30 | #include <ksharedconfig.h> | ||
31 | #include <KisKineticScroller.h> | ||||
31 | 32 | | |||
32 | #include <QtDebug> | 33 | #include <QtDebug> | ||
33 | #include <QContextMenuEvent> | 34 | #include <QContextMenuEvent> | ||
Context not available. | |||||
40 | #include <QApplication> | 41 | #include <QApplication> | ||
41 | #include <QPainter> | 42 | #include <QPainter> | ||
42 | #include <QScrollBar> | 43 | #include <QScrollBar> | ||
44 | #include <QScroller> | ||||
43 | 45 | | |||
44 | #include "kis_node_view_color_scheme.h" | 46 | #include "kis_node_view_color_scheme.h" | ||
45 | 47 | | |||
Context not available. | |||||
99 | setDragEnabled(true); | 101 | setDragEnabled(true); | ||
100 | setDragDropMode(QAbstractItemView::DragDrop); | 102 | setDragDropMode(QAbstractItemView::DragDrop); | ||
101 | setAcceptDrops(true); | 103 | setAcceptDrops(true); | ||
102 | | ||||
103 | setDropIndicatorShown(true); | 104 | setDropIndicatorShown(true); | ||
105 | | ||||
106 | { | ||||
107 | QScroller *scroller = KisKineticScroller::createPreconfiguredScroller(this); | ||||
108 | if (scroller) { | ||||
109 | connect(scroller, SIGNAL(stateChanged(QScroller::State)), | ||||
110 | this, SLOT(slotScrollerStateChanged(QScroller::State))); | ||||
111 | } | ||||
112 | } | ||||
104 | } | 113 | } | ||
105 | 114 | | |||
106 | KisNodeView::~KisNodeView() | 115 | KisNodeView::~KisNodeView() | ||
Context not available. | |||||
571 | { | 580 | { | ||
572 | d->delegate.slotUpdateIcon(); | 581 | d->delegate.slotUpdateIcon(); | ||
573 | } | 582 | } | ||
583 | | ||||
584 | void KisNodeView::slotScrollerStateChanged(QScroller::State state){ | ||||
585 | KisKineticScroller::updateCursor(this, state); | ||||
586 | } | ||||
Context not available. |