Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
/*
* SPDX-FileCopyrightText: 2005 Boudewijn Rempt <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __KIS_SELECTION_OPTIONS_H__
#define __KIS_SELECTION_OPTIONS_H__
#include "kritaui_export.h"
#include <KisOptionCollectionWidget.h>
#include <KisSelectionTags.h>
class QKeySequence;
class KRITAUI_EXPORT KisSelectionOptions : public KisOptionCollectionWidget
{
Q_OBJECT
public:
enum ReferenceLayers { CurrentLayer, CurrentGroup, AllLayers, ColorLabeledLayers };
KisSelectionOptions(QWidget *parent = nullptr);
~KisSelectionOptions() override;
SelectionMode mode() const;
SelectionAction action() const;
bool moveSelectedContent() const;
bool antiAliasSelection() const;
int growSelection() const;
bool stopGrowingAtDarkestPixel() const;
int featherSelection() const;
ReferenceLayers referenceLayers() const;
QList<int> selectedColorLabels() const;
void setMode(SelectionMode newMode);
void setAction(SelectionAction newAction);
void setMoveSelectedContent(bool newMoveSelectedContent);
void setAntiAliasSelection(bool newAntiAliasSelection);
void setGrowSelection(int newGrowSelection);
void setStopGrowingAtDarkestPixel(bool newStopGrowingAtDarkestPixel);
void setFeatherSelection(int newFeatherSelection);
void setReferenceLayers(ReferenceLayers newReferenceLayers);
void setSelectedColorLabels(const QList<int> &newSelectedColorLabels);
void setModeSectionVisible(bool visible);
void setActionSectionVisible(bool visible);
void setAdjustmentsSectionVisible(bool visible);
void setStopGrowingAtDarkestPixelButtonVisible(bool visible);
void setReferenceSectionVisible(bool visible);
void updateActionButtonToolTip(SelectionAction action,
const QKeySequence &shortcut);
Q_SIGNALS:
void modeChanged(SelectionMode mode);
void actionChanged(SelectionAction action);
void moveSelectedContentChanged(bool moveSelectedContent);
void antiAliasSelectionChanged(bool antiAliasSelection);
void growSelectionChanged(int growSelection);
void stopGrowingAtDarkestPixelChanged(bool stopGrowingAtDarkestPixel);
void featherSelectionChanged(int featherSelection);
void referenceLayersChanged(ReferenceLayers referenceLayers);
void selectedColorLabelsChanged();
private Q_SLOTS:
void slotConfigChanged();
void slotSelectionActionsPanelCheckboxToggled(bool value);
private:
class Private;
QScopedPointer<Private> m_d;
};
#endif