本文整理汇总了C++中disconnect函数的典型用法代码示例。如果您正苦于以下问题:C++ disconnect函数的具体用法?C++ disconnect怎么用?C++ disconnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了disconnect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
void CMainWindow::connectSignals()
{
CChatManager *Manager = CChatManager::instance();
CNetworkClient *Network = CNetworkClient::instance();
CBattleManager *BattleManager = CBattleManager::instance();
connect(ui->ChatTabWidget->tabBar(), SIGNAL(tabCloseRequested(int)), Manager, SLOT(closeChannel(int)));
connect(ui->ChatTabWidget->tabBar(), SIGNAL(currentChanged(int)), Manager, SLOT(changeCurrentChannel(int)));
connect(ui->ChatTabWidget->tabBar(), SIGNAL(tabMoved(int,int)), Manager, SLOT(moveChannel(int,int)));
connect(Manager, SIGNAL(joined(CChannel*)), this, SLOT(createTab(CChannel*)));
connect(Manager, SIGNAL(closeTab(int)), this, SLOT(removeTab(int)));
connect(Manager, SIGNAL(currentChanged(CChannel*)), ui->ChatTabWidget->chatView(), SLOT(loadChannel(CChannel*)));
connect(ui->ChannelsView, SIGNAL(doubleClicked(QModelIndex)), CChatManager::instance(), SLOT(doubleClicked(QModelIndex)));
connect(ui->ChannelUserView, SIGNAL(doubleClicked(QModelIndex)),
CUserManager::instance()->chatModel(), SLOT(doubleClicked(QModelIndex)));
connect(ui->actionChatSend, SIGNAL(triggered()), this, SLOT(sendChat()));
connect(ui->actionBattleSend, SIGNAL(triggered()), this, SLOT(sendBattle()));
connect(Manager, SIGNAL(currentChanged(int)), ui->ChatTabWidget->tabBar(), SLOT(setCurrentIndex(int)));
connect(ui->BattleListView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
CBattleManager::instance(), SLOT(battleSelected(QModelIndex)));
connect(ui->BattleListView, SIGNAL(doubleClicked(QModelIndex)), CBattleManager::instance(), SLOT(doubleClicked(QModelIndex)));
connect(ui->BattlePreviewView, SIGNAL(doubleClicked(QModelIndex)),
CBattleManager::instance()->battlePreviewModel(), SLOT(doubleClicked(QModelIndex)));
connect(ui->actionConnect, SIGNAL(triggered()), this, SLOT(showConnectDialog()));
connect(&ConnectDialog, SIGNAL(connect(QString,int,QString,QString)), Network, SLOT(connectToServer(QString,int,QString,QString)));
connect(Network, SIGNAL(disconnected()), this, SLOT(networkDisconnected()));
connect(Network, SIGNAL(connected()), this, SLOT(networkConnected()));
connect(Network, SIGNAL(multiplayerDisabled()), this, SLOT(disableMultiplayerGUI()));
connect(Network, SIGNAL(multiplayerEnabled()), this, SLOT(enableMultiplayerGUI()));
connect(ui->actionDisconnect, SIGNAL(triggered()), Network, SLOT(disconnect()));
connect(CBattleManager::instance(), SIGNAL(currentMapChanged(CMap*)), ui->MapInfo, SLOT(setMap(CMap*)));
connect(CBattleroomManager::instance(), SIGNAL(mapChanged(CMap*)), ui->BattleMapInfo, SLOT(setMap(CMap*)));
connect(CBattleroomManager::instance(), SIGNAL(updateChat(CChannel*)), ui->BattleChatText, SLOT(loadChannel(CChannel*)));
connect(CBattleroomManager::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(ui->LeaveBattleButton, SIGNAL(clicked()), CBattleroomManager::instance(), SLOT(leaveBattle()));
connect(ui->DownloadButton, SIGNAL(clicked()), this, SLOT(execDownload()));
connect(ui->actionDeleteDownload, SIGNAL(triggered()), this, SLOT(removeDownload()));
connect(ui->actionDownloadMap, SIGNAL(triggered()), BattleManager, SLOT(downloadMapForBattle()));
connect(ui->actionDownloadMod, SIGNAL(triggered()), BattleManager, SLOT(downloadModForBattle()));
connect(ui->DownloadView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showDownloadContextMenu(QPoint)));
connect(ui->BattleListView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showBattleContextMenu(QPoint)));
connect(Network, SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(CDownloadManager::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(Manager, SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(CDownloadManager::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(Network, SIGNAL(agreement(QString)), this, SLOT(showAgreement(QString)));
connect(ui->actionReloadUnitSync, SIGNAL(triggered()), CUnitSync::instance(), SLOT(reload()));
connect(CUnitSync::instance(), SIGNAL(error(int,QString)), this, SLOT(error(int,QString)));
connect(CUserManager::instance(), SIGNAL(lobbyUserBattleStatusChanged(CBattleStatus*)),
this, SLOT(updateBattleStatus(CBattleStatus*)));
connect(CUnitSync::instance(), SIGNAL(loaded()), this, SLOT(unitsyncLoaded()));
connect(CUnitSync::instance(), SIGNAL(unloaded()), this, SLOT(unitsyncUnloaded()));
connect(ui->actionUpdateStatus, SIGNAL(triggered()), this, SLOT(changeBattleStatus()));
connect(CBattleroomManager::instance(), SIGNAL(battleJoined(CBattle*)), this, SLOT(enableBattleroom(CBattle*)));
connect(CBattleroomManager::instance(), SIGNAL(battleClosed()), this, SLOT(disableBattleroom()));
connect(CBattleroomManager::instance(), SIGNAL(gameStarted()), this, SLOT(lockBattleroom()));
connect(CBattleroomManager::instance(), SIGNAL(gameEnded()), this, SLOT(unlockBattleroom()));
connect(CBattleroomManager::instance(), SIGNAL(battleStarted()), this, SLOT(onBattleStarted()));
connect(CBattleroomManager::instance(), SIGNAL(battleEnded()), this, SLOT(onBattleEnded()));
connect(ui->SelectColorButton, SIGNAL(clicked()), this, SLOT(selectColor()));
connect(ui->StartBattleButton, SIGNAL(clicked()), CBattleroomManager::instance(), SLOT(startGame()));
connect(&ColorDialog, SIGNAL(colorSelected(QColor)), this, SLOT(colorSelected(QColor)));
}
示例2: disconnect
VisualDebugger::~VisualDebugger()
{
disconnect();
}
示例3: disconnect
void stringListEntryWidget::setAllWidgets(QList<stringListEntryWidget*> widgets)
{
disconnect(0, 0, this, SLOT(verify())) ;
newValue->setValidator(new stringListEntryValidator(widgets, this)) ;
}
示例4: connect
/*
* Establish connection for tip
*
* If DU is true, we should dial an ACU whose type is AT.
* The phone numbers are in PN, and the call unit is in CU.
*
* If the PN is an '@', then we consult the PHONES file for
* the phone numbers. This file is /etc/phones, unless overriden
* by an exported shell variable.
*
* The data base files must be in the format:
* host-name[ \t]*phone-number
* with the possibility of multiple phone numbers
* for a single host acting as a rotary (in the order
* found in the file).
*/
char *
connect(void)
{
char *cp = PN;
char *phnum, string[256];
FILE *fd;
int tried = 0;
if (!DU) { /* regular connect message */
if (CM != NULL)
xpwrite(FD, CM, size(CM));
logent(value(HOST), "", DV, "call completed");
return (NULL);
}
/*
* @ =>'s use data base in PHONES environment variable
* otherwise, use /etc/phones
*/
signal(SIGINT, acuabort);
signal(SIGQUIT, acuabort);
if (setjmp(jmpbuf)) {
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
printf("\ncall aborted\n");
logent(value(HOST), "", "", "call aborted");
if (acu != NULL) {
boolean(value(VERBOSE)) = FALSE;
if (conflag)
disconnect(NULL);
else
(*acu->acu_abort)();
}
return ("interrupt");
}
if ((acu = acutype(AT)) == NULL)
return ("unknown ACU type");
if (*cp != '@') {
while (*cp) {
for (phnum = cp; *cp && *cp != ','; cp++)
;
if (*cp)
*cp++ = '\0';
if ((conflag = (*acu->acu_dialer)(phnum, CU))) {
if (CM != NULL)
xpwrite(FD, CM, size(CM));
logent(value(HOST), phnum, acu->acu_name,
"call completed");
return (NULL);
} else
logent(value(HOST), phnum, acu->acu_name,
"call failed");
tried++;
}
} else {
if ((fd = fopen(PH, "r")) == NULL) {
printf("%s: ", PH);
return ("can't open phone number file");
}
while (fgets(string, sizeof(string), fd) != NULL) {
for (cp = string; !any(*cp, " \t\n"); cp++)
;
if (*cp == '\n') {
fclose(fd);
return ("unrecognizable host name");
}
*cp++ = '\0';
if (strcmp(string, value(HOST)))
continue;
while (any(*cp, " \t"))
cp++;
if (*cp == '\n') {
fclose(fd);
return ("missing phone number");
}
for (phnum = cp; *cp && *cp != ',' && *cp != '\n'; cp++)
;
if (*cp)
*cp++ = '\0';
if ((conflag = (*acu->acu_dialer)(phnum, CU))) {
fclose(fd);
if (CM != NULL)
xpwrite(FD, CM, size(CM));
//.........这里部分代码省略.........
示例5: readyToAnimate
void QQuickAnimatorProxyJob::sceneGraphInitialized()
{
readyToAnimate();
disconnect(this, SLOT(sceneGraphInitialized()));
}
示例6: disconnect
QtConnectionOwner::~QtConnectionOwner() {
disconnect();
}
示例7: disconnect
void FormJoinGame::hide()
{
disconnect(TcpGameConnectionClient::instance(), &TcpGameConnectionClient::notifyError, this, &FormJoinGame::gameJoinError);
Form::hide();
}
示例8: connect
void PureMaid::changeSelfMode(int mode)
{
for(int i = 0;i < cardNum;i++)
{
for(int j = 0;j < cardNum;j++)
{
if(i != j)
{
connect(cardButton[i],SIGNAL(changeClicked()),cardButton[j],SLOT(cancelX()));
}
}
for(int j = 0;j < 6;j++)
{
if(paintStructX->gameCharacter[5]->color != paintStructX->gameCharacter[j]->color)
{
connect(cardButton[i],SIGNAL(changeClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(recoverClick()));
connect(cardButton[i],SIGNAL(notClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(cancelClick()));
}
}
}
for(int i = 0;i < 6;i++)
{
connect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(changeClicked()),ensure,SLOT(recoverClick()));
connect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(notClicked()),ensure,SLOT(cancelClick()));
for(int j = 0;j < 6;j ++)
{
if(i != j)
{
connect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(changeClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(cancelX()));
}
}
}
cancel->canBeClicked = true;
switch(mode)
{
case 4://治疗术响应阶段
{
cancel->canBeClicked = false;
//system("pause");
//system("pause");
for(int i = 0;i < cardNum;i++)
{
if(cardList->getSkillOne(card[i]) == 61)
{
cardButton[i]->canBeClicked = true;
}
}
for(int i = 0;i < cardNum;i++)
{
for(int j = 0;j < 6;j++)
{
if(paintStructX->gameCharacter[5]->color != paintStructX->gameCharacter[j]->color)
{
disconnect(cardButton[i],SIGNAL(changeClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(recoverClick()));
disconnect(cardButton[i],SIGNAL(notClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(cancelClick()));
}
connect(cardButton[i],SIGNAL(changeClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(recoverClick()));
connect(cardButton[i],SIGNAL(notClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(cancelClick()));
}
}
//disconnect(ensure,SIGNAL(changeClicked()),this,SLOT(selfReset()));
break;
}
case 5://治愈之光响应阶段
{
cancel->canBeClicked = false;
for(int i = 0;i < 6;i++)
{
disconnect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(changeClicked()),ensure,SLOT(recoverClick()));
disconnect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(notClicked()),ensure,SLOT(cancelClick()));
for(int j = 0;j < 6;j ++)
{
if(i != j)
{
disconnect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(changeClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(cancelX()));
}
}
}
for(int i = 0;i < cardNum;i++)
{
if(cardList->getSkillOne(card[i]) == 62)
{
cardButton[i]->canBeClicked = true;
}
}
for(int i = 0;i < 6;i++)
{
connect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(changeClicked()),this,SLOT(countPlus()));
connect(paintStructX->gameCharacter[i]->characterPic,SIGNAL(notClicked()),this,SLOT(countMinus()));
}
for(int i = 0;i < cardNum;i++)
{
for(int j = 0;j < 6;j++)
{
if(paintStructX->gameCharacter[5]->color != paintStructX->gameCharacter[j]->color)
{
disconnect(cardButton[i],SIGNAL(changeClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(recoverClick()));
disconnect(cardButton[i],SIGNAL(notClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(cancelClick()));
}
connect(cardButton[i],SIGNAL(changeClicked()),paintStructX->gameCharacter[j]->characterPic,SLOT(recoverClick()));
//.........这里部分代码省略.........
示例9: disconnect
StreamAdapter::~StreamAdapter() {
disconnect();
}
示例10: disconnect
void QgsMapToolAdvancedDigitizing::deactivate()
{
QgsMapToolEdit::deactivate();
disconnect( mCadDockWidget, SIGNAL( pointChanged( QgsPoint ) ), this, SLOT( cadPointChanged( QgsPoint ) ) );
mCadDockWidget->disable();
}
示例11: disconnect
WebSocketsClient::~WebSocketsClient() {
disconnect();
}
示例12: disconnect
WorkerThreadableWebSocketChannel::Bridge::~Bridge()
{
disconnect();
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:4,代码来源:WorkerThreadableWebSocketChannel.cpp
示例13: QDialog
LBMUIMFlowDialog::LBMUIMFlowDialog(QWidget * parent, capture_file * cfile) :
QDialog(parent),
m_ui(new Ui::LBMUIMFlowDialog),
m_capture_file(cfile),
m_num_items(0),
m_packet_num(0),
m_node_label_width(20)
{
m_ui->setupUi(this);
QCustomPlot * sp = m_ui->sequencePlot;
m_sequence_diagram = new SequenceDiagram(sp->yAxis, sp->xAxis2, sp->yAxis2);
sp->addPlottable(m_sequence_diagram);
sp->axisRect()->setRangeDragAxes(sp->xAxis2, sp->yAxis);
sp->xAxis->setVisible(false);
sp->xAxis->setPadding(0);
sp->xAxis->setLabelPadding(0);
sp->xAxis->setTickLabelPadding(0);
sp->xAxis2->setVisible(true);
sp->yAxis2->setVisible(true);
m_one_em = QFontMetrics(sp->yAxis->labelFont()).height();
m_ui->horizontalScrollBar->setSingleStep(100 / m_one_em);
m_ui->verticalScrollBar->setSingleStep(100 / m_one_em);
sp->setInteractions(QCP::iRangeDrag);
m_ui->gridLayout->setSpacing(0);
connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), sp->yAxis2, SLOT(setRange(QCPRange)));
m_context_menu.addAction(m_ui->actionReset);
m_context_menu.addSeparator();
m_context_menu.addAction(m_ui->actionMoveRight10);
m_context_menu.addAction(m_ui->actionMoveLeft10);
m_context_menu.addAction(m_ui->actionMoveUp10);
m_context_menu.addAction(m_ui->actionMoveDown10);
m_context_menu.addAction(m_ui->actionMoveRight1);
m_context_menu.addAction(m_ui->actionMoveLeft1);
m_context_menu.addAction(m_ui->actionMoveUp1);
m_context_menu.addAction(m_ui->actionMoveDown1);
m_context_menu.addSeparator();
m_context_menu.addAction(m_ui->actionGoToPacket);
memset(&m_sequence_analysis, 0, sizeof(m_sequence_analysis));
m_ui->showComboBox->blockSignals(true);
m_ui->showComboBox->setCurrentIndex(0);
m_ui->showComboBox->blockSignals(false);
m_sequence_analysis.all_packets = TRUE;
m_sequence_analysis.any_addr = TRUE;
QPushButton * save_bt = m_ui->buttonBox->button(QDialogButtonBox::Save);
save_bt->setText(tr("Save As..."));
// XXX Use recent settings instead
if (parent)
{
resize(parent->width(), parent->height() * 4 / 5);
}
connect(m_ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int)));
connect(m_ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vScrollBarChanged(int)));
connect(sp->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(xAxisChanged(QCPRange)));
connect(sp->yAxis, SIGNAL(rangeChanged(QCPRange)), this, SLOT(yAxisChanged(QCPRange)));
connect(sp, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(diagramClicked(QMouseEvent*)));
connect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*)));
connect(sp, SIGNAL(mouseRelease(QMouseEvent*)), this, SLOT(mouseReleased(QMouseEvent*)));
connect(this, SIGNAL(goToPacket(int)), m_sequence_diagram, SLOT(setSelectedPacket(int)));
disconnect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
fillDiagram();
}
示例14: disconnect
void base_lco::disconnect_nonvirt(naming::id_type const & id)
{
disconnect(id);
}
示例15: disconnect
TelemetryDataRF::~TelemetryDataRF()
{
disconnect();
}