45 int preserveAlpha = 0;
46 bool vectorMergeEnabled =
false;
47 bool bezier_state =
false;
48 bool closedPolylinePath =
false;
49 bool useFeather =
true;
52 int stabilizerLevel = 0;
54 bool toleranceEnabled =
false;
55 int bucketFillExpand = 0;
56 bool bucketFillExpandEnabled = 0;
57 int bucketFillReferenceMode = 0;
58 bool useFillContour =
false;
59 bool showSelectionInfo =
true;
60 bool cameraShowPath =
true;
61 DotColorType cameraPathDotColorType = DotColorType::RED;
66const int DISABLED = -1;
76 static QString TypeName(ToolType);
77 QString typeName() {
return TypeName(type()); }
79 void initialize(
Editor* editor);
81 virtual ToolType type() = 0;
82 virtual void loadSettings() = 0;
91 virtual bool keyPressEvent(
QKeyEvent*) {
return false; }
92 virtual bool keyReleaseEvent(
QKeyEvent*) {
return false; }
94 virtual bool enterEvent(
QEnterEvent*) {
return false; }
95 virtual bool leaveEvent(
QEvent*) {
return false; }
97 virtual void clearToolData() {}
98 virtual void resetToDefault() {}
109 virtual void setWidth(
const qreal width);
110 virtual void setFeather(
const qreal feather);
112 virtual void setInvisibility(
const bool invisibility);
113 virtual void setBezier(
const bool bezier_state);
114 virtual void setClosedPath(
const bool closed);
115 virtual void setPressure(
const bool pressure);
116 virtual void setUseFeather(
const bool usingFeather);
117 virtual void setPreserveAlpha(
const bool preserveAlpha);
118 virtual void setVectorMergeEnabled(
const bool vectorMergeEnabled);
119 virtual void setAA(
const int useAA);
120 virtual void setFillMode(
const int mode);
121 virtual void setStabilizerLevel(
const int level);
122 virtual void setTolerance(
const int tolerance);
123 virtual void setToleranceEnabled(
const bool enabled);
124 virtual void setFillExpand(
const int fillExpandValue);
125 virtual void setFillExpandEnabled(
const bool enabled);
126 virtual void setFillReferenceMode(
int referenceMode);
127 virtual void setUseFillContour(
const bool useFillContour);
128 virtual void setShowSelectionInfo(
const bool b);
129 virtual void setShowCameraPath(
const bool showCameraPath);
130 virtual void setPathDotColorType(
const DotColorType dotColorType);
131 virtual void resetCameraPath();
133 virtual void paint(
QPainter& painter,
const QRect& blitRect) { Q_UNUSED(painter) Q_UNUSED(blitRect) }
144 bool isPropertyEnabled(ToolPropertyType t) {
return mPropertyEnabled[t]; }
148 bool isActiveChanged(ToolType,
bool);
151 Editor* editor() {
return mEditor; }
155 Editor* mEditor =
nullptr;
QObject * parent() const const