kfinddialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef KFINDDIALOG_H
00022
#define KFINDDIALOG_H
00023
00024
#include <kdialogbase.h>
00025
class KHistoryCombo;
00026
class QPushButton;
00027
class QPopupMenu;
00028
class QGridLayout;
00029
class QLabel;
00030
class QGroupBox;
00031
class QCheckBox;
00032
00072 class KFindDialog:
00073
public KDialogBase
00074 {
00075 Q_OBJECT
00076
00077
public:
00078
00079
00080
00081
enum Options
00082 {
00083 WholeWordsOnly = 1,
00084 FromCursor = 2,
00085 SelectedText = 4,
00086 CaseSensitive = 8,
00087 FindBackwards = 16,
00088 RegularExpression = 32,
00089
00090 MinimumUserOption = 65536
00091 };
00092
00102
KFindDialog(
QWidget *parent = 0,
const char *name = 0,
long options = 0,
00103
const QStringList &findStrings =
QStringList(),
bool hasSelection =
false );
00104
00115
KFindDialog(
bool modal,
QWidget *parent = 0,
const char *name = 0,
long options = 0,
00116
const QStringList &findStrings =
QStringList(),
bool hasSelection =
false );
00117
00121
virtual ~KFindDialog();
00122
00131
void setFindHistory(
const QStringList &history );
00132
00138
QStringList findHistory()
const;
00139
00146
void setHasSelection(
bool hasSelection );
00147
00155
void setHasCursor(
bool hasCursor );
00156
00162
void setOptions(
long options );
00163
00170
long options()
const;
00171
00175
QString pattern()
const;
00176
00180
void setPattern (
const QString &pattern );
00181
00188
QWidget *
findExtension();
00189
00190
protected slots:
00191
00192
void slotOk();
00193
void slotSelectedTextToggled(
bool);
00194
void showPatterns();
00195
void showPlaceholders();
00196
void textSearchChanged(
const QString &);
00197
00198
protected:
00199
virtual void showEvent (
QShowEvent * );
00200
00201
private:
00202
00203
QGroupBox *m_findGrp;
00204
QLabel *m_findLabel;
00205
KHistoryCombo *m_find;
00206
QCheckBox *m_regExp;
00207
QPushButton *m_regExpItem;
00208
QGridLayout *m_findLayout;
00209
QWidget *m_findExtension;
00210
00211
QGroupBox *m_optionGrp;
00212
QCheckBox *m_wholeWordsOnly;
00213
QCheckBox *m_fromCursor;
00214
QCheckBox *m_selectedText;
00215
QCheckBox *m_caseSensitive;
00216
QCheckBox *m_findBackwards;
00217
00218
QPopupMenu *m_patterns;
00219
00220
00221
00222
00223
friend class KReplaceDialog;
00224
00231
KFindDialog(
QWidget *parent,
const char *name,
bool forReplace );
00232
void init(
bool forReplace,
const QStringList &findStrings,
bool hasSelection );
00233
00234
QGroupBox *m_replaceGrp;
00235
QLabel *m_replaceLabel;
00236
KHistoryCombo *m_replace;
00237
QCheckBox* m_backRef;
00238
QPushButton* m_backRefItem;
00239
QGridLayout *m_replaceLayout;
00240
QWidget *m_replaceExtension;
00241
00242
QCheckBox* m_promptOnReplace;
00243
00244
QPopupMenu *m_placeholders;
00245
00246
00247
class KFindDialogPrivate;
00248 KFindDialogPrivate *d;
00249 };
00250
00251
#endif // KFINDDIALOG_H
This file is part of the documentation for kutils Library Version 3.2.3.