From bd7207d8bf82c58c60399c05c29c2312a8c0f258 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 22 Sep 2015 13:59:38 +0300 Subject: protocol: added download state field to "download" added module defined download state names to "module_info" few fields description server: added download state to downloader api structures setting download states in outgoing downloads client-qt: basic implementation of download state in downloads table (withoud module defined states) fixed downloads table model update (working) --- client-qt/udm-client-qt/downloads_model.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'client-qt/udm-client-qt/downloads_model.h') diff --git a/client-qt/udm-client-qt/downloads_model.h b/client-qt/udm-client-qt/downloads_model.h index 08172d5..519d8ba 100644 --- a/client-qt/udm-client-qt/downloads_model.h +++ b/client-qt/udm-client-qt/downloads_model.h @@ -31,12 +31,21 @@ class downloads_model : public QAbstractTableModel Q_OBJECT public: downloads_model(std::vector &downloads, QObject *parent = 0); + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount ( const QModelIndex & parent = QModelIndex() ) const; + QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - int columnCount ( const QModelIndex & parent = QModelIndex() ) const; + + QModelIndex index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const; + QModelIndex parent ( const QModelIndex & index ) const; + + bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()); bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()); + + void sort ( int column, Qt::SortOrder order = Qt::AscendingOrder ); -- cgit v1.2.3