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 antiAliasSelection() const;
33 int growSelection() const;
34 bool stopGrowingAtDarkestPixel() const;
35 int featherSelection() const;
36 KisSelectionOptions::ReferenceLayers referenceLayers() const;
37 QList<int> selectedColorLabels() const;
38
39 int action() const { return selectionAction(); }
40
41 void setConfigGroupForExactTool(QString toolId);
42
43Q_SIGNALS:
45
46public Q_SLOTS:
47 void slotToolActivatedChanged(bool isActivated);
48
49 void slotWidgetModeChanged(SelectionMode mode);
50 void slotWidgetActionChanged(SelectionAction action);
51 void slotWidgetAntiAliasChanged(bool value);
52 void slotWidgetGrowChanged(int value);
53 void slotWidgetStopGrowingAtDarkestPixelChanged(bool value);
54 void slotWidgetFeatherChanged(int value);
55 void slotReferenceLayersChanged(
57 void slotSelectedColorLabelsChanged();
58
59 void slotReplaceModeRequested();
60 void slotAddModeRequested();
61 void slotSubtractModeRequested();
62 void slotIntersectModeRequested();
63 void slotSymmetricDifferenceModeRequested();
64
65private:
68 QString m_configGroupForTool {""};
69
70 void reloadExactToolConfig();
71};
72
73#endif /* __KIS_SELECTION_TOOL_CONFIG_WIDGET_HELPER_H */
float value(const T *src, size_t ch)
SelectionMode
SelectionAction
void selectionActionChanged(SelectionAction newAction)