|
Krita Source Code Documentation
|
#include <WGColorPatches.h>
Inheritance diagram for WGColorPatches:Public Types | |
| enum | Preset { None , History , CommonColors } |
Public Types inherited from WGSelectorWidgetBase | |
| enum | UiMode { DockerMode , PopupMode } |
Public Slots | |
| void | updateIcons () |
Signals | |
| void | sigColorChanged (const KoColor &color) |
Signals inherited from WGSelectorWidgetBase | |
| void | sigChannelValuesChanged (const QVector4D &values) |
| void | sigColorInteraction (bool active) |
Public Member Functions | |
| KisUniqueColorSet * | colorHistoryModel () const |
| QPoint | popupOffset () const override |
| The position, relative to the top left corner, where the cursor of the cursor shall be when showing the popup. | |
| void | setAdditionalButtons (QList< QToolButton * > buttonList) |
| void | setColorHistoryModel (KisUniqueColorSet *history) |
| void | setPreset (Preset preset) |
| void | updateSettings () override |
| WGColorPatches (WGSelectorDisplayConfigSP displayConfig, KisUniqueColorSet *history, QWidget *parent=nullptr) | |
Public Member Functions inherited from WGSelectorWidgetBase | |
| WGSelectorDisplayConfigSP | displayConfiguration () const |
| const KisDisplayColorConverter * | displayConverter () const |
| virtual void | setModel (KisVisualColorModelSP model) |
| void | setUiMode (UiMode mode) |
| UiMode | uiMode () const |
| WGSelectorWidgetBase (WGSelectorDisplayConfigSP displayConfig, QWidget *parent=nullptr, UiMode uiMode=UiMode::DockerMode) | |
Protected Member Functions | |
| void | contentPaintEvent (QPaintEvent *event) |
| bool | event (QEvent *event) override |
| bool | eventFilter (QObject *watched, QEvent *e) override |
| QToolButton * | fetchButton (QList< QToolButton * > &recycleList) |
| int | indexAt (const QPoint &widgetPos) const |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| QRect | patchRect (int gridIndex) const |
| void | reconnectButtons (KisUniqueColorSet *oldSet, KisUniqueColorSet *newSet) |
| void | resizeEvent (QResizeEvent *event) override |
| QPoint | scrollOffset () const |
| QSize | sizeHint () const override |
| void | updateMetrics () |
| void | wheelEvent (QWheelEvent *event) override |
Private Attributes | |
| bool | m_allowScrolling {true} |
| QList< QToolButton * > | m_buttonList |
| QPointer< KisUniqueColorSet > | m_colorHistoryModel |
| const WGConfig::ColorPatches * | m_configSource {0} |
| QWidget * | m_contentWidget {0} |
| int | m_maxScroll {0} |
| int | m_mouseIndex {-1} |
| int | m_numLines {1} |
| Qt::Orientation | m_orientation {Qt::Horizontal} |
| int | m_patchCount {30} |
| int | m_patchesPerLine {30} |
| int | m_patchHeight {16} |
| int | m_patchWidth {16} |
| Preset | m_preset {None} |
| bool | m_scrollInline {true} |
| int | m_scrollValue {0} |
| int | m_totalLines {1} |
| QWidget * | m_viewport {0} |
Definition at line 22 of file WGColorPatches.h.
| Enumerator | |
|---|---|
| None | |
| History | |
| CommonColors | |
Definition at line 26 of file WGColorPatches.h.
| WGColorPatches::WGColorPatches | ( | WGSelectorDisplayConfigSP | displayConfig, |
| KisUniqueColorSet * | history, | ||
| QWidget * | parent = nullptr ) |
Definition at line 26 of file WGColorPatches.cpp.
References m_contentWidget, m_viewport, and setColorHistoryModel().
| KisUniqueColorSet * WGColorPatches::colorHistoryModel | ( | ) | const |
Definition at line 41 of file WGColorPatches.cpp.
References m_colorHistoryModel.
|
protected |
Definition at line 343 of file WGColorPatches.cpp.
References WGSelectorWidgetBase::displayConverter(), m_colorHistoryModel, m_contentWidget, m_patchCount, patchRect(), and KisDisplayColorConverter::toQColor().
|
overrideprotected |
Definition at line 191 of file WGColorPatches.cpp.
References event(), m_allowScrolling, m_contentWidget, m_maxScroll, m_orientation, m_scrollInline, m_scrollValue, and scrollOffset().
|
overrideprotected |
Definition at line 241 of file WGColorPatches.cpp.
References contentPaintEvent(), event(), m_contentWidget, and m_viewport.
|
protected |
Definition at line 501 of file WGColorPatches.cpp.
References button().
|
protected |
Definition at line 396 of file WGColorPatches.cpp.
References m_colorHistoryModel, m_contentWidget, m_numLines, m_orientation, m_patchCount, m_patchesPerLine, m_patchHeight, m_patchWidth, m_scrollInline, and m_totalLines.
|
overrideprotected |
Definition at line 288 of file WGColorPatches.cpp.
References event(), indexAt(), m_colorHistoryModel, m_mouseIndex, and sigColorChanged().
|
overrideprotected |
Definition at line 299 of file WGColorPatches.cpp.
References event(), indexAt(), m_colorHistoryModel, m_mouseIndex, sigColorChanged(), and WGSelectorWidgetBase::sigColorInteraction().
|
overrideprotected |
Definition at line 310 of file WGColorPatches.cpp.
References event(), and WGSelectorWidgetBase::sigColorInteraction().
|
protected |
Definition at line 420 of file WGColorPatches.cpp.
References m_numLines, m_orientation, m_patchesPerLine, m_patchHeight, m_patchWidth, and m_scrollInline.
|
overridevirtual |
The position, relative to the top left corner, where the cursor of the cursor shall be when showing the popup.
The default implementation returns the widget center.
Reimplemented from WGSelectorWidgetBase.
Definition at line 142 of file WGColorPatches.cpp.
References m_buttonList, and patchRect().
|
protected |
Definition at line 512 of file WGColorPatches.cpp.
References CommonColors, History, m_buttonList, and m_preset.
|
overrideprotected |
Definition at line 366 of file WGColorPatches.cpp.
References event(), m_buttonList, m_contentWidget, m_maxScroll, m_orientation, m_patchesPerLine, m_patchHeight, m_patchWidth, m_scrollValue, m_totalLines, m_viewport, patchRect(), and updateMetrics().
|
protected |
Definition at line 439 of file WGColorPatches.cpp.
References m_allowScrolling, m_orientation, m_scrollInline, and m_scrollValue.
set buttons, that should be drawn additionally to the patches this class takes ownership of them and will delete them they will be resized to the patchsize
Definition at line 147 of file WGColorPatches.cpp.
References m_buttonList, m_patchesPerLine, and resizeEvent().
| void WGColorPatches::setColorHistoryModel | ( | KisUniqueColorSet * | history | ) |
Definition at line 161 of file WGColorPatches.cpp.
References colorHistoryModel(), m_colorHistoryModel, m_contentWidget, m_scrollValue, and reconnectButtons().
Definition at line 114 of file WGColorPatches.cpp.
References WGConfig::colorHistory, CommonColors, WGConfig::commonColors, History, m_configSource, m_preset, None, WGSelectorWidgetBase::PopupMode, WGConfig::popupPatches, WGSelectorWidgetBase::uiMode(), and updateSettings().
|
overrideprotected |
Definition at line 387 of file WGColorPatches.cpp.
References m_numLines, m_orientation, m_patchesPerLine, m_patchHeight, and m_patchWidth.
|
slot |
Definition at line 178 of file WGColorPatches.cpp.
References CommonColors, History, KisIconUtils::loadIcon(), m_buttonList, m_preset, and None.
|
protected |
Definition at line 461 of file WGColorPatches.cpp.
References m_allowScrolling, m_buttonList, m_maxScroll, m_numLines, m_orientation, m_patchCount, m_patchesPerLine, m_patchHeight, m_patchWidth, m_scrollInline, and m_totalLines.
|
overridevirtual |
Reimplemented from WGSelectorWidgetBase.
Definition at line 46 of file WGColorPatches.cpp.
References buttons(), WGConfig::colorHistoryShowClearButton, CommonColors, WGConfig::commonColors, fetchButton(), History, m_allowScrolling, m_buttonList, m_colorHistoryModel, m_configSource, m_contentWidget, m_numLines, m_orientation, m_patchCount, m_patchesPerLine, m_patchHeight, m_patchWidth, m_preset, m_scrollInline, m_viewport, WGConfig::ColorPatches::maxCount, WGConfig::ColorPatches::orientation, WGConfig::ColorPatches::patchSize, WGSelectorWidgetBase::PopupMode, reconnectButtons(), resizeEvent(), WGConfig::ColorPatches::rows, WGConfig::ColorPatches::scrolling, WGConfig::ScrollLongitudinal, WGConfig::ScrollNone, WGSelectorWidgetBase::uiMode(), and updateIcons().
|
overrideprotected |
Definition at line 317 of file WGColorPatches.cpp.
References m_allowScrolling, m_contentWidget, m_maxScroll, m_patchHeight, m_patchWidth, m_scrollInline, m_scrollValue, and scrollOffset().
|
private |
Definition at line 79 of file WGColorPatches.h.
|
private |
Definition at line 65 of file WGColorPatches.h.
|
private |
Definition at line 64 of file WGColorPatches.h.
|
private |
Definition at line 67 of file WGColorPatches.h.
|
private |
Definition at line 69 of file WGColorPatches.h.
|
private |
Definition at line 77 of file WGColorPatches.h.
|
private |
Definition at line 78 of file WGColorPatches.h.
|
private |
Definition at line 70 of file WGColorPatches.h.
|
private |
Definition at line 66 of file WGColorPatches.h.
|
private |
Definition at line 75 of file WGColorPatches.h.
|
private |
Definition at line 71 of file WGColorPatches.h.
|
private |
Definition at line 74 of file WGColorPatches.h.
|
private |
Definition at line 73 of file WGColorPatches.h.
Definition at line 81 of file WGColorPatches.h.
|
private |
Definition at line 80 of file WGColorPatches.h.
|
private |
Definition at line 76 of file WGColorPatches.h.
|
private |
Definition at line 72 of file WGColorPatches.h.
|
private |
Definition at line 68 of file WGColorPatches.h.