| 3 | #include <QPushButton> |
| 4 | |
| 5 | WizLineInputDialog::WizLineInputDialog(const QString& strTitle, |
| 6 | const QString& strHint, |
| 7 | const QString& strDefault /* = "" */, |
| 8 | QWidget *parent /* = 0 */, QLineEdit::EchoMode echo) |
| 9 | : QDialog(parent) |
| 10 | , ui(new Ui::WizLineInputDialog) |
| 11 | { |
| 12 | ui->setupUi(this); |
| 13 | setFixedSize(size()); |
| 14 | |
| 15 | setWindowTitle(strTitle); |
| 16 | ui->labelHint->setText(strHint); |
| 17 | |
| 18 | ui->editInput->setText(strDefault); |
| 19 | ui->editInput->selectAll(); |
| 20 | ui->editInput->setEchoMode(echo); |
| 21 | m_strDefault = strDefault; |
| 22 | |
| 23 | ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); |
| 24 | ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); |
| 25 | |
| 26 | connect(ui->editInput, SIGNAL(textChanged(QString)), SIGNAL(textChanged(QString))); |
| 27 | } |
| 28 | |
| 29 | WizLineInputDialog::~WizLineInputDialog() |
| 30 | { |