From 6ae4c71032e6b15dedd631dfff0c0c4cc4a8522a Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Tue, 10 Aug 2021 14:56:44 +0200 Subject: Complete restructure of current code tree --- src/RWAHostModel.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/RWAHostModel.cpp (limited to 'src/RWAHostModel.cpp') diff --git a/src/RWAHostModel.cpp b/src/RWAHostModel.cpp deleted file mode 100644 index 5f62adc..0000000 --- a/src/RWAHostModel.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "RWAHostModel.h" - -RWAHostModel::RWAHostModel(QObject *parent) { - Q_UNUSED(parent) -} - -int RWAHostModel::rowCount(const QModelIndex& parent) const { - Q_UNUSED(parent); - return mDatas.size(); -} - -int RWAHostModel::columnCount(const QModelIndex& parent) const { - Q_UNUSED(parent); - return 1; -} - -QVariant RWAHostModel::data(const QModelIndex &index, int role) const - { - if (!index.isValid()) - return QVariant(); - if ( role == Qt::DisplayRole) { - return mDatas[index.row()]; - } - return QVariant(); -} - -void RWAHostModel::populate() { - beginResetModel(); - mDatas.clear(); - RWAHost *host1 = new RWAHost("uuid-1", "Erster Server", "url1"); - RWAHost *host2 = new RWAHost("uuid-2", "Zweiter Server", "url2"); - RWAHost *host3 = new RWAHost("uuid-3", "Dritter Server", "url3"); - mDatas.append(host1->alias()); - mDatas.append(host2->alias()); - mDatas.append(host3->alias()); - endResetModel(); -} -- cgit v1.2.3