blob: 75bf9c7d6ef2aa4a1ad801957a6b2164376e0434 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef CONNECTIONLISTMODEL_H
#define CONNECTIONLISTMODEL_H
#include <QAbstractListModel>
class ConnectionListModel : public QAbstractListModel {
Q_OBJECT
public:
ConnectionListModel(QObject *parent = nullptr);
QHash<int, QByteArray> roleNames() const override;
QVariant data(const QModelIndex &index, int role) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
void addAddress(const QString &address);
void removeAllAddresses();
int indexOf(const QString &address) const;
private:
QStringList m_addresses;
};
#endif
|