Palette
#include <Palette.h>
Detailed Description
The Palette class Palette is a resource object that stores organised color data.
It's purpose is to allow artists to save colors and store them.
An example for printing all the palettes and the entries:
Constructor & Destructor Documentation
◆ Palette()
Palette::Palette | ( | Resource * | resource | ) |
Definition at line 18 of file Palette.cpp.
◆ ~Palette()
|
override |
Definition at line 22 of file Palette.cpp.
Member Function Documentation
◆ addEntry()
addEntry add an entry to a group.
Gets appended to the end.
- Parameters
-
entry the entry groupName the name of the group to add to.
Definition at line 100 of file Palette.cpp.
◆ addGroup()
addGroup
- Parameters
-
name of the new group
- Returns
- whether adding the group was successful.
Definition at line 63 of file Palette.cpp.
◆ changeGroupName()
changeGroupName change the group name.
- Parameters
-
oldGroupName the old groupname to change. newGroupName the new name to change it into.
- Returns
- whether successful. Reasons for failure include not knowing have oldGroupName
Definition at line 125 of file Palette.cpp.
◆ colorsCountTotal()
int Palette::colorsCountTotal | ( | ) |
colorsCountTotal
- Returns
- the total amount of entries in the whole group
Definition at line 75 of file Palette.cpp.
◆ colorSetEntryByIndex()
Swatch * Palette::colorSetEntryByIndex | ( | int | index | ) |
colorSetEntryByIndex get the colorsetEntry from the global index.
- Parameters
-
index the global index
- Returns
- the colorset entry
Definition at line 81 of file Palette.cpp.
◆ colorSetEntryFromGroup()
colorSetEntryFromGroup
- Parameters
-
index index in the group. groupName the name of the group to get the color from.
- Returns
- the colorsetentry.
Definition at line 91 of file Palette.cpp.
◆ columnCount()
int Palette::columnCount | ( | ) |
columnCount
- Returns
- the amount of columns this palette is set to use.
Definition at line 33 of file Palette.cpp.
◆ comment()
QString Palette::comment | ( | ) |
comment
- Returns
- the comment or description associated with the palette.
Definition at line 45 of file Palette.cpp.
◆ groupNames()
QStringList Palette::groupNames | ( | ) | const |
groupNames
- Returns
- the list of group names. This is list is in the order these groups are in the file.
Definition at line 57 of file Palette.cpp.
◆ moveGroup()
void Palette::moveGroup | ( | const QString & | groupName, |
const QString & | groupNameInsertBefore = QString() ) |
moveGroup move the group to before groupNameInsertBefore.
- Parameters
-
groupName group to move. groupNameInsertBefore group to inset before.
- Returns
- whether successful. Reasons for failure include either group not existing.
Definition at line 130 of file Palette.cpp.
◆ numberOfEntries()
int Palette::numberOfEntries | ( | ) | const |
◆ removeEntry()
removeEntry remove the entry at index
from the group groupName
.
Definition at line 105 of file Palette.cpp.
◆ removeGroup()
removeGroup
- Parameters
-
name the name of the group to remove. keepColors whether or not to delete all the colors inside, or to move them to the default group.
- Returns
Definition at line 69 of file Palette.cpp.
◆ save()
bool Palette::save | ( | ) |
◆ setColumnCount()
void Palette::setColumnCount | ( | int | columns | ) |
setColumnCount Set the amount of columns this palette should use.
Definition at line 39 of file Palette.cpp.
◆ setComment()
setComment set the comment or description associated with the palette.
- Parameters
-
comment
Definition at line 51 of file Palette.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:53 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.