|
Krita Source Code Documentation
|
#include <WGColorSelectorDock.h>
Inheritance diagram for WGColorSelectorDock:Public Types | |
| enum | ColorSpaceSource { LayerColorSpace , ImageColorSpace , FixedColorSpace } |
Public Member Functions | |
| KisUniqueColorSet * | colorHistory () const |
| const KisVisualColorModel & | colorModel () const |
| KisDisplayColorConverter * | displayColorConverter (bool rawPointer=false) const |
| bool | selectingBackground () const |
| void | setChannelValues (const QVector4D &values) |
| Set new channel values; takes effect immediately! | |
| WGColorSelectorDock () | |
Public Member Functions inherited from KisMainwindowObserver | |
| KisMainwindowObserver () | |
| ~KisMainwindowObserver () override | |
Public Member Functions inherited from KoCanvasObserverBase | |
| KoCanvasObserverBase () | |
| KoCanvasBase * | observedCanvas () const |
| virtual QString | observerName () |
| void | setObservedCanvas (KoCanvasBase *canvas) |
| void | unsetObservedCanvas () |
| virtual | ~KoCanvasObserverBase () |
Protected Member Functions | |
| void | disconnectFromCanvas () |
| void | leaveEvent (QEvent *event) override |
| void | setCanvas (KoCanvasBase *canvas) override |
| void | setViewManager (KisViewManager *viewManager) override |
| void | unsetCanvas () override |
| void | updateLayout () |
Private Slots | |
| void | slotCanvasResourceChanged (int key, const QVariant &value) |
| void | slotColorInteraction (bool active) |
| void | slotColorSelected (const KoColor &color) |
| void | slotColorSourceToggled (bool selectingBg) |
| void | slotConfigurationChanged () |
| void | slotDisplayConfigurationChanged () |
| void | slotFGColorUsed (const KoColor &color) |
| void | slotOpenSettings () |
| void | slotSetNewColors () |
| void | slotShowGamutMaskToolbar (bool show) |
Private Attributes | |
| WGActionManager * | m_actionManager {0} |
| QPointer< KisCanvas2 > | m_canvas |
| KisSignalCompressor * | m_colorChangeCompressor |
| KisUniqueColorSet * | m_colorHistory |
| KisVisualColorModelSP | m_colorModelBG |
| KisVisualColorModelSP | m_colorModelFG |
| WGColorPreviewToolTip * | m_colorTooltip {0} |
| WGColorPatches * | m_commonColors {0} |
| WGCommonColorSet * | m_commonColorSet {0} |
| QToolButton * | m_configButton {0} |
| ColorSpaceSource | m_CSSource {LayerColorSpace} |
| const KoColorSpace * | m_customCS {0} |
| WGSelectorDisplayConfigSP | m_displayConfig |
| KisGamutMaskToolbar * | m_gamutToolbar |
| WGColorPatches * | m_history {0} |
| QBoxLayout * | m_mainWidgetLayout {0} |
| bool | m_pendingBgUpdate {false} |
| bool | m_pendingFgUpdate {false} |
| QWidgetAction * | m_quickSettingAction {0} |
| WGQuickSettingsWidget * | m_quickSettings {0} |
| KisVisualColorSelector * | m_selector {0} |
| QBoxLayout * | m_selectorAreaLayout {0} |
| WGShadeSelector * | m_shadeSelector {0} |
| KisColorSourceToggle * | m_toggle {0} |
| QBoxLayout * | m_verticalElementsLayout {0} |
Definition at line 38 of file WGColorSelectorDock.h.
| Enumerator | |
|---|---|
| LayerColorSpace | |
| ImageColorSpace | |
| FixedColorSpace | |
Definition at line 42 of file WGColorSelectorDock.h.
| WGColorSelectorDock::WGColorSelectorDock | ( | ) |
Definition at line 40 of file WGColorSelectorDock.cpp.
References WGColorPatches::CommonColors, connect(), WGColorPatches::History, KisIconUtils::loadIcon(), m_colorChangeCompressor, m_colorHistory, m_colorModelFG, m_commonColors, m_commonColorSet, m_configButton, m_displayConfig, m_gamutToolbar, m_history, m_mainWidgetLayout, m_selector, m_selectorAreaLayout, m_shadeSelector, m_toggle, m_verticalElementsLayout, WGConfig::notifier(), KisVisualColorSelector::selectorModel(), KisVisualColorSelector::setMinimumSliderWidth(), WGColorPatches::setPreset(), slotColorInteraction(), slotColorSelected(), slotColorSourceToggled(), slotConfigurationChanged(), slotSetNewColors(), and slotShowGamutMaskToolbar().
|
inline |
| const KisVisualColorModel & WGColorSelectorDock::colorModel | ( | ) | const |
Definition at line 118 of file WGColorSelectorDock.cpp.
References m_colorModelBG, m_colorModelFG, and selectingBackground().
|
protected |
Definition at line 227 of file WGColorSelectorDock.cpp.
References m_canvas, and m_selector.
| KisDisplayColorConverter * WGColorSelectorDock::displayColorConverter | ( | bool | rawPointer = false | ) | const |
Definition at line 128 of file WGColorSelectorDock.cpp.
References KisDisplayColorConverter::dumbConverterInstance(), and m_canvas.
|
overrideprotected |
Definition at line 158 of file WGColorSelectorDock.cpp.
References m_colorTooltip.
| bool WGColorSelectorDock::selectingBackground | ( | ) | const |
Definition at line 137 of file WGColorSelectorDock.cpp.
References m_toggle.
|
overrideprotectedvirtual |
re-implement this method in your canvas observer. It will be called whenever a canvas becomes active. Note that you are responsible for not connecting more than one time to the signals of a canvas or any of the QObjects you can access through the canvas.
Implements KoCanvasObserverBase.
Definition at line 164 of file WGColorSelectorDock.cpp.
References connect(), KisGamutMaskToolbar::connectMaskSignals(), disconnectFromCanvas(), m_actionManager, m_canvas, m_commonColorSet, m_displayConfig, m_gamutToolbar, m_selector, WGActionManager::setCanvas(), KisVisualColorSelector::setDisplayRenderer(), WGCommonColorSet::setImage(), slotCanvasResourceChanged(), slotDisplayConfigurationChanged(), and slotFGColorUsed().
| void WGColorSelectorDock::setChannelValues | ( | const QVector4D & | values | ) |
Set new channel values; takes effect immediately!
This is intended for synchronization when color gets adjusted outside of the docker, like in WGActionManager
| values |
Definition at line 142 of file WGColorSelectorDock.cpp.
References m_canvas, m_colorModelFG, and m_pendingFgUpdate.
|
overrideprotectedvirtual |
Implements KisMainwindowObserver.
Definition at line 222 of file WGColorSelectorDock.cpp.
References m_actionManager, and WGActionManager::registerActions().
|
privateslot |
Definition at line 453 of file WGColorSelectorDock.cpp.
References KoCanvasResource::BackgroundColor, displayColorConverter(), KoCanvasResource::ForegroundColor, m_colorModelBG, m_colorModelFG, m_pendingBgUpdate, m_pendingFgUpdate, m_toggle, KisColorSourceToggle::setBackgroundColor(), KisColorSourceToggle::setForegroundColor(), KisDisplayColorConverter::toQColor(), and value().
|
privateslot |
Definition at line 418 of file WGColorSelectorDock.cpp.
References KisVisualColorSelector::getCurrentColor(), m_colorTooltip, m_displayConfig, m_selector, m_shadeSelector, WGColorPreviewToolTip::setCurrentColor(), WGColorPreviewToolTip::setPreviousColor(), and WGColorPreviewToolTip::show().
Definition at line 377 of file WGColorSelectorDock.cpp.
References displayColorConverter(), m_colorChangeCompressor, m_colorTooltip, m_displayConfig, m_pendingBgUpdate, m_pendingFgUpdate, m_selector, m_toggle, selectingBackground(), KisColorSourceToggle::setBackgroundColor(), WGColorPreviewToolTip::setCurrentColor(), KisColorSourceToggle::setForegroundColor(), KisVisualColorSelector::slotSetColor(), KisSignalCompressor::start(), and KisDisplayColorConverter::toQColor().
|
privateslot |
Definition at line 396 of file WGColorSelectorDock.cpp.
References m_canvas, m_colorModelBG, m_colorModelFG, m_selector, m_shadeSelector, WGShadeSelector::setModel(), KisVisualColorSelector::setSelectorModel(), and slotDisplayConfigurationChanged().
|
privateslot |
Definition at line 286 of file WGColorSelectorDock.cpp.
References WGConfig::colorSpaceSource, WGConfig::commonColorsAutoUpdate, connect(), FixedColorSpace, WGQuickSettingsWidget::loadConfiguration(), m_canvas, m_commonColors, m_commonColorSet, m_configButton, m_CSSource, m_customCS, m_displayConfig, m_history, m_quickSettingAction, m_quickSettings, m_selector, m_shadeSelector, WGConfig::proofToPaintingColors, WGConfig::quickSettingsEnabled, WGConfig::rgbColorModel, KisVisualColorSelector::selectorModel(), WGConfig::selectorRenderMode, WGCommonColorSet::setAutoUpdate(), KisVisualColorSelector::setConfiguration(), KisVisualColorSelector::setProofColors(), KisVisualColorSelector::setRenderMode(), slotDisplayConfigurationChanged(), slotOpenSettings(), updateLayout(), WGColorPatches::updateSettings(), and WGShadeSelector::updateSettings().
|
privateslot |
Definition at line 344 of file WGColorSelectorDock.cpp.
References displayColorConverter(), FixedColorSpace, ImageColorSpace, m_canvas, m_colorModelFG, m_CSSource, m_customCS, m_displayConfig, m_selector, m_toggle, KisVisualColorSelector::selectorModel(), KisColorSourceToggle::setBackgroundColor(), and KisColorSourceToggle::setForegroundColor().
Definition at line 432 of file WGColorSelectorDock.cpp.
References KisUniqueColorSet::addColor(), m_actionManager, m_colorHistory, m_colorTooltip, m_displayConfig, WGActionManager::setLastUsedColor(), and WGColorPreviewToolTip::setLastUsedColor().
|
privateslot |
Definition at line 474 of file WGColorSelectorDock.cpp.
References m_canvas.
|
privateslot |
Definition at line 440 of file WGColorSelectorDock.cpp.
References m_canvas, m_colorModelBG, m_colorModelFG, m_pendingBgUpdate, and m_pendingFgUpdate.
|
privateslot |
Definition at line 484 of file WGColorSelectorDock.cpp.
References m_gamutToolbar.
|
overrideprotectedvirtual |
Re-implement to notify the observer that its canvas is no longer among the living. The daisies, it is pushing up. This means you don't have to disconnect, it's dead.
The old canvas should be deleted already, so if you stored a pointer to it, don't touch!
Note that currently there is a bug where in certain specific circumstances unsetCanvas can be called when it shouldn't, see for example KWStatisticsDocker for a workaround for this problem.
Implements KoCanvasObserverBase.
Definition at line 212 of file WGColorSelectorDock.cpp.
References m_actionManager, m_canvas, m_commonColorSet, m_displayConfig, m_selector, WGActionManager::setCanvas(), KisVisualColorSelector::setDisplayRenderer(), and WGCommonColorSet::setImage().
|
protected |
Definition at line 235 of file WGColorSelectorDock.cpp.
References WGConfig::colorHistory, WGConfig::colorHistoryEnabled, WGConfig::commonColors, WGConfig::commonColorsEnabled, m_commonColors, m_history, m_mainWidgetLayout, m_shadeSelector, m_verticalElementsLayout, and WGConfig::minimalShadeSelectorEnabled.
|
private |
Definition at line 96 of file WGColorSelectorDock.h.
|
private |
Definition at line 83 of file WGColorSelectorDock.h.
|
private |
Definition at line 92 of file WGColorSelectorDock.h.
|
private |
Definition at line 93 of file WGColorSelectorDock.h.
|
private |
Definition at line 105 of file WGColorSelectorDock.h.
|
private |
Definition at line 104 of file WGColorSelectorDock.h.
|
private |
Definition at line 97 of file WGColorSelectorDock.h.
|
private |
Definition at line 100 of file WGColorSelectorDock.h.
|
private |
Definition at line 95 of file WGColorSelectorDock.h.
|
private |
Definition at line 103 of file WGColorSelectorDock.h.
|
private |
Definition at line 107 of file WGColorSelectorDock.h.
|
private |
Definition at line 106 of file WGColorSelectorDock.h.
|
private |
Definition at line 84 of file WGColorSelectorDock.h.
|
private |
Definition at line 94 of file WGColorSelectorDock.h.
|
private |
Definition at line 99 of file WGColorSelectorDock.h.
|
private |
Definition at line 86 of file WGColorSelectorDock.h.
|
private |
Definition at line 109 of file WGColorSelectorDock.h.
|
private |
Definition at line 108 of file WGColorSelectorDock.h.
|
private |
Definition at line 101 of file WGColorSelectorDock.h.
|
private |
Definition at line 102 of file WGColorSelectorDock.h.
|
private |
Definition at line 90 of file WGColorSelectorDock.h.
|
private |
Definition at line 87 of file WGColorSelectorDock.h.
|
private |
Definition at line 98 of file WGColorSelectorDock.h.
|
private |
Definition at line 91 of file WGColorSelectorDock.h.
|
private |
Definition at line 88 of file WGColorSelectorDock.h.