1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #include "longinputdialog.h"
- #include "ui_longinputdialog.h"
- LongInputDialog::LongInputDialog(const QString & title,
- const QString & labelText,
- const QString & contentText,
- QWidget * parent) :
- QDialog(parent),
- ui(new Ui::LongInputDialog)
- {
- ui->setupUi(this);
- this->setWindowTitle(title);
- ui->m_label->setText(labelText);
- ui->m_longInput->setPlainText(contentText);
- connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
- connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- }
- QString LongInputDialog::contentText() const
- {
- return ui->m_longInput->toPlainText();
- }
- LongInputDialog::~LongInputDialog()
- {
- delete ui;
- }
- void LongInputDialog::changeEvent(QEvent *e)
- {
- QDialog::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
- }
- }
|