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