summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/editlistviewdialog.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kexi/formeditor/editlistviewdialog.h
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/formeditor/editlistviewdialog.h')
-rw-r--r--kexi/formeditor/editlistviewdialog.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/kexi/formeditor/editlistviewdialog.h b/kexi/formeditor/editlistviewdialog.h
new file mode 100644
index 00000000..09de4429
--- /dev/null
+++ b/kexi/formeditor/editlistviewdialog.h
@@ -0,0 +1,93 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef EDITLISTVIEW_DIALOG_H
+#define EDITLISTVIEW_DIALOG_H
+
+#include <qintdict.h>
+#include <qtoolbutton.h>
+#include <kdialogbase.h>
+
+class QFrame;
+class QListView;
+class QListViewItem;
+class KListViewItem;
+class KListView;
+class KListBox;
+class QListBoxItem;
+
+namespace KoProperty {
+ class Property;
+ class Set;
+ class Editor;
+}
+
+namespace KFormDesigner {
+
+//! A dialog to edit the contents of a listvuew (KListView or QListView)
+/*! The dialog contains two pages, one to edit columns and one to edit ist items.
+ KoProperty::Editor is used in columns to edit column properties
+ (there are two properties not supported by Qt Designer: 'width' and 'resizable').
+ The user can enter list contents inside the list
+ using KListViewItem::setRenameable(). Pixmaps are not yet supported. */
+class KFORMEDITOR_EXPORT EditListViewDialog : public KDialogBase
+{
+ Q_OBJECT
+
+ public:
+ EditListViewDialog(QWidget *parent);
+ ~EditListViewDialog() {}
+
+ int exec(QListView *listview);
+
+ public slots:
+ // Columns page
+ void updateItemProperties(QListBoxItem*);
+ void newItem();
+ void removeItem();
+ void MoveItemUp();
+ void MoveItemDown();
+ void changeProperty(KoProperty::Set& set, KoProperty::Property& property);
+
+ // Contents page
+ void updateButtons(QListViewItem*);
+ void newRow();
+ void newChildRow();
+ void removeRow();
+ void MoveRowUp();
+ void MoveRowDown();
+
+ protected:
+ /*! Loads all child items of \a item into \a listview (may be different from the \a items 's listview) as child of \a parent item.
+ This is used to copy the contents of a listview into another listview. */
+ void loadChildNodes(QListView *listview, QListViewItem *item, QListViewItem *parent);
+
+ protected:
+ enum { BNewRow = 10, BNewChild, BRemRow, BRowUp, BRowDown , BColAdd = 20, BColRem, BColUp, BColDown };
+ KoProperty::Editor *m_editor;
+ KoProperty::Set *m_propSet;
+ QFrame *m_contents, *m_column;
+ KListBox *m_listbox;
+ KListView *m_listview;
+ QIntDict<QToolButton> m_buttons;
+};
+
+}
+
+#endif