440 BtnAssociateFiles->setText(QPushButton::tr("Associate file extensions")); |
440 BtnAssociateFiles->setText(QPushButton::tr("Associate file extensions")); |
441 BtnAssociateFiles->setVisible(!custom_data && !custom_config); |
441 BtnAssociateFiles->setVisible(!custom_data && !custom_config); |
442 gbCLayout->addWidget(BtnAssociateFiles); |
442 gbCLayout->addWidget(BtnAssociateFiles); |
443 } |
443 } |
444 |
444 |
445 page2Layout->addWidget(new QWidget(this), 1, 0); |
445 { |
|
446 IconedGroupBox * gbProxy = new IconedGroupBox(this); |
|
447 gbProxy->setIcon(QIcon(":/res/Settings.png")); |
|
448 gbProxy->setTitle(QGroupBox::tr("Proxy settings")); |
|
449 page2Layout->addWidget(gbProxy, 1, 0); |
|
450 QGridLayout * gbLayout = new QGridLayout(gbProxy); |
|
451 |
|
452 QStringList sl; |
|
453 sl |
|
454 << tr("Proxy host") |
|
455 << tr("Proxy port") |
|
456 << tr("Proxy login") |
|
457 << tr("Proxy password") |
|
458 ; |
|
459 for(int i = 0; i < sl.size(); ++i) |
|
460 { |
|
461 QLabel * l = new QLabel(gbProxy); |
|
462 l->setText(sl[i]); |
|
463 gbLayout->addWidget(l, i + 1, 0); |
|
464 } |
|
465 |
|
466 cbProxyType = new QComboBox(gbProxy); |
|
467 cbProxyType->addItems(QStringList() |
|
468 << tr("No proxy") |
|
469 << tr("Socks5 proxy") |
|
470 << tr("HTTP proxy")); |
|
471 gbLayout->addWidget(cbProxyType, 0, 1); |
|
472 |
|
473 leProxy = new QLineEdit(gbProxy); |
|
474 gbLayout->addWidget(leProxy, 1, 1); |
|
475 |
|
476 sbProxyPort = new QSpinBox(gbProxy); |
|
477 sbProxyPort->setMaximum(65535); |
|
478 gbLayout->addWidget(sbProxyPort, 2, 1); |
|
479 |
|
480 leProxyLogin = new QLineEdit(gbProxy); |
|
481 gbLayout->addWidget(leProxyLogin, 3, 1); |
|
482 |
|
483 leProxyPassword = new QLineEdit(gbProxy); |
|
484 leProxyPassword->setEchoMode(QLineEdit::Password); |
|
485 gbLayout->addWidget(leProxyPassword, 4, 1); |
|
486 |
|
487 |
|
488 connect(cbProxyType, SIGNAL(currentIndexChanged(int)), this, SLOT(onProxyTypeChanged())); |
|
489 } |
|
490 |
|
491 page2Layout->addWidget(new QWidget(this), 2, 0); |
446 } |
492 } |
447 |
493 |
448 previousQuality = this->SLQuality->value(); |
494 previousQuality = this->SLQuality->value(); |
449 previousResolutionIndex = this->CBResolution->currentIndex(); |
495 previousResolutionIndex = this->CBResolution->currentIndex(); |
450 previousFullscreenValue = this->CBFullscreen->isChecked(); |
496 previousFullscreenValue = this->CBFullscreen->isChecked(); |
574 |
620 |
575 QStandardItemModel * model = DataManager::instance().colorsModel(); |
621 QStandardItemModel * model = DataManager::instance().colorsModel(); |
576 |
622 |
577 m_colorButtons[topLeft.row()]->setStyleSheet(QString("background: %1").arg(model->item(topLeft.row())->data().value<QColor>().name())); |
623 m_colorButtons[topLeft.row()]->setStyleSheet(QString("background: %1").arg(model->item(topLeft.row())->data().value<QColor>().name())); |
578 } |
624 } |
|
625 |
|
626 void PageOptions::onProxyTypeChanged() |
|
627 { |
|
628 bool b = cbProxyType->currentIndex() > 0; |
|
629 |
|
630 sbProxyPort->setEnabled(b); |
|
631 leProxy->setEnabled(b); |
|
632 leProxyLogin->setEnabled(b); |
|
633 leProxyPassword->setEnabled(b); |
|
634 } |