void VCardDialog::EnableEditableMode () { Ui_.ButtonBox_->setStandardButtons (QDialogButtonBox::Save | QDialogButtonBox::Cancel | QDialogButtonBox::Ok); connect (Ui_.ButtonBox_->button (QDialogButtonBox::Save), SIGNAL (released ()), this, SLOT (publishVCard ())); Q_FOREACH (QLineEdit *edit, findChildren<QLineEdit*> ()) edit->setReadOnly (false); }
void VCardDialog::EnableEditableMode () { Ui_.ButtonBox_->setStandardButtons (QDialogButtonBox::Save | QDialogButtonBox::Cancel | QDialogButtonBox::Ok); connect (Ui_.ButtonBox_->button (QDialogButtonBox::Save), SIGNAL (released ()), this, SLOT (publishVCard ())); auto toEnable = findChildren<QLineEdit*> (); toEnable.removeAll (Ui_.EditPhone_); toEnable.removeAll (Ui_.EditEmail_); Q_FOREACH (QLineEdit *edit, toEnable) edit->setReadOnly (false); Ui_.About_->setReadOnly (false); Ui_.EditBirthday_->setReadOnly (false); }