Commit ce4e70c5 authored by Mathieu Faverge's avatar Mathieu Faverge

Keep restruring settings

parent 465ec3e7
......@@ -50,8 +50,8 @@
#include <string>
using namespace std;
unsigned int Info::Screen::width = 800;
unsigned int Info::Screen::height = 600;
unsigned int Info::Screen::width = 800;
unsigned int Info::Screen::height = 600;
Element_pos Info::Container::x_min = 0;
Element_pos Info::Container::x_max = 0;
......@@ -79,9 +79,9 @@ Element_pos Info::Render::_info_accurate = 0.0;
bool Info::Render::_no_arrows = false;
bool Info::Render::_no_events = false;
bool Info::Render::_shaded_states = Session::get_shaded_states_setting();
bool Info::Render::_shaded_states = Session::getSession().get_shaded_states_setting();
//true;/* By default, enable shaded state */
bool Info::Render::_vertical_line = Session::get_vertical_line_setting();
bool Info::Render::_vertical_line = Session::getSession().get_vertical_line_setting();
//true;/* By default, enable vertical line */
bool Info::Splitter::split = false;
......
This diff is collapsed.
......@@ -50,9 +50,9 @@
class Palette;
class Color;
class QByteArray;
class QColor;
class QString;
class QStringList;
#include <QColor>
#include <QSettings>
#include <list>
......@@ -103,36 +103,57 @@ class QStringList;
*/
#define PALETTE_NAMES "/palettes_name"
class MinimapSettings {
public:
int _x, _y;
int _width, _height;
int _pen_size;
QColor _pen_color, _brush_color;
bool _is_closed;
MinimapSettings();
~MinimapSettings();
void load();
void save();
void save(int x, int y, int w, int h, bool hidden );
};
/*!
* \brief Class used to store information between two software launch.
*
*/
class Session {
private:
/*!
* \brief The class constructor.
*/
Session();
static QSettings *settings;
class Session : public QSettings {
static Palette *_palette;
protected:
static Session *S;
static MinimapSettings *_mmSettings;
static Palette *_link_types;
static Palette *_event_types;
public:
static Palette *_palettes_state;
static Palette *_palettes_link;
static Palette *_palettes_event;
//boolean used to know if palettes are used (only one boolean for all types of palettes)
static bool _use_palettes;
//boolean used to know if the previous one is set (ugly but avoids rereading from settings file each time)
static bool _use_palettes_is_set;
/*!
* \brief The class destructor.
* \brief Sub structure to store render information.
*/
struct Render{
};
/*!
* \brief The class constructor.
*/
virtual ~Session();
Session();
static void init();
public:
/*!
* \brief Sub structure to store export information.
......@@ -150,25 +171,22 @@ public:
const static QByteArray DEFAULT_STATE;
};
/*!
* \brief Sub structure to store render information.
*/
struct Render{
static Session &getSession() {
if (S == NULL) {
S = new Session();
init();
}
return *S;
}
};
static MinimapSettings &getSessionMinimap() {
return *(getSession()._mmSettings);
}
/*!
* \brief Sub structure to store the Minimap information.
* \brief The class destructor.
*/
struct Minimap{
static int x, y;
static int width, height;
static int pen_size;
static QColor pen_color, brush_color;
static bool is_closed;
};
static void save_minimap(int x, int y, int w, int h, bool hide_on_start);
~Session();
/*!
* \brief maximum number of file shown in the recent files menu.
......@@ -331,7 +349,6 @@ public:
* \param state_name : the state name
*/
static void remove_state_to_palette(const std::string type, const std::string &palette_name, const std::string &state_name);
};
#endif
......@@ -87,6 +87,7 @@
#include "common/Session.hpp"
#include "common/Message.hpp"
#include "common/Palette.hpp"
#include "common/Session.hpp"
/* -- */
#include "render/Geometry.hpp"
#include "render/Hook_event.hpp"
......@@ -213,7 +214,7 @@ Core::~Core(){
if( _trace != NULL )
delete _trace;
if ( _run_env[0] != NULL )
if ( _run_env[0] != NULL )
delete _run_env[0];
if ( _run_env[1] != NULL )
......
This diff is collapsed.
......@@ -6,13 +6,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
......@@ -23,7 +23,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
......@@ -37,11 +37,11 @@
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
*/
/*!
* \mainpage ViTE
/*!
* \mainpage ViTE
*
ViTE is a trace explorer. It is a tool to visualize execution traces in Pajé format for debugging and profiling parallel or distributed applications.
* \image html logo.png
......@@ -88,21 +88,21 @@ int main(int argc, char **argv) {
FILE * file;
double timestamp;
#endif
Q_INIT_RESOURCE(vite);
Info::Render::_key_alt = false;/* no CTRL key pushed */
#ifdef VITE_DBG_MEMORY_TRACE
#ifdef VITE_DBG_MEMORY_TRACE
timestamp = clockGet();
file = fopen("toto.trace", "w");
memAllocTrace(file, timestamp, 0);
trace_start(file, timestamp, 0, -1);
#endif /* VITE_DBG_MEMORY_TRACE */
Core console(argc, argv);
console.run();
#ifdef MEMORY_USAGE
#ifdef VITE_DBG_MEMORY_TRACE
trace_finish(file, (clockGet()-timestamp), 0, -1);
......
This diff is collapsed.
/*
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
/*!
*\file Minimap.hpp
*/
......@@ -59,7 +59,6 @@ class QCloseEvent;
*/
class Minimap: public QLabel
{
protected:
/*!
......@@ -87,11 +86,11 @@ protected:
*/
QPen _pen;
/*!
* \brief Boolean used to know if the minimap needs to be initialized.
*/
bool _is_initialized;
/*!
* \brief Boolean used to know if the minimap needs to be initialized.
*/
bool _is_initialized;
/*!
* \brief Called by Qt when the user manually closes the window.
......@@ -130,12 +129,12 @@ public:
*/
void init(const QImage &image);
/*!
* \brief Check if the minimap has been initialized
*/
/*!
* \brief Check if the minimap has been initialized
*/
bool is_initialized();
/*!
/*!
* \brief Update the minimap according to the current viewport (viewport is define by x, y, w and h).
*/
void update(const int x, const int y, const int w, const int h);
......@@ -144,12 +143,6 @@ public:
* \brief Release the minimap data.
*/
void release();
static void load_session();
static void store_session();
};
#endif
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