Mercurial > hg > svgui
comparison layer/SingleColourLayer.h @ 293:15b8a4bfe855
* continue to pick "new" colours for coloured layers even when all colours
have been used at least once, rather than sticking on the last one
* some messing about with application palette settings
* when replacing an audio file, retain the previous playback settings for
any layers that depended on the old file
* re-check plugin program setting when a parameter changes -- so a plugin
can decide to reset the program if the parameters no longer match those
for the current program
* fix failure to update check-boxes for toggled plugin parameters when their
parameters are changed by program changes
author | Chris Cannam |
---|---|
date | Thu, 09 Aug 2007 14:40:03 +0000 |
parents | cd2492c5fe45 |
children | 919740b20cc9 |
comparison
equal
deleted
inserted
replaced
292:24fc90078754 | 293:15b8a4bfe855 |
---|---|
17 #define _SINGLE_COLOUR_LAYER_H_ | 17 #define _SINGLE_COLOUR_LAYER_H_ |
18 | 18 |
19 #include "Layer.h" | 19 #include "Layer.h" |
20 #include <QColor> | 20 #include <QColor> |
21 #include <vector> | 21 #include <vector> |
22 #include <map> | |
22 | 23 |
23 class SingleColourLayer : public Layer | 24 class SingleColourLayer : public Layer |
24 { | 25 { |
25 public: | 26 public: |
26 virtual void setBaseColour(int); | 27 virtual void setBaseColour(int); |
60 | 61 |
61 virtual void flagBaseColourChanged() { } | 62 virtual void flagBaseColourChanged() { } |
62 virtual int getDefaultColourHint(bool /* darkBackground */, | 63 virtual int getDefaultColourHint(bool /* darkBackground */, |
63 bool & /* impose */) { return -1; } | 64 bool & /* impose */) { return -1; } |
64 | 65 |
65 typedef std::multiset<int> ColourIndexPool; | 66 typedef std::map<int, int> ColourRefCount; |
66 static ColourIndexPool m_usedColourIndices; | 67 static ColourRefCount m_colourRefCount; |
67 | 68 |
68 int m_colour; | 69 int m_colour; |
69 }; | 70 }; |
70 | 71 |
71 #endif | 72 #endif |