1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef NETWORKMODEL_H
- #define NETWORKMODEL_H
- #include <QAbstractListModel>
- #include <QNetworkConfiguration>
- class QNetworkConfigurationManager;
- class NetworkModel : public QAbstractListModel
- {
- Q_OBJECT
- enum {
- RoleName = Qt::UserRole + 1,
- RoleDescription
- };
- public:
- explicit NetworkModel(QObject *parent = 0);
- ~NetworkModel();
- int rowCount(const QModelIndex &parent) const;
- QVariant data(const QModelIndex &index, int role) const;
- QNetworkConfiguration configurationForRow(int row);
- public slots:
- void scan();
- signals:
- private:
- QNetworkConfigurationManager* m_manager;
- QList<QNetworkConfiguration> m_configurations;
- };
- #endif // NETWORKMODEL_H
|