~ubuntu-branches/ubuntu/quantal/glom/quantal

« back to all changes in this revision

Viewing changes to glom/frame_glom.h

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2009-01-11 17:12:01 UTC
  • mfrom: (1.1.39 upstream)
  • Revision ID: james.westby@ubuntu.com-20090111171201-0ov9zh1fxfueshxc
Tags: 1.8.5-0ubuntu1
* New upstream release (LP: #256701), fixes LP bugs: 
  + Clear the text in property dialogs for text items (LP: #309147)
  + Don't crash when showing and then hiding the grid (LP: #303453)
  + Temporarily remember the sort order so it is the same when navigating 
    away and back (LP: #303422)
  + Use the list's sort order for the top-level records in the report 
    (LP: #303425)
  + Users/Groups: Disable drag-and-drop for the treeview, because it is
    useless and confusing (LP: #299573)
  + Import: Sort the fields list alphabetically (LP: #306593)
  + delete primary key make unusuable the database (LP: #299549)
  + Spanish translate incomplete (LP: #299556)
  + import date format error (LP: #299591)
  + can't delete data from table list view (LP: #299853)
  + Field definition: default value not saved (LP: #299896)
  + reports crashing (LP: #300054)
  + Year error with date fields (LP: #300057)
  + list view: 2 records added instead of 1 (LP: #300819)
* debian/control: Refreshed dependencies for libglom-dev.
* debian/control: Updated build-deps to match configure checks. goocavnasmm
  build-dep bumped to version without .la files.
* debian/rules: Don't delete the directory containing the templates.
* debian/control, debian/rules, debian/glom-doc.*: Split out
  arch-independent manual and examples into separate package glom-doc, which
  is now recommended by glom (glom will still work if they're not available)
* debian/copyright: Rewritten to new machine-readable format. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <glom/libglom/document/document_glom.h>
29
29
 
30
30
#include "dialog_glom.h"
31
 
 
32
31
#include "navigation/box_tables.h"
33
 
#include "box_reports.h"
34
 
 
35
32
#include "mode_data/notebook_data.h"
36
33
#include "mode_find/notebook_find.h"
37
34
 
38
35
#ifndef GLOM_ENABLE_CLIENT_ONLY
 
36
#include "box_reports.h"
 
37
#include "mode_design/print_layouts/box_print_layouts.h"
39
38
#include "mode_design/dialog_fields.h"
40
39
#include "mode_design/dialog_relationships.h"
41
40
#endif // !GLOM_ENABLE_CLIENT_ONLY
50
49
 
51
50
#ifndef GLOM_ENABLE_CLIENT_ONLY
52
51
class Dialog_Layout_Report;
 
52
class Window_PrintLayout_Edit;
53
53
class Dialog_AddRelatedTable;
 
54
class Dialog_RelationshipsOverview;
54
55
#endif // !GLOM_ENABLE_CLIENT_ONLY
55
56
 
56
57
class Frame_Glom :
63
64
  virtual ~Frame_Glom();
64
65
 
65
66
  void set_databases_selected(const Glib::ustring& strName);
 
67
 
66
68
  void on_box_tables_selected(const Glib::ustring& strName);
67
 
 
68
69
#ifndef GLOM_ENABLE_CLIENT_ONLY
69
70
  void on_box_reports_selected(const Glib::ustring& strName);
70
 
#endif // !GLOM_ENABLE_CLIENT_ONLY
 
71
  void on_box_print_layouts_selected(const Glib::ustring& strName);
71
72
 
72
 
#ifndef GLOM_ENABLE_CLIENT_ONLY
73
73
  void on_menu_userlevel_Developer(const Glib::RefPtr<Gtk::RadioAction>& action, const Glib::RefPtr<Gtk::RadioAction>& operator_action);
74
74
  void on_menu_userlevel_Operator(const Glib::RefPtr<Gtk::RadioAction>& action);
75
 
#endif // !GLOM_ENABLE_CLIENT_ONLY
76
75
 
77
76
  void on_menu_file_export();
 
77
  void on_menu_file_import();
 
78
  void on_menu_file_print_edit_layouts();
 
79
 
 
80
#endif // !GLOM_ENABLE_CLIENT_ONLY
78
81
  void on_menu_file_print();
79
82
 
80
83
  void on_menu_Mode_Data();
82
85
 
83
86
  void on_menu_report_selected(const Glib::ustring& report_name);
84
87
 
 
88
#ifndef GLOM_ENABLE_CLIENT_ONLY
 
89
  void on_menu_print_layout_selected(const Glib::ustring& print_layout_name);
 
90
#endif // !GLOM_ENABLE_CLIENT_ONLY
 
91
 
85
92
  //virtual void on_menu_Navigate_Database();
86
93
  //virtual void do_menu_Navigate_Database(bool bUseList = true);
 
94
 
 
95
  void do_menu_Navigate_Table(bool open_default = false);
 
96
 
87
97
#ifndef GLOM_ENABLE_CLIENT_ONLY
88
98
  void on_menu_Tables_EditTables();
89
99
  void on_menu_Tables_AddRelatedTable();
90
100
#endif // !GLOM_ENABLE_CLIENT_ONLY
91
101
 
92
 
  void do_menu_Navigate_Table(bool open_default = false);
93
 
 
94
102
#ifndef GLOM_ENABLE_CLIENT_ONLY
95
 
  void on_menu_Tables_EditReports();
96
 
 
 
103
  void on_menu_Reports_EditReports();
 
104
  void on_menu_File_EditPrintLayouts();
97
105
  void on_menu_developer_database_preferences();
98
 
 
99
106
  void on_menu_developer_fields();
100
107
  void do_menu_developer_fields(Gtk::Window& parent);
101
 
 
 
108
  void do_menu_developer_fields(Gtk::Window& parent, const Glib::ustring table_name);
102
109
  void on_menu_developer_relationships_overview();
103
110
  void on_menu_developer_relationships();
 
111
  void do_menu_developer_relationships(Gtk::Window& parent, const Glib::ustring table_name);
104
112
  void on_menu_developer_users();
105
113
  void on_menu_developer_layout();
106
114
  void on_menu_developer_reports();
 
115
  void on_menu_developer_print_layouts();
107
116
  void on_menu_developer_script_library();
108
117
 
109
118
  void on_developer_dialog_hide();
110
 
#endif // !GLOM_ENABLE_CLIENT_ONLY
111
119
 
112
 
#ifndef GLOM_ENABLE_CLIENT_ONLY
113
120
  void on_dialog_layout_report_hide();
114
121
  void on_dialog_reports_hide();
 
122
  void on_dialog_layout_print_hide();
 
123
  void on_dialog_print_layouts_hide();
 
124
 
 
125
  void on_dialog_add_related_table_request_edit_fields();
115
126
#endif // !GLOM_ENABLE_CLIENT_ONLY
 
127
 
116
128
  void on_dialog_tables_hide();
117
 
#ifndef GLOM_ENABLE_CLIENT_ONLY
118
 
 
119
 
  void on_dialog_add_related_table_request_edit_fields();
120
 
#endif // !GLOM_ENABLE_CLIENT_ONLY
121
129
 
122
130
  virtual void set_document(Document_Glom* pDocument); //View override
123
131
  virtual void load_from_document(); //View override
137
145
 
138
146
  //Show the dialog to request the password, and check whether it works.
139
147
#ifdef GLIBMM_EXCEPTIONS_ENABLED
140
 
  bool connection_request_password_and_attempt();
 
148
  bool connection_request_password_and_attempt(const Glib::ustring known_username = Glib::ustring(), const Glib::ustring& known_password = Glib::ustring());
141
149
#else
142
 
  bool connection_request_password_and_attempt(std::auto_ptr<ExceptionConnection>& error);
 
150
  bool connection_request_password_and_attempt(const Glib::ustring known_username = Glib::ustring(), const Glib::ustring& known_password = Glib::ustring(), std::auto_ptr<ExceptionConnection>& error);
143
151
#endif
144
152
 
145
153
  //Show the dialog to request the password, and choose an unused database name.
147
155
 
148
156
#ifndef GLOM_ENABLE_CLIENT_ONLY
149
157
  ///Create the database for new documents, showing the Connection dialog
150
 
  bool create_database(const Glib::ustring& database_name, const Glib::ustring& title, bool request_password = true);
 
158
  bool create_database(const Glib::ustring& database_name, const Glib::ustring& title);
 
159
  void show_layout_toolbar(bool show = true);
151
160
#endif // !GLOM_ENABLE_CLIENT_ONLY
152
161
 
153
 
  void export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document_Glom::type_mapLayoutGroupSequence& sequence);
154
 
  void export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document_Glom::type_mapLayoutGroupSequence& sequence);
 
162
  void export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
 
163
  void export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
155
164
 
156
165
  /** Show the table again. For instance, if the document has changed, or we want to display it differently.
157
166
   */
158
167
  void show_table_refresh();
159
168
 
 
169
  ///Whether we are viewing the details or list.
 
170
  bool get_viewing_details() const;
 
171
 
160
172
protected:
161
173
 
162
174
  //virtual void set_document(Document_Glom* pDocument); //override
163
175
 
 
176
  /** Show the table, possibly selecting a particular record, possibly showing that in the details tab.
 
177
   *
 
178
   * @param table_name The database table to show.
 
179
   * @param primary_key_value_for_details If specified, switch to the details view, and show this record.
 
180
   */
164
181
  void show_table(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value_for_details = Gnome::Gda::Value());
 
182
    
165
183
  void show_table_title();
 
184
#ifndef GLOM_ENABLE_CLIENT_ONLY
166
185
  void update_table_in_document_from_database();
167
 
 
 
186
#endif // !GLOM_ENABLE_CLIENT_ONLY
168
187
  virtual void set_mode_widget(Gtk::Widget& widget); //e.g. show the design mode notebook.
169
188
  virtual bool set_mode(enumModes mode); //bool indicates that there was a change.
170
189
 
179
198
  void on_notebook_find_criteria(const Glib::ustring& where_clause);
180
199
  void on_button_quickfind();
181
200
  void on_button_find_all();
 
201
  void on_notebook_data_switch_page(GtkNotebookPage* page, guint page_num);
182
202
  void on_notebook_data_record_details_requested(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
183
203
  void on_userlevel_changed(AppState::userlevels userlevel);
184
204
 
214
234
 
215
235
  //Navigation:
216
236
  Dialog_Glom* m_pDialog_Tables;
 
237
 
217
238
#ifndef GLOM_ENABLE_CLIENT_ONLY
218
239
  //Developer:
219
240
  Dialog_Glom* m_pDialog_Reports;
 
241
  Dialog_Layout_Report* m_pDialogLayoutReport;
220
242
  Box_Reports* m_pBox_Reports;
 
243
  
 
244
  Dialog_Glom* m_pDialog_PrintLayouts;
 
245
  Window_PrintLayout_Edit* m_pDialogLayoutPrint;
 
246
  Box_Print_Layouts* m_pBox_PrintLayouts;
221
247
 
222
248
  Dialog_Fields* m_pDialog_Fields;
223
249
  Dialog_Relationships* m_pDialog_Relationships;
224
250
  Dialog_AddRelatedTable* m_dialog_addrelatedtable;
225
 
 
226
 
  Dialog_Layout_Report* m_pDialogLayoutReport;
 
251
  Dialog_RelationshipsOverview* m_dialog_relationships_overview;
 
252
  
227
253
#endif // !GLOM_ENABLE_CLIENT_ONLY
228
254
 
229
255
  Dialog_Connection* m_pDialogConnection;
230
 
 
231
 
 
232
 
  Box_Data_List_Related m_HackToFixLinkerError; //The implementation of this class does not seem to be in the library unless I do this. murrayc.
233
256
};
234
257
 
235
258
} //namespace Glom