2006-09-11 03:32:05 +02:00
|
|
|
// src/statistics_container_window.cc - Copyright 2005, 2006, University
|
|
|
|
// of Padova, dept. of Pure and Applied
|
|
|
|
// Mathematics
|
|
|
|
//
|
|
|
|
// This file is part of SGPEMv2.
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// SGPEMv2 is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with SGPEMv2; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
#include "statistics_container_window.hh"
|
2006-09-14 12:58:54 +02:00
|
|
|
#include <glibmm/ustring.h>
|
|
|
|
|
2006-09-11 03:32:05 +02:00
|
|
|
#include <iostream>
|
|
|
|
|
2006-09-14 12:58:54 +02:00
|
|
|
|
|
|
|
using namespace Gtk;
|
|
|
|
using Gnome::Glade::Xml;
|
2006-09-11 03:32:05 +02:00
|
|
|
using namespace sgpem;
|
|
|
|
using namespace std;
|
|
|
|
|
2006-09-14 12:58:54 +02:00
|
|
|
StatisticsContainerWindow::StatisticsContainerWindow(const std::string& gladefile)
|
|
|
|
: _refXml(Xml::create(gladefile))
|
2006-09-11 03:32:05 +02:00
|
|
|
{
|
2006-09-14 12:58:54 +02:00
|
|
|
_refXml->get_widget("StatisticsWindow", _main_win);
|
2006-09-11 03:32:05 +02:00
|
|
|
// This just sets the title of our new window.
|
2006-09-14 12:58:54 +02:00
|
|
|
_main_win->set_title(_("Simulation Statistics"));
|
|
|
|
|
|
|
|
ScrolledWindow *scroll1, *scroll2;
|
|
|
|
_refXml->get_widget("SchedulableStatisticsScroll", scroll1);
|
|
|
|
_tab_sched = manage(new TabularSchedulableStatisticsWidget());
|
|
|
|
scroll1->add(*_tab_sched);
|
|
|
|
|
|
|
|
_refXml->get_widget("SimulationStatisticsScroll", scroll2);
|
|
|
|
_tab_sim = manage(new TabularSimulationStatisticsWidget());
|
|
|
|
scroll2->add(*_tab_sim);
|
|
|
|
|
|
|
|
scroll1->show();
|
|
|
|
scroll2->show();
|
|
|
|
_tab_sched->show();
|
|
|
|
_tab_sim->show();
|
|
|
|
|
|
|
|
/*
|
2006-09-11 03:32:05 +02:00
|
|
|
_scrolled_tabular.add(_tabular_schedulables_statistics_widget);
|
|
|
|
add(_scrolled_tabular);
|
|
|
|
_scrolled_tabular.show();
|
|
|
|
_tabular_schedulables_statistics_widget.show();
|
|
|
|
|
|
|
|
_scrolled_tabular.get_hscrollbar()->property_visible() = true;
|
|
|
|
_scrolled_tabular.get_vscrollbar()->property_visible() = true;
|
2006-09-14 12:58:54 +02:00
|
|
|
*/
|
2006-09-11 03:32:05 +02:00
|
|
|
//_scrolled_tabular.get_vscrollbar()->set_visible(true);
|
|
|
|
|
|
|
|
/*cout << "\n\nSIIIIIIIIIIIIIIIIIIIII\n\n";
|
|
|
|
if (_scrolled_tabular.get_vscrollbar_visible())
|
|
|
|
cout << "\n\nSIIIIIIIIIIIIIIIIIIIII\n\n";
|
|
|
|
else
|
|
|
|
cout << "\n\nNNNNNNNNNNNNNNNOOOOOOOOOOO\n\n";
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
StatisticsContainerWindow::~StatisticsContainerWindow()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-09-14 12:58:54 +02:00
|
|
|
void
|
|
|
|
StatisticsContainerWindow::make_child(Window& w)
|
|
|
|
{
|
|
|
|
_main_win->set_transient_for(w);
|
2006-09-11 03:32:05 +02:00
|
|
|
}
|
|
|
|
|
2006-09-14 12:58:54 +02:00
|
|
|
TabularSimulationStatisticsWidget*
|
|
|
|
StatisticsContainerWindow::get_tabular_simulation_statistics_widget()
|
|
|
|
{
|
|
|
|
return _tab_sim;
|
|
|
|
}
|
|
|
|
|
|
|
|
TabularSchedulableStatisticsWidget*
|
2006-09-11 03:32:05 +02:00
|
|
|
StatisticsContainerWindow::get_tabular_schedulables_statistics_widget()
|
|
|
|
{
|
2006-09-14 12:58:54 +02:00
|
|
|
return _tab_sched;
|
|
|
|
}
|
|
|
|
|
|
|
|
Window*
|
|
|
|
StatisticsContainerWindow::get_main_window()
|
|
|
|
{
|
|
|
|
return _main_win;
|
2006-09-11 03:32:05 +02:00
|
|
|
}
|
|
|
|
|