29#include "toolproperties.h"
43const int DISABLED = -1;
53 static QString TypeName(ToolType);
54 QString typeName() {
return TypeName(type()); }
56 void initialize(
Editor* editor);
58 virtual ToolType type()
const = 0;
61 virtual void loadSettings() = 0;
73 virtual bool keyPressEvent(
QKeyEvent*) {
return false; }
74 virtual bool keyReleaseEvent(
QKeyEvent*) {
return false; }
76 virtual bool enterEvent(
QEnterEvent*) {
return false; }
77 virtual bool leaveEvent(
QEvent*) {
return false; }
79 virtual void clearToolData() {}
90 virtual void paint(
QPainter& painter,
const QRect& blitRect) { Q_UNUSED(painter) Q_UNUSED(blitRect) }
99 bool isPropertyEnabled(
int rawType);
103 bool isActiveChanged(ToolType,
bool);
106 Editor* editor() {
return mEditor; }
109 Editor* mEditor =
nullptr;
QObject * parent() const const