cleaned up some PR formatting / names, removed old size indicator (#2778)
* cleaned up some PR formatting / names, removed old size indicator * fixed clang format * fixed clang format
This commit is contained in:
@@ -56,7 +56,7 @@ GeneralConf::GeneralConf(QWidget* parent)
|
||||
initUndoLimit();
|
||||
initUploadClientSecret();
|
||||
initPredefinedColorPaletteLarge();
|
||||
initshowSelectionGeometry();
|
||||
initShowSelectionGeometry();
|
||||
|
||||
m_layout->addStretch();
|
||||
|
||||
@@ -105,8 +105,6 @@ void GeneralConf::_updateComponents(bool allowEmptySavePath)
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
|
||||
m_showTray->setChecked(!config.disabledTrayIcon());
|
||||
#endif
|
||||
// m_showSelectionGeometry->setChecked(
|
||||
// config.value("showSelectionGeometry").toBool());
|
||||
}
|
||||
|
||||
void GeneralConf::updateComponents()
|
||||
@@ -711,7 +709,7 @@ void GeneralConf::initSquareMagnifier()
|
||||
});
|
||||
}
|
||||
|
||||
void GeneralConf::initshowSelectionGeometry()
|
||||
void GeneralConf::initShowSelectionGeometry()
|
||||
{
|
||||
auto* tobox = new QHBoxLayout();
|
||||
|
||||
@@ -737,8 +735,8 @@ void GeneralConf::initshowSelectionGeometry()
|
||||
|
||||
auto* vboxLayout = new QVBoxLayout();
|
||||
box->setLayout(vboxLayout);
|
||||
auto* selgeoLayout = new QHBoxLayout();
|
||||
selgeoLayout->addWidget(new QLabel(tr("Display Location")));
|
||||
auto* selGeoLayout = new QHBoxLayout();
|
||||
selGeoLayout->addWidget(new QLabel(tr("Display Location")));
|
||||
m_selectGeometryLocation = new QComboBox(this);
|
||||
|
||||
m_selectGeometryLocation->addItem(tr("None"), GeneralConf::xywh_none);
|
||||
@@ -762,8 +760,8 @@ void GeneralConf::initshowSelectionGeometry()
|
||||
this,
|
||||
SLOT(setGeometryLocation(int)));
|
||||
|
||||
selgeoLayout->addWidget(m_selectGeometryLocation);
|
||||
vboxLayout->addLayout(selgeoLayout);
|
||||
selGeoLayout->addWidget(m_selectGeometryLocation);
|
||||
vboxLayout->addLayout(selGeoLayout);
|
||||
vboxLayout->addStretch();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ private:
|
||||
void initUploadHistoryMax();
|
||||
void initUploadClientSecret();
|
||||
void initSaveLastRegion();
|
||||
void initshowSelectionGeometry();
|
||||
void initShowSelectionGeometry();
|
||||
|
||||
void _updateComponents(bool allowEmptySavePath);
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ target_sources(flameshot PRIVATE save/savetool.h save/savetool.cpp)
|
||||
target_sources(flameshot PRIVATE accept/accepttool.h accept/accepttool.cpp)
|
||||
target_sources(flameshot PRIVATE invert/inverttool.h invert/inverttool.cpp)
|
||||
target_sources(flameshot PRIVATE selection/selectiontool.h selection/selectiontool.cpp)
|
||||
target_sources(flameshot PRIVATE sizeindicator/sizeindicatortool.h sizeindicator/sizeindicatortool.cpp)
|
||||
target_sources(
|
||||
flameshot
|
||||
PRIVATE text/textconfig.h
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
|
||||
|
||||
#include "sizeindicatortool.h"
|
||||
#include <QPainter>
|
||||
|
||||
SizeIndicatorTool::SizeIndicatorTool(QObject* parent)
|
||||
: AbstractActionTool(parent)
|
||||
{}
|
||||
|
||||
bool SizeIndicatorTool::closeOnButtonPressed() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QIcon SizeIndicatorTool::icon(const QColor& background, bool inEditor) const
|
||||
{
|
||||
return inEditor ? QIcon()
|
||||
: QIcon(iconPath(background) + "size_indicator.svg");
|
||||
}
|
||||
QString SizeIndicatorTool::name() const
|
||||
{
|
||||
return tr("Selection Size Indicator");
|
||||
}
|
||||
|
||||
CaptureTool::Type SizeIndicatorTool::type() const
|
||||
{
|
||||
return CaptureTool::TYPE_SELECTIONINDICATOR;
|
||||
}
|
||||
|
||||
QString SizeIndicatorTool::description() const
|
||||
{
|
||||
return tr("Show X and Y dimensions of the selection");
|
||||
}
|
||||
|
||||
CaptureTool* SizeIndicatorTool::copy(QObject* parent)
|
||||
{
|
||||
return new SizeIndicatorTool(parent);
|
||||
}
|
||||
|
||||
void SizeIndicatorTool::pressed(CaptureContext& context)
|
||||
{
|
||||
Q_UNUSED(context)
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "src/tools/abstractactiontool.h"
|
||||
|
||||
class SizeIndicatorTool : public AbstractActionTool
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SizeIndicatorTool(QObject* parent = nullptr);
|
||||
|
||||
bool closeOnButtonPressed() const override;
|
||||
|
||||
QIcon icon(const QColor& background, bool inEditor) const override;
|
||||
QString name() const override;
|
||||
QString description() const override;
|
||||
|
||||
CaptureTool* copy(QObject* parent = nullptr) override;
|
||||
|
||||
protected:
|
||||
CaptureTool::Type type() const override;
|
||||
|
||||
public slots:
|
||||
void pressed(CaptureContext& context) override;
|
||||
};
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "selection/selectiontool.h"
|
||||
#include "sizedecrease/sizedecreasetool.h"
|
||||
#include "sizeincrease/sizeincreasetool.h"
|
||||
#include "sizeindicator/sizeindicatortool.h"
|
||||
#include "text/texttool.h"
|
||||
#include "undo/undotool.h"
|
||||
|
||||
@@ -45,7 +44,6 @@ CaptureTool* ToolFactory::CreateTool(CaptureTool::Type t, QObject* parent)
|
||||
if_TYPE_return_TOOL(TYPE_RECTANGLE, RectangleTool);
|
||||
if_TYPE_return_TOOL(TYPE_CIRCLE, CircleTool);
|
||||
if_TYPE_return_TOOL(TYPE_MARKER, MarkerTool);
|
||||
if_TYPE_return_TOOL(TYPE_SELECTIONINDICATOR, SizeIndicatorTool);
|
||||
if_TYPE_return_TOOL(TYPE_MOVESELECTION, MoveTool);
|
||||
if_TYPE_return_TOOL(TYPE_UNDO, UndoTool);
|
||||
if_TYPE_return_TOOL(TYPE_COPY, CopyTool);
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
CONFIG_GETTER_SETTER(copyOnDoubleClick, setCopyOnDoubleClick, bool)
|
||||
CONFIG_GETTER_SETTER(uploadClientSecret, setUploadClientSecret, QString)
|
||||
CONFIG_GETTER_SETTER(saveLastRegion, setSaveLastRegion, bool)
|
||||
CONFIG_GETTER_SETTER(showSelectionGeometry, setshowSelectionGeometry, int)
|
||||
CONFIG_GETTER_SETTER(showSelectionGeometry, setShowSelectionGeometry, int)
|
||||
// SPECIAL CASES
|
||||
bool startupLaunch();
|
||||
void setStartupLaunch(const bool);
|
||||
|
||||
@@ -171,7 +171,6 @@ QList<CaptureTool::Type> CaptureToolButton::iterableButtonTypes = {
|
||||
CaptureTool::TYPE_RECTANGLE, CaptureTool::TYPE_CIRCLE,
|
||||
CaptureTool::TYPE_MARKER, CaptureTool::TYPE_TEXT,
|
||||
CaptureTool::TYPE_CIRCLECOUNT, CaptureTool::TYPE_PIXELATE,
|
||||
CaptureTool::TYPE_INVERT, CaptureTool::TYPE_SELECTIONINDICATOR,
|
||||
CaptureTool::TYPE_MOVESELECTION, CaptureTool::TYPE_UNDO,
|
||||
CaptureTool::TYPE_REDO, CaptureTool::TYPE_COPY,
|
||||
CaptureTool::TYPE_SAVE, CaptureTool::TYPE_EXIT,
|
||||
|
||||
Reference in New Issue
Block a user