sgpemv2/src/graphical_preferences_edito...

84 lines
1.9 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 "config.h"
#include "backend/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:
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:
Glib::RefPtr<Gnome::Glade::Xml> _refXml;
GlobalPreferences& prefs;
Gtk::Dialog* preferences_dialog;
Gtk::TreeView* plugins_dirs_treeview;
Glib::RefPtr<Gtk::ListStore> plugins_dirs_model;
Gtk::TreeView* policies_dirs_treeview;
Glib::RefPtr<Gtk::ListStore> policies_dirs_model;
Gtk::SpinButton* speed_spin;
};
}
#endif