1 // Copyright(c) 2017-2019 Alejandro Sirgo Rica & Contributors 2 // 3 // This file is part of Flameshot. 4 // 5 // Flameshot is free software: you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation, either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // Flameshot is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with Flameshot. If not, see <http://www.gnu.org/licenses/>. 17 18 #include "sizeincreasetool.h" 19 #include <QPainter> 20 SizeIncreaseTool(QObject * parent)21SizeIncreaseTool::SizeIncreaseTool(QObject* parent) 22 : AbstractActionTool(parent) 23 {} 24 closeOnButtonPressed() const25bool SizeIncreaseTool::closeOnButtonPressed() const 26 { 27 return false; 28 } 29 icon(const QColor & background,bool inEditor) const30QIcon SizeIncreaseTool::icon(const QColor& background, bool inEditor) const 31 { 32 Q_UNUSED(inEditor) 33 return QIcon(iconPath(background) + "plus.svg"); 34 } name() const35QString SizeIncreaseTool::name() const 36 { 37 return tr("Increase Tool Size"); 38 } 39 nameID() const40ToolType SizeIncreaseTool::nameID() const 41 { 42 return ToolType::SIZEINCREASE; 43 } 44 description() const45QString SizeIncreaseTool::description() const 46 { 47 return tr("Increase the size of the other tools"); 48 } 49 copy(QObject * parent)50CaptureTool* SizeIncreaseTool::copy(QObject* parent) 51 { 52 return new SizeIncreaseTool(parent); 53 } 54 pressed(const CaptureContext & context)55void SizeIncreaseTool::pressed(const CaptureContext& context) 56 { 57 Q_UNUSED(context) 58 emit requestAction(REQ_INCREASE_TOOL_SIZE); 59 } 60