Code refactoring - change code style to the new clang-format rules
This commit is contained in:
@@ -19,35 +19,42 @@
|
||||
#include "src/utils/screenshotsaver.h"
|
||||
#include <QPainter>
|
||||
|
||||
CopyTool::CopyTool(QObject *parent) : AbstractActionTool(parent) {
|
||||
CopyTool::CopyTool(QObject* parent)
|
||||
: AbstractActionTool(parent)
|
||||
{}
|
||||
|
||||
}
|
||||
|
||||
bool CopyTool::closeOnButtonPressed() const {
|
||||
bool CopyTool::closeOnButtonPressed() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QIcon CopyTool::icon(const QColor &background, bool inEditor) const {
|
||||
QIcon CopyTool::icon(const QColor& background, bool inEditor) const
|
||||
{
|
||||
Q_UNUSED(inEditor);
|
||||
return QIcon(iconPath(background) + "content-copy.svg");
|
||||
}
|
||||
QString CopyTool::name() const {
|
||||
QString CopyTool::name() const
|
||||
{
|
||||
return tr("Copy");
|
||||
}
|
||||
|
||||
QString CopyTool::nameID() {
|
||||
QString CopyTool::nameID()
|
||||
{
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
QString CopyTool::description() const {
|
||||
QString CopyTool::description() const
|
||||
{
|
||||
return tr("Copy the selection into the clipboard");
|
||||
}
|
||||
|
||||
CaptureTool* CopyTool::copy(QObject *parent) {
|
||||
CaptureTool* CopyTool::copy(QObject* parent)
|
||||
{
|
||||
return new CopyTool(parent);
|
||||
}
|
||||
|
||||
void CopyTool::pressed(const CaptureContext &context) {
|
||||
void CopyTool::pressed(const CaptureContext& context)
|
||||
{
|
||||
emit requestAction(REQ_CAPTURE_DONE_OK);
|
||||
ScreenshotSaver().saveToClipboard(context.selectedScreenshotArea());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user