]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/ColorCache.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / ColorCache.h
index 54768f612443b21e98ece648f5b113a139088e16..88db6bb565879a7991bb6e59ce1bc29c27927589 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef COLORCACHE_H
 #define COLORCACHE_H
 
-#include "ColorCode.h"
+#include "Color.h"
 
 #include <QColor>
 
@@ -26,19 +26,21 @@ struct RGBColor;
 class ColorCache
 {
 public:
-       ColorCache() { init(); }
+       ColorCache() : initialized_(false) {}
 
        /// get the given color
-       QColor const & get(ColorCode color) const { return lcolors_[color]; }
+       QColor get(Color color) const;
 
        /// clear all colors
-       void clear() { init(); }
+       void clear() { initialized_ = false; }
 
 private:
        ///
        void init();
        ///
        QColor lcolors_[Color_ignore + 1];
+       ///
+       bool initialized_;
 };
 
 ///