Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_selection_tool_config_widget_helper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2011 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_SELECTION_TOOL_CONFIG_WIDGET_HELPER_H
8#define __KIS_SELECTION_TOOL_CONFIG_WIDGET_HELPER_H
9
10#include <QObject>
11#include <QList>
12
14#include "kis_image.h"
15#include "kis_selection.h"
16#include "kritaui_export.h"
18
20
21class KRITAUI_EXPORT KisSelectionToolConfigWidgetHelper : public QObject
22{
23 Q_OBJECT
24public:
25 KisSelectionToolConfigWidgetHelper(const QString &windowTitle);
26
27 void createOptionWidget(const QString &toolId);
28 KisSelectionOptions* optionWidget() const;
29
30 SelectionMode selectionMode() const;
31 SelectionAction selectionAction() const;
32 bool moveSelectedContent() const;
33 bool antiAliasSelection() const;
34 int growSelection() const;
35 bool stopGrowingAtDarkestPixel() const;
36 int featherSelection() const;
37 KisSelectionOptions::ReferenceLayers referenceLayers() const;
38 QList<int> selectedColorLabels() const;
39
40 int action() const { return selectionAction(); }
41
42 void setConfigGroupForExactTool(QString toolId);
43
44Q_SIGNALS:
46
47public Q_SLOTS:
48 void slotToolActivatedChanged(bool isActivated);
49
50 void slotWidgetModeChanged(SelectionMode mode);
51 void slotWidgetActionChanged(SelectionAction action);
52 void slotWidgetMoveSelectedContentChanged(bool value);
53 void slotWidgetAntiAliasChanged(bool value);
54 void slotWidgetGrowChanged(int value);
55 void slotWidgetStopGrowingAtDarkestPixelChanged(bool value);
56 void slotWidgetFeatherChanged(int value);
57 void slotReferenceLayersChanged(
59 void slotSelectedColorLabelsChanged();
60
61 void slotReplaceModeRequested();
62 void slotAddModeRequested();
63 void slotSubtractModeRequested();
64 void slotIntersectModeRequested();
65 void slotSymmetricDifferenceModeRequested();
66
67private:
70 QString m_configGroupForTool {""};
71
72 void reloadExactToolConfig();
73};
74
75#endif /* __KIS_SELECTION_TOOL_CONFIG_WIDGET_HELPER_H */
float value(const T *src, size_t ch)
SelectionMode
SelectionAction
void selectionActionChanged(SelectionAction newAction)