Robert Bieber | e6fd3d0 | 2010-07-23 07:31:53 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 Lorenzo Bettini <http://www.lorenzobettini.it> |
| 3 | * See COPYING file that comes with this distribution |
| 4 | */ |
| 5 | |
| 6 | #include "findreplacedialog.h" |
| 7 | #include "ui_findreplacedialog.h" |
| 8 | |
| 9 | FindReplaceDialog::FindReplaceDialog(QWidget *parent) : |
| 10 | QDialog(parent), |
| 11 | ui(new Ui::FindReplaceDialog) |
| 12 | { |
| 13 | ui->setupUi(this); |
| 14 | } |
| 15 | |
| 16 | FindReplaceDialog::~FindReplaceDialog() |
| 17 | { |
| 18 | delete ui; |
| 19 | } |
| 20 | |
| 21 | void FindReplaceDialog::changeEvent(QEvent *e) |
| 22 | { |
| 23 | QDialog::changeEvent(e); |
| 24 | switch (e->type()) { |
| 25 | case QEvent::LanguageChange: |
| 26 | ui->retranslateUi(this); |
| 27 | break; |
| 28 | default: |
| 29 | break; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | void FindReplaceDialog::setTextEdit(QTextEdit *textEdit) { |
| 34 | ui->findReplaceForm->setTextEdit(textEdit); |
| 35 | } |
| 36 | |
| 37 | void FindReplaceDialog::setTextEdit(QPlainTextEdit *textEdit) { |
| 38 | ui->findReplaceForm->setTextEdit(textEdit); |
| 39 | } |
| 40 | |
| 41 | void FindReplaceDialog::writeSettings(QSettings &settings, const QString &prefix) { |
| 42 | ui->findReplaceForm->writeSettings(settings, prefix); |
| 43 | } |
| 44 | |
| 45 | void FindReplaceDialog::readSettings(QSettings &settings, const QString &prefix) { |
| 46 | ui->findReplaceForm->readSettings(settings, prefix); |
| 47 | } |
| 48 | |
| 49 | void FindReplaceDialog::findNext() { |
| 50 | ui->findReplaceForm->findNext(); |
| 51 | } |
| 52 | |
| 53 | void FindReplaceDialog::findPrev() { |
| 54 | ui->findReplaceForm->findPrev(); |
| 55 | } |