Theme Editor: Added an edit menu with a find/replace function (copied from an LGPL...
[kugel-rb.git] / utils / themeeditor / findreplace / findreplacedialog.cpp
blob547ad236e5ab856d53b8422c22b4ab4371f31db5
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * This file has been copied from Lorenzo Bettini, with minor modifications
11 * made available under the LGPL version 3, as the original file was licensed
13 ****************************************************************************
15 * Copyright (C) 2009 Lorenzo Bettini <http://www.lorenzobettini.it>
16 * See COPYING file that comes with this distribution
19 #include "findreplacedialog.h"
20 #include "ui_findreplacedialog.h"
22 FindReplaceDialog::FindReplaceDialog(QWidget *parent) :
23 QDialog(parent),
24 ui(new Ui::FindReplaceDialog)
26 ui->setupUi(this);
29 FindReplaceDialog::~FindReplaceDialog()
31 delete ui;
34 void FindReplaceDialog::changeEvent(QEvent *e)
36 QDialog::changeEvent(e);
37 switch (e->type()) {
38 case QEvent::LanguageChange:
39 ui->retranslateUi(this);
40 break;
41 default:
42 break;
46 void FindReplaceDialog::setTextEdit(QPlainTextEdit *textEdit) {
47 ui->findReplaceForm->setTextEdit(textEdit);
50 void FindReplaceDialog::writeSettings(QSettings &settings, const QString &prefix) {
51 ui->findReplaceForm->writeSettings(settings, prefix);
54 void FindReplaceDialog::readSettings(QSettings &settings, const QString &prefix) {
55 ui->findReplaceForm->readSettings(settings, prefix);
58 void FindReplaceDialog::findNext() {
59 ui->findReplaceForm->findNext();
62 void FindReplaceDialog::findPrev() {
63 ui->findReplaceForm->findPrev();