Example #1
0
void AuthControler::onConnectChanged(int flag)
{
    qDebug() << Q_FUNC_INFO<<"lixinlixinlixinlixinlixin"<<flag;
    if(flag==0){
        emit connectChanged("");
    }
    else{
        emit connectChanged("服务器连接中...");
    }
}
Example #2
0
void AuthControler::onNetworkStatusChanged(bool connected, CNetworkManager::NetworkType type)
{
    qDebug() << Q_FUNC_INFO<<"sssssssssssxinxinxinxinxinxinxin";
    if(connected){
        emit connectChanged("");
    }
    else{
        emit connectChanged("网络连接中...");
    }

}
	LLNotificationHistoryChannel(const std::string& filename) : 
		LLNotificationChannel("History", "Visible", &historyFilter, LLNotificationComparators::orderByUUID()),
		mFileName(filename)
	{
		connectChanged(boost::bind(&LLNotificationHistoryChannel::historyHandler, this, _1));
		loadPersistentNotifications();
	}
void OnkyoRemoteItem::connect_(bool conn)
{
    bool linked_ = getConnected();
    if( linked_ != conn ){

        if(conn){
            onkyo_.reset( new OnkyoClient() );
            connect(onkyo_.data(), SIGNAL( newStatus(QString) ), this, SLOT(status_(QString)) );
            connect(onkyo_.data(), SIGNAL( error(QString)), this, SLOT(error_(QString)) );
            if(addr_.isEmpty())
                onkyo_->init();
            else {
                DeviceInfo d;
                d.addr = QHostAddress(addr_);
                d.port = port_;
                onkyo_->init(d);
            }
            onkyo_->setConnected(true);
        }
        else {//make diskonnect
            if(! onkyo_.isNull() ){
                this->disconnect(onkyo_.data());
                onkyo_.reset();
            }
        }
        emit connectChanged();
    }

}
Example #5
0
// Complete/incremental contents rebuilder; check dirty status if incremental.
void qjackctlConnect::updateContents ( bool bClear )
{
	int iDirtyCount = 0;

	if (startMutex()) {
		// Do we do a complete rebuild?
		if (bClear) {
			m_pOClientList->clear();
			m_pIClientList->clear();
			updateIconPixmaps();
		}
		// Add (newer) client:ports and respective connections...
		if (m_pOClientList->updateClientPorts() > 0) {
			m_pOClientList->refresh();
			iDirtyCount++;
		}
		if (m_pIClientList->updateClientPorts() > 0) {
			m_pIClientList->refresh();
			iDirtyCount++;
		}			
		updateConnections();
		endMutex();
	}

	(m_pConnectView->connectorView())->update();

	if (!bClear && iDirtyCount > 0)
		emit connectChanged();
}
Example #6
0
void Kompas::updateSettings()
{
    m_connect=settings->m_interface;
    emit connectChanged();
    port->setPortName(settings->m_name_COM);
    port->setBaudRate(settings->m_Baud_rate);
    port->setDataBits(QSerialPort::DataBits(settings->m_Number_of_data_bits));
    port->setStopBits(QSerialPort::StopBits(settings->m_Stop_bits));
    port->setParity(QSerialPort::Parity(settings->m_Parity));
}
void OnkyoRemoteItem::status_(const QString &str)
{
    if( str.isEmpty() )
        emit connectChanged();
    else {
        emit status(str);
        foreach(OnkyoParameterItem* p, params_){
            if( str.startsWith( p->nik() ) )
                p->setValue( QString(str).remove(0, p->nik().size() ) );
        }
    }
}
Example #8
0
// Disconnect current selected ports.
bool qjackctlConnect::disconnectSelected (void)
{
	bool bResult = false;

	if (startMutex()) {
		bResult = disconnectSelectedEx();
		endMutex();
	}

	m_pConnectView->connectorView()->update();

	if (bResult)
		emit connectChanged();

	return bResult;
}
Example #9
0
RegisteredColorPicker::RegisteredColorPicker(const Glib::ustring& label,
                                             const Glib::ustring& title,
                                             const Glib::ustring& tip,
                                             const Glib::ustring& ckey,
                                             const Glib::ustring& akey,
                                             Registry& wr,
                                             Inkscape::XML::Node* repr_in,
                                             SPDocument *doc_in)
    : RegisteredWidget<ColorPicker> (title, tip, 0, true)
{
    init_parent("", wr, repr_in, doc_in);

    _label = new Gtk::Label (label, 1.0, 0.5);
    _label->set_use_underline (true);
    _label->set_mnemonic_widget (*this);
    _ckey = ckey;
    _akey = akey;
    _changed_connection = connectChanged (sigc::mem_fun (*this, &RegisteredColorPicker::on_changed));
}
Example #10
0
// Disconnect all ports.
bool qjackctlConnect::disconnectAll (void)
{
	if (QMessageBox::warning(m_pConnectView,
		tr("Warning") + " - " QJACKCTL_SUBTITLE1,
		tr("This will suspend sound processing\n"
		"from all client applications.\n\nAre you sure?"),
		QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
		return false;
	}

	bool bResult = false;

	if (startMutex()) {
		bResult = disconnectAllEx();
		endMutex();
	}

	m_pConnectView->connectorView()->update();

	if (bResult)
		emit connectChanged();

	return bResult;
}