ServerDialog::ServerDialog(QWidget *parent) : ConfigPage(parent) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); connect(ui.mixologyServer, SIGNAL(editingFinished()), this, SLOT(editedServer())); connect(ui.disableAutoConfig, SIGNAL(clicked(bool)), this, SLOT(autoConfigClicked(bool))); /* Setup display */ QSettings settings(*mainSettings, QSettings::IniFormat, this); /* Load up actual port number */ PeerDetails detail; if (peers->getPeerDetails(peers->getOwnLibraryMixerId(), detail)) { ui.portNumber->setValue(detail.localPort); } ui.portNumber->setMinimum(Peers::MIN_PORT); ui.portNumber->setMaximum(Peers::MAX_PORT); if (settings.value("Network/AutoOrPort", DEFAULT_NETWORK_AUTO_OR_PORT) == DEFAULT_NETWORK_AUTO_OR_PORT) { ui.disableAutoConfig->setChecked(false); autoConfigClicked(false); } else { ui.disableAutoConfig->setChecked(true); autoConfigClicked(true); } QSettings serverSettings(*startupSettings, QSettings::IniFormat, this); ui.mixologyServer->setText(serverSettings.value("MixologyServer", DEFAULT_MIXOLOGY_SERVER).toString()); showAdvanced(settings.value("Gui/ShowAdvanced", DEFAULT_SHOW_ADVANCED).toBool()); }
void IpWidget::clear() { ui->checkBox_ip->setCheckState(Qt::Checked); ui->comboBox_ip->setCurrentIndex(0); ipEnable(ui->checkBox_ip->checkState()); changeIpMode(ui->comboBox_ip->currentText()); ui->lineEdit_ipAddress->clear(); ui->listWidget_ipAddress->setCurrentRow(-1); ui->listWidget_ipAddress->clear(); ui->lineEdit_gateway->clear(); ui->lineEdit_ipRoutes->clear(); ui->lineEdit_ipRoutes2->clear(); ui->listWidget_ipRoutes->setCurrentRow(-1); ui->listWidget_ipRoutes->clear(); ui->checkBox_ip6->setCheckState(Qt::Unchecked); ui->comboBox_ip6->setCurrentIndex(0); ip6Enable(ui->checkBox_ip6->checkState()); changeIp6Mode(ui->comboBox_ip6->currentText()); ui->lineEdit_ipAddress6->clear(); ui->listWidget_ipAddress6->setCurrentRow(-1); ui->listWidget_ipAddress6->clear(); ui->lineEdit_gateway6->clear(); ui->lineEdit_ipRoutes6->clear(); ui->lineEdit_ipRoutes62->clear(); ui->listWidget_ipRoutes6->setCurrentRow(-1); ui->listWidget_ipRoutes6->clear(); ui->lineEdit_custom->clear(); ui->listWidget_custom->clear(); ui->lineEdit_hostname->clear(); ui->spinBox_timeoutDad->setValue(3); ui->comboBox_dhcp->setCurrentIndex(0); changeDhcpClient(ui->comboBox_dhcp->currentText()); ui->lineEdit_dhcpcdOpt->clear(); ui->lineEdit_dhclientOpt->clear(); ui->lineEdit_dhclientOpt6->clear(); ui->spinBox_timeoutDhcp->setValue(30); ui->checkBox_dhcp->setCheckState(Qt::Unchecked); ui->lineEdit_dns->clear(); ui->listWidget_dns->setCurrentRow(-1); ui->listWidget_dns->clear(); ui->lineEdit_dnsDomain->clear(); ui->lineEdit_dnsSearch->clear(); ui->lineEdit_dnsOptions->clear(); ui->listWidget_dnsOptions->setCurrentRow(-1); ui->listWidget_dnsOptions->clear(); ui->pushButton_ipAdvanced->setChecked(false);; showAdvanced(); }
void MobileWidget::clear() { ui->lineEdit_username->clear(); ui->lineEdit_password->clear(); ui->lineEdit_apn->clear(); ui->lineEdit_pin->clear(); ui->comboBox_mode->setCurrentIndex(0); ui->spinBox_fail->setValue(5); ui->checkBox_route->setCheckState(Qt::Checked); ui->checkBox_dns->setCheckState(Qt::Checked); ui->lineEdit_options->clear(); ui->pushButton_mobileAdvanced->setChecked(false);; showAdvanced(); }
void GeneralWidget::clear() { ui->lineEdit_description->setText(QString("Generated by Netctl GUI")); ui->comboBox_connection->setCurrentIndex(0); ui->comboBox_interface->clear(); ui->comboBox_interface->addItems(ifaceDirectory->entryList(QDir::Dirs | QDir::NoDotAndDotDot)); ui->comboBox_bindto->clear(); ui->comboBox_bindto->addItems(ifaceDirectory->entryList(QDir::Dirs | QDir::NoDotAndDotDot)); ui->listWidget_bindto->setCurrentRow(-1); ui->listWidget_bindto->clear(); ui->comboBox_after->clear(); ui->comboBox_after->addItems(profileDirectory->entryList(QDir::Files)); ui->listWidget_after->setCurrentRow(-1); ui->listWidget_after->clear(); ui->lineEdit_execUpPost->clear(); ui->lineEdit_execDownPre->clear(); ui->checkBox_forceConnect->setCheckState(Qt::Unchecked); ui->checkBox_debug->setCheckState(Qt::Unchecked); ui->pushButton_generalAdvanced->setChecked(false); showAdvanced(); }
void PppoeWidget::clear() { ui->lineEdit_username->clear(); ui->lineEdit_password->clear(); ui->comboBox_connection->setCurrentIndex(0); changeMode(ui->comboBox_connection->currentText()); ui->spinBox_timeout->setValue(300); ui->spinBox_fail->setValue(5); ui->checkBox_route->setCheckState(Qt::Checked); ui->checkBox_dns->setCheckState(Qt::Checked); ui->lineEdit_unit->clear(); ui->spinBox_lcpInterval->setValue(30); ui->spinBox_lcpFailure->setValue(4); ui->lineEdit_options->clear(); ui->lineEdit_service->clear(); ui->lineEdit_ac->clear(); ui->lineEdit_session->clear(); ui->lineEdit_mac->clear(); ui->checkBox_ipv6->setCheckState(Qt::Unchecked); ui->pushButton_pppoeAdvanced->setChecked(false);; showAdvanced(); }
void HintsConfigurationUiHandler::mainConfigurationWindowCreated(MainConfigurationWindow *mainConfigurationWindow) { connect(mainConfigurationWindow, SIGNAL(destroyed()), this, SLOT(mainConfigurationWindowDestroyed())); connect(mainConfigurationWindow->widget()->widgetById("hints/advanced"), SIGNAL(clicked()), this, SLOT(showAdvanced())); connect(mainConfigurationWindow->widget()->widgetById("hints/showContent"), SIGNAL(toggled(bool)), mainConfigurationWindow->widget()->widgetById("hints/showContentCount"), SLOT(setEnabled(bool))); connect(mainConfigurationWindow->widget()->widgetById("toolTipClasses"), SIGNAL(currentIndexChanged(const QString &)), this, SLOT(toolTipClassesHighlighted(const QString &))); ConfigGroupBox *toolTipBox = mainConfigurationWindow->widget()->configGroupBox("Look", "Buddy List", "General"); QWidget *configureHint = new QWidget(toolTipBox->widget()); overUserConfigurationPreview = new QFrame(configureHint); QHBoxLayout *lay = new QHBoxLayout(overUserConfigurationPreview); lay->setMargin(10); lay->setSizeConstraint(QLayout::SetFixedSize); overUserConfigurationTipLabel = new QLabel(overUserConfigurationPreview); overUserConfigurationTipLabel->setTextFormat(Qt::RichText); overUserConfigurationTipLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); overUserConfigurationTipLabel->setContentsMargins(10, 10, 10, 10); lay->addWidget(overUserConfigurationTipLabel); configureOverUserHint = new QPushButton(tr("Configure")); connect(configureOverUserHint, SIGNAL(clicked()), this, SLOT(showOverUserConfigurationWindow())); Buddy example = Buddy::dummy(); if (!example.isNull()) hint_manager->prepareOverUserHint(overUserConfigurationPreview, overUserConfigurationTipLabel, example); lay = new QHBoxLayout(configureHint); lay->addWidget(overUserConfigurationPreview); lay->addWidget(configureOverUserHint); toolTipBox->addWidgets(new QLabel(tr("Hint over buddy list: ")), configureHint); }