• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeutils
 

tdeutils

  • tdeutils
kfinddialog.h
1/*
2 Copyright (C) 2001, S.R.Haque <srhaque@iee.org>.
3 Copyright (C) 2002, David Faure <david@mandrakesoft.com>
4 This file is part of the KDE project
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2, as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KFINDDIALOG_H
22#define KFINDDIALOG_H
23
24#include <kdialogbase.h>
25class KHistoryCombo;
26class TQPushButton;
27class TQPopupMenu;
28class TQGridLayout;
29class TQLabel;
30class TQGroupBox;
31class TQCheckBox;
32
74class TDEUTILS_EXPORT KFindDialog:
75 public KDialogBase
76{
77 TQ_OBJECT
78
79public:
80
81 // Options.
82
83 // KDE4: move to KFind
87 enum Options
88 {
89 WholeWordsOnly = 1,
90 FromCursor = 2,
91 SelectedText = 4,
92 CaseSensitive = 8,
93 FindBackwards = 16,
94 RegularExpression = 32,
95 FindIncremental = 64,
96 // Note that KReplaceDialog uses 256 and 512
97 // User extensions can use boolean options above this value.
98 MinimumUserOption = 65536
99 };
100
110 KFindDialog( TQWidget *parent = 0, const char *name = 0, long options = 0,
111 const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
112 // KDE4: fix ambiguity with private constructor
113 // Maybe remove options (there's setOptions) and findStrings (setFindHistory) and hasSelection (setHasSelection)
114
125 KFindDialog( bool modal, TQWidget *parent = 0, const char *name = 0, long options = 0,
126 const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
127 // KDE4: consider simplifying
128
132 virtual ~KFindDialog();
133
142 void setFindHistory( const TQStringList &history );
143
150 TQStringList findHistory() const;
151
158 void setHasSelection( bool hasSelection );
159
167 void setHasCursor( bool hasCursor );
168
177 void setSupportsBackwardsFind( bool supports );
178
187 void setSupportsCaseSensitiveFind( bool supports );
188
197 void setSupportsWholeWordsFind( bool supports );
198
207 void setSupportsRegularExpressionFind( bool supports );
208
215 void setOptions( long options );
216
224 long options() const;
225
230 TQString pattern() const;
231
236 void setPattern ( const TQString &pattern );
237
245 TQWidget *findExtension();
246
247protected slots:
248
249 void slotOk();
250 void slotSelectedTextToggled(bool);
251 void showPatterns();
252 void showPlaceholders();
253 void textSearchChanged(const TQString &);
254 void slotRegexCheckBoxToggled(bool checked);
255 void slotPlaceholdersCheckBoxToggled(bool checked);
256
257protected:
258 virtual void showEvent ( TQShowEvent * );
259
260private slots:
265 void slotPlaceholdersAboutToShow();
266
267private:
268
269 TQGroupBox *m_findGrp;
270 TQLabel *m_findLabel;
271 KHistoryCombo *m_find;
272 TQCheckBox *m_regExp;
273 TQPushButton *m_regExpItem;
274 TQGridLayout *m_findLayout;
275 TQWidget *m_findExtension;
276
277 TQGroupBox *m_optionGrp;
278 TQCheckBox *m_wholeWordsOnly;
279 TQCheckBox *m_fromCursor;
280 TQCheckBox *m_selectedText;
281 TQCheckBox *m_caseSensitive;
282 TQCheckBox *m_findBackwards;
283
284 TQPopupMenu *m_patterns;
285
286 // Our dirty little secret is that we also implement the "replace" dialog. But we
287 // keep that fact hidden from all but our friends.
288
289 friend class KReplaceDialog;
290
297 KFindDialog( TQWidget *parent, const char *name, bool forReplace );
298 void init( bool forReplace, const TQStringList &findStrings, bool hasSelection );
299
300 TQGroupBox *m_replaceGrp;
301 TQLabel *m_replaceLabel;
302 KHistoryCombo *m_replace;
303 TQCheckBox* m_backRef;
304 TQPushButton* m_backRefItem;
305 TQGridLayout *m_replaceLayout;
306 TQWidget *m_replaceExtension;
307
308 TQCheckBox* m_promptOnReplace;
309
310 TQPopupMenu *m_placeholders;
311
312 // Binary compatible extensibility.
313 class KFindDialogPrivate;
314 KFindDialogPrivate *d;
315};
316
317#endif // KFINDDIALOG_H
KDialogBase
KDialogBase::slotOk
virtual void slotOk()
KFindDialog
A generic "find" dialog.
Definition: kfinddialog.h:76
KFindDialog::KFindDialog
KFindDialog(TQWidget *parent=0, const char *name=0, long options=0, const TQStringList &findStrings=TQStringList(), bool hasSelection=false)
Construct a modal find dialog.
Definition: kfinddialog.cpp:54
KFindDialog::Options
Options
Options for the search.
Definition: kfinddialog.h:88
KHistoryCombo
KReplaceDialog
A generic "replace" dialog.
Definition: kreplacedialog.h:61

tdeutils

Skip menu "tdeutils"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeutils

Skip menu "tdeutils"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeutils by doxygen 1.9.4
This website is maintained by Timothy Pearson.