mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
bf9a526d63
-avoid object copies -use some more bullet proof C++11 constructs -avoid using a QRegExp, simple string matches are faster Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
19 lines
515 B
C++
19 lines
515 B
C++
#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
|