sgpemv2/src/add_request_dialog.hh

69 lines
2.1 KiB
C++
Raw Normal View History

// src/add_request_dialog.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 ADD_REQUEST_DIALOG_HH
#define ADD_REQUEST_DIALOG_HH 1
#include "config.h"
#include <gtkmm/treeview.h>
#include <gtkmm/liststore.h>
#include <gtkmm/dialog.h>
#include <gtkmm/combobox.h>
#include <libglademm/xml.h>
namespace sgpem
{
class AddRequestDialog : public Gtk::Dialog
{
public:
AddRequestDialog(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade);
protected:
virtual void on_show();
private:
void _on_add();
void _on_remove();
void _on_selection_changed();
Glib::RefPtr<Gnome::Glade::Xml> _glade;
Gtk::TreeView* _list;
Glib::RefPtr<Gtk::ListStore> _list_model;
Gtk::TreeModelColumnRecord _list_columns;
Gtk::TreeModelColumn<unsigned int> _list_key_column;
Gtk::TreeModelColumn<Glib::ustring> _list_resource_column;
Gtk::TreeModelColumn<unsigned int> _list_length_column;
Gtk::Button* _add_button;
Gtk::Button* _remove_button;
Gtk::ComboBox* _resource_combo;
Glib::RefPtr<Gtk::ListStore> _combo_model;
Gtk::TreeModelColumnRecord _combo_columns;
Gtk::TreeModelColumn<unsigned int> _combo_key_column;
Gtk::TreeModelColumn<Glib::ustring> _combo_resource_column;
};
} //~ namespace sgpem
#endif //~ ADD_REQUEST_DIALOG_HH