NumberRole
};
- explicit WordListModel(/*QHash<QString, QList<Translation*> > translations, QHash<QString, bool> wordsInBookmarks, */QObject *parent = 0);
+ explicit WordListModel(QObject *parent = 0);
int rowCount(const QModelIndex & parent = QModelIndex()) const;
//! Clear model data and refresh UI
void clear();
-signals:
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
-// //! Set index of current selected word
-// /*!
-// \param index word position in data list
-// */
-// void itemSelected(int index);
+signals:
void addToBookmarks(QString word);
QHash<QString, bool > _wordInBookmarks;
QList<QString> _wordList;
+ void ascendingQuickSort(int left, int right);
+ void descendingQuickSort(int left, int right);
+
};
#endif // WORDLISTMODEL_H