- Add debug printout in SimulationWidget
- Add holt_widget.{cc,hh} to main executable sources git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1002 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
64839353bb
commit
c10ed2f4fb
|
@ -302,6 +302,7 @@ sgpemv2_SOURCES = \
|
||||||
src/configure_policy_dialog.cc \
|
src/configure_policy_dialog.cc \
|
||||||
src/graphical_preferences_editor.cc \
|
src/graphical_preferences_editor.cc \
|
||||||
src/gui_builder.cc \
|
src/gui_builder.cc \
|
||||||
|
src/holt_widget.cc \
|
||||||
src/main.cc \
|
src/main.cc \
|
||||||
src/parse_opts.cc \
|
src/parse_opts.cc \
|
||||||
src/resources_widget.cc \
|
src/resources_widget.cc \
|
||||||
|
@ -318,6 +319,7 @@ noinst_HEADERS += \
|
||||||
src/configure_policy_dialog.hh \
|
src/configure_policy_dialog.hh \
|
||||||
src/graphical_preferences_editor.hh \
|
src/graphical_preferences_editor.hh \
|
||||||
src/gui_builder.hh \
|
src/gui_builder.hh \
|
||||||
|
src/holt_widget.hh \
|
||||||
src/main.hh \
|
src/main.hh \
|
||||||
src/parse_opts.hh \
|
src/parse_opts.hh \
|
||||||
src/resources_widget.hh \
|
src/resources_widget.hh \
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "configure_policy_dialog.hh"
|
#include "configure_policy_dialog.hh"
|
||||||
#include "graphical_preferences_editor.hh"
|
#include "graphical_preferences_editor.hh"
|
||||||
|
#include "holt_widget.hh"
|
||||||
#include "schedulables_tree_widget.hh"
|
#include "schedulables_tree_widget.hh"
|
||||||
#include "simulation_widget.hh"
|
#include "simulation_widget.hh"
|
||||||
#include "resources_widget.hh"
|
#include "resources_widget.hh"
|
||||||
|
@ -517,7 +518,6 @@ GuiBuilder::GuiBuilder(const std::string& gladefile)
|
||||||
// we have to remember to manually show custom added widgets:
|
// we have to remember to manually show custom added widgets:
|
||||||
scheds_tree->show();
|
scheds_tree->show();
|
||||||
|
|
||||||
|
|
||||||
// Resources ListView widget
|
// Resources ListView widget
|
||||||
ResourcesWidget* resources_widget = NULL;
|
ResourcesWidget* resources_widget = NULL;
|
||||||
_refXml->get_widget_derived("Resources.Tree", resources_widget);
|
_refXml->get_widget_derived("Resources.Tree", resources_widget);
|
||||||
|
@ -527,9 +527,14 @@ GuiBuilder::GuiBuilder(const std::string& gladefile)
|
||||||
// Main simulation widget
|
// Main simulation widget
|
||||||
ScrolledWindow* simulation_window = NULL;
|
ScrolledWindow* simulation_window = NULL;
|
||||||
_refXml->get_widget("SimulationScrolledWindow", simulation_window);
|
_refXml->get_widget("SimulationScrolledWindow", simulation_window);
|
||||||
_simulation_widget = manage(new SimulationWidget(Simulation::get_instance()));
|
SimulationWidget& simulation_widget = *manage(new SimulationWidget(Simulation::get_instance()));
|
||||||
simulation_window->add(*_simulation_widget);
|
simulation_window->add(simulation_widget);
|
||||||
_simulation_widget->show();
|
simulation_widget.show();
|
||||||
|
|
||||||
|
// Why this works, and SimulationWidget doesn't ??
|
||||||
|
// HoltWidget& holt = *manage(new HoltWidget(Simulation::get_instance()));
|
||||||
|
// simulation_window->add(holt);
|
||||||
|
// holt.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,6 @@ namespace sgpem
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Glib::RefPtr<Gnome::Glade::Xml> _refXml;
|
Glib::RefPtr<Gnome::Glade::Xml> _refXml;
|
||||||
SimulationWidget* _simulation_widget;
|
|
||||||
SimulationController _controller;
|
SimulationController _controller;
|
||||||
|
|
||||||
// Used to store the loaded snapshot filename, when !empty
|
// Used to store the loaded snapshot filename, when !empty
|
||||||
|
|
|
@ -585,6 +585,8 @@ SimulationWidget::draw_widget(cairo_t* ctx)
|
||||||
void
|
void
|
||||||
SimulationWidget::calc_drawing_size(cairo_t* ctx, size_t& width, size_t& height)
|
SimulationWidget::calc_drawing_size(cairo_t* ctx, size_t& width, size_t& height)
|
||||||
{
|
{
|
||||||
|
std::cout << "Simulation widget BEFORE calc_drawing_size width=" << width << " height=" << height << std::endl;
|
||||||
|
|
||||||
if(!_simulation)
|
if(!_simulation)
|
||||||
return;
|
return;
|
||||||
const History& hist = _simulation->get_history();
|
const History& hist = _simulation->get_history();
|
||||||
|
@ -605,6 +607,8 @@ SimulationWidget::calc_drawing_size(cairo_t* ctx, size_t& width, size_t& height)
|
||||||
height = (1.0 + 3.0 * _n_proc + 3.0) * _y_unit;
|
height = (1.0 + 3.0 * _n_proc + 3.0) * _y_unit;
|
||||||
if(_show_threads)
|
if(_show_threads)
|
||||||
height += _n_thr * _y_unit;
|
height += _n_thr * _y_unit;
|
||||||
|
|
||||||
|
std::cout << "Simulation widget AFTER calc_drawing_size width=" << width << " height=" << height << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue