mirror of
https://github.com/fergalmoran/flameshot.git
synced 2025-12-22 09:51:06 +00:00
closes: #1374 . Use SPDX short-form identifiers instead of lengthy copyright header to document per-file license and copyright. This commit updates all files under src/ directory where applicable as well as org.flameshot.Flameshot.metainfo.xml.
46 lines
863 B
C++
46 lines
863 B
C++
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
|
|
|
|
#include "exittool.h"
|
|
#include <QPainter>
|
|
|
|
ExitTool::ExitTool(QObject* parent)
|
|
: AbstractActionTool(parent)
|
|
{}
|
|
|
|
bool ExitTool::closeOnButtonPressed() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
QIcon ExitTool::icon(const QColor& background, bool inEditor) const
|
|
{
|
|
Q_UNUSED(inEditor);
|
|
return QIcon(iconPath(background) + "close.svg");
|
|
}
|
|
QString ExitTool::name() const
|
|
{
|
|
return tr("Exit");
|
|
}
|
|
|
|
ToolType ExitTool::nameID() const
|
|
{
|
|
return ToolType::EXIT;
|
|
}
|
|
|
|
QString ExitTool::description() const
|
|
{
|
|
return tr("Leave the capture screen");
|
|
}
|
|
|
|
CaptureTool* ExitTool::copy(QObject* parent)
|
|
{
|
|
return new ExitTool(parent);
|
|
}
|
|
|
|
void ExitTool::pressed(const CaptureContext& context)
|
|
{
|
|
Q_UNUSED(context);
|
|
emit requestAction(REQ_CLOSE_GUI);
|
|
}
|