Source-highlight Qt Library
QtColorMap.h
1 /*
2  * Copyright (C) 2008-2010 Lorenzo Bettini, http://www.lorenzobettini.it
3  * License: See COPYING file that comes with this distribution
4  */
5 
6 #ifndef QTCOLORMAP_H_
7 #define QTCOLORMAP_H_
8 
9 #include <map>
10 #include <string>
11 
12 namespace srchiliteqt {
13 
18 class QtColorMap : public std::map<std::string, std::string> {
19 public:
20  QtColorMap();
21  ~QtColorMap();
22 
30  std::string getColor(const std::string &color);
31 };
32 
40 class QtColorMapRGB : public std::map<std::string, std::string> {
41 public:
42  QtColorMapRGB();
43  ~QtColorMapRGB();
44 
53  std::string getColor(const std::string &color);
54 };
55 
56 }
57 
58 #endif /* QTCOLORMAP_H_ */
Definition: ColorDialog.cpp:12
std::string getColor(const std::string &color)
Returns the color associated to the passed string (if the string is already of the shape "#RRGGBB"...
Definition: QtColorMap.cpp:36
Map for RGB colors (actually, into the format #RRGGBB) into source-highlight colors.
Definition: QtColorMap.h:40
Map for source-highlight colors into qt colors (actually, into the format #RRGGBB) ...
Definition: QtColorMap.h:18
std::string getColor(const std::string &color)
Returns the source-highlight color associated to the passed string of the shape "#RRGGBB"; if a mappi...
Definition: QtColorMap.cpp:68