|
svgui
1.9
|
#include <ColourDatabase.h>


Classes | |
| struct | ColourRec |
Signals | |
| void | colourDatabaseChanged () |
Public Member Functions | |
| int | getColourCount () const |
| QString | getColourName (int c) const |
| QColor | getColour (int c) const |
| QColor | getColour (QString name) const |
| int | getColourIndex (QString name) const |
| int | getColourIndex (QColor c) const |
| bool | haveColour (QColor c) const |
| bool | useDarkBackground (int c) const |
| void | setUseDarkBackground (int c, bool dark) |
| int | addColour (QColor, QString) |
| void | removeColour (QString) |
| QColor | getContrastingColour (int c) const |
| void | getStringValues (int index, QString &colourName, QString &colourSpec, QString &darkbg) const |
| int | putStringValues (QString colourName, QString colourSpec, QString darkbg) |
| void | getColourPropertyRange (int *min, int *max) const |
| QPixmap | getExamplePixmap (int index, QSize size) const |
Static Public Member Functions | |
| static ColourDatabase * | getInstance () |
Protected Types | |
| typedef std::vector< ColourRec > | ColourList |
Protected Member Functions | |
| ColourDatabase () | |
Protected Attributes | |
| ColourList | m_colours |
Static Protected Attributes | |
| static ColourDatabase | m_instance |
Definition at line 26 of file ColourDatabase.h.
|
protected |
Definition at line 78 of file ColourDatabase.h.
|
protected |
Definition at line 30 of file ColourDatabase.cpp.
|
static |
Definition at line 25 of file ColourDatabase.cpp.
References m_instance.
Referenced by PropertyBox::addNewColour(), SingleColourLayer::getBaseQColor(), getColourPropertyRange(), TimeRulerLayer::getDefaultColourHint(), TextLayer::getDefaultColourHint(), TimeInstantLayer::getDefaultColourHint(), SliceLayer::getDefaultColourHint(), RegionLayer::getDefaultColourHint(), NoteLayer::getDefaultColourHint(), TimeValueLayer::getDefaultColourHint(), FlexiNoteLayer::getDefaultColourHint(), SingleColourLayer::getLayerPresentationPixmap(), SingleColourLayer::getPropertyRangeAndValue(), SingleColourLayer::getPropertyValueLabel(), SingleColourLayer::hasLightBackground(), PropertyBox::PropertyBox(), PropertyBox::propertyControllerChanged(), SingleColourLayer::setDefaultColourFor(), SingleColourLayer::setProperties(), SingleColourLayer::toXml(), WaveformLayer::toXml(), and PropertyBox::updatePropertyEditor().
| int ColourDatabase::getColourCount | ( | ) | const |
Definition at line 35 of file ColourDatabase.cpp.
References m_colours.
Referenced by getColourPropertyRange(), SingleColourLayer::setDefaultColourFor(), and PropertyBox::updatePropertyEditor().
| QString ColourDatabase::getColourName | ( | int | c | ) | const |
Definition at line 41 of file ColourDatabase.cpp.
References m_colours.
Referenced by SingleColourLayer::getPropertyValueLabel(), getStringValues(), and PropertyBox::updatePropertyEditor().
| QColor ColourDatabase::getColour | ( | int | c | ) | const |
Definition at line 48 of file ColourDatabase.cpp.
References m_colours.
Referenced by SingleColourLayer::getBaseQColor(), getExamplePixmap(), and getStringValues().
| QColor ColourDatabase::getColour | ( | QString | name | ) | const |
Definition at line 55 of file ColourDatabase.cpp.
References m_colours.
| int ColourDatabase::getColourIndex | ( | QString | name | ) | const |
Definition at line 66 of file ColourDatabase.cpp.
References m_colours.
Referenced by TimeRulerLayer::getDefaultColourHint(), TextLayer::getDefaultColourHint(), TimeInstantLayer::getDefaultColourHint(), SliceLayer::getDefaultColourHint(), RegionLayer::getDefaultColourHint(), NoteLayer::getDefaultColourHint(), TimeValueLayer::getDefaultColourHint(), FlexiNoteLayer::getDefaultColourHint(), and putStringValues().
| int ColourDatabase::getColourIndex | ( | QColor | c | ) | const |
Definition at line 79 of file ColourDatabase.cpp.
References m_colours.
| bool ColourDatabase::haveColour | ( | QColor | c | ) | const |
| bool ColourDatabase::useDarkBackground | ( | int | c | ) | const |
Definition at line 92 of file ColourDatabase.cpp.
References m_colours.
Referenced by getExamplePixmap(), getStringValues(), SingleColourLayer::hasLightBackground(), and SingleColourLayer::setDefaultColourFor().
| void ColourDatabase::setUseDarkBackground | ( | int | c, |
| bool | dark | ||
| ) |
Definition at line 99 of file ColourDatabase.cpp.
References colourDatabaseChanged(), and m_colours.
Referenced by PropertyBox::addNewColour(), and putStringValues().
| int ColourDatabase::addColour | ( | QColor | c, |
| QString | name | ||
| ) |
Definition at line 109 of file ColourDatabase.cpp.
References ColourDatabase::ColourRec::colour, colourDatabaseChanged(), ColourDatabase::ColourRec::darkbg, m_colours, and ColourDatabase::ColourRec::name.
Referenced by PropertyBox::addNewColour(), and putStringValues().
| void ColourDatabase::removeColour | ( | QString | name | ) |
Definition at line 131 of file ColourDatabase.cpp.
References m_colours.
| QColor ColourDatabase::getContrastingColour | ( | int | c | ) | const |
| void ColourDatabase::getStringValues | ( | int | index, |
| QString & | colourName, | ||
| QString & | colourSpec, | ||
| QString & | darkbg | ||
| ) | const |
Definition at line 143 of file ColourDatabase.cpp.
References getColour(), getColourName(), m_colours, and useDarkBackground().
Referenced by SingleColourLayer::toXml(), and WaveformLayer::toXml().
| int ColourDatabase::putStringValues | ( | QString | colourName, |
| QString | colourSpec, | ||
| QString | darkbg | ||
| ) |
Definition at line 159 of file ColourDatabase.cpp.
References addColour(), getColourIndex(), and setUseDarkBackground().
Referenced by SingleColourLayer::setProperties().
| void ColourDatabase::getColourPropertyRange | ( | int * | min, |
| int * | max | ||
| ) | const |
Definition at line 181 of file ColourDatabase.cpp.
References getColourCount(), and getInstance().
Referenced by SingleColourLayer::getPropertyRangeAndValue().
| QPixmap ColourDatabase::getExamplePixmap | ( | int | index, |
| QSize | size | ||
| ) | const |
Definition at line 192 of file ColourDatabase.cpp.
References getColour(), and useDarkBackground().
Referenced by SingleColourLayer::getLayerPresentationPixmap(), and PropertyBox::updatePropertyEditor().
|
signal |
Referenced by addColour(), and setUseDarkBackground().
|
protected |
Definition at line 79 of file ColourDatabase.h.
Referenced by addColour(), getColour(), getColourCount(), getColourIndex(), getColourName(), getStringValues(), removeColour(), setUseDarkBackground(), and useDarkBackground().
|
staticprotected |
Definition at line 81 of file ColourDatabase.h.
Referenced by getInstance().