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
00061 class KFindDialog:
00062 public KDialogBase
00063 {
00064 Q_OBJECT
00065
00066 public:
00067
00068
00069
00070 enum Options
00071 {
00072 WholeWordsOnly = 1,
00073 FromCursor = 2,
00074 SelectedText = 4,
00075 CaseSensitive = 8,
00076 FindBackwards = 16,
00077 RegularExpression = 32,
00078
00079 MinimumUserOption = 65536
00080 };
00081
00091 KFindDialog( QWidget *parent = 0, const char *name = 0, long options = 0,
00092 const QStringList &findStrings = QStringList(), bool hasSelection = false );
00093
00097 virtual ~KFindDialog();
00098
00107 void setFindHistory( const QStringList &strings );
00108
00114 QStringList findHistory() const;
00115
00122 void setHasSelection( bool hasSelection );
00123
00131 void setHasCursor( bool hasCursor );
00132
00138 void setOptions( long options );
00139
00146 long options() const;
00147
00151 QString pattern() const;
00152
00156 void setPattern ( const QString &pattern );
00157
00164 QWidget *findExtension();
00165
00166 signals:
00167
00172 void okClicked();
00173
00174 protected slots:
00175
00176 void slotOk();
00177 void slotSelectedTextToggled(bool);
00178 void showPatterns();
00179 void showPlaceholders();
00180 void textSearchChanged( const QString &);
00181
00182 protected:
00183 virtual void showEvent ( QShowEvent * );
00184
00185 private:
00186
00187 QGroupBox *m_findGrp;
00188 QLabel *m_findLabel;
00189 KHistoryCombo *m_find;
00190 QCheckBox *m_regExp;
00191 QPushButton *m_regExpItem;
00192 QGridLayout *m_findLayout;
00193 QWidget *m_findExtension;
00194
00195 QGroupBox *m_optionGrp;
00196 QCheckBox *m_wholeWordsOnly;
00197 QCheckBox *m_fromCursor;
00198 QCheckBox *m_selectedText;
00199 QCheckBox *m_caseSensitive;
00200 QCheckBox *m_findBackwards;
00201
00202 QPopupMenu *m_patterns;
00203
00204
00205
00206
00207 friend class KReplaceDialog;
00208
00215 KFindDialog( QWidget *parent, const char *name, bool forReplace );
00216 void init( bool forReplace, const QStringList &findStrings, bool hasSelection );
00217
00218 QGroupBox *m_replaceGrp;
00219 QLabel *m_replaceLabel;
00220 KHistoryCombo *m_replace;
00221 QCheckBox* m_backRef;
00222 QPushButton* m_backRefItem;
00223 QGridLayout *m_replaceLayout;
00224 QWidget *m_replaceExtension;
00225
00226 QCheckBox* m_promptOnReplace;
00227
00228 QPopupMenu *m_placeholders;
00229
00230
00231 class KFindDialogPrivate;
00232 KFindDialogPrivate *d;
00233 };
00234
00235 #endif // KFINDDIALOG_H
This file is part of the documentation for kdelibs Version 3.1.0.