本文整理汇总了C++中setConnected函数的典型用法代码示例。如果您正苦于以下问题:C++ setConnected函数的具体用法?C++ setConnected怎么用?C++ setConnected使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setConnected函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: setConnected
void REIXSXESMCPDetector::onControlsConnected(bool connected){
if(connected)
setConnected(connected);
else
setConnected(false);
if(connected)
setReadyForAcquisition();
else if(!isNotReadyForAcquisition())
setNotReadyForAcquisition();
}
开发者ID:acquaman,项目名称:acquaman,代码行数:11,代码来源:REIXSXESMCPDetector.cpp
示例2: qDebug
void
LNetworkConnectionMonitor::onStateChange( uint newState )
{
qDebug() << "Networkmanager state change!";
if ( newState == Disconnected )
{
setConnected( false );
}
else if ( newState == Connected )
{
setConnected( true );
}
}
开发者ID:LittleForker,项目名称:tomahawk,代码行数:14,代码来源:LNetworkConnectionMonitor_linux.cpp
示例3: qDebug
void
lastfm::LNetworkConnectionMonitor::onStateChange( uint newState )
{
qDebug() << "Networkmanager state change!";
if ( newState == NM_STATE_DISCONNECTED || newState == NM_STATE_ASLEEP )
{
setConnected( false );
}
else if ( newState == NM_STATE_CONNECTED_GLOBAL )
{
setConnected( true );
}
}
开发者ID:Timmmm,项目名称:liblastfm,代码行数:14,代码来源:LNetworkConnectionMonitor_linux.cpp
示例4: qDebug
void CDatabaseItem::init(const QString &dbname)
{
#ifdef DEBUG
qDebug("CDatabaseItem::init('%s')", debug_string(dbname));
#endif
setText(0,dbname);
setDatabaseName(dbname);
widgetData.setAutoDelete(true);
if (databaseDisconnectedIcon.isNull())
databaseDisconnectedIcon = getPixmapIcon("databaseDisconnectedIcon");
if (databaseConnectedIcon.isNull())
databaseConnectedIcon = getPixmapIcon("databaseConnectedIcon");
databaseConnectIcon = getPixmapIcon("databaseConnectIcon");
databaseDisconnectIcon = getPixmapIcon("databaseDisconnectIcon");
sqlIcon = getPixmapIcon("sqlIcon");
deleteIcon = getPixmapIcon("deleteIcon");
newWindowIcon = getPixmapIcon("newWindowIcon");
if (is_connected)
setConnected(is_connected);
else
setPixmap(0, databaseDisconnectedIcon);
}
开发者ID:soundgnome,项目名称:mysqlcc,代码行数:25,代码来源:CDatabaseItem.cpp
示例5: Log
void IcyConnector::ProcessHeaders(const QString &hdrs)
{
QStringList f0;
QStringList f1;
QString txt;
f0=hdrs.split("\r\n");
if(f0[0]!="OK2") {
Log(LOG_WARNING,
QString().sprintf("login to \"%s:%d\" rejected: %s",
(const char *)hostHostname().toUtf8(),
0xFFFF&hostPort(),
(const char *)f0[0].toUtf8()));
return;
}
icy_authenticated=true;
WriteHeader("icy-name: "+streamName());
WriteHeader("icy-genre: "+streamGenre());
WriteHeader("icy-pub: "+QString().sprintf("%d",streamPublic()));
WriteHeader("icy-br: "+QString().sprintf("%u",audioBitrate()));
if(icy_protocol_version==1) {
WriteHeader("icy-url: "+streamUrl());
}
WriteHeader("icy-irc: "+streamIrc());
WriteHeader("icy-icq: "+streamIcq());
WriteHeader("icy-aim: "+streamAim());
WriteHeader("Content-Type: "+contentType());
WriteHeader("");
setConnected(true);
}
开发者ID:saschaludwig,项目名称:GlassCoder,代码行数:31,代码来源:icyconnector.cpp
示例6: memset
void WlanCoreImpl::cacheInterfaceInfo()
{
m_deviceOk = false;
memset(&m_deviceId, 0, sizeof(m_deviceId));
PWLAN_INTERFACE_INFO_LIST intfList;
if (ERROR_SUCCESS == m_wlanapi->WlanEnumInterfaces(m_wlanHandle, NULL, &intfList)) {
if (intfList->dwNumberOfItems > 0) {
const WLAN_INTERFACE_INFO *intf = intfList->InterfaceInfo + 0;
m_deviceOk = true;
m_deviceId = intf->InterfaceGuid;
m_deviceState = intf->isState;
m_deviceDesc = QString::fromWCharArray(intf->strInterfaceDescription);
}
m_wlanapi->WlanFreeMemory(intfList);
}
if (m_deviceOk) {
cacheRadioState();
cacheConnectionInfo();
} else {
setSoftwareEnabled(false);
setHardwareEnabled(false);
setEnabled(false);
setSsid(QString());
setMacAddress(QByteArray());
setSignalQuality(0);
setProfileName(QString());
setConnected(false);
}
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:30,代码来源:WlanCoreImpl.cpp
示例7: sizeof
void WlanCoreImpl::cacheConnectionInfo()
{
QString profileName;
QString ssid;
bool connected = false;
int signalQuality = 0;
QByteArray macAddress;
if (m_deviceOk) {
PWLAN_CONNECTION_ATTRIBUTES conn;
DWORD cb = sizeof(conn);
WLAN_OPCODE_VALUE_TYPE vt;
if (ERROR_SUCCESS == m_wlanapi->WlanQueryInterface(m_wlanHandle, &m_deviceId, wlan_intf_opcode_current_connection, NULL, &cb, reinterpret_cast<PVOID*>(&conn), &vt)) {
profileName = QString::fromWCharArray(conn->strProfileName).trimmed();
connected = (conn->isState == wlan_interface_state_connected);
ssid = QString::fromLatin1(reinterpret_cast<char*>(conn->wlanAssociationAttributes.dot11Ssid.ucSSID), conn->wlanAssociationAttributes.dot11Ssid.uSSIDLength);
signalQuality = conn->wlanAssociationAttributes.wlanSignalQuality;
macAddress = QByteArray(reinterpret_cast<char*>(conn->wlanAssociationAttributes.dot11Bssid), 6);
m_wlanapi->WlanFreeMemory(conn);
}
}
setSsid(ssid);
setMacAddress(macAddress);
setSignalQuality(signalQuality);
setProfileName(profileName);
setConnected(connected);
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:28,代码来源:WlanCoreImpl.cpp
示例8: catch
void DkCamControls::closeDeviceAndSetState() {
bool lvActive = false;
try {
lvActive = maidFacade->isLiveViewActive();
} catch (Maid::MaidError) {
lvActive = false;
}
if (lvActive) {
maidFacade->toggleLiveView();
liveViewTimer->stop();
// TODO: get the plugin viewport here?!
//viewport->setImage(QImage());
//emit updateImage(QImage()); // is setting an empty image here intentional?
}
try {
maidFacade->closeSource();
} catch (Maid::MaidError) {
// there is probably nothing left to close
}
connectedDeviceId.second = false;
setConnected(false);
updateUiValues();
}
开发者ID:alyosama,项目名称:nomacs-plugins,代码行数:26,代码来源:DkCamControls.cpp
示例9: dialog
void DkCamControls::onDeviceOpened() {
if (openDeviceProgressDialog) {
openDeviceProgressDialog->cancel();
}
try {
if (!maidFacade->isSourceAlive()) {
return;
}
if (!maidFacade->checkCameraType()) {
QMessageBox dialog(this);
dialog.setIcon(QMessageBox::Warning);
dialog.setText(tr("This program is not compatible with the selected camera model."));
dialog.show();
dialog.exec();
//qDebug() << tr("This program is not compatible with the selected camera model.");
closeDeviceAndSetState();
return;
}
setConnected(true);
updateUiValues();
} catch (Maid::MaidError e) {
qDebug() << tr("[ERROR] after opening device");
}
}
开发者ID:alyosama,项目名称:nomacs-plugins,代码行数:29,代码来源:DkCamControls.cpp
示例10: setConnected
void BioXASSSRLMonochromatorRegionControl::updateConnected()
{
bool slitsOK = ( maskUpperBlade_ && maskUpperBlade_->isConnected() && maskLowerBlade_ && maskLowerBlade_->isConnected() && maskBladesStatus_ && maskBladesStatus_->isConnected() );
bool paddleOK = (paddle_ && paddle_->isConnected());
bool paddleStatusOK = (paddleStatus_ && paddleStatus_->isConnected());
bool keyStatusOK = (keyStatus_ && keyStatus_->isConnected());
bool brakeStatusOK = (brakeStatus_ && brakeStatus_->isConnected());
bool braggOK = (bragg_ && bragg_->isConnected());
bool braggAtCrystalChangePositionStatusOK = (braggAtCrystalChangePositionStatus_ && braggAtCrystalChangePositionStatus_->isConnected());
bool crystalChangeOK = (crystalChange_ && crystalChange_->isConnected());
bool crystalChangeCWLimitStatusOK = (crystalChangeCWLimitStatus_ && crystalChangeCWLimitStatus_->isConnected());
bool crystalChangeCCWLimitStatusOK = (crystalChangeCCWLimitStatus_ && crystalChangeCCWLimitStatus_->isConnected());
bool regionAStatusOK = (regionAStatus_ && regionAStatus_->isConnected());
bool regionBStatusOK = (regionBStatus_ && regionBStatus_->isConnected());
bool isConnected = (
slitsOK &&
paddleOK &&
paddleStatusOK &&
keyStatusOK &&
brakeStatusOK &&
braggOK &&
braggAtCrystalChangePositionStatusOK &&
crystalChangeOK &&
crystalChangeCWLimitStatusOK &&
crystalChangeCCWLimitStatusOK &&
regionAStatusOK &&
regionBStatusOK
);
setConnected(isConnected);
}
开发者ID:acquaman,项目名称:acquaman,代码行数:32,代码来源:BioXASSSRLMonochromatorRegionControl.cpp
示例11: qDebug
int HidController::close() {
if (!isOpen()) {
qDebug() << "HID device" << getName() << "already closed";
return -1;
}
qDebug() << "Shutting down HID device" << getName();
// Stop the reading thread
if (m_pReader == NULL) {
qWarning() << "HidReader not present for" << getName()
<< "yet the device is open!";
} else {
disconnect(m_pReader, SIGNAL(incomingData(QByteArray, mixxx::Duration)),
this, SLOT(receive(QByteArray, mixxx::Duration)));
m_pReader->stop();
hid_set_nonblocking(m_pHidDevice, 1); // Quit blocking
controllerDebug(" Waiting on reader to finish");
m_pReader->wait();
delete m_pReader;
m_pReader = NULL;
}
// Stop controller engine here to ensure it's done before the device is closed
// incase it has any final parting messages
stopEngine();
// Close device
setConnected(false);
controllerDebug(" Closing device");
hid_close(m_pHidDevice);
setOpen(false);
return 0;
}
开发者ID:hile,项目名称:mixxx,代码行数:34,代码来源:hidcontroller.cpp
示例12: WideCharToMultiByte
void
Server::sendMessage(wstring* message)
{
if(isConnected())
{
int result = 0;
int mbsize = WideCharToMultiByte(CP_UTF8, 0, message->c_str(), static_cast<int>(message->length()), NULL, 0, NULL, NULL);
if (mbsize > 0)
{
char *szMessage = (char*)malloc(mbsize);
int bytes = WideCharToMultiByte(CP_UTF8, 0, message->c_str(), static_cast<int>(message->length()), szMessage, mbsize, NULL, NULL);
result = send(serverSocket, szMessage, bytes, 0);
DebugPrint(L"Capture-Server-sendMessage: Allocated: %i, Converted: %i, Sent: %i\n", mbsize, bytes, result);
if(result == SOCKET_ERROR)
{
DebugPrint(L"Capture-Server-sendMessage: Socket Error %i: %s\n", WSAGetLastError(), szMessage);
if(WSAGetLastError() == WSAENOTCONN)
{
setConnected(false);
}
}
free(szMessage);
}
}
}
开发者ID:ISergey256,项目名称:capture-hpc,代码行数:25,代码来源:Server.cpp
示例13: setConnected
void Ableton::setup(string abletonOscHost)
{
this->abletonOscHost = abletonOscHost;
sender.setup(abletonOscHost, ABLETON_OSC_PORT_OUT);
receiver.setup(ABLETON_OSC_PORT_IN);
setConnected(true);
setAutoUpdate(true);
setAutoDraw(true);
control.addToggle("Connected", &connected, this, &Ableton::eventSetConnected); // unusued
control.addButton("Refresh", this, &Ableton::eventRefresh);
GuiWidget *widgetGlobal = control.addWidget("Global");
widgetGlobal->addSlider("Tempo", &tempo, 4.0f, 999.0f, this, &Ableton::eventSetTempo);
widgetGlobal->addSlider("Time", &time, 4.0f, 999.0f, this, &Ableton::eventSetTime);
widgetGlobal->addSlider("Volume", &volume, 0.0f, 1.0f, this, &Ableton::eventSetVolume);
widgetGlobal->addSlider("Pan", &pan, -1.0f, 1.0f, this, &Ableton::eventSetPan);
widgetGlobal->addToggle("Overdub", &overdub, this, &Ableton::eventSetOverdub);
GuiWidget *widgetPlayback = control.addWidget("Playback");
widgetPlayback->addButton("Prev cue", this, &Ableton::eventPrevCue);
widgetPlayback->addButton("Next cue", this, &Ableton::eventNextCue);
widgetPlayback->addButton("Play", this, &Ableton::eventPlay);
widgetPlayback->addButton("Continue", this, &Ableton::eventPlayContinue);
widgetPlayback->addButton("Play selection", this, &Ableton::eventPlaySelection);
widgetPlayback->addButton("Stop", this, &Ableton::eventStop);
scanLiveSet();
// REFRESH OPTION!
// -> delete everything
// -> redo scanLiveSet
// CONNECTED variable
}
开发者ID:decebel,项目名称:OF-tools,代码行数:35,代码来源:AbletonLiveSet.cpp
示例14: printBytes
/**
* Initializes the temperature sensor.
* This method is called when the sensor is first created and also any time the sensor reports it's disconnected.
* If the result is TEMP_SENSOR_DISCONNECTED then subsequent calls to read() will also return TEMP_SENSOR_DISCONNECTED.
* Clients should attempt to re-initialize the sensor by calling init() again.
*/
bool OneWireTempSensor::init(){
// save address and pinNr for log messages
char addressString[17];
printBytes(sensorAddress, 8, addressString);
uint8_t pinNr = oneWire->pinNr();
bool success = false;
if (sensor==NULL) {
sensor = new DallasTemperature(oneWire);
if (sensor==NULL) {
logErrorString(ERROR_SRAM_SENSOR, addressString);
}
}
logDebug("init onewire sensor");
// This quickly tests if the sensor is connected and initializes the reset detection.
// During the main TempControl loop, we don't want to spend many seconds
// scanning each sensor since this brings things to a halt.
if (sensor && sensor->initConnection(sensorAddress) && requestConversion()) {
logDebug("init onewire sensor - wait for conversion");
waitForConversion();
temperature temp = readAndConstrainTemp();
DEBUG_ONLY(logInfoIntStringTemp(INFO_TEMP_SENSOR_INITIALIZED, pinNr, addressString, temp));
success = temp!=DEVICE_DISCONNECTED && requestConversion();
}
setConnected(success);
logDebug("init onewire sensor complete %d", success);
return success;
}
开发者ID:BrewPi,项目名称:brewpi-avr,代码行数:37,代码来源:OneWireTempSensor.cpp
示例15: joined
void JabberRoomChat::joined()
{
auto details = static_cast<ChatDetailsRoom *>(m_chat.details());
details->setConnected(true);
emit joined(m_chat);
}
开发者ID:vogel,项目名称:kadu,代码行数:7,代码来源:jabber-room-chat.cpp
示例16: connect
void Player::setConnectionThread(Thread *th) {
thread = th;
connect(this, SIGNAL(toClient(QString)), thread, SLOT(toClient(QString)));
connect(thread, SIGNAL(fromClient(QString)), this, SIGNAL(fromPlayer(QString)));
qDebug() << "Thread Set!";
setConnected(true);
}
开发者ID:gbschenkel,项目名称:KoolTruco,代码行数:7,代码来源:player.cpp
示例17: g
void AAPIO::checkForFileTimeout() {
Gate g(this, "checkForFileTimeout()");
QFile file("/dev/aap0");
bool exists = file.exists();
g.log() << "Exists" << exists;
setConnected(exists);
}
开发者ID:stevenbeeckman,项目名称:Presentations,代码行数:7,代码来源:AAPIO.cpp
示例18: qCDebug
void CloudConnection::onConnected()
{
qCDebug(dcCloud()) << "Connected to cloud proxy server" << m_proxyServerUrl.toString();
m_error = Cloud::CloudErrorNoError;
setConnected(true);
m_reconnectionTimer->stop();
}
开发者ID:ni-cc,项目名称:guh,代码行数:7,代码来源:cloudconnection.cpp
示例19: left
void JabberRoomChat::left()
{
auto details = static_cast<ChatDetailsRoom *>(m_chat.details());
details->setConnected(false);
emit left(m_chat);
}
开发者ID:vogel,项目名称:kadu,代码行数:7,代码来源:jabber-room-chat.cpp
示例20: setRollbackRslt
void WESplClient::onConnect()
{
//TODO
// update all the flags on Connect.
// alert data can be send now
// do not allow to connect back again.
// when reconnect happens, reset the variables
setRollbackRslt(0);
setCleanupRslt(0);
setCpiPassed(false);
setCpiFailed(false);
setContinue(true);
setConnected(true);
ByteStream bsWrite;
bsWrite << (ByteStream::byte) WE_CLT_SRV_KEEPALIVE;
try
{
this->write(bsWrite); // send the keep init keep alive
}
catch(...)
{
}
// need to send Alarm
fIpAddress = fClnt->addr2String();
}
开发者ID:hans511002,项目名称:erydb,代码行数:29,代码来源:we_splclient.cpp
注:本文中的setConnected函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论