|
Krita Source Code Documentation
|
#include <kis_palette_view.h>
Inheritance diagram for KisPaletteView:Classes | |
| struct | Private |
Public Slots | |
| void | slotFGColorChanged (const KoColor &) |
| void | slotScrollerStateChanged (QScroller::State state) |
Signals | |
| void | sigColorSelected (const KoColor &) |
| void | sigIndexSelected (const QModelIndex &index) |
Public Member Functions | |
| bool | addEntryWithDialog (KoColor color) |
| bool | addGroupWithDialog () |
| const KoColor | closestColor (const KoColor &color) const |
| closestColor determines closest swatch in the active palette and returns it's color as KoColor | |
| KisPaletteView (QWidget *parent=0) | |
| KisPaletteModel * | paletteModel () const |
| bool | removeEntryWithDialog (QModelIndex index) |
| void | removeSelectedEntry () |
| void | selectClosestColor (const KoColor &color) |
| selectClosestColor select a color that's closest to parameter color | |
| void | setAllowModification (bool allow) |
| setAllowModification Set whether doubleclick calls up a modification window. This is to prevent users from editing the palette when the palette is intended to be a list of items. | |
| void | setCrossedKeyword (const QString &value) |
| setCrossedKeyword This allows you to set keywords that can cross out colors. This is implemented to mark the lazybrush "transparent" color. | |
| void | setDisplayRenderer (const KoColorDisplayRendererInterface *displayRenderer) |
| void | setPaletteModel (KisPaletteModel *model) |
| ~KisPaletteView () override | |
Private Slots | |
| void | slotAdditionalGuiUpdate () |
| void | slotCurrentSelectionChanged (const QModelIndex &newCurrent) |
| void | slotHorizontalHeaderResized (int, int, int newSize) |
Private Member Functions | |
| void | resizeRows (int newSize) |
| void | saveModification () |
Private Attributes | |
| const QScopedPointer< Private > | d |
Static Private Attributes | |
| static int | MINIMUM_ROW_HEIGHT = 10 |
Definition at line 24 of file kis_palette_view.h.
|
explicit |
Definition at line 42 of file kis_palette_view.cpp.
References connect(), KisKineticScroller::createPreconfiguredScroller(), MINIMUM_ROW_HEIGHT, slotCurrentSelectionChanged(), slotHorizontalHeaderResized(), and slotScrollerStateChanged().
|
override |
Definition at line 84 of file kis_palette_view.cpp.
| bool KisPaletteView::addEntryWithDialog | ( | KoColor | color | ) |
add an entry with a dialog window.
Definition at line 97 of file kis_palette_view.cpp.
References KisColorButton::color, d, saveModification(), KisColorButton::setColor(), KisSwatch::setColor(), KisSwatch::setId(), KisSwatch::setName(), and KisSwatch::setSpotColor().
| bool KisPaletteView::addGroupWithDialog | ( | ) |
add entry with a dialog window.
Definition at line 141 of file kis_palette_view.cpp.
References d, and saveModification().
closestColor determines closest swatch in the active palette and returns it's color as KoColor
| color |
Definition at line 196 of file kis_palette_view.cpp.
References KisSwatch::color(), and d.
| KisPaletteModel * KisPaletteView::paletteModel | ( | ) | const |
| bool KisPaletteView::removeEntryWithDialog | ( | QModelIndex | index | ) |
remove entry with a dialog window.(Necessary for groups.
Definition at line 158 of file kis_palette_view.cpp.
References d, KisPaletteModel::IsGroupNameRole, and saveModification().
| void KisPaletteView::removeSelectedEntry | ( | ) |
Definition at line 249 of file kis_palette_view.cpp.
References d.
|
private |
Definition at line 238 of file kis_palette_view.cpp.
|
private |
Definition at line 244 of file kis_palette_view.cpp.
References d, and KisResourceUserOperations::updateResourceWithUserInput().
selectClosestColor select a color that's closest to parameter color
| color |
Definition at line 178 of file kis_palette_view.cpp.
References d.
| void KisPaletteView::setAllowModification | ( | bool | allow | ) |
setAllowModification Set whether doubleclick calls up a modification window. This is to prevent users from editing the palette when the palette is intended to be a list of items.
Definition at line 227 of file kis_palette_view.cpp.
| void KisPaletteView::setCrossedKeyword | ( | const QString & | value | ) |
setCrossedKeyword This allows you to set keywords that can cross out colors. This is implemented to mark the lazybrush "transparent" color.
| value |
Definition at line 88 of file kis_palette_view.cpp.
References KIS_ASSERT_RECOVER_RETURN, KisPaletteDelegate::setCrossedKeyword(), and value().
| void KisPaletteView::setDisplayRenderer | ( | const KoColorDisplayRendererInterface * | displayRenderer | ) |
Definition at line 308 of file kis_palette_view.cpp.
References d.
| void KisPaletteView::setPaletteModel | ( | KisPaletteModel * | model | ) |
Definition at line 208 of file kis_palette_view.cpp.
References connect(), d, and slotAdditionalGuiUpdate().
|
signal |
|
privateslot |
Definition at line 257 of file kis_palette_view.cpp.
References d, and resizeRows().
|
privateslot |
Definition at line 289 of file kis_palette_view.cpp.
References KisPaletteModel::CheckSlotRole, KisSwatch::color(), d, KisPaletteModel::IsGroupNameRole, sigColorSelected(), and sigIndexSelected().
This tries to select the closest color in the palette. This doesn't update the foreground color, just the visual selection.
Definition at line 203 of file kis_palette_view.cpp.
References selectClosestColor().
|
privateslot |
Definition at line 232 of file kis_palette_view.cpp.
References resizeRows(), and slotAdditionalGuiUpdate().
|
inlineslot |
Definition at line 104 of file kis_palette_view.h.
References KisKineticScroller::updateCursor().
|
private |
Definition at line 117 of file kis_palette_view.h.
|
staticprivate |
Definition at line 28 of file kis_palette_view.h.