Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_selection_options.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2005 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_SELECTION_OPTIONS_H__
8#define __KIS_SELECTION_OPTIONS_H__
9
10#include "kritaui_export.h"
11
13#include <KisSelectionTags.h>
14
15class QKeySequence;
16
18{
19 Q_OBJECT
20
21public:
22 enum ReferenceLayers { CurrentLayer, AllLayers, ColorLabeledLayers };
23
24 KisSelectionOptions(QWidget *parent = nullptr);
25 ~KisSelectionOptions() override;
26
27 SelectionMode mode() const;
28 SelectionAction action() const;
29 bool moveSelectedContent() const;
30 bool antiAliasSelection() const;
31 int growSelection() const;
32 bool stopGrowingAtDarkestPixel() const;
33 int featherSelection() const;
34 ReferenceLayers referenceLayers() const;
35 QList<int> selectedColorLabels() const;
36
37 void setMode(SelectionMode newMode);
38 void setAction(SelectionAction newAction);
39 void setMoveSelectedContent(bool newMoveSelectedContent);
40 void setAntiAliasSelection(bool newAntiAliasSelection);
41 void setGrowSelection(int newGrowSelection);
42 void setStopGrowingAtDarkestPixel(bool newStopGrowingAtDarkestPixel);
43 void setFeatherSelection(int newFeatherSelection);
44 void setReferenceLayers(ReferenceLayers newReferenceLayers);
45 void setSelectedColorLabels(const QList<int> &newSelectedColorLabels);
46
47 void setModeSectionVisible(bool visible);
48 void setActionSectionVisible(bool visible);
49 void setAdjustmentsSectionVisible(bool visible);
50 void setStopGrowingAtDarkestPixelButtonVisible(bool visible);
51 void setReferenceSectionVisible(bool visible);
52
53 void updateActionButtonToolTip(SelectionAction action,
54 const QKeySequence &shortcut);
55
56Q_SIGNALS:
59 void moveSelectedContentChanged(bool moveSelectedContent);
60 void antiAliasSelectionChanged(bool antiAliasSelection);
61 void growSelectionChanged(int growSelection);
62 void stopGrowingAtDarkestPixelChanged(bool stopGrowingAtDarkestPixel);
63 void featherSelectionChanged(int featherSelection);
66
67private Q_SLOTS:
68 void slotConfigChanged();
69 void slotSelectionActionsPanelCheckboxToggled(bool value);
70
71private:
72 class Private;
73 QScopedPointer<Private> m_d;
74};
75
76#endif
77
float value(const T *src, size_t ch)
SelectionMode
SelectionAction
Class providing a list of widgets with some addons such as separators, orientation or individual widg...
void actionChanged(SelectionAction action)
void antiAliasSelectionChanged(bool antiAliasSelection)
void featherSelectionChanged(int featherSelection)
void selectedColorLabelsChanged()
void referenceLayersChanged(ReferenceLayers referenceLayers)
QScopedPointer< Private > m_d
void stopGrowingAtDarkestPixelChanged(bool stopGrowingAtDarkestPixel)
void growSelectionChanged(int growSelection)
void modeChanged(SelectionMode mode)
void moveSelectedContentChanged(bool moveSelectedContent)