Example #1
0
int WifiDialog::popup(bool scan, bool auto_connect)
{
    scanned_once_ = false;
    clicked_ssid_.clear();

    proxy_.enableAutoConnect(auto_connect);

    showMaximized();
    scanResults(scan_results_);
    arrangeAPItems(scan_results_);
    onyx::screen::watcher().addWatcher(this);
    if (scan)
    {
        triggerScan();
    }
    bool ret = exec();
    onyx::screen::watcher().removeWatcher(this);
    return ret;
}
int WifiWatcher::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 8)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 8;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = lanTetherPowerEnabled(); break;
        case 1: *reinterpret_cast< QString*>(_v) = lanTetherState(); break;
        case 2: *reinterpret_cast< QVariantList*>(_v) = scanResults(); break;
        case 3: *reinterpret_cast< bool*>(_v) = connected(); break;
        case 4: *reinterpret_cast< QString*>(_v) = connectionState(); break;
        case 5: *reinterpret_cast< QString*>(_v) = connectionSsid(); break;
        case 6: *reinterpret_cast< QString*>(_v) = connectionBssid(); break;
        }
        _id -= 7;
    } else if (_c == QMetaObject::WriteProperty) {
        _id -= 7;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 7;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 7;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}