Mercurial > hg > easyhg
view colourset.h @ 53:3c46b2ac45d3
* Put proper labels &c in changeset items; colour branches and users; etc
author | Chris Cannam |
---|---|
date | Fri, 12 Nov 2010 16:48:18 +0000 |
parents | |
children | f583e44d9d31 |
line wrap: on
line source
#ifndef _COLOURSET_H_ #define _COLOURSET_H_ #include <QSet> #include <QMap> #include <QColor> #include <QString> class ColourSet { public: void clearDefaultNames() { m_defaultNames.clear(); } void addDefaultName(QString n) { m_defaultNames.insert(n); } QColor getColourFor(QString n); static ColourSet *instance(); private: ColourSet(); QSet<QString> m_defaultNames; QMap<QString, QColor> m_colours; QColor m_lastColour; static ColourSet m_instance; }; #endif