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

@@ -46,10 +46,10 @@ SelectionTool::name() const
return tr("Rectangular Selection");
}
QString
SelectionTool::nameID()
ToolType
SelectionTool::nameID() const
{
return QLatin1String("");
return ToolType::SELECTION;
}
QString

View File

@@ -29,7 +29,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;
@@ -39,6 +38,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;