Commit 7bcd53b7 authored by Thibault Soucarre's avatar Thibault Soucarre
Browse files

correct reload button

parent a0f3e47a
......@@ -127,7 +127,7 @@ Interface_graphic::Interface_graphic(Core* core, QWidget *parent):QMainWindow(pa
// _cmd_window = NULL;
_cmd_window = new Command_window(this,this);
if (!_ui_node_selection) {
/*if (!_ui_node_selection) {
_ui_node_selection = new Node_select(this, 0);
//connect( _ui_node_selection, SIGNAL(settings_changed()), this, SLOT(update_settings()));
......@@ -141,7 +141,7 @@ Interface_graphic::Interface_graphic(Core* core, QWidget *parent):QMainWindow(pa
//connect( _ui_node_selection, SIGNAL(settings_changed()), this, SLOT(update_settings()));
// To close the window when we quit the application
connect(quit, SIGNAL(triggered()), _ui_interval_selection, SLOT(close()));
}
}*/
// For drag and drop operations
setAcceptDrops(true);
}
......@@ -641,7 +641,16 @@ void Interface_graphic::on_export_file_triggered(){
void Interface_graphic::on_reload_triggered() {
if(_is_rendering_trace) {
Element_pos zoom[2]={Info::Splitter::_x_min,Info::Splitter::_x_max};
if(_ui_settings!=NULL){
_ui_settings->on_reload_states_btn_clicked();
_ui_settings->on_reload_link_types_palette_btn_clicked();
_ui_settings->on_reload_event_types_palette_btn_clicked();
_ui_settings->on_apply_clicked();
}
if(_ui_node_selection!=NULL)
_ui_node_selection->on_reset_button_clicked();
if(_ui_interval_selection!=NULL)
_ui_interval_selection->on_reset_button_clicked();
if(_reload_type)
_core->launch_action(Core::_STATE_RELEASE_RENDER_AREA);
else
......@@ -910,8 +919,10 @@ void Interface_graphic::on_show_settings_triggered() {
void Interface_graphic::on_node_selection_triggered() {
//if (!_ui_node_selection) {
// _ui_node_selection = new Node_select(this, 0);
if (!_ui_node_selection){
_ui_node_selection = new Node_select(this, 0);
connect(quit, SIGNAL(triggered()), _ui_node_selection, SLOT(close()));
}
if(_core->get_trace() != NULL) {
if(!_ui_node_selection->get_trace()){//first use
_ui_node_selection->set_trace(_core->get_trace());
......@@ -930,6 +941,10 @@ void Interface_graphic::on_interval_selection_triggered() {
//if (!_ui_node_selection) {
// _ui_node_selection = new Node_select(this, 0);
if(!_ui_interval_selection){
_ui_interval_selection = new Interval_select(this, 0);
connect(quit, SIGNAL(triggered()), _ui_interval_selection, SLOT(close()));
}
if(_core->get_trace() != NULL) {
if(!_ui_interval_selection->get_trace() && _core->get_trace()){//first use
_ui_interval_selection->set_trace(_core->get_trace());
......@@ -1240,3 +1255,5 @@ void Interface_graphic::update_settings() {
}
cout << "Settings changed, need to update classes" << endl;
}
......@@ -77,9 +77,7 @@ class QProgressDialog;
*\brief This class is a graphical interface which creates a window, it inherited from the Interface interface.
*/
class Interface_graphic : public QMainWindow, protected Ui::main_window, public Interface{
Q_OBJECT
protected:
......
......@@ -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,7 +37,7 @@
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
*/
/*!
......@@ -78,15 +78,15 @@ class Interval_select;
*/
class Interval_select : public QDialog, protected Ui::interval_selector {
Q_OBJECT
friend class Interface_graphic;
private:
Trace* _trace;
Interface_graphic *_console;
bool _applied;
bool _auto_refresh;
Interface_graphic *_console;
bool _applied;
bool _auto_refresh;
public:
/*!
* Default constructor
......@@ -96,7 +96,7 @@ public:
~Interval_select();
/*!
/*!
* \fn set_trace(Trace *trace)
* \brief Set the trace parsed (give the container names)
* \param trace The trace.
......@@ -108,26 +108,26 @@ public:
* \brief returns the trace
*/
Trace * get_trace();
void apply_settings();
void update_values();
private slots:
void minSpinBoxValueChanged( double value );
void minSliderValueChanged( int value );
void maxSpinBoxValueChanged( double value );
void maxSpinBoxValueChanged( double value );
void maxSliderValueChanged( int value );
void on_ok_button_clicked();
void on_cancel_button_clicked();
void on_reset_button_clicked();
void on_apply_button_clicked();
void on_auto_refresh_box_stateChanged();
void on_reset_button_clicked();
void on_apply_button_clicked();
void on_auto_refresh_box_stateChanged();
signals:
void minValueChanged( double value );
void maxValueChanged( double value );
void maxValueChanged( double value );
};
......
......@@ -82,7 +82,7 @@ class QDomDocument;
class Node_select : public QWidget, protected Ui::node_selector {
Q_OBJECT
friend class Interface_graphic;
private:
std::vector<Container *> _initial_containers;
......
......@@ -65,7 +65,7 @@ class QCheckBox;
class Settings_window : public QWidget, protected Ui::settings {
Q_OBJECT
friend class Interface_graphic;
private:
Core *_c;
......
Supports Markdown
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