Commit c10439cb authored by Mathieu Faverge's avatar Mathieu Faverge

Move the palette to common directory and cleanuop some spaces

parent c4506771
...@@ -42,13 +42,14 @@ ...@@ -42,13 +42,14 @@
# #
SET(VITE_HDRS SET(VITE_HDRS
common/common.hpp
common/Message.hpp
common/Errors.hpp common/Errors.hpp
common/Tools.hpp
common/Info.hpp common/Info.hpp
common/Session.hpp
common/Memory.hpp common/Memory.hpp
common/Message.hpp
common/Palette.hpp
common/Session.hpp
common/Tools.hpp
common/common.hpp
# Data structure headers # Data structure headers
trace/values/Color.hpp trace/values/Color.hpp
trace/values/Date.hpp trace/values/Date.hpp
...@@ -83,7 +84,6 @@ SET(VITE_HDRS ...@@ -83,7 +84,6 @@ SET(VITE_HDRS
trace/Trace.hpp trace/Trace.hpp
trace/IntervalOfContainer.hpp trace/IntervalOfContainer.hpp
# Render headers # Render headers
render/Palette.hpp
render/Render.hpp render/Render.hpp
render/Geometry.hpp render/Geometry.hpp
render/Hook_event.hpp render/Hook_event.hpp
...@@ -145,12 +145,13 @@ SET(VITE_UIS ...@@ -145,12 +145,13 @@ SET(VITE_UIS
SET(VITE_SRCS SET(VITE_SRCS
# Messages & Errors # Messages & Errors
common/Message.cpp
common/Errors.cpp common/Errors.cpp
common/Tools.cpp
common/Info.cpp common/Info.cpp
common/Session.cpp
common/Memory.cpp common/Memory.cpp
common/Message.cpp
common/Palette.cpp
common/Session.cpp
common/Tools.cpp
# Data structure code files # Data structure code files
trace/values/Color.cpp trace/values/Color.cpp
trace/values/Date.cpp trace/values/Date.cpp
...@@ -177,7 +178,6 @@ SET(VITE_SRCS ...@@ -177,7 +178,6 @@ SET(VITE_SRCS
trace/Trace.cpp trace/Trace.cpp
trace/IntervalOfContainer.cpp trace/IntervalOfContainer.cpp
# Render code files # Render code files
render/Palette.cpp
render/Geometry.cpp render/Geometry.cpp
render/Hook_event.cpp render/Hook_event.cpp
render/Render.hpp render/Render.hpp
......
...@@ -30,8 +30,8 @@ Color *Palette::get_color(const std::string &state_name) { ...@@ -30,8 +30,8 @@ Color *Palette::get_color(const std::string &state_name) {
bool Palette::is_visible(const std::string &state_name){ bool Palette::is_visible(const std::string &state_name){
return _visible[state_name]; return _visible[state_name];
} }
void Palette::add_state(const std::string &state, Color &c, bool visible) { void Palette::add_state(const std::string &state, Color &c, bool visible) {
if(_pairs.find(state) != _pairs.end()) { if(_pairs.find(state) != _pairs.end()) {
...@@ -43,7 +43,7 @@ void Palette::add_state(const std::string &state, Color &c, bool visible) { ...@@ -43,7 +43,7 @@ void Palette::add_state(const std::string &state, Color &c, bool visible) {
} }
void Palette::clear(){ void Palette::clear(){
_pairs.clear(); _pairs.clear();
} }
std::string Palette::get_name() const { std::string Palette::get_name() const {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
/* -- */ /* -- */
#include "trace/values/Value.hpp" #include "trace/values/Value.hpp"
#include "trace/values/Color.hpp" #include "trace/values/Color.hpp"
#include "render/Palette.hpp" #include "common/Palette.hpp"
#include "common/Session.hpp" #include "common/Session.hpp"
using namespace std; using namespace std;
...@@ -77,11 +77,13 @@ int Session::Minimap::pen_size; ...@@ -77,11 +77,13 @@ int Session::Minimap::pen_size;
QColor Session::Minimap::pen_color; QColor Session::Minimap::pen_color;
QColor Session::Minimap::brush_color; QColor Session::Minimap::brush_color;
bool Session::Minimap::is_closed; bool Session::Minimap::is_closed;
Palette *Session::_palette = NULL; Palette *Session::_palette = NULL;
Palette *Session::_link_types = NULL; Palette *Session::_link_types = NULL;
Palette *Session::_event_types = NULL; Palette *Session::_event_types = NULL;
bool Session::_use_palettes= false; bool Session::_use_palettes= false;
bool Session::_use_palettes_is_set=false; bool Session::_use_palettes_is_set=false;
QSettings *Session::settings = NULL; QSettings *Session::settings = NULL;
Session::Session() { Session::Session() {
......
...@@ -119,7 +119,7 @@ private: ...@@ -119,7 +119,7 @@ private:
public: public:
static QSettings *settings; static QSettings *settings;
static Palette *_palette; // static Palette *_palette;
static Palette * _link_types; static Palette * _link_types;
static Palette * _event_types; static Palette * _event_types;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment