3
* Copyright (C) 2001-2004 Murray Cumming
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
15
* You should have received a copy of the GNU General Public
16
* License along with this program; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
21
#ifndef GLOM_MODE_DATA_DIALOG_GROUPBY_SECONDARYFIELDS_HH
22
#define GLOM_MODE_DATA_DIALOG_GROUPBY_SECONDARYFIELDS_HH
24
#include <glom/base_db.h>
25
#include <glom/mode_design/layout/dialog_layout.h>
26
#include <gtkmm/builder.h>
31
class Dialog_GroupBy_SecondaryFields
32
: public Dialog_Layout //It has some useful stuff
35
Dialog_GroupBy_SecondaryFields(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
36
virtual ~Dialog_GroupBy_SecondaryFields();
39
void set_fields(const Glib::ustring& table_name, const LayoutGroup::type_list_items& table_fields);
40
LayoutGroup::type_list_items get_fields() const;
44
//Enable/disable buttons, depending on treeview selection:
45
virtual void enable_buttons();
48
virtual void on_button_field_up();
49
virtual void on_button_field_down();
50
virtual void on_button_add_field();
51
virtual void on_button_delete();
52
virtual void on_button_edit_field();
53
virtual void on_button_field_formatting();
54
virtual void on_treeview_fields_selection_changed();
55
virtual void on_cell_data_name(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter);
58
class ModelColumns_Fields : public Gtk::TreeModel::ColumnRecord
63
{ add(m_col_layout_item); add(m_col_sequence); }
65
Gtk::TreeModelColumn< sharedptr<const LayoutItem_Field> > m_col_layout_item;
66
Gtk::TreeModelColumn<guint> m_col_sequence;
69
ModelColumns_Fields m_ColumnsFields;
72
Gtk::TreeView* m_treeview_fields;
73
Gtk::Button* m_button_field_up;
74
Gtk::Button* m_button_field_down;
75
Gtk::Button* m_button_field_add;
76
Gtk::Button* m_button_field_delete;
77
Gtk::Button* m_button_field_edit;
78
Gtk::Button* m_button_field_formatting;
80
Glib::RefPtr<Gtk::ListStore> m_model_fields;
82
Gtk::Label* m_label_table_name;
87
#endif //GLOM_MODE_DATA_DIALOG_GROUPBY_SECONDARYFIELDS_HH