diff options
author | Kalle Viironen <kalle.viironen@digia.com> | 2014-04-15 15:16:02 +0300 |
---|---|---|
committer | Kalle Viironen <kalle.viironen@digia.com> | 2014-04-15 15:16:16 +0300 |
commit | 9627172876cd2a387d44b5a9a6ce0a3867ebc730 (patch) | |
tree | ea7b4382c6390ece7e9588e7e71ad7357b13b338 /src/imports/wifi/qwifinetworklistmodel.h | |
parent | 436af494659d416cfbd531b8d3ba9fc49e2fa710 (diff) | |
parent | f9da7d90608cb4ce511770f5da8ef666e8a3e1b0 (diff) |
Merge branch 'stable' into releaseQtEE_v2.1.0
* stable:
Doc: Add ChangeLog for Qt Enterprise Embedded 2.1.0
Doc: Disable code highlighting for command-line instructions
doc: update version number to 2.1.0
[Wifi] Add new enums and make some API changes
Doc: Add documentation on custom build & deploy steps
Doc: Create QML Type reference page
Doc: Add information about licenses in embedded Linux images
Doc: Improve instructions for deploying existing projects
Doc: Separate Building Your Own Linux Image into its own page
doc: use same directory for yocto and qt
doc: config.<MACHINE> needed only once
doc: guide for imx53 and how to setup QtCreator
Doc: Be more precise on screen content for Nexus7
Add documentation to QtWifi library
Doc: Add note for users to not use root for installation
doc: describe how to use network connection for adb
Rename misleading class name
Remove unnecessary roles from QWifiNetworkList
Document C++11 usage
doc: how to use rebuilt yocto images and BYOS
Change-Id: If51af9f476d05e7d147d93670d36ca1b99e03d8c
Diffstat (limited to 'src/imports/wifi/qwifinetworklistmodel.h')
-rw-r--r-- | src/imports/wifi/qwifinetworklistmodel.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/imports/wifi/qwifinetworklistmodel.h b/src/imports/wifi/qwifinetworklistmodel.h new file mode 100644 index 0000000..91ca231 --- /dev/null +++ b/src/imports/wifi/qwifinetworklistmodel.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ +#ifndef QWIFINETWORKLISTMODEL_H +#define QWIFINETWORKLISTMODEL_H + +#include <QtCore/QAbstractListModel> +#include <QtCore/QList> + +#include "qwifinetwork.h" + +class QWifiManager; + +class QWifiNetworkListModel : public QAbstractListModel +{ + Q_OBJECT + +public: + + QWifiNetworkListModel(QWifiManager *manager); + ~QWifiNetworkListModel(); + + void parseScanResults(const QByteArray &data); + + QWifiNetwork *networkForSSID(const QByteArray &ssid, int *pos); + QWifiNetwork *outOfRangeListContains(const QByteArray &ssid); + + int rowCount(const QModelIndex &) const { return m_networks.size(); } + QVariant data(const QModelIndex &index, int role) const; + + QHash<int,QByteArray> roleNames() const; + +private: + QWifiManager *m_manager; + QList<QWifiNetwork *> m_networks; + QList<QWifiNetwork *> m_outOfRangeNetworks; +}; + +#endif // QWIFINETWORKLISTMODEL_H |