]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/ColorCache.cpp
Compil fix.
[lyx.git] / src / frontends / qt4 / ColorCache.cpp
1 /**
2  * \file ColorCache.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "ColorCache.h"
14
15 #include "Color.h"
16
17 #include <string>
18
19 namespace lyx {
20
21 void ColorCache::init()
22 {
23         for (int col = 0; col <= Color_ignore; ++col)
24                 lcolors_[col] = QColor(lcolor.getX11Name(ColorCode(col)).c_str());
25 }
26
27
28 QColor const rgb2qcolor(RGBColor const & rgb)
29 {
30         return QColor(rgb.r, rgb.g, rgb.b);
31 }
32
33
34 } // namespace lyx