| 1 | #include "aboutwidget.h" |
| 2 | #include "ui_aboutwidget.h" |
| 3 | |
| 4 | AboutWidget::AboutWidget(QWidget *parent) : |
| 5 | QDialog(parent), |
| 6 | ui(new Ui::AboutWidget) |
| 7 | { |
| 8 | ui->setupUi(this); |
| 9 | } |
| 10 | |
| 11 | AboutWidget::~AboutWidget() |
| 12 | { |
| 13 | delete ui; |
| 14 | } |
| 15 | |
| 16 | void AboutWidget::setIntroText(QString text) |
| 17 | { |
| 18 | ui->aboutTextEdit->setHtml(text); |
| 19 | } |
| 20 | |
| 21 | void AboutWidget::setInstructions(QString text) |
| 22 | { |
| 23 | ui->instructionsTextEdit->setHtml(text); |
| 24 | } |
| 25 | |
| 26 | void AboutWidget::setStyleSheet(QString sheet) |
| 27 | { |
| 28 | if (!sheet.isEmpty()) { |
| 29 | ui->aboutTextEdit->setStyleSheet(sheet); |
| 30 | ui->instructionsTextEdit->setStyleSheet(sheet); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | void AboutWidget::changeEvent(QEvent *e) |
| 35 | { |
| 36 | QDialog::changeEvent(e); |
| 37 | switch (e->type()) { |
| 38 | case QEvent::LanguageChange: |
| 39 | ui->retranslateUi(this); |
| 40 | break; |
| 41 | default: |
| 42 | break; |
| 43 | } |
| 44 | } |
| 45 |