mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-03-26 09:59:52 +00:00
Changed clang format to new agreement
This commit is contained in:
committed by
borgmanJeremy
parent
2cbccc3d0a
commit
0d5386edd4
@@ -23,57 +23,50 @@ SaveTool::SaveTool(QObject* parent)
|
||||
: AbstractActionTool(parent)
|
||||
{}
|
||||
|
||||
bool
|
||||
SaveTool::closeOnButtonPressed() const
|
||||
bool SaveTool::closeOnButtonPressed() const
|
||||
{
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
QIcon
|
||||
SaveTool::icon(const QColor& background, bool inEditor) const
|
||||
QIcon SaveTool::icon(const QColor& background, bool inEditor) const
|
||||
{
|
||||
Q_UNUSED(inEditor);
|
||||
return QIcon(iconPath(background) + "content-save.svg");
|
||||
Q_UNUSED(inEditor);
|
||||
return QIcon(iconPath(background) + "content-save.svg");
|
||||
}
|
||||
QString
|
||||
SaveTool::name() const
|
||||
QString SaveTool::name() const
|
||||
{
|
||||
return tr("Save");
|
||||
return tr("Save");
|
||||
}
|
||||
|
||||
ToolType
|
||||
SaveTool::nameID() const
|
||||
ToolType SaveTool::nameID() const
|
||||
{
|
||||
return ToolType::SAVE;
|
||||
return ToolType::SAVE;
|
||||
}
|
||||
|
||||
QString
|
||||
SaveTool::description() const
|
||||
QString SaveTool::description() const
|
||||
{
|
||||
return tr("Save the capture");
|
||||
return tr("Save the capture");
|
||||
}
|
||||
|
||||
CaptureTool*
|
||||
SaveTool::copy(QObject* parent)
|
||||
CaptureTool* SaveTool::copy(QObject* parent)
|
||||
{
|
||||
return new SaveTool(parent);
|
||||
return new SaveTool(parent);
|
||||
}
|
||||
|
||||
void
|
||||
SaveTool::pressed(const CaptureContext& context)
|
||||
void SaveTool::pressed(const CaptureContext& context)
|
||||
{
|
||||
if (context.savePath.isEmpty()) {
|
||||
emit requestAction(REQ_HIDE_GUI);
|
||||
bool ok =
|
||||
ScreenshotSaver().saveToFilesystemGUI(context.selectedScreenshotArea());
|
||||
if (ok) {
|
||||
emit requestAction(REQ_CAPTURE_DONE_OK);
|
||||
if (context.savePath.isEmpty()) {
|
||||
emit requestAction(REQ_HIDE_GUI);
|
||||
bool ok = ScreenshotSaver().saveToFilesystemGUI(
|
||||
context.selectedScreenshotArea());
|
||||
if (ok) {
|
||||
emit requestAction(REQ_CAPTURE_DONE_OK);
|
||||
}
|
||||
} else {
|
||||
bool ok = ScreenshotSaver().saveToFilesystem(
|
||||
context.selectedScreenshotArea(), context.savePath, "");
|
||||
if (ok) {
|
||||
emit requestAction(REQ_CAPTURE_DONE_OK);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
bool ok = ScreenshotSaver().saveToFilesystem(
|
||||
context.selectedScreenshotArea(), context.savePath, "");
|
||||
if (ok) {
|
||||
emit requestAction(REQ_CAPTURE_DONE_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user