1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 #ifndef FINDREPLACEDIALOG_H
20 #define FINDREPLACEDIALOG_H
23 #include <QPlainTextEdit>
26 class FindReplaceDialog
;
33 * A find/replace dialog.
35 * It relies on a FindReplaceForm object (see that class for the functionalities provided).
37 class FindReplaceDialog
: public QDialog
{
40 FindReplaceDialog(QWidget
*parent
= 0);
41 virtual ~FindReplaceDialog();
44 * Associates the text editor where to perform the search
47 void setTextEdit(QPlainTextEdit
*textEdit
);
50 * Writes the state of the form to the passed settings.
52 * @param prefix the prefix to insert in the settings
54 virtual void writeSettings(QSettings
&settings
, const QString
&prefix
= "FindReplaceDialog");
57 * Reads the state of the form from the passed settings.
59 * @param prefix the prefix to look for in the settings
61 virtual void readSettings(QSettings
&settings
, const QString
&prefix
= "FindReplaceDialog");
65 * Finds the next occurrence
70 * Finds the previous occurrence
75 void changeEvent(QEvent
*e
);
77 Ui::FindReplaceDialog
*ui
;
80 #endif // FINDREPLACEDIALOG_H