45 int preserveAlpha = 0;
46 bool vectorMergeEnabled =
false;
47 bool bezier_state =
false;
48 bool useFeather =
true;
51 int stabilizerLevel = 0;
53 bool toleranceEnabled =
false;
54 int bucketFillExpand = 0;
55 bool bucketFillExpandEnabled = 0;
56 int bucketFillReferenceMode = 0;
57 bool useFillContour =
false;
58 bool showSelectionInfo =
true;
59 bool cameraShowPath =
true;
60 DotColorType cameraPathDotColorType = DotColorType::RED;
65const int DISABLED = -1;
75 static QString TypeName(ToolType);
76 QString typeName() {
return TypeName(type()); }
78 void initialize(
Editor* editor);
80 virtual ToolType type() = 0;
81 virtual void loadSettings() = 0;
90 virtual bool keyPressEvent(
QKeyEvent*) {
return false; }
91 virtual bool keyReleaseEvent(
QKeyEvent*) {
return false; }
93 virtual void clearToolData() {}
94 virtual void resetToDefault() {}
105 virtual void setWidth(
const qreal width);
106 virtual void setFeather(
const qreal feather);
107 virtual void setInvisibility(
const bool invisibility);
108 virtual void setBezier(
const bool bezier_state);
109 virtual void setPressure(
const bool pressure);
110 virtual void setUseFeather(
const bool usingFeather);
111 virtual void setPreserveAlpha(
const bool preserveAlpha);
112 virtual void setVectorMergeEnabled(
const bool vectorMergeEnabled);
113 virtual void setAA(
const int useAA);
114 virtual void setFillMode(
const int mode);
115 virtual void setStabilizerLevel(
const int level);
116 virtual void setTolerance(
const int tolerance);
117 virtual void setToleranceEnabled(
const bool enabled);
118 virtual void setFillExpand(
const int fillExpandValue);
119 virtual void setFillExpandEnabled(
const bool enabled);
120 virtual void setFillReferenceMode(
int referenceMode);
121 virtual void setUseFillContour(
const bool useFillContour);
122 virtual void setShowSelectionInfo(
const bool b);
123 virtual void setShowCameraPath(
const bool showCameraPath);
124 virtual void setPathDotColorType(
const DotColorType dotColorType);
125 virtual void resetCameraPath();
127 virtual void paint(
QPainter& painter,
const QRect& blitRect) { Q_UNUSED(painter) Q_UNUSED(blitRect) }
138 bool isPropertyEnabled(ToolPropertyType t) {
return mPropertyEnabled[t]; }
142 bool isActiveChanged(ToolType,
bool);
145 Editor* editor() {
return mEditor; }
149 Editor* mEditor =
nullptr;
QObject * parent() const const