2006-08-15 19:33:47 +02:00
|
|
|
// src/graphical_preferences_editor.hh - 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
|
|
|
|
|
|
|
|
#ifndef GRAPHICAL_PREFERENCES_EDITOR_HH
|
|
|
|
#define GRAPHICAL_PREFERENCES_EDITOR_HH 1
|
|
|
|
|
|
|
|
|
2006-09-07 02:43:00 +02:00
|
|
|
#include <sgpemv2/global_preferences.hh>
|
2006-08-15 19:33:47 +02:00
|
|
|
|
2006-09-17 03:19:10 +02:00
|
|
|
|
2006-08-15 19:33:47 +02:00
|
|
|
#include <libglademm/xml.h>
|
|
|
|
#include <gtkmm/liststore.h>
|
|
|
|
#include <gtkmm/dialog.h>
|
|
|
|
#include <gtkmm/treeview.h>
|
|
|
|
#include <gtkmm/spinbutton.h>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace sgpem
|
|
|
|
{
|
|
|
|
|
|
|
|
class PreferencesEditor
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2006-09-14 22:42:54 +02:00
|
|
|
explicit PreferencesEditor(const std::string& gladefile = GLADEDIR "/configure-dialog.glade");
|
2006-08-15 19:33:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
on_close();
|
|
|
|
|
|
|
|
void
|
|
|
|
on_add_plugins_dir();
|
|
|
|
|
|
|
|
void
|
|
|
|
on_remove_plugins_dir();
|
|
|
|
|
|
|
|
void
|
|
|
|
on_add_policies_dir();
|
|
|
|
|
|
|
|
void
|
|
|
|
on_remove_policies_dir();
|
|
|
|
|
|
|
|
void
|
|
|
|
on_set_speed();
|
|
|
|
|
|
|
|
|
|
|
|
~PreferencesEditor();
|
|
|
|
|
|
|
|
private:
|
2006-09-02 01:28:23 +02:00
|
|
|
|
2006-09-17 03:19:10 +02:00
|
|
|
void
|
|
|
|
update_policies();
|
2006-09-02 01:28:23 +02:00
|
|
|
|
2006-09-17 03:19:10 +02:00
|
|
|
void
|
|
|
|
update_plugins();
|
2006-09-02 01:28:23 +02:00
|
|
|
|
2006-08-15 19:33:47 +02:00
|
|
|
Glib::RefPtr<Gnome::Glade::Xml> _refXml;
|
|
|
|
Gtk::Dialog* preferences_dialog;
|
2006-09-02 01:28:23 +02:00
|
|
|
|
2006-08-15 19:33:47 +02:00
|
|
|
Gtk::TreeView* plugins_dirs_treeview;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> plugins_dirs_model;
|
2006-09-02 01:28:23 +02:00
|
|
|
|
|
|
|
Gtk::TreeView* plugins_treeview;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> plugins_model;
|
|
|
|
|
2006-08-15 19:33:47 +02:00
|
|
|
Gtk::TreeView* policies_dirs_treeview;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> policies_dirs_model;
|
2006-09-02 01:28:23 +02:00
|
|
|
|
|
|
|
Gtk::TreeView* policies_treeview;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> policies_model;
|
|
|
|
|
2006-08-15 19:33:47 +02:00
|
|
|
Gtk::SpinButton* speed_spin;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2006-09-17 03:19:10 +02:00
|
|
|
} // ~ namespace
|
2006-08-15 19:33:47 +02:00
|
|
|
|
2006-09-17 03:19:10 +02:00
|
|
|
#endif // ~ GRAPHICAL_PREFERENCES_EDITOR_HH
|