297 GBAlayout->addLayout(GBAreslayout); |
297 GBAlayout->addLayout(GBAreslayout); |
298 |
298 |
299 CBFullscreen = new QCheckBox(AGGroupBox); |
299 CBFullscreen = new QCheckBox(AGGroupBox); |
300 CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
300 CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
301 GBAlayout->addWidget(CBFullscreen); |
301 GBAlayout->addWidget(CBFullscreen); |
302 connect(CBFullscreen, SIGNAL(stateChanged(int)), this, SLOT(setFullscreen(void))); |
|
303 |
302 |
304 QLabel * quality = new QLabel(AGGroupBox); |
303 QLabel * quality = new QLabel(AGGroupBox); |
305 quality->setText(QLabel::tr("Quality")); |
304 quality->setText(QLabel::tr("Quality")); |
306 quality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
305 quality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
307 GBAqualayout->addWidget(quality); |
306 GBAqualayout->addWidget(quality); |
411 this->CBFullscreen->setChecked(true); |
410 this->CBFullscreen->setChecked(true); |
412 this->CBFullscreen->setEnabled(false); |
411 this->CBFullscreen->setEnabled(false); |
413 previousQuality = this->SLQuality->value(); |
412 previousQuality = this->SLQuality->value(); |
414 this->SLQuality->setValue(this->SLQuality->maximum()); |
413 this->SLQuality->setValue(this->SLQuality->maximum()); |
415 this->SLQuality->setEnabled(false); |
414 this->SLQuality->setEnabled(false); |
|
415 previousResolutionIndex = this->CBResolution->currentIndex(); |
|
416 this->CBResolution->setCurrentIndex(0); |
|
417 this->CBResolution->setEnabled(false); |
416 } else { |
418 } else { |
417 this->CBFullscreen->setChecked(previousFullscreenValue); |
419 this->CBFullscreen->setChecked(previousFullscreenValue); |
418 this->CBFullscreen->setEnabled(true); |
420 this->CBFullscreen->setEnabled(true); |
419 this->SLQuality->setValue(previousQuality); |
421 this->SLQuality->setValue(previousQuality); |
420 this->SLQuality->setEnabled(true); |
422 this->SLQuality->setEnabled(true); |
|
423 this->CBResolution->setCurrentIndex(previousResolutionIndex); |
|
424 this->CBResolution->setEnabled(true); |
421 } |
425 } |
422 } |
|
423 |
|
424 void PageOptions::setFullscreen(void) |
|
425 { |
|
426 int tmp = this->CBResolution->currentIndex(); |
|
427 if (this->CBFullscreen->isChecked()) |
|
428 this->CBResolution->setCurrentIndex(0); |
|
429 else |
|
430 this->CBResolution->setCurrentIndex(previousResolutionIndex); |
|
431 previousResolutionIndex = tmp; |
|
432 } |
426 } |
433 |
427 |
434 void PageOptions::trimNetNick() |
428 void PageOptions::trimNetNick() |
435 { |
429 { |
436 editNetNick->setText(editNetNick->text().trimmed()); |
430 editNetNick->setText(editNetNick->text().trimmed()); |