|
Krita Source Code Documentation
|
A colormanaged widget for choosing a color from a colorset. More...
#include <KoColorSetWidget.h>
Inheritance diagram for KoColorSetWidget:Signals | |
| void | colorChanged (const KoColor &color, bool final) |
| void | widgetSizeChanged (const QSize &size) |
Public Member Functions | |
| void | activateRecent (int i) |
| void | addRecent (const KoColor &) |
| void | addRemoveColors () |
| KoColorSetSP | colorSet () |
| KoColorSetWidget (QWidget *parent=0) | |
| void | setColorSet (KoColorSetSP colorSet) |
| void | setDisplayRenderer (const KoColorDisplayRendererInterface *displayRenderer) |
| setDisplayRenderer Set the display renderer of this object. | |
| ~KoColorSetWidget () override | |
Public Attributes | |
| QToolButton * | addRemoveButton |
| QHBoxLayout * | bottomLayout |
| KisPaletteComboBox * | colorNameCmb |
| KoColorSetSP | colorSet |
| QVBoxLayout * | colorSetLayout |
| const KoColorDisplayRendererInterface * | displayRenderer |
| QVBoxLayout * | mainLayout |
| int | numRecents |
| KisPaletteChooser * | paletteChooser |
| KisPopupButton * | paletteChooserButton |
| KisPaletteView * | paletteView |
| KoColorPatch * | recentPatches [6] |
| QHBoxLayout * | recentsLayout |
| KoResourceServer< KoColorSet > * | rServer |
| KoColorSetWidget * | thePublic |
Protected Member Functions | |
| void | resizeEvent (QResizeEvent *event) override |
| reimplemented from QFrame | |
Private Slots | |
| void | slotColorSelectedByPalette (const KoColor &color) |
| slotEntrySelected Triggered when a color is choose from the palette view | |
| void | slotNameListSelection (const KoColor &) |
| void | slotPaletteChosen (KoColorSetSP) |
| void | slotPatchTriggered (KoColorPatch *) |
| slotPatchTriggered Triggered when a recent patch is triggered | |
Private Attributes | |
| KoColorSetWidgetPrivate *const | d |
A colormanaged widget for choosing a color from a colorset.
KoColorSetWidget is a widget for choosing a color (colormanaged via pigment). It shows a color set plus optionally a checkbox to filter away bad matching colors.
Definition at line 30 of file KoColorSetWidget.h.
|
explicit |
Constructor for the widget, where color is initially blackpoint of sRGB
| parent | parent QWidget |
Definition at line 67 of file KoColorSetWidget.cpp.
References connect(), d, KoColor::fromQColor(), KoColorSpaceRegistry::instance(), KoResourceServerProvider::instance(), KisIconUtils::loadIcon(), KoResourceServerProvider::paletteServer, setColorSet(), slotColorSelectedByPalette(), slotNameListSelection(), and slotPaletteChosen().
|
override |
| void KoColorSetWidget::activateRecent | ( | int | i | ) |
| void KoColorSetWidget::addRemoveColors | ( | ) |
Emitted every time the color changes (by calling setColor() or by user interaction.
| color | the new color |
| final | if the value is final (ie not produced by the pointer moving over around) |
| KoColorSetSP KoColorSetWidget::colorSet | ( | ) |
Gets the current color set
|
overrideprotected |
reimplemented from QFrame
Definition at line 153 of file KoColorSetWidget.cpp.
References widgetSizeChanged().
| void KoColorSetWidget::setColorSet | ( | KoColorSetSP | colorSet | ) |
Sets the color set that this widget shows.
| colorSet | pointer to the color set |
Definition at line 127 of file KoColorSetWidget.cpp.
| void KoColorSetWidget::setDisplayRenderer | ( | const KoColorDisplayRendererInterface * | displayRenderer | ) |
setDisplayRenderer Set the display renderer of this object.
| displayRenderer |
Definition at line 141 of file KoColorSetWidget.cpp.
References d, and displayRenderer.
slotEntrySelected Triggered when a color is choose from the palette view
Definition at line 159 of file KoColorSetWidget.cpp.
References colorChanged(), and d.
Definition at line 189 of file KoColorSetWidget.cpp.
References colorChanged().
|
privateslot |
|
privateslot |
slotPatchTriggered Triggered when a recent patch is triggered
Definition at line 165 of file KoColorSetWidget.cpp.
References KoColorPatch::color(), colorChanged(), and d.
|
signal |
Emitted every time the size of this widget changes because of new colorset with different number of colors is loaded. This is useful for KoColorSetAction to update correct size of the menu showing this widget.
| size | the new size |
| QToolButton* KoColorSetWidget::addRemoveButton |
Definition at line 50 of file KoColorSetWidget_p.h.
| QHBoxLayout* KoColorSetWidget::bottomLayout |
Definition at line 47 of file KoColorSetWidget_p.h.
| KisPaletteComboBox* KoColorSetWidget::colorNameCmb |
Definition at line 51 of file KoColorSetWidget_p.h.
| KoColorSetSP KoColorSetWidget::colorSet |
Definition at line 38 of file KoColorSetWidget_p.h.
| QVBoxLayout* KoColorSetWidget::colorSetLayout |
Definition at line 45 of file KoColorSetWidget_p.h.
|
private |
Definition at line 105 of file KoColorSetWidget.h.
| const KoColorDisplayRendererInterface* KoColorSetWidget::displayRenderer |
Definition at line 54 of file KoColorSetWidget_p.h.
| QVBoxLayout* KoColorSetWidget::mainLayout |
Definition at line 44 of file KoColorSetWidget_p.h.
| int KoColorSetWidget::numRecents |
Definition at line 52 of file KoColorSetWidget_p.h.
| KisPaletteChooser* KoColorSetWidget::paletteChooser |
Definition at line 41 of file KoColorSetWidget_p.h.
| KisPopupButton* KoColorSetWidget::paletteChooserButton |
Definition at line 42 of file KoColorSetWidget_p.h.
| KisPaletteView* KoColorSetWidget::paletteView |
Definition at line 40 of file KoColorSetWidget_p.h.
| KoColorPatch* KoColorSetWidget::recentPatches[6] |
Definition at line 49 of file KoColorSetWidget_p.h.
| QHBoxLayout* KoColorSetWidget::recentsLayout |
Definition at line 46 of file KoColorSetWidget_p.h.
| KoResourceServer<KoColorSet>* KoColorSetWidget::rServer |
Definition at line 55 of file KoColorSetWidget_p.h.
| KoColorSetWidget* KoColorSetWidget::thePublic |
Definition at line 37 of file KoColorSetWidget_p.h.