4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
25 * Cache from Color to QColor.
31 ColorCache() : initialized_(false) {}
33 /// get the given color (depends on LyXRC::use_system_color)
34 QColor get(Color const & color) const;
36 /// get the given color
37 QColor get(Color const & color, bool use_system_colors) const;
39 /// is this color replaced when LyXRC::use_system_color is true?
40 bool isSystem(ColorCode color) const;
42 /// change the undelying palette
43 void setPalette(QPalette const pal) { pal_ = pal; clear(); }
46 void clear() { initialized_ = false; }
52 QColor lcolors_[Color_ignore + 1];
60 QColor const rgb2qcolor(RGBColor const &);
64 #endif // COLORCACHE_H