void NetworkConfig::load(const Settings &r) { loadCheckBox(qcbTcpMode, s.bTCPCompat); loadCheckBox(qcbQoS, s.bQoS); loadCheckBox(qcbAutoReconnect, s.bReconnect); loadCheckBox(qcbAutoConnect, s.bAutoConnect); loadCheckBox(qcbSuppressIdentity, s.bSuppressIdentity); loadComboBox(qcbType, s.ptProxyType); qleHostname->setText(r.qsProxyHost); if (r.usProxyPort > 0) { QString port; port.setNum(r.usProxyPort); qlePort->setText(port); } else qlePort->setText(QString()); qleUsername->setText(r.qsProxyUsername); qlePassword->setText(r.qsProxyPassword); loadCheckBox(qcbImageDownload, r.iMaxImageSize <= 0); loadCheckBox(qcbAutoUpdate, r.bUpdateCheck); loadCheckBox(qcbPluginUpdate, r.bPluginOverlayCheck); loadCheckBox(qcbUsage, r.bUsage); #if defined(SNAPSHOT_BUILD) && defined(QT_NO_DEBUG) qcbAutoUpdate->setEnabled(false); qcbAutoUpdate->setToolTip(tr("Updates are mandatory when using snapshot releases.")); #endif }
void LookConfig::load(const Settings &r) { loadComboBox(qcbLanguage, 0); loadComboBox(qcbChannelDrag, 0); loadComboBox(qcbUserDrag, 0); // Load Layout checkbox state switch (r.wlWindowLayout) { case Settings::LayoutClassic: qrbLClassic->setChecked(true); break; case Settings::LayoutStacked: qrbLStacked->setChecked(true); break; case Settings::LayoutHybrid: qrbLHybrid->setChecked(true); break; case Settings::LayoutCustom: default: s.wlWindowLayout = Settings::LayoutCustom; qrbLCustom->setChecked(true); break; } qcbLockLayout->setEnabled(r.wlWindowLayout==Settings::LayoutCustom); for (int i=0;i<qcbLanguage->count();i++) { if (qcbLanguage->itemData(i).toString() == r.qsLanguage) { loadComboBox(qcbLanguage, i); break; } } loadComboBox(qcbAlwaysOnTop, r.aotbAlwaysOnTop); loadComboBox(qcbExpand, r.ceExpand); loadComboBox(qcbChannelDrag, r.ceChannelDrag); loadComboBox(qcbUserDrag, r.ceUserDrag); loadCheckBox(qcbUsersTop, r.bUserTop); loadCheckBox(qcbAskOnQuit, r.bAskOnQuit); loadCheckBox(qcbEnableDeveloperMenu, r.bEnableDeveloperMenu); loadCheckBox(qcbLockLayout, (r.wlWindowLayout==Settings::LayoutCustom)&&r.bLockLayout); loadCheckBox(qcbHideTray, r.bHideInTray); loadCheckBox(qcbStateInTray, r.bStateInTray); loadCheckBox(qcbShowUserCount, r.bShowUserCount); loadCheckBox(qcbShowContextMenuInMenuBar, r.bShowContextMenuInMenuBar); loadCheckBox(qcbShowTransmitModeComboBox, r.bShowTransmitModeComboBox); loadCheckBox(qcbHighContrast, r.bHighContrast); loadCheckBox(qcbChatBarUseSelection, r.bChatBarUseSelection); loadCheckBox(qcbFilterHidesEmptyChannels, r.bFilterHidesEmptyChannels); const boost::optional<ThemeInfo::StyleInfo> configuredStyle = Themes::getConfiguredStyle(r); reloadThemes(configuredStyle); }
PersistentConnection::PersistentConnection(QWidget *parent) : QDialog(parent), ui(new Ui::PersistentConnection) { ui->setupUi(this); setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); suppressSlot = true; QDEBUG(); sendPacket.clear(); QDEBUG() << ": refreshTimer Connection attempt " << connect ( &refreshTimer , SIGNAL ( timeout() ) , this, SLOT ( refreshTimerTimeout ( ) ) ) << connect ( this , SIGNAL ( rejected() ) , this, SLOT ( aboutToClose ( ) ) ) << connect ( this , SIGNAL ( accepted() ) , this, SLOT ( aboutToClose ( ) ) ) << connect ( this , SIGNAL ( dialogIsClosing() ) , this, SLOT ( aboutToClose ( ) ) ); QDEBUG() << "Setup timer"; refreshTimer.setInterval(200); refreshTimer.start(); trafficList.clear(); startTime = QDateTime::currentDateTime(); wasConnected = false; stopTimer = false; ui->searchEdit->setText(""); loadComboBox(); useraw = true; ui->asciiLineEdit->setFocus(); suppressSlot = false; }