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;
125 connect(&
d->
scrollTimer, SIGNAL(timeout()),
this, SLOT(timeout()));
210 switch (event->type()) {
211 case QEvent::TabletPress:
214 case QEvent::TabletRelease:
219 case QEvent::TabletMove:
397 Q_FOREACH(QAction *action, collection->
actions()) {
399 const QVariant prop = action->property(
"tool_action");
401 if (prop.isValid()) {
406 std::copy(shortcuts.begin(), shortcuts.end(),
426 switch (event->touchPointStates())
428 case Qt::TouchPointPressed:
431 case Qt::TouchPointMoved:
434 case Qt::TouchPointReleased:
478 bool success =
false;
489 bool success =
false;
530 if(e->type()==QEvent::ShortcutOverride
533 && (
static_cast<QKeyEvent*
>(e)->modifiers()==Qt::NoModifier ||
534 static_cast<QKeyEvent*
>(e)->modifiers()==Qt::ShiftModifier
537 || (
static_cast<QKeyEvent*
>(e)->modifiers()==(Qt::AltModifier | Qt::ControlModifier) &&
538 static_cast<QKeyEvent*
>(e)->key() < Qt::Key_Escape)
579#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
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)