annotate src/colourset.h @ 655:68494beada6e

Ignore .msi files
author Chris Cannam <chris.cannam@eecs.qmul.ac.uk>
date Fri, 25 Jan 2013 15:33:35 +0000
parents ae67ea0af696
children
rev   line source
Chris@57 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@57 2
Chris@57 3 /*
Chris@57 4 EasyMercurial
Chris@57 5
Chris@57 6 Based on HgExplorer by Jari Korhonen
Chris@57 7 Copyright (c) 2010 Jari Korhonen
Chris@644 8 Copyright (c) 2013 Chris Cannam
Chris@644 9 Copyright (c) 2013 Queen Mary, University of London
Chris@57 10
Chris@57 11 This program is free software; you can redistribute it and/or
Chris@57 12 modify it under the terms of the GNU General Public License as
Chris@57 13 published by the Free Software Foundation; either version 2 of the
Chris@57 14 License, or (at your option) any later version. See the file
Chris@57 15 COPYING included with this distribution for more information.
Chris@57 16 */
Chris@57 17
Chris@53 18 #ifndef _COLOURSET_H_
Chris@53 19 #define _COLOURSET_H_
Chris@53 20
Chris@53 21 #include <QSet>
Chris@53 22 #include <QMap>
Chris@53 23 #include <QColor>
Chris@53 24 #include <QString>
Chris@53 25
Chris@53 26 class ColourSet
Chris@53 27 {
Chris@53 28 public:
Chris@53 29 void clearDefaultNames() { m_defaultNames.clear(); }
Chris@53 30 void addDefaultName(QString n) { m_defaultNames.insert(n); }
Chris@53 31
Chris@53 32 QColor getColourFor(QString n);
Chris@53 33
Chris@53 34 static ColourSet *instance();
Chris@53 35
Chris@53 36 private:
Chris@53 37 ColourSet();
Chris@53 38 QSet<QString> m_defaultNames;
Chris@53 39 QMap<QString, QColor> m_colours;
Chris@53 40 QColor m_lastColour;
Chris@53 41
Chris@53 42 static ColourSet m_instance;
Chris@53 43 };
Chris@53 44
Chris@53 45 #endif