ColorManager Class Reference
Dialog to manage colors and colorsets. It provides all operations - color creating, deleting, importing etc. There are some predefined color sets for user and it is managed here too. More...
#include <colorm.h>

Public Member Functions | |
| ColorManager (QWidget *parent, ColorList doco, ScribusDoc *doc, QString docColSet, QStringList custColSet) | |
| ~ColorManager () | |
| QString | getColorSetName () |
| Returns the name of the current/selected color set. | |
Public Attributes | |
| ColorList | EditColors |
| A ColorList with all available colors after dialog closing. | |
| ColorList | UsedC |
| in doc used colors | |
| QMap< QString, QString > | replaceMap |
| Color to color replacement mapping. | |
| QStringList | customColSet |
| Custom user's color set. | |
Protected Attributes | |
| QVBoxLayout * | Layout2 |
| QHBoxLayout * | layout5 |
| QVBoxLayout * | layout3 |
| QVBoxLayout * | ColsSetGroupLayout |
| QVBoxLayout * | Layout1 |
| ColorSetManager | csm |
| int | customSetStartIndex |
Private Slots | |
| void | saveDefaults () |
| void | loadDefaults (const QString &txt) |
| void | importColors () |
| Just note: Farbe is German word for Color... | |
| void | deleteColor () |
| void | deleteUnusedColors () |
| void | duplicateColor () |
| void | newColor () |
| void | editColor () |
| void | selColor (QListWidgetItem *) |
| void | selEditColor (QListWidgetItem *) |
| void | updateCList () |
Private Member Functions | |
| void | updateButtons () |
Private Attributes | |
| ColorListBox * | colorListBox |
| QGroupBox * | ColorsGroup |
| QGroupBox * | ColsSetGroup |
| QPushButton * | importColorsButton |
| QPushButton * | newColorButton |
| QPushButton * | editColorButton |
| QPushButton * | duplicateColorButton |
| QPushButton * | deleteColorButton |
| QPushButton * | deleteUnusedButton |
| QPushButton * | saveButton |
| QPushButton * | cancelButton |
| QLabel * | textLabel1 |
| QPushButton * | SaveColSet |
| QComboBox * | LoadColSet |
| QString | sColor |
| QColor | tmpColor |
| QStringList | DontChange |
| ScribusDoc * | m_Doc |
Detailed Description
Dialog to manage colors and colorsets. It provides all operations - color creating, deleting, importing etc. There are some predefined color sets for user and it is managed here too.Definition at line 33 of file colorm.h.
Constructor & Destructor Documentation
| ColorManager::ColorManager | ( | QWidget * | parent, | |
| ColorList | doco, | |||
| ScribusDoc * | doc, | |||
| QString | docColSet, | |||
| QStringList | custColSet | |||
| ) |
Definition at line 49 of file colorm.cpp.
References cancelButton, colorListBox, ColorsGroup, ColsSetGroup, ColsSetGroupLayout, csm, customColSet, customSetStartIndex, deleteColor(), deleteColorButton, deleteUnusedButton, deleteUnusedColors(), duplicateColor(), duplicateColorButton, editColor(), editColorButton, EditColors, ColorSetManager::findPaletteLocations(), ColorSetManager::findPalettes(), ScPaths::getApplicationDataDir(), importColors(), importColorsButton, Layout1, Layout2, layout3, layout5, LoadColSet, loadDefaults(), loadIcon(), m_Doc, newColor(), newColorButton, ColorSetManager::paletteNames(), replaceMap, saveButton, SaveColSet, saveDefaults(), selColor(), selEditColor(), setCurrentComboItem(), textLabel1, tr(), CommonStrings::tr_Cancel, CommonStrings::tr_OK, and updateCList().
Member Function Documentation
| QString ColorManager::getColorSetName | ( | ) |
Returns the name of the current/selected color set.
- Return values:
-
QString selected name.
Definition at line 728 of file colorm.cpp.
References LoadColSet.
| void ColorManager::updateButtons | ( | ) | [private] |
Definition at line 699 of file colorm.cpp.
References colorListBox, deleteColorButton, duplicateColorButton, editColorButton, EditColors, ScColor::isRegistrationColor(), sColor, and tmpColor.
Referenced by deleteColor(), deleteUnusedColors(), duplicateColor(), editColor(), newColor(), and updateCList().
| void ColorManager::saveDefaults | ( | ) | [private, slot] |
Definition at line 185 of file colorm.cpp.
References colorModelRGB, customColSet, EditColors, ScPaths::getApplicationDataDir(), Query::getEditText(), LoadColSet, setCurrentComboItem(), Query::setEditText(), and tr().
Referenced by ColorManager().
| void ColorManager::loadDefaults | ( | const QString & | txt | ) | [private, slot] |
Definition at line 257 of file colorm.cpp.
References csm, customSetStartIndex, EditColors, ScColor::fromQColor(), ScPaths::getApplicationDataDir(), ScPaths::instance(), ScPaths::libDir(), LoadColSet, loadRawText(), CommonStrings::None, ColorSetManager::paletteFileFromName(), ScColor::setColor(), ScColor::setColorRGB(), setCurrentComboItem(), ScColor::setNamedColor(), ScColor::setRegistrationColor(), ScColor::setSpotColor(), and updateCList().
Referenced by ColorManager().
| void ColorManager::importColors | ( | ) | [private, slot] |
Just note: Farbe is German word for Color...
Definition at line 427 of file colorm.cpp.
References FormatsManager::AI, EditColors, FormatsManager::EPS, extensionIndicatesEPSorPS(), PrefsContext::get(), PrefsFile::getContext(), FormatsManager::instance(), PrefsManager::instance(), PrefsManager::prefsFile, FormatsManager::PS, FileLoader::ReadColors(), readLinefromDataStream(), CustomFDialog::selectedFile(), PrefsContext::set(), ScColor::setSpotColor(), FileLoader::TestFile(), tr(), and updateCList().
Referenced by ColorManager().
| void ColorManager::deleteColor | ( | ) | [private, slot] |
Definition at line 642 of file colorm.cpp.
References colorListBox, EditColors, DelColor::getReplacementColor(), m_Doc, CommonStrings::None, replaceMap, sColor, CommonStrings::tr_NoneColor, updateButtons(), and updateCList().
Referenced by ColorManager().
| void ColorManager::deleteUnusedColors | ( | ) | [private, slot] |
Definition at line 557 of file colorm.cpp.
References EditColors, ColorList::ensureBlackAndWhite(), ScribusDoc::getUsedColors(), m_Doc, updateButtons(), updateCList(), and UsedC.
Referenced by ColorManager().
| void ColorManager::duplicateColor | ( | ) | [private, slot] |
Definition at line 582 of file colorm.cpp.
References editColor(), EditColors, sColor, tr(), updateButtons(), and updateCList().
Referenced by ColorManager().
| void ColorManager::newColor | ( | ) | [private, slot] |
Definition at line 592 of file colorm.cpp.
References colorListBox, customColSet, EditColors, CMYKChoose::Farbe, CMYKChoose::Farbname, m_Doc, sColor, CMYKChoose::Separations, ScColor::setSpotColor(), tmpColor, tr(), updateButtons(), and updateCList().
Referenced by ColorManager().
| void ColorManager::editColor | ( | ) | [private, slot] |
Definition at line 618 of file colorm.cpp.
References colorListBox, customColSet, EditColors, CMYKChoose::Farbe, CMYKChoose::Farbname, ScColor::isRegistrationColor(), m_Doc, replaceMap, sColor, CMYKChoose::Separations, ScColor::setRegistrationColor(), ScColor::setSpotColor(), tmpColor, updateButtons(), and updateCList().
Referenced by ColorManager(), duplicateColor(), and selEditColor().
| void ColorManager::selColor | ( | QListWidgetItem * | c | ) | [private, slot] |
Definition at line 675 of file colorm.cpp.
References deleteColorButton, duplicateColorButton, editColorButton, EditColors, ScColor::isRegistrationColor(), sColor, and tmpColor.
Referenced by ColorManager().
| void ColorManager::selEditColor | ( | QListWidgetItem * | c | ) | [private, slot] |
Definition at line 686 of file colorm.cpp.
References deleteColorButton, duplicateColorButton, editColor(), editColorButton, EditColors, ScColor::isRegistrationColor(), sColor, and tmpColor.
Referenced by ColorManager().
| void ColorManager::updateCList | ( | ) | [private, slot] |
Definition at line 720 of file colorm.cpp.
References colorListBox, EditColors, ColorListBox::fancyPixmap, ColorListBox::updateBox(), and updateButtons().
Referenced by ColorManager(), deleteColor(), deleteUnusedColors(), duplicateColor(), editColor(), importColors(), loadDefaults(), and newColor().
Member Data Documentation
A ColorList with all available colors after dialog closing.
Definition at line 39 of file colorm.h.
Referenced by ColorManager(), deleteColor(), deleteUnusedColors(), duplicateColor(), editColor(), importColors(), loadDefaults(), newColor(), saveDefaults(), selColor(), selEditColor(), updateButtons(), and updateCList().
| QMap<QString,QString> ColorManager::replaceMap |
Color to color replacement mapping.
Definition at line 45 of file colorm.h.
Referenced by ColorManager(), deleteColor(), and editColor().
| QStringList ColorManager::customColSet |
Custom user's color set.
Definition at line 47 of file colorm.h.
Referenced by ColorManager(), editColor(), newColor(), and saveDefaults().
ColorListBox* ColorManager::colorListBox [private] |
Definition at line 55 of file colorm.h.
Referenced by ColorManager(), deleteColor(), editColor(), newColor(), updateButtons(), and updateCList().
QGroupBox* ColorManager::ColorsGroup [private] |
QGroupBox* ColorManager::ColsSetGroup [private] |
QPushButton* ColorManager::importColorsButton [private] |
QPushButton* ColorManager::newColorButton [private] |
QPushButton* ColorManager::editColorButton [private] |
Definition at line 60 of file colorm.h.
Referenced by ColorManager(), selColor(), selEditColor(), and updateButtons().
QPushButton* ColorManager::duplicateColorButton [private] |
Definition at line 61 of file colorm.h.
Referenced by ColorManager(), selColor(), selEditColor(), and updateButtons().
QPushButton* ColorManager::deleteColorButton [private] |
Definition at line 62 of file colorm.h.
Referenced by ColorManager(), selColor(), selEditColor(), and updateButtons().
QPushButton* ColorManager::deleteUnusedButton [private] |
QPushButton* ColorManager::saveButton [private] |
QPushButton* ColorManager::cancelButton [private] |
QLabel* ColorManager::textLabel1 [private] |
QPushButton* ColorManager::SaveColSet [private] |
QComboBox* ColorManager::LoadColSet [private] |
Definition at line 68 of file colorm.h.
Referenced by ColorManager(), getColorSetName(), loadDefaults(), and saveDefaults().
QString ColorManager::sColor [private] |
Definition at line 69 of file colorm.h.
Referenced by deleteColor(), duplicateColor(), editColor(), newColor(), selColor(), selEditColor(), and updateButtons().
QColor ColorManager::tmpColor [private] |
Definition at line 70 of file colorm.h.
Referenced by editColor(), newColor(), selColor(), selEditColor(), and updateButtons().
QStringList ColorManager::DontChange [private] |
ScribusDoc* ColorManager::m_Doc [private] |
Definition at line 72 of file colorm.h.
Referenced by ColorManager(), deleteColor(), deleteUnusedColors(), editColor(), and newColor().
QVBoxLayout* ColorManager::Layout2 [protected] |
QHBoxLayout* ColorManager::layout5 [protected] |
QVBoxLayout* ColorManager::layout3 [protected] |
QVBoxLayout* ColorManager::ColsSetGroupLayout [protected] |
QVBoxLayout* ColorManager::Layout1 [protected] |
ColorSetManager ColorManager::csm [protected] |
int ColorManager::customSetStartIndex [protected] |
The documentation for this class was generated from the following files:
