#ifndef UNUSEDFIELDSLISTMODEL_H #define UNUSEDFIELDSLISTMODEL_H #include #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 m_unusedFields; ///< Always updated list }; #endif