Files
Sourcetrail/src/lib/settings/ColorScheme.h
T
Eberhard Graether 5722b4dc23 ui: color schemes
Put all colors into single xml file. Accessing colors is handled via the singleton class ColorScheme. The default scheme
"bright.xml" holds the original colors. The scheme "dark.xml" is a start, but still a poor alternative. Color schemes
can be switched via the View menu.
2015-07-17 19:50:39 +02:00

32 lines
887 B
C++

#ifndef COLOR_SCHEME_H
#define COLOR_SCHEME_H
#include "data/graph/Node.h"
#include "data/graph/Edge.h"
#include "data/query/QueryNode.h"
#include "settings/Settings.h"
class ColorScheme
: public Settings
{
public:
static std::shared_ptr<ColorScheme> getInstance();
virtual ~ColorScheme();
std::string getColor(const std::string& key) const;
std::string getNodeTypeColor(Node::NodeType type, const std::string& state = "normal") const;
std::string getEdgeTypeColor(Edge::EdgeType type, const std::string& state = "normal") const;
std::string getQueryNodeTypeColor(QueryNode::QueryNodeType type, const std::string& state = "normal") const;
std::string getSyntaxColor(const std::string& key) const;
protected:
ColorScheme();
ColorScheme(const ColorScheme&);
void operator=(const ColorScheme&);
static std::shared_ptr<ColorScheme> s_instance;
};
#endif // COLOR_SCHEME_H