glom r1424 - in trunk: . glom/mode_data glom/utility_widgets
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1424 - in trunk: . glom/mode_data glom/utility_widgets
- Date: Tue, 19 Feb 2008 16:19:37 +0000 (GMT)
Author: jhs
Date: Tue Feb 19 16:19:36 2008
New Revision: 1424
URL: http://svn.gnome.org/viewvc/glom?rev=1424&view=rev
Log:
2008-02-19 Johannes Schmid <johannes schmid openismus com>
* glom/mode_data/flowtablewithfields.cc:
* glom/mode_data/flowtablewithfields.h:
* glom/utility_widgets/flowtable.h:
Added drag and drop for notebooks
Modified:
trunk/ChangeLog
trunk/glom/mode_data/flowtablewithfields.cc
trunk/glom/mode_data/flowtablewithfields.h
trunk/glom/utility_widgets/flowtable.h
Modified: trunk/glom/mode_data/flowtablewithfields.cc
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.cc (original)
+++ trunk/glom/mode_data/flowtablewithfields.cc Tue Feb 19 16:19:36 2008
@@ -1144,10 +1144,25 @@
signal_layout_changed().emit();
}
-void FlowTableWithFields::on_dnd_add_layout_group(LayoutWidgetBase* above)
+void FlowTableWithFields::on_dnd_add_layout_notebook (LayoutWidgetBase* above)
{
- type_list_layoutwidgets::iterator cur_widget;
+ sharedptr<LayoutItem_Notebook> notebook(new LayoutItem_Notebook);
+ sharedptr<LayoutItem> item = sharedptr<LayoutItem>::cast_dynamic(notebook);
+ notebook->set_name(_("Notebook"));
+ // Add a group to the notebook
+ sharedptr<LayoutGroup> group(new LayoutGroup ());
+ group->set_title(_("New Group"));
+ group->set_name (_("Group"));
+ notebook->m_list_items.push_back(group);
+
+ dnd_add_to_layout_group (item, above);
+ //Tell the parent to tell the document to save the layout
+ signal_layout_changed().emit();
+}
+
+void FlowTableWithFields::on_dnd_add_layout_group(LayoutWidgetBase* above)
+{
sharedptr<LayoutGroup> group(new LayoutGroup());
group->set_title(_("New Group"));
group->set_name (_("Group"));
Modified: trunk/glom/mode_data/flowtablewithfields.h
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.h (original)
+++ trunk/glom/mode_data/flowtablewithfields.h Tue Feb 19 16:19:36 2008
@@ -204,6 +204,7 @@
virtual void on_dnd_add_layout_group(LayoutWidgetBase* above);
virtual void on_dnd_add_layout_item_button (LayoutWidgetBase* above);
virtual void on_dnd_add_layout_item_text (LayoutWidgetBase* above);
+ virtual void on_dnd_add_layout_notebook (LayoutWidgetBase* above);
bool get_field_information (sharedptr<LayoutItem>& item);
void dnd_notify_failed_drop();
Modified: trunk/glom/utility_widgets/flowtable.h
==============================================================================
--- trunk/glom/utility_widgets/flowtable.h (original)
+++ trunk/glom/utility_widgets/flowtable.h Tue Feb 19 16:19:36 2008
@@ -108,7 +108,7 @@
virtual void on_dnd_add_layout_group(LayoutWidgetBase* above) = 0;
virtual void on_dnd_add_layout_item_button (LayoutWidgetBase* above) = 0;
virtual void on_dnd_add_layout_item_text (LayoutWidgetBase* above) = 0;
- virtual void on_dnd_add_layout_notebook (LayoutWidgetBase* above) {};
+ virtual void on_dnd_add_layout_notebook (LayoutWidgetBase* above) = 0;
#endif // !GLOM_ENABLE_CLIENT_ONLY
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]