QTfrontend/pages.cpp
changeset 4870 c02406028e02
parent 4864 9001217d3af2
child 4892 b0610081ee95
equal deleted inserted replaced
4869:7a720b5d2247 4870:c02406028e02
   615             MiscLayout->addWidget(labelNN, 0, 0);
   615             MiscLayout->addWidget(labelNN, 0, 0);
   616 
   616 
   617             editNetNick = new QLineEdit(groupMisc);
   617             editNetNick = new QLineEdit(groupMisc);
   618             editNetNick->setMaxLength(20);
   618             editNetNick->setMaxLength(20);
   619             editNetNick->setText(QLineEdit::tr("unnamed"));
   619             editNetNick->setText(QLineEdit::tr("unnamed"));
       
   620             connect(editNetNick, SIGNAL(editingFinished()), this, SLOT(trimNetNick()));
   620             MiscLayout->addWidget(editNetNick, 0, 1);
   621             MiscLayout->addWidget(editNetNick, 0, 1);
   621 
   622 
   622             QLabel *labelLanguage = new QLabel(groupMisc);
   623             QLabel *labelLanguage = new QLabel(groupMisc);
   623             labelLanguage->setText(QLabel::tr("Locale") + " *");
   624             labelLanguage->setText(QLabel::tr("Locale") + " *");
   624             MiscLayout->addWidget(labelLanguage, 1, 0);
   625             MiscLayout->addWidget(labelLanguage, 1, 0);
   828         this->CBResolution->setCurrentIndex(0);
   829         this->CBResolution->setCurrentIndex(0);
   829     else
   830     else
   830         this->CBResolution->setCurrentIndex(previousResolutionIndex);
   831         this->CBResolution->setCurrentIndex(previousResolutionIndex);
   831     previousResolutionIndex = tmp;
   832     previousResolutionIndex = tmp;
   832     this->CBResolution->setEnabled(!this->CBFullscreen->isChecked());
   833     this->CBResolution->setEnabled(!this->CBFullscreen->isChecked());
       
   834 }
       
   835 
       
   836 void PageOptions::trimNetNick()
       
   837 {
       
   838     editNetNick->setText(editNetNick->text().trimmed());
   833 }
   839 }
   834 
   840 
   835 PageNet::PageNet(QWidget* parent) : AbstractPage(parent)
   841 PageNet::PageNet(QWidget* parent) : AbstractPage(parent)
   836 {
   842 {
   837     QFont * font14 = new QFont("MS Shell Dlg", 14);
   843     QFont * font14 = new QFont("MS Shell Dlg", 14);