networkDialog::networkDialog(MainWindow *parent, gpibSocket *gpibSocket) : QDialog(parent), ui(new Ui::networkDialog) { ui->setupUi(this); w=parent; this->gpib=gpibSocket; connect(ui->lockButton,SIGNAL(toggled(bool)),this,SLOT(lockCurrentServer(bool))); connect(ui->searchButton,SIGNAL(clicked()),this,SLOT(searchServers())); connect(gpib,SIGNAL(serverFound(QHostAddress)),this,SLOT(serverFound(QHostAddress))); connect(this,SIGNAL(accepted()),this,SLOT(setCurrentServer())); connect(gpib,SIGNAL(serverIdleRunning(bool)),this,SLOT(setServerStatus(bool))); connect(gpib,SIGNAL(serverInterval(int)),this,SLOT(setServerInterval(int))); connect(ui->refreshButton,SIGNAL(clicked()),SLOT(refreshButtonClicked())); connect(ui->startStopButton,SIGNAL(clicked(bool)),SLOT(startStopButtonClicked(bool))); if (!gpib->getServerAddress().isNull()) { ui->serversComboBox->insertItem(0,gpib->getServerAddress().toString()); ui->lockButton->setChecked(true); ui->settingsGroupBox->setEnabled(true); this->refreshButtonClicked(); } else { gpib->scan(); } }
void OptionsServerPage::addNewServer() { DVRServer *server = m_serverRepository->createServer(tr("New Server")); server->configuration().setAutoConnect(true); server->configuration().setPort(7001); server->configuration().setConnectionType(DVRServerConnectionType::RTSP); if (!m_serversView->currentIndex().isValid()) saveChanges(server); setCurrentServer(server); m_nameEdit->setFocus(); m_nameEdit->selectAll(); }
void NetworkItem::attachNetwork(Network *network) { if (!network) return; _network = network; connect(network, SIGNAL(networkNameSet(QString)), this, SLOT(setNetworkName(QString))); connect(network, SIGNAL(currentServerSet(QString)), this, SLOT(setCurrentServer(QString))); connect(network, SIGNAL(ircChannelAdded(IrcChannel *)), this, SLOT(attachIrcChannel(IrcChannel *))); connect(network, SIGNAL(ircUserAdded(IrcUser *)), this, SLOT(attachIrcUser(IrcUser *))); connect(network, SIGNAL(connectedSet(bool)), this, SIGNAL(networkDataChanged())); connect(network, SIGNAL(destroyed()), this, SLOT(onNetworkDestroyed())); emit networkDataChanged(); }
void ScriptWidget::setup(const MongoShellExecResult &execResult) { setCurrentDatabase(execResult.currentDatabase(), execResult.isCurrentDatabaseValid()); setCurrentServer(execResult.currentServer(), execResult.isCurrentServerValid()); }