|
Krita Source Code Documentation
|
#include <WGColorSelectorDock.h>
Inheritance diagram for WGColorSelectorDock:Public Types | |
| enum | ColorSpaceSource { LayerColorSpace , ImageColorSpace , FixedColorSpace } |
Public Member Functions | |
| KisUniqueColorSet * | colorHistoryModel () 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) |
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 41 of file WGColorSelectorDock.cpp.
References WGColorPatches::CommonColors, WGColorPatches::History, KisIconUtils::loadIcon(), m_colorChangeCompressor, m_colorModelFG, m_commonColors, m_commonColorSet, m_configButton, m_displayConfig, m_documentColorHistoryModel, m_fallbackColorHistoryModel, m_gamutToolbar, m_globalColorHistoryModel, 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().
| KisUniqueColorSet * WGColorSelectorDock::colorHistoryModel | ( | ) | const |
Definition at line 167 of file WGColorSelectorDock.cpp.
References m_colorHistoryFromDocument, m_documentColorHistoryModel, and m_globalColorHistoryModel.
| const KisVisualColorModel & WGColorSelectorDock::colorModel | ( | ) | const |
Definition at line 121 of file WGColorSelectorDock.cpp.
References m_colorModelBG, m_colorModelFG, and selectingBackground().
|
protected |
Definition at line 246 of file WGColorSelectorDock.cpp.
References m_canvas, and m_selector.
| KisDisplayColorConverter * WGColorSelectorDock::displayColorConverter | ( | bool | rawPointer = false | ) | const |
Definition at line 131 of file WGColorSelectorDock.cpp.
References KisDisplayColorConverter::dumbConverterInstance(), and m_canvas.
|
overrideprotected |
Definition at line 161 of file WGColorSelectorDock.cpp.
References m_colorTooltip.
| bool WGColorSelectorDock::selectingBackground | ( | ) | const |
Definition at line 140 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 173 of file WGColorSelectorDock.cpp.
References KisCanvasResourceProvider::colorHistoryModel(), colorHistoryModel(), KisGamutMaskToolbar::connectMaskSignals(), disconnectFromCanvas(), m_actionManager, m_canvas, m_commonColorSet, m_displayConfig, m_documentColorHistoryModel, m_gamutToolbar, m_globalColorHistoryModel, m_history, m_selector, WGActionManager::setCanvas(), WGColorPatches::setColorHistoryModel(), KisVisualColorSelector::setDisplayRenderer(), WGCommonColorSet::setImage(), slotCanvasResourceChanged(), slotDisplayConfigurationChanged(), slotFGColorUsed(), and WGActionManager::updateColorHistoryModel().
| 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 145 of file WGColorSelectorDock.cpp.
References m_canvas, m_colorModelFG, and m_pendingFgUpdate.
|
overrideprotectedvirtual |
Implements KisMainwindowObserver.
Definition at line 241 of file WGColorSelectorDock.cpp.
References m_actionManager, and WGActionManager::registerActions().
|
privateslot |
Definition at line 481 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 442 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 401 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 420 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 305 of file WGColorSelectorDock.cpp.
References WGConfig::colorHistoryFromDocument, colorHistoryModel(), WGConfig::colorSpaceSource, WGConfig::commonColorsAutoUpdate, FixedColorSpace, WGQuickSettingsWidget::loadConfiguration(), m_actionManager, m_canvas, m_colorHistoryFromDocument, 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(), WGColorPatches::setColorHistoryModel(), KisVisualColorSelector::setConfiguration(), KisVisualColorSelector::setProofColors(), KisVisualColorSelector::setRenderMode(), slotDisplayConfigurationChanged(), slotOpenSettings(), WGActionManager::updateColorHistoryModel(), updateLayout(), WGColorPatches::updateSettings(), and WGShadeSelector::updateSettings().
|
privateslot |
Definition at line 368 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 456 of file WGColorSelectorDock.cpp.
References KisUniqueColorSet::addColor(), m_actionManager, m_colorHistoryFromDocument, m_colorTooltip, m_displayConfig, m_documentColorHistoryModel, m_globalColorHistoryModel, WGActionManager::setLastUsedColor(), and WGColorPreviewToolTip::setLastUsedColor().
|
privateslot |
Definition at line 502 of file WGColorSelectorDock.cpp.
References m_canvas.
|
privateslot |
Definition at line 468 of file WGColorSelectorDock.cpp.
References m_canvas, m_colorModelBG, m_colorModelFG, m_pendingBgUpdate, and m_pendingFgUpdate.
|
privateslot |
Definition at line 512 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 228 of file WGColorSelectorDock.cpp.
References m_actionManager, m_canvas, m_commonColorSet, m_displayConfig, m_documentColorHistoryModel, m_globalColorHistoryModel, m_history, m_selector, WGActionManager::setCanvas(), WGColorPatches::setColorHistoryModel(), KisVisualColorSelector::setDisplayRenderer(), and WGCommonColorSet::setImage().
|
protected |
Definition at line 254 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 99 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 96 of file WGColorSelectorDock.h.
|
private |
Definition at line 108 of file WGColorSelectorDock.h.
|
private |
Definition at line 107 of file WGColorSelectorDock.h.
|
private |
Definition at line 100 of file WGColorSelectorDock.h.
|
private |
Definition at line 103 of file WGColorSelectorDock.h.
|
private |
Definition at line 98 of file WGColorSelectorDock.h.
|
private |
Definition at line 106 of file WGColorSelectorDock.h.
|
private |
Definition at line 110 of file WGColorSelectorDock.h.
|
private |
Definition at line 109 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 95 of file WGColorSelectorDock.h.
|
private |
Definition at line 97 of file WGColorSelectorDock.h.
|
private |
Definition at line 93 of file WGColorSelectorDock.h.
|
private |
Definition at line 102 of file WGColorSelectorDock.h.
|
private |
Definition at line 86 of file WGColorSelectorDock.h.
|
private |
Definition at line 112 of file WGColorSelectorDock.h.
|
private |
Definition at line 111 of file WGColorSelectorDock.h.
|
private |
Definition at line 104 of file WGColorSelectorDock.h.
|
private |
Definition at line 105 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 101 of file WGColorSelectorDock.h.
|
private |
Definition at line 91 of file WGColorSelectorDock.h.
|
private |
Definition at line 88 of file WGColorSelectorDock.h.