12#include <QApplication>
21#include <klocalizedstring.h>
55 const QPointF margin(10.0, 10.0);
58 const QPointF mouseAreaBottomRightWidget = mouseAreaTopLeftWidget + 2 * margin;
62 QRectF mouseAreaDoc(mouseAreaTopLeftDoc, mouseAreaBottomRightDoc);
72 if (oldPreferredCenter == newPreferredCenter) {
78 QMouseEvent event(QEvent::MouseMove, originalWidgetPoint, Qt::LeftButton, Qt::LeftButton, QFlags<Qt::KeyboardModifier>());
90 if (event.
buttons() != Qt::LeftButton)
return;
123 connect(&
d->
scrollTimer, SIGNAL(timeout()),
this, SLOT(timeout()));
208 switch (event->type()) {
209 case QEvent::TabletPress:
212 case QEvent::TabletRelease:
217 case QEvent::TabletMove:
395 Q_FOREACH(QAction *action, collection->
actions()) {
397 const QVariant prop = action->property(
"tool_action");
399 if (prop.isValid()) {
404 std::copy(shortcuts.begin(), shortcuts.end(),
424 switch (event->touchPointStates())
426 case Qt::TouchPointPressed:
429 case Qt::TouchPointMoved:
432 case Qt::TouchPointReleased:
476 bool success =
false;
487 bool success =
false;
528 if(e->type()==QEvent::ShortcutOverride
531 && (
static_cast<QKeyEvent*
>(e)->modifiers()==Qt::NoModifier ||
532 static_cast<QKeyEvent*
>(e)->modifiers()==Qt::ShiftModifier
535 || (
static_cast<QKeyEvent*
>(e)->modifiers()==(Qt::AltModifier | Qt::ControlModifier) &&
536 static_cast<QKeyEvent*
>(e)->key() < Qt::Key_Escape)
577#include "moc_KoToolProxy.cpp"
A container for a set of QAction objects.
QList< QAction * > actions() const
virtual KoShapeManager * shapeManager() const =0
virtual QPointF preferredCenter() const =0
Returns the currently set preferred center point in view coordinates (pixels)
virtual void ensureVisibleDoc(const QRectF &docRect, bool smooth)=0
Scrolls the content of the canvas so that the given rect is visible.
KisKActionCollection * actionCollection
QPointer< KoToolManager > toolManager
virtual KoCanvasBase * canvas() const
QPoint globalPos() const
Return the position screen coordinates.
Qt::MouseButtons buttons() const
return buttons pressed (see QMouseEvent::buttons());
bool isAccepted() const
return if the event has been accepted.
KoPointerEventWrapper deepCopyEvent() const
QPoint pos() const
return the position in widget coordinates
KoShapeLayer * activeLayer() const
virtual bool isShapeEditable(bool recursive=true) const
checks recursively if the shape or one of its parents is not visible or locked
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)