|
Krita Source Code Documentation
|
The PaletteView class is a wrapper around a MVC method for handling palettes. This class shows a nice widget that can drag and drop, edit colors in a colorset and will handle adding and removing entries if you'd like it to. More...
#include <PaletteView.h>
Inheritance diagram for PaletteView:Public Slots | |
| bool | addEntryWithDialog (ManagedColor *color) |
| addEntryWithDialog This gives a simple dialog for adding colors, with options like adding name, id, and to which group the color should be added. | |
| bool | addGroupWithDialog () |
| addGroupWithDialog gives a little dialog to ask for the desired groupname. | |
| bool | removeSelectedEntryWithDialog () |
| removeSelectedEntryWithDialog removes the selected entry. If it is a group, it pop up a dialog asking whether the colors should also be removed. | |
| void | setPalette (Palette *palette) |
| setPalette Set a new palette. | |
| void | trySelectClosestColor (ManagedColor *color) |
| trySelectClosestColor tries to select the closest color to the one given. It does not force a change on the active color. | |
Signals | |
| void | entrySelectedBackGround (Swatch entry) |
| entrySelectedBackGround fires when a swatch is selected with rightclick. | |
| void | entrySelectedForeGround (Swatch entry) |
| entrySelectedForeGround fires when a swatch is selected with leftclick. | |
Public Member Functions | |
| PaletteView (QWidget *parent=0) | |
| ~PaletteView () | |
Private Slots | |
| void | fgSelected (QModelIndex index) |
Private Attributes | |
| const QScopedPointer< Private > | d |
The PaletteView class is a wrapper around a MVC method for handling palettes. This class shows a nice widget that can drag and drop, edit colors in a colorset and will handle adding and removing entries if you'd like it to.
Definition at line 30 of file PaletteView.h.
| PaletteView::PaletteView | ( | QWidget * | parent = 0 | ) |
Definition at line 17 of file PaletteView.cpp.
References connect(), d, and fgSelected().
| PaletteView::~PaletteView | ( | ) |
Definition at line 32 of file PaletteView.cpp.
References d.
|
slot |
addEntryWithDialog This gives a simple dialog for adding colors, with options like adding name, id, and to which group the color should be added.
| color | the default color to add |
Definition at line 44 of file PaletteView.cpp.
References ManagedColor::color(), and d.
|
slot |
addGroupWithDialog gives a little dialog to ask for the desired groupname.
Definition at line 52 of file PaletteView.cpp.
References d.
entrySelectedBackGround fires when a swatch is selected with rightclick.
| entry |
entrySelectedForeGround fires when a swatch is selected with leftclick.
| entry |
|
privateslot |
Definition at line 73 of file PaletteView.cpp.
References d, and entrySelectedForeGround().
|
slot |
removeSelectedEntryWithDialog removes the selected entry. If it is a group, it pop up a dialog asking whether the colors should also be removed.
Definition at line 60 of file PaletteView.cpp.
References d.
setPalette Set a new palette.
| palette |
Definition at line 38 of file PaletteView.cpp.
|
slot |
trySelectClosestColor tries to select the closest color to the one given. It does not force a change on the active color.
| color | the color to compare to. |
Definition at line 68 of file PaletteView.cpp.
References ManagedColor::color(), and d.
|
private |
Definition at line 94 of file PaletteView.h.