2017-10-06 07:51:30 -07:00
|
|
|
#ifndef CONNECTIONLISTMODEL_H
|
|
|
|
#define CONNECTIONLISTMODEL_H
|
|
|
|
|
|
|
|
#include <QAbstractListModel>
|
|
|
|
|
|
|
|
class ConnectionListModel : public QAbstractListModel {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ConnectionListModel(QObject *parent = 0);
|
2019-03-20 07:31:24 -07:00
|
|
|
QVariant data(const QModelIndex &index, int role) const;
|
2017-10-06 07:51:30 -07:00
|
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
|
|
void addAddress(const QString address);
|
2017-10-11 19:31:45 +02:00
|
|
|
void removeAllAddresses();
|
2018-08-08 05:54:10 -07:00
|
|
|
int indexOf(QString address);
|
2017-10-06 07:51:30 -07:00
|
|
|
private:
|
|
|
|
QStringList m_addresses;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|