GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — sqlitebrowser/src/ProxyDialog.cpp at master · sqlitebrowser/sqlitebrowser Expand file tree/ Copy pathProxyDialog.cppMore file actions 57 lines (49 loc) · 2.38 KB / Copy pathProxyDialog.cppFile metadata and controls57 lines (49 loc) · 2.38 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 #include "ProxyDialog.h" #include "ui_ProxyDialog.h" #include "Settings.h" ProxyDialog::ProxyDialog(QWidget *parent) : QDialog(parent), ui(new Ui::ProxyDialog) { ui->setupUi(this); // Add different proxy types. We use user data strings for addressing them later ui->comboType->addItem(tr("None"), "none"); ui->comboType->addItem(tr("System settings"), "system"); ui->comboType->addItem(tr("HTTP"), "http"); ui->comboType->addItem(tr("SOCKS5"), "socks5"); // Load current settings ui->comboType->setCurrentIndex(ui->comboType->findData(Settings::getValue("proxy", "type").toString())); ui->editHost->setText(Settings::getValue("proxy", "host").toString()); ui->spinPort->setValue(Settings::getValue("proxy", "port").toInt()); ui->checkAuthentication->setChecked(Settings::getValue("proxy", "authentication").toBool()); ui->editUser->setText(Settings::getValue("proxy", "user").toString()); ui->editPassword->setText(Settings::getValue("proxy", "password").toString()); } ProxyDialog::~ProxyDialog() { delete ui; } void ProxyDialog::proxyTypeChanged(int /*new_index*/) { // When selecting the "None" or "System settings" proxy types, disable all the other input fields bool proxy_configuration = (ui->comboType->currentData() != "none" && ui->comboType->currentData() != "system"); ui->editHost->setEnabled(proxy_configuration); ui->spinPort->setEnabled(proxy_configuration); ui->checkAuthentication->setEnabled(proxy_configuration); ui->editUser->setEnabled(ui->checkAuthentication->isChecked() && proxy_configuration); // Enable user name and password only if the... ui->editPassword->setEnabled(ui->checkAuthentication->isChecked() && proxy_configuration); // ... Authentication Required checkbox is checked } void ProxyDialog::authenticationRequiredChanged(bool required) { ui->editUser->setEnabled(required); ui->editPassword->setEnabled(required); } void ProxyDialog::saveSettings() const { Settings::setValue("proxy", "type", ui->comboType->currentData()); Settings::setValue("proxy", "host", ui->editHost->text()); Settings::setValue("proxy", "port", ui->spinPort->value()); Settings::setValue("proxy", "authentication", ui->checkAuthentication->isChecked()); Settings::setValue("proxy", "user", ui->editUser->text()); Settings::setValue("proxy", "password", ui->editPassword->text()); } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |