diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-23 07:31:53 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-23 07:31:53 +0000 |
commit | e6fd3d0318d0f53c51cf4cc87ccdc8f9741957e7 (patch) | |
tree | da29255f5c33ae915c28a1dbff5525fdf912fbe6 /utils/themeeditor/qtfindreplacedialog/findreplacedialog.h | |
parent | b21b7714209230cbadab1e709c6778c4cc214437 (diff) | |
download | rockbox-e6fd3d0318d0f53c51cf4cc87ccdc8f9741957e7.tar.gz rockbox-e6fd3d0318d0f53c51cf4cc87ccdc8f9741957e7.zip |
Theme Editor: Switched back to Lorenzo Bettini's find/replace dialog (with some modifications) as he changed the license to LGPL v2.1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27528 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/qtfindreplacedialog/findreplacedialog.h')
-rw-r--r-- | utils/themeeditor/qtfindreplacedialog/findreplacedialog.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/utils/themeeditor/qtfindreplacedialog/findreplacedialog.h b/utils/themeeditor/qtfindreplacedialog/findreplacedialog.h new file mode 100644 index 0000000000..78e87371cd --- /dev/null +++ b/utils/themeeditor/qtfindreplacedialog/findreplacedialog.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Lorenzo Bettini <http://www.lorenzobettini.it> | ||
3 | * See COPYING file that comes with this distribution | ||
4 | */ | ||
5 | |||
6 | #ifndef FINDREPLACEDIALOG_H | ||
7 | #define FINDREPLACEDIALOG_H | ||
8 | |||
9 | #include <QDialog> | ||
10 | |||
11 | #include "findreplace_global.h" | ||
12 | |||
13 | namespace Ui { | ||
14 | class FindReplaceDialog; | ||
15 | } | ||
16 | |||
17 | class QTextEdit; | ||
18 | class QPlainTextEdit; | ||
19 | class QSettings; | ||
20 | |||
21 | /** | ||
22 | * A find/replace dialog. | ||
23 | * | ||
24 | * It relies on a FindReplaceForm object (see that class for the functionalities provided). | ||
25 | */ | ||
26 | class FINDREPLACESHARED_EXPORT FindReplaceDialog : public QDialog { | ||
27 | Q_OBJECT | ||
28 | public: | ||
29 | FindReplaceDialog(QWidget *parent = 0); | ||
30 | virtual ~FindReplaceDialog(); | ||
31 | |||
32 | /** | ||
33 | * Associates the text editor where to perform the search | ||
34 | * @param textEdit | ||
35 | */ | ||
36 | void setTextEdit(QTextEdit *textEdit); | ||
37 | |||
38 | /** | ||
39 | * Associates the text editor where to perform the search | ||
40 | * @param textEdit | ||
41 | */ | ||
42 | void setTextEdit(QPlainTextEdit *textEdit); | ||
43 | |||
44 | |||
45 | /** | ||
46 | * Writes the state of the form to the passed settings. | ||
47 | * @param settings | ||
48 | * @param prefix the prefix to insert in the settings | ||
49 | */ | ||
50 | virtual void writeSettings(QSettings &settings, const QString &prefix = "FindReplaceDialog"); | ||
51 | |||
52 | /** | ||
53 | * Reads the state of the form from the passed settings. | ||
54 | * @param settings | ||
55 | * @param prefix the prefix to look for in the settings | ||
56 | */ | ||
57 | virtual void readSettings(QSettings &settings, const QString &prefix = "FindReplaceDialog"); | ||
58 | |||
59 | public slots: | ||
60 | /** | ||
61 | * Finds the next occurrence | ||
62 | */ | ||
63 | void findNext(); | ||
64 | |||
65 | /** | ||
66 | * Finds the previous occurrence | ||
67 | */ | ||
68 | void findPrev(); | ||
69 | |||
70 | protected: | ||
71 | void changeEvent(QEvent *e); | ||
72 | |||
73 | Ui::FindReplaceDialog *ui; | ||
74 | }; | ||
75 | |||
76 | #endif // FINDREPLACEDIALOG_H | ||