3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "lcolorcache.h"
17 LColorCache lcolorcache;
20 LColorCache::LColorCache()
25 QColor const & LColorCache::get(LColor_color col) const
27 lcolor_map::const_iterator cit = colormap.find(col);
28 if (cit != colormap.end())
31 if (lcolor.getX11Name(col) == "grey40")
32 colormap[col] = Qt::lightGray;
33 else if (lcolor.getX11Name(col) == "grey60")
34 colormap[col] = Qt::gray;
35 else if (lcolor.getX11Name(col) == "grey80")
36 colormap[col] = Qt::darkGray;
37 else if (lcolor.getX11Name(col) == "grey90")
38 colormap[col] = Qt::darkGray;
40 colormap[col] = QColor(lcolor.getX11Name(col).c_str());
46 void LColorCache::clear()