Commit f987bbf0 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Base the selection tools on the right toolfactory class

This re-enables the selection mode shortcuts again.

BUG:403587
parent 4b9a8887
......@@ -42,9 +42,8 @@ QList<QAction *> KisSelectionToolFactoryBase::createActionsImpl()
}
KisToolPolyLineFactoryBase::KisToolPolyLineFactoryBase(const QString &id)
: KisSelectionToolFactoryBase(id)
: KisToolPaintFactoryBase(id)
{
}
KisToolPolyLineFactoryBase::~KisToolPolyLineFactoryBase()
......@@ -55,7 +54,7 @@ KisToolPolyLineFactoryBase::~KisToolPolyLineFactoryBase()
QList<QAction *> KisToolPolyLineFactoryBase::createActionsImpl()
{
KisActionRegistry *actionRegistry = KisActionRegistry::instance();
QList<QAction *> actions = KisSelectionToolFactoryBase::createActionsImpl();
QList<QAction *> actions = KisToolPaintFactoryBase::createActionsImpl();
actions << actionRegistry->makeQAction("undo_polygon_selection");
actions << actionRegistry->makeQAction("selection_tool_mode_add");
......
......@@ -31,7 +31,7 @@ protected:
QList<QAction *> createActionsImpl() override;
};
class KRITAUI_EXPORT KisToolPolyLineFactoryBase : public KisSelectionToolFactoryBase
class KRITAUI_EXPORT KisToolPolyLineFactoryBase : public KisToolPaintFactoryBase
{
public:
explicit KisToolPolyLineFactoryBase(const QString &id);
......
......@@ -25,7 +25,7 @@
#include "kis_tool_shape.h"
#include "kis_types.h"
#include "KisSelectionToolFactoryBase.h"
#include "KisToolPaintFactoryBase.h"
#include "flake/kis_node_shape.h"
#include <kis_tool_ellipse_base.h>
#include <kis_icon.h>
......@@ -48,12 +48,12 @@ protected:
void finishRect(const QRectF& rect, qreal roundCornersX, qreal roundCornersY) override;
};
class KisToolEllipseFactory : public KisSelectionToolFactoryBase
class KisToolEllipseFactory : public KisToolPaintFactoryBase
{
public:
KisToolEllipseFactory()
: KisSelectionToolFactoryBase("KritaShape/KisToolEllipse") {
: KisToolPaintFactoryBase("KritaShape/KisToolEllipse") {
setToolTip(i18n("Ellipse Tool"));
setSection(TOOL_TYPE_SHAPE);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -26,7 +26,7 @@
#include "kis_tool_shape.h"
#include "kis_types.h"
#include "KisSelectionToolFactoryBase.h"
#include "KisToolPaintFactoryBase.h"
#include "flake/kis_node_shape.h"
#include <kis_tool_rectangle_base.h>
#include <kis_icon.h>
......@@ -51,12 +51,12 @@ protected Q_SLOTS:
void resetCursorStyle() override;
};
class KisToolRectangleFactory : public KisSelectionToolFactoryBase
class KisToolRectangleFactory : public KisToolPaintFactoryBase
{
public:
KisToolRectangleFactory()
: KisSelectionToolFactoryBase("KritaShape/KisToolRectangle") {
: KisToolPaintFactoryBase("KritaShape/KisToolRectangle") {
setToolTip(i18n("Rectangle Tool"));
setSection(TOOL_TYPE_SHAPE);
......
......@@ -23,7 +23,7 @@
#ifndef __KIS_TOOL_SELECT_CONTIGUOUS_H__
#define __KIS_TOOL_SELECT_CONTIGUOUS_H__
#include "KoToolFactoryBase.h"
#include "KisSelectionToolFactoryBase.h"
#include "kis_tool_select_base.h"
#include <kis_icon.h>
#include <kconfig.h>
......@@ -72,11 +72,11 @@ private:
KConfigGroup m_configGroup;
};
class KisToolSelectContiguousFactory : public KoToolFactoryBase
class KisToolSelectContiguousFactory : public KisSelectionToolFactoryBase
{
public:
KisToolSelectContiguousFactory()
: KoToolFactoryBase("KisToolSelectContiguous")
: KisSelectionToolFactoryBase("KisToolSelectContiguous")
{
setToolTip(i18n("Contiguous Selection Tool"));
setSection(TOOL_TYPE_SELECTION);
......
......@@ -24,7 +24,7 @@
#ifndef __KIS_TOOL_SELECT_ELLIPTICAL_H__
#define __KIS_TOOL_SELECT_ELLIPTICAL_H__
#include "KoToolFactoryBase.h"
#include "KisSelectionToolFactoryBase.h"
#include "kis_tool_ellipse_base.h"
#include <kis_tool_select_base.h>
#include "kis_selection_tool_config_widget_helper.h"
......@@ -65,11 +65,11 @@ public:
void resetCursorStyle();
};
class KisToolSelectEllipticalFactory : public KoToolFactoryBase
class KisToolSelectEllipticalFactory : public KisSelectionToolFactoryBase
{
public:
KisToolSelectEllipticalFactory()
: KoToolFactoryBase("KisToolSelectElliptical")
: KisSelectionToolFactoryBase("KisToolSelectElliptical")
{
setToolTip(i18n("Elliptical Selection Tool"));
setSection(TOOL_TYPE_SELECTION);
......
......@@ -25,7 +25,7 @@
#define KIS_TOOL_SELECT_OUTLINE_H_
#include <QPoint>
#include <KoToolFactoryBase.h>
#include "KisSelectionToolFactoryBase.h"
#include <kis_tool_select_base.h>
#include <kis_icon.h>
......@@ -68,11 +68,11 @@ private:
QPointF m_lastCursorPos;
};
class KisToolSelectOutlineFactory : public KoToolFactoryBase
class KisToolSelectOutlineFactory : public KisSelectionToolFactoryBase
{
public:
KisToolSelectOutlineFactory()
: KoToolFactoryBase("KisToolSelectOutline")
: KisSelectionToolFactoryBase("KisToolSelectOutline")
{
setToolTip(i18n("Outline Selection Tool"));
setSection(TOOL_TYPE_SELECTION);
......
......@@ -21,7 +21,7 @@
#define KIS_TOOL_SELECT_PATH_H_
#include <KoCreatePathTool.h>
#include <KoToolFactoryBase.h>
#include <KisSelectionToolFactoryBase.h>
#include "kis_tool_select_base.h"
#include "kis_delegated_tool.h"
......@@ -84,11 +84,11 @@ protected:
QList<QPointer<QWidget> > createOptionWidgets() override;
};
class KisToolSelectPathFactory : public KoToolFactoryBase
class KisToolSelectPathFactory : public KisSelectionToolFactoryBase
{
public:
KisToolSelectPathFactory()
: KoToolFactoryBase("KisToolSelectPath") {
: KisSelectionToolFactoryBase("KisToolSelectPath") {
setToolTip(i18n("Bezier Curve Selection Tool"));
setSection(TOOL_TYPE_SELECTION);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -24,7 +24,7 @@
#ifndef KIS_TOOL_SELECT_POLYGONAL_H_
#define KIS_TOOL_SELECT_POLYGONAL_H_
#include "KoToolFactoryBase.h"
#include "KisSelectionToolFactoryBase.h"
#include "kis_tool_polyline_base.h"
#include <kis_tool_select_base.h>
#include "kis_selection_tool_config_widget_helper.h"
......@@ -54,11 +54,11 @@ public:
class KisToolSelectPolygonalFactory : public KoToolFactoryBase
class KisToolSelectPolygonalFactory : public KisSelectionToolFactoryBase
{
public:
KisToolSelectPolygonalFactory()
: KoToolFactoryBase("KisToolSelectPolygonal")
: KisSelectionToolFactoryBase("KisToolSelectPolygonal")
{
setToolTip(i18n("Polygonal Selection Tool"));
setSection(TOOL_TYPE_SELECTION);
......
......@@ -23,7 +23,7 @@
#ifndef KIS_TOOL_SELECT_RECTANGULAR_H_
#define KIS_TOOL_SELECT_RECTANGULAR_H_
#include "KoToolFactoryBase.h"
#include "KisSelectionToolFactoryBase.h"
#include "kis_tool_rectangle_base.h"
#include <kis_tool_select_base.h>
#include "kis_selection_tool_config_widget_helper.h"
......@@ -58,12 +58,12 @@ public:
void resetCursorStyle();
};
class KisToolSelectRectangularFactory : public KoToolFactoryBase
class KisToolSelectRectangularFactory : public KisSelectionToolFactoryBase
{
public:
KisToolSelectRectangularFactory()
: KoToolFactoryBase("KisToolSelectRectangular")
: KisSelectionToolFactoryBase("KisToolSelectRectangular")
{
setToolTip(i18n("Rectangular Selection Tool"));
setSection(TOOL_TYPE_SELECTION);
......
......@@ -19,7 +19,7 @@
#ifndef KIS_TOOL_SELECT_SIMILAR_H_
#define KIS_TOOL_SELECT_SIMILAR_H_
#include <KoToolFactoryBase.h>
#include <KisSelectionToolFactoryBase.h>
#include <kis_icon.h>
#include <kconfig.h>
#include "kis_tool_select_base.h"
......@@ -52,11 +52,11 @@ private:
};
class KisToolSelectSimilarFactory : public KoToolFactoryBase
class KisToolSelectSimilarFactory : public KisSelectionToolFactoryBase
{
public:
KisToolSelectSimilarFactory()
: KoToolFactoryBase("KisToolSelectSimilar")
: KisSelectionToolFactoryBase("KisToolSelectSimilar")
{
setToolTip(i18n("Similar Color Selection Tool"));
setSection(TOOL_TYPE_SELECTION);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment