27 , m_continuedMode(false)
29 , m_numberOfContinuedModePoints(0)
30 , m_hasUserInteractionRunning(false)
48 if (event->key() == Qt::Key_Control ||
49 !(event->modifiers() & Qt::ControlModifier)) {
116 if (event->type() == QEvent::MouseButtonPress ||
117 event->type() == QEvent::MouseButtonDblClick) {
118 QMouseEvent *mouseEvent =
static_cast<QMouseEvent*
>(event);
119 if (mouseEvent->button() == Qt::RightButton) {
123 }
else if (event->type() == QEvent::TabletPress) {
124 QTabletEvent *tabletEvent =
static_cast<QTabletEvent*
>(event);
125 if (tabletEvent->button() == Qt::RightButton) {
141 const QRectF lastSegmentRect =
144 updateRect = updateRect.united(lastSegmentRect);
163 QString message = i18n(
"This tool cannot paint on clone layers. Please select a paint or vector layer or mask.");
169 QString message = i18n(
"The MyPaint Brush Engine is not available for this colorspace");
223 QPainterPath outline;
225 for (qint32 i = 1; i <
m_points.size(); ++i) {
240 qint32 lastPointIndex =
m_points.count() - 1;
242 QRectF updateRect = QRectF(
m_points[lastPointIndex - 1],
m_points[lastPointIndex]).normalized();
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisInputManager * globalInputManager() const
void updateCanvas(const QRectF &rc) override
KisViewManager * viewManager() const
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 spontaneous() const
return if this event was spontaneous (see QMouseEvent::spontaneous())
QPointF point
The point in document coordinates.
#define KIS_ASSERT_RECOVER_RETURN(cond)
T kisGrowRect(const T &rect, U offset)
#define koIcon(name)
Use these macros for icons without any issues.