summaryrefslogtreecommitdiffstats
path: root/src/net/pvsNetworkInterfaceListModel.h
blob: 3a9b95d1679f09ca836bdc1d1125e9f6fe654e5f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * pvsNetworkInterfaceListModel.h
 *
 *  Created on: 04.08.2010
 *      Author: brs
 */

#ifndef PVSNETWORKINTERFACELISTMODEL_H_
#define PVSNETWORKINTERFACELISTMODEL_H_

#include <QAbstractListModel>
#include <QList>
#include <QNetworkInterface>
#include <QVariant>

class PVSNetworkInterfaceListModel : public QAbstractListModel
{
	Q_OBJECT

public:
    PVSNetworkInterfaceListModel(QObject* parent = 0);
    virtual ~PVSNetworkInterfaceListModel();

    QVariant data(QModelIndex const& index, int role = Qt::DisplayRole) const;
    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
    int rowCount(QModelIndex const&) const;

private:
    QList<QNetworkInterface> _interfaces;

public slots:
    void reloadInterfaceList();
};

#endif /* PVSNETWORKINTERFACELISTMODEL_H_ */