Refactor code related to CaptureWidget (#1801)
* Make CaptureWidget::initShortcuts uniform Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Disable window flags in debug builds Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Remove pointer in extendedRect parameter Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Move color initialization to the constructor * Rename updateButtons to initButtons Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Rename handleButtonSignal to handleToolSignal Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Remove useless code in pixmap() Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Remove obsolete comment Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Move processTool definition inline Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Merge painter, aliasing and process into a function Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Fix inconsistent (non)usage of emit Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Rename nameID to type Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Remove some redundancy in confighandler.cpp - In `getButtons`: instead of re-adding all the buttons manually, now the buttons are taken from `CaptureToolButton::getIterableButtonTypes()` and those we want unchecked are removed. - Changed some parts to use `fromButtonToInt` instead of re-implementing it inline each time Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Revert "Disable window flags in debug builds" This reverts commit 2adb583359bc0a1fd2d335f2d0e88299a4d1dd65. * Disable window flags in debug builds Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@ QString SizeDecreaseTool::name() const
|
||||
return tr("Decrease Tool Size");
|
||||
}
|
||||
|
||||
ToolType SizeDecreaseTool::nameID() const
|
||||
ToolType SizeDecreaseTool::type() const
|
||||
{
|
||||
return ToolType::SIZEDECREASE;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
CaptureTool* copy(QObject* parent = nullptr) override;
|
||||
|
||||
protected:
|
||||
ToolType nameID() const override;
|
||||
ToolType type() const override;
|
||||
|
||||
public slots:
|
||||
void pressed(const CaptureContext& context) override;
|
||||
|
||||
Reference in New Issue
Block a user