diff options
Diffstat (limited to 'client-qt/udm-client-qt/downloads_model.cpp')
-rw-r--r-- | client-qt/udm-client-qt/downloads_model.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client-qt/udm-client-qt/downloads_model.cpp b/client-qt/udm-client-qt/downloads_model.cpp index 567b5e5..1883a6c 100644 --- a/client-qt/udm-client-qt/downloads_model.cpp +++ b/client-qt/udm-client-qt/downloads_model.cpp @@ -21,7 +21,7 @@ #include "downloads_model.h" -downloads_model::downloads_model(std::vector<download> &downloads_, QObject */*parent*/) : downloads(downloads_) +downloads_model::downloads_model(std::vector<download> &downloads_, QObject *parent) : QAbstractTableModel(parent), downloads(downloads_) { } @@ -134,6 +134,13 @@ bool downloads_model::removeRows(int position, int rows, const QModelIndex &/*in return true; } +void downloads_model::refresh() +{ + QModelIndex topLeft = createIndex(0,0), bottomRight = createIndex(downloads.size()-1, 5); + emit dataChanged(topLeft, bottomRight); +} + + void downloads_model::sort ( int /*column*/, Qt::SortOrder /*order*/) { //TODO: |