comparison 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
comparison
equal deleted inserted replaced
52:384420567575 53:3c46b2ac45d3
1 #ifndef _COLOURSET_H_
2 #define _COLOURSET_H_
3
4 #include <QSet>
5 #include <QMap>
6 #include <QColor>
7 #include <QString>
8
9 class ColourSet
10 {
11 public:
12 void clearDefaultNames() { m_defaultNames.clear(); }
13 void addDefaultName(QString n) { m_defaultNames.insert(n); }
14
15 QColor getColourFor(QString n);
16
17 static ColourSet *instance();
18
19 private:
20 ColourSet();
21 QSet<QString> m_defaultNames;
22 QMap<QString, QColor> m_colours;
23 QColor m_lastColour;
24
25 static ColourSet m_instance;
26 };
27
28 #endif