diff options
Diffstat (limited to 'src/dic-options/UnusedFieldsListModel.h')
-rw-r--r-- | src/dic-options/UnusedFieldsListModel.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/dic-options/UnusedFieldsListModel.h b/src/dic-options/UnusedFieldsListModel.h new file mode 100644 index 0000000..c3a95f6 --- /dev/null +++ b/src/dic-options/UnusedFieldsListModel.h @@ -0,0 +1,35 @@ +#ifndef UNUSEDFIELDSLISTMODEL_H +#define UNUSEDFIELDSLISTMODEL_H + +#include <QAbstractListModel> + +#include "DictionaryOptionsDialog.h" +#include "DraggableListModel.h" + +class UnusedFieldsListModel : public DraggableListModel +{ + Q_OBJECT + +public: + UnusedFieldsListModel( DictionaryOptionsDialog* aParent ); + + 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 ); + bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, + const QModelIndex &parent); + +public slots: + void changeParentRow( const QModelIndex& aIndex ); + void updateUnusedFields(); + +private: + int m_parentRow; + QList<const Field*> m_unusedFields; ///< Always updated list +}; + +#endif |