98 lines
2.1 KiB
C++
98 lines
2.1 KiB
C++
// 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
|
|
|
|
|
|
#include <sgpemv2/global_preferences.hh>
|
|
|
|
|
|
#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:
|
|
|
|
explicit PreferencesEditor(const std::string& gladefile = GLADEDIR "/configure-dialog.glade");
|
|
|
|
|
|
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:
|
|
|
|
void
|
|
update_policies();
|
|
|
|
void
|
|
update_plugins();
|
|
|
|
Glib::RefPtr<Gnome::Glade::Xml> _refXml;
|
|
Gtk::Dialog* preferences_dialog;
|
|
|
|
Gtk::TreeView* plugins_dirs_treeview;
|
|
Glib::RefPtr<Gtk::ListStore> plugins_dirs_model;
|
|
|
|
Gtk::TreeView* plugins_treeview;
|
|
Glib::RefPtr<Gtk::ListStore> plugins_model;
|
|
|
|
Gtk::TreeView* policies_dirs_treeview;
|
|
Glib::RefPtr<Gtk::ListStore> policies_dirs_model;
|
|
|
|
Gtk::TreeView* policies_treeview;
|
|
Glib::RefPtr<Gtk::ListStore> policies_model;
|
|
|
|
Gtk::SpinButton* speed_spin;
|
|
|
|
};
|
|
|
|
} // ~ namespace
|
|
|
|
#endif // ~ GRAPHICAL_PREFERENCES_EDITOR_HH
|