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.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user