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
00082 enum Options
00083 {
00084 WholeWordsOnly = 1,
00085 FromCursor = 2,
00086 SelectedText = 4,
00087 CaseSensitive = 8,
00088 FindBackwards = 16,
00089 RegularExpression = 32,
00090 FindIncremental = 64,
00091
00092
00093 MinimumUserOption = 65536
00094 };
00095
00105 KFindDialog( QWidget *parent = 0, const char *name = 0, long options = 0,
00106 const QStringList &findStrings = QStringList(), bool hasSelection = false );
00107
00118 KFindDialog( bool modal, QWidget *parent = 0, const char *name = 0, long options = 0,
00119 const QStringList &findStrings = QStringList(), bool hasSelection = false );
00120
00124 virtual ~KFindDialog();
00125
00134 void setFindHistory( const QStringList &history );
00135
00141 QStringList findHistory() const;
00142
00149 void setHasSelection( bool hasSelection );
00150
00158 void setHasCursor( bool hasCursor );
00159
00165 void setOptions( long options );
00166
00173 long options() const;
00174
00178 QString pattern() const;
00179
00183 void setPattern ( const QString &pattern );
00184
00191 QWidget *findExtension();
00192
00193 protected slots:
00194
00195 void slotOk();
00196 void slotSelectedTextToggled(bool);
00197 void showPatterns();
00198 void showPlaceholders();
00199 void textSearchChanged( const QString &);
00200
00201 protected:
00202 virtual void showEvent ( QShowEvent * );
00203
00204 private:
00205
00206 QGroupBox *m_findGrp;
00207 QLabel *m_findLabel;
00208 KHistoryCombo *m_find;
00209 QCheckBox *m_regExp;
00210 QPushButton *m_regExpItem;
00211 QGridLayout *m_findLayout;
00212 QWidget *m_findExtension;
00213
00214 QGroupBox *m_optionGrp;
00215 QCheckBox *m_wholeWordsOnly;
00216 QCheckBox *m_fromCursor;
00217 QCheckBox *m_selectedText;
00218 QCheckBox *m_caseSensitive;
00219 QCheckBox *m_findBackwards;
00220
00221 QPopupMenu *m_patterns;
00222
00223
00224
00225
00226 friend class KReplaceDialog;
00227
00234 KFindDialog( QWidget *parent, const char *name, bool forReplace );
00235 void init( bool forReplace, const QStringList &findStrings, bool hasSelection );
00236
00237 QGroupBox *m_replaceGrp;
00238 QLabel *m_replaceLabel;
00239 KHistoryCombo *m_replace;
00240 QCheckBox* m_backRef;
00241 QPushButton* m_backRefItem;
00242 QGridLayout *m_replaceLayout;
00243 QWidget *m_replaceExtension;
00244
00245 QCheckBox* m_promptOnReplace;
00246
00247 QPopupMenu *m_placeholders;
00248
00249
00250 class KFindDialogPrivate;
00251 KFindDialogPrivate *d;
00252 };
00253
00254 #endif // KFINDDIALOG_H
This file is part of the documentation for kutils Library Version 3.3.1.