12#include <QApplication>
21#include <klocalizedstring.h>
54 mouseArea.setTopLeft(mouseArea.center());
63 if (oldPreferredCenter == newPreferredCenter) {
69 QMouseEvent event(QEvent::MouseMove, originalWidgetPoint, Qt::LeftButton, Qt::LeftButton, QFlags<Qt::KeyboardModifier>());
81 if (event.
buttons() != Qt::LeftButton)
return;
116 connect(&
d->
scrollTimer, SIGNAL(timeout()),
this, SLOT(timeout()));
196 switch (event->type()) {
197 case QEvent::TabletPress:
200 case QEvent::TabletRelease:
205 case QEvent::TabletMove:
383 Q_FOREACH(QAction *action, collection->
actions()) {
385 const QVariant prop = action->property(
"tool_action");
387 if (prop.isValid()) {
392 std::copy(shortcuts.begin(), shortcuts.end(),
412 switch (event->touchPointStates())
414 case Qt::TouchPointPressed:
417 case Qt::TouchPointMoved:
420 case Qt::TouchPointReleased:
464 bool success =
false;
475 bool success =
false;
516 if(e->type()==QEvent::ShortcutOverride
519 && (
static_cast<QKeyEvent*
>(e)->modifiers()==Qt::NoModifier ||
520 static_cast<QKeyEvent*
>(e)->modifiers()==Qt::ShiftModifier
523 || (
static_cast<QKeyEvent*
>(e)->modifiers()==(Qt::AltModifier | Qt::ControlModifier) &&
524 static_cast<QKeyEvent*
>(e)->key() < Qt::Key_Escape)
565#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)