Files
flameshot/src/tools/abstractactiontool.h
Haris Gušić 534f05b238 Refactor tool size handling (#1969)
* Add ConfigHandler::toolSize and setToolSize

* Refactor thickness (now toolSize) in CaptureWidget

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix update of tool size while object is drawn

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Rename thickness to tool size across the board

Tool size is the generic term. Depending on the selected tool,
different specialized names are used. This has always been the case
in the config.

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Reorder circle count tool

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* clang-format

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-20 00:01:35 +02:00

30 lines
894 B
C++

// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
#pragma once
#include "capturetool.h"
class AbstractActionTool : public CaptureTool
{
Q_OBJECT
public:
explicit AbstractActionTool(QObject* parent = nullptr);
bool isValid() const override;
bool isSelectable() const override;
bool showMousePreview() const override;
QRect boundingRect() const override;
void process(QPainter& painter, const QPixmap& pixmap) override;
void paintMousePreview(QPainter& painter,
const CaptureContext& context) override;
public slots:
void drawEnd(const QPoint& p) override;
void drawMove(const QPoint& p) override;
void drawStart(const CaptureContext& context) override;
void onColorChanged(const QColor& c) override;
void onSizeChanged(int size) override;
};