aboutsummaryrefslogtreecommitdiffstats
path: root/core/connectionlistmodel.h
blob: d05b753c7d9fcb9ae3d326e467efeb794af2f462 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef CONNECTIONLISTMODEL_H
#define CONNECTIONLISTMODEL_H

#include <QAbstractListModel>

class ConnectionListModel : public QAbstractListModel {
	Q_OBJECT
public:
	ConnectionListModel(QObject *parent = nullptr);
	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