当前位置: 首页>>代码示例>>C++>>正文


C++ QNetworkConfigurationManagerPrivate::allConfigurations方法代码示例

本文整理汇总了C++中QNetworkConfigurationManagerPrivate::allConfigurations方法的典型用法代码示例。如果您正苦于以下问题:C++ QNetworkConfigurationManagerPrivate::allConfigurations方法的具体用法?C++ QNetworkConfigurationManagerPrivate::allConfigurations怎么用?C++ QNetworkConfigurationManagerPrivate::allConfigurations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QNetworkConfigurationManagerPrivate的用法示例。


在下文中一共展示了QNetworkConfigurationManagerPrivate::allConfigurations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: all

/*!
    Returns the list of configurations which comply with the given \a filter.

    By default this function returns all (defined and undefined) configurations.

    A wireless network with a particular SSID may only be accessible in a
    certain area despite the fact that the system has a valid configuration
    for it. Therefore the filter flag may be used to limit the list to
    discovered and possibly connected configurations only.

    If \a filter is set to zero this function returns all possible configurations.

    Note that this function returns the states for all configurations as they are known at
    the time of this function call. If for instance a configuration of type WLAN is defined
    the system may have to perform a WLAN scan in order to determine whether it is
    actually available. To obtain the most accurate state updateConfigurations() should
    be used to update each configuration's state. Note that such an update may require
    some time. It's completion is signalled by updateCompleted(). In the absence of a
    configuration update this function returns the best estimate at the time of the call.
    Therefore, if WLAN configurations are of interest, it is recommended that
    updateConfigurations() is called once after QNetworkConfigurationManager
    instantiation (WLAN scans are too time consuming to perform in constructor).
    After this the data is kept automatically up-to-date as the system reports
    any changes.
*/
QList<QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::StateFlags filter) const
{
    QNetworkConfigurationManagerPrivate *priv = qNetworkConfigurationManagerPrivate();
    if (priv)
        return priv->allConfigurations(filter);

    return QList<QNetworkConfiguration>();
}
开发者ID:,项目名称:,代码行数:33,代码来源:


注:本文中的QNetworkConfigurationManagerPrivate::allConfigurations方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。