summaryrefslogblamecommitdiffstats
path: root/src/net/pvsNetworkInterfaceListModel.h
blob: 3a9b95d1679f09ca836bdc1d1125e9f6fe654e5f (plain) (tree)


































                                                                                                    
/*
 * 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_ */