Example #1
0
void CLSSIS3820Scaler::onScanningToggleChanged(){

	if(!isConnected())
		return;

	emit scanningChanged(startToggle_->withinTolerance(1));
}
void TechnologyModel::requestScan()
{
    if (m_tech && !m_tech->tethering()) {
        m_tech->scan();
        m_scanning = true;
        Q_EMIT scanningChanged(m_scanning);
    }
}
void TechnologyModel::doUpdateTechnologies()
{
    NetworkTechnology *newTech = m_manager->getTechnology(m_techname);
    if (m_tech == newTech)
        return;

    bool oldPowered = false;
    bool oldConnected = false;

    if (m_tech) {
        oldPowered = m_tech->powered();
        oldConnected = m_tech->connected();

        disconnect(m_tech, SIGNAL(poweredChanged(bool)), this, SLOT(changedPower(bool)));
        disconnect(m_tech, SIGNAL(connectedChanged(bool)), this, SLOT(changedConnected(bool)));
        disconnect(m_tech, SIGNAL(scanFinished()), this, SLOT(finishedScan()));
    }

    if (m_scanning) {
        m_scanning = false;
        Q_EMIT scanningChanged(m_scanning);
    }

    m_tech = newTech;

    if (m_tech) {
        connect(m_tech, SIGNAL(poweredChanged(bool)), this, SLOT(changedPower(bool)));
        connect(m_tech, SIGNAL(connectedChanged(bool)), this, SLOT(changedConnected(bool)));
        connect(m_tech, SIGNAL(scanFinished()), this, SLOT(finishedScan()));

        bool b = m_tech->powered();
        if (b != oldPowered)
            Q_EMIT poweredChanged(b);
        b = m_tech->connected();
        if (b != oldConnected)
            Q_EMIT connectedChanged(b);
    } else {
        if (oldPowered)