summaryrefslogtreecommitdiffstats
path: root/src/net/pvsNetworkInterfaceListModel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/pvsNetworkInterfaceListModel.h')
-rw-r--r--src/net/pvsNetworkInterfaceListModel.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/net/pvsNetworkInterfaceListModel.h b/src/net/pvsNetworkInterfaceListModel.h
new file mode 100644
index 0000000..3a9b95d
--- /dev/null
+++ b/src/net/pvsNetworkInterfaceListModel.h
@@ -0,0 +1,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_ */