summaryrefslogtreecommitdiff
path: root/src/dic-options/PackFieldsListModel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dic-options/PackFieldsListModel.h')
-rw-r--r--src/dic-options/PackFieldsListModel.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/dic-options/PackFieldsListModel.h b/src/dic-options/PackFieldsListModel.h
new file mode 100644
index 0000000..06565c5
--- /dev/null
+++ b/src/dic-options/PackFieldsListModel.h
@@ -0,0 +1,34 @@
+#ifndef PACKFIELDSLISTMODEL_H
+#define PACKFIELDSLISTMODEL_H
+
+#include <QAbstractListModel>
+
+#include "DictionaryOptionsDialog.h"
+#include "DraggableListModel.h"
+#include "../dictionary/Dictionary.h"
+
+class PackFieldsListModel : public DraggableListModel
+{
+ Q_OBJECT
+
+public:
+ PackFieldsListModel( DictionaryOptionsDialog* aParent ):
+ DraggableListModel( aParent ), m_parentRow( 0 )
+ {}
+
+ int rowCount( const QModelIndex& parent = QModelIndex() ) const;
+ QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
+ bool setData(const QModelIndex& index, const QVariant& aValue, int role = Qt::EditRole );
+ bool insertRows(int position, int rows, const QModelIndex &);
+ bool removeRows(int position, int rows, const QModelIndex &);
+ const void* dataPtr( const QModelIndex& aIndex ) const;
+ void insertPointer( int aPos, void* aData );
+
+public slots:
+ void changeParentRow( const QModelIndex& aIndex );
+
+private:
+ int m_parentRow;
+};
+
+#endif