|
Krita Source Code Documentation
|
#include <dlg_colorrange.h>
Inheritance diagram for DlgColorRange:Public Member Functions | |
| DlgColorRange (KisViewManager *viewManager, QWidget *parent=0) | |
| ~DlgColorRange () override | |
Public Member Functions inherited from KoDialog | |
| QPushButton * | button (ButtonCode id) const |
| QIcon | buttonIcon (ButtonCode id) const |
| QString | buttonText (ButtonCode id) const |
| QString | buttonToolTip (ButtonCode id) const |
| QString | buttonWhatsThis (ButtonCode id) const |
| ButtonCode | defaultButton () const |
| QString | helpLinkText () const |
| void | incrementInitialSize (const QSize &size) |
| bool | isButtonEnabled (ButtonCode id) const |
| KoDialog (QWidget *parent=0, Qt::WindowFlags f=Qt::WindowFlags()) | |
| QWidget * | mainWidget () |
| QSize | minimumSizeHint () const override |
| void | setButtonFocus (ButtonCode id) |
| void | setButtonGuiItem (ButtonCode id, const KGuiItem &item) |
| void | setButtonIcon (ButtonCode id, const QIcon &icon) |
| void | setButtons (ButtonCodes buttonMask) |
| void | setButtonsOrientation (Qt::Orientation orientation) |
| void | setButtonText (ButtonCode id, const QString &text) |
| void | setButtonToolTip (ButtonCode id, const QString &text) |
| void | setButtonWhatsThis (ButtonCode id, const QString &text) |
| void | setDefaultButton (ButtonCode id) |
| void | setEscapeButton (ButtonCode id) |
| void | setInitialSize (const QSize &size) |
| void | setMainWidget (QWidget *widget) |
| void | showButton (ButtonCode id, bool state) |
| void | showButtonSeparator (bool state) |
| QSize | sizeHint () const override |
| ~KoDialog () override | |
Private Slots | |
| void | cancelClicked () |
| void | okClicked () |
| void | slotAdd (bool on) |
| void | slotDeselectClicked () |
| void | slotInvertClicked () |
| void | slotSelectClicked () |
| void | slotSelectionTypeChanged (int index) |
| void | slotSubtract (bool on) |
Private Member Functions | |
| QImage | createMask (KisSelectionSP selection, KisPaintDeviceSP layer) |
Private Attributes | |
| enumAction | m_currentAction |
| bool | m_invert |
| SelectionAction | m_mode |
| QCursor | m_oldCursor |
| WdgColorRange * | m_page |
| int | m_selectionCommandsAdded |
| KisViewManager * | m_viewManager |
Additional Inherited Members | |
Public Types inherited from KoDialog | |
| enum | ButtonCode { None = 0x00000000 , Help = 0x00000001 , Default = 0x00000002 , Ok = 0x00000004 , Apply = 0x00000008 , Try = 0x00000010 , Cancel = 0x00000020 , Close = 0x00000040 , No = 0x00000080 , Yes = 0x00000100 , Reset = 0x00000200 , Details = 0x00000400 , User1 = 0x00001000 , User2 = 0x00002000 , User3 = 0x00004000 , NoDefault = 0x00008000 } |
| enum | ButtonPopupMode { InstantPopup = 0 , DelayedPopup = 1 } |
| enum | CaptionFlag { NoCaptionFlags = 0 , AppNameCaption = 1 , ModifiedCaption = 2 , HIGCompliantCaption = AppNameCaption } |
Public Slots inherited from KoDialog | |
| void | delayedDestruct () |
| void | enableButton (ButtonCode id, bool state) |
| void | enableButtonApply (bool state) |
| void | enableButtonCancel (bool state) |
| void | enableButtonOk (bool state) |
| void | enableLinkedHelp (bool state) |
| bool | isDetailsWidgetVisible () const |
| virtual void | setCaption (const QString &caption) |
| virtual void | setCaption (const QString &caption, bool modified) |
| void | setDetailsWidget (QWidget *detailsWidget) |
| void | setDetailsWidgetVisible (bool visible) |
| void | setHelp (const QString &anchor, const QString &appname=QString()) |
| void | setHelpLinkText (const QString &text) |
| virtual void | setPlainCaption (const QString &caption) |
Signals inherited from KoDialog | |
| void | aboutToShowDetails () |
| void | applyClicked () |
| void | buttonClicked (KoDialog::ButtonCode button) |
| void | cancelClicked () |
| void | closeClicked () |
| void | defaultClicked () |
| void | finished () |
| void | helpClicked () |
| void | hidden () |
| void | layoutHintChanged () |
| void | noClicked () |
| void | okClicked () |
| void | resetClicked () |
| void | tryClicked () |
| void | user1Clicked () |
| void | user2Clicked () |
| void | user3Clicked () |
| void | yesClicked () |
Static Public Member Functions inherited from KoDialog | |
| static int | groupSpacingHint () |
| static QString | makeStandardCaption (const QString &userCaption, QWidget *window=0, CaptionFlags flags=HIGCompliantCaption) |
| static int | marginHint () |
| static void | resizeLayout (QLayout *lay, int margin, int spacing) |
| static void | resizeLayout (QWidget *widget, int margin, int spacing) |
| static int | spacingHint () |
Protected Slots inherited from KoDialog | |
| virtual void | slotButtonClicked (int button) |
Protected Member Functions inherited from KoDialog | |
| void | closeEvent (QCloseEvent *e) override |
| void | hideEvent (QHideEvent *) override |
| void | keyPressEvent (QKeyEvent *) override |
| void | showEvent (QShowEvent *e) override |
This dialog allows the user to create a selection mask based on a (range of) colors.
Definition at line 51 of file dlg_colorrange.h.
| DlgColorRange::DlgColorRange | ( | KisViewManager * | viewManager, |
| QWidget * | parent = 0 ) |
Definition at line 43 of file dlg_colorrange.cc.
References KoDialog::Cancel, cancelClicked(), connect(), m_currentAction, m_invert, m_mode, m_page, KoDialog::Ok, okClicked(), REDS, SELECTION_ADD, KoDialog::setButtons(), KoDialog::setCaption(), KoDialog::setDefaultButton(), KoDialog::setMainWidget(), slotAdd(), slotDeselectClicked(), slotInvertClicked(), slotSelectClicked(), slotSelectionTypeChanged(), and slotSubtract().
|
override |
|
privateslot |
Definition at line 107 of file dlg_colorrange.cc.
References KisViewManager::canvas(), KisViewManager::image(), m_selectionCommandsAdded, m_viewManager, KisViewManager::undoAdapter(), and KisUndoAdapter::undoLastCommand().
|
private |
|
privateslot |
Definition at line 102 of file dlg_colorrange.cc.
|
privateslot |
Definition at line 135 of file dlg_colorrange.cc.
References m_mode, and SELECTION_ADD.
|
privateslot |
Definition at line 250 of file dlg_colorrange.cc.
References m_page, m_selectionCommandsAdded, m_viewManager, KisViewManager::undoAdapter(), and KisUndoAdapter::undoLastCommand().
|
privateslot |
|
privateslot |
Definition at line 141 of file dlg_colorrange.cc.
References KisViewManager::activeDevice(), BLUES, KisImage::bounds(), KisViewManager::canvasBase(), KisPaintDevice::colorSpace(), KoColor::convertTo(), KisPaintDevice::createHLineConstIteratorNG(), KisPaintDevice::createHLineIteratorNG(), CYANS, KoColor::data(), KoColorSpace::difference(), GREENS, HIGHLIGHTS, KisViewManager::image(), KoColorSpaceRegistry::instance(), KisPixelSelection::invalidateOutlineCache(), KIS_ASSERT_RECOVER_RETURN, kundo2_i18n(), KoColorSpaceRegistry::lab16(), m_currentAction, m_invert, m_mode, m_page, m_selectionCommandsAdded, m_viewManager, MAGENTAS, MAX_SELECTED, MIDTONES, MIN_SELECTED, KisBaseConstIteratorNG::nextPixel(), KisHLineConstIteratorNG::nextRow(), KisBaseConstAccessor::oldRawData(), OPACITY_TRANSPARENT_U8, KoColorSpace::opacityU8(), KisSelection::pixelSelection, REDS, KoColorSpace::scaleToU8(), SELECTION_ADD, SELECTION_SUBTRACT, KisSelectionToolHelper::selectPixelSelection(), SHADOWS, toQShared(), KisCursor::waitCursor(), and YELLOWS.
|
privateslot |
|
privateslot |
Definition at line 129 of file dlg_colorrange.cc.
References m_mode, and SELECTION_SUBTRACT.
|
private |
Definition at line 83 of file dlg_colorrange.h.
|
private |
Definition at line 84 of file dlg_colorrange.h.
|
private |
Definition at line 81 of file dlg_colorrange.h.
|
private |
Definition at line 82 of file dlg_colorrange.h.
|
private |
Definition at line 78 of file dlg_colorrange.h.
|
private |
Definition at line 79 of file dlg_colorrange.h.
|
private |
Definition at line 80 of file dlg_colorrange.h.