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 KUTILS_EXPORT 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
00108
00109
00120 KFindDialog( bool modal, QWidget *parent = 0, const char *name = 0, long options = 0,
00121 const QStringList &findStrings = QStringList(), bool hasSelection = false );
00122
00123
00127 virtual ~KFindDialog();
00128
00137 void setFindHistory( const QStringList &history );
00138
00144 QStringList findHistory() const;
00145
00152 void setHasSelection( bool hasSelection );
00153
00161 void setHasCursor( bool hasCursor );
00162
00171 void setSupportsBackwardsFind( bool supports );
00172
00181 void setSupportsCaseSensitiveFind( bool supports );
00182
00191 void setSupportsWholeWordsFind( bool supports );
00192
00201 void setSupportsRegularExpressionFind( bool supports );
00202
00208 void setOptions( long options );
00209
00216 long options() const;
00217
00221 QString pattern() const;
00222
00226 void setPattern ( const QString &pattern );
00227
00234 QWidget *findExtension();
00235
00236 protected slots:
00237
00238 void slotOk();
00239 void slotSelectedTextToggled(bool);
00240 void showPatterns();
00241 void showPlaceholders();
00242 void textSearchChanged( const QString &);
00243
00244 protected:
00245 virtual void showEvent ( QShowEvent * );
00246
00247 private slots:
00252 void slotPlaceholdersAboutToShow();
00253
00254 private:
00255
00256 QGroupBox *m_findGrp;
00257 QLabel *m_findLabel;
00258 KHistoryCombo *m_find;
00259 QCheckBox *m_regExp;
00260 QPushButton *m_regExpItem;
00261 QGridLayout *m_findLayout;
00262 QWidget *m_findExtension;
00263
00264 QGroupBox *m_optionGrp;
00265 QCheckBox *m_wholeWordsOnly;
00266 QCheckBox *m_fromCursor;
00267 QCheckBox *m_selectedText;
00268 QCheckBox *m_caseSensitive;
00269 QCheckBox *m_findBackwards;
00270
00271 QPopupMenu *m_patterns;
00272
00273
00274
00275
00276 friend class KReplaceDialog;
00277
00284 KFindDialog( QWidget *parent, const char *name, bool forReplace );
00285 void init( bool forReplace, const QStringList &findStrings, bool hasSelection );
00286
00287 QGroupBox *m_replaceGrp;
00288 QLabel *m_replaceLabel;
00289 KHistoryCombo *m_replace;
00290 QCheckBox* m_backRef;
00291 QPushButton* m_backRefItem;
00292 QGridLayout *m_replaceLayout;
00293 QWidget *m_replaceExtension;
00294
00295 QCheckBox* m_promptOnReplace;
00296
00297 QPopupMenu *m_placeholders;
00298
00299
00300 class KFindDialogPrivate;
00301 KFindDialogPrivate *d;
00302 };
00303
00304 #endif // KFINDDIALOG_H
This file is part of the documentation for kutils Library Version 3.4.1.