Made undo tool aware of circle count to decrement. Refactored tool ID's to be enum

This commit is contained in:
Jeremy Borgman
2020-09-07 14:47:49 -05:00
committed by borgmanJeremy
parent ed4ea1377b
commit 6afa3ca26a
47 changed files with 166 additions and 81 deletions

View File

@@ -40,10 +40,10 @@ RectangleTool::name() const
return tr("Rectangle");
}
QString
RectangleTool::nameID()
ToolType
RectangleTool::nameID() const
{
return QLatin1String("");
return ToolType::RECTANGLE;
}
QString

View File

@@ -27,7 +27,6 @@ public:
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;
static QString nameID();
QString description() const override;
CaptureTool* copy(QObject* parent = nullptr) override;
@@ -37,6 +36,9 @@ public:
void paintMousePreview(QPainter& painter,
const CaptureContext& context) override;
protected:
ToolType nameID() const override;
public slots:
void drawStart(const CaptureContext& context) override;
void pressed(const CaptureContext& context) override;