From 10308be19ef7fa44699562cc75946e7ea1fdf6b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 03:45:53 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kutils/kfind.h | 106 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 53 insertions(+), 53 deletions(-) (limited to 'kutils/kfind.h') diff --git a/kutils/kfind.h b/kutils/kfind.h index 089d261c3..502708dd1 100644 --- a/kutils/kfind.h +++ b/kutils/kfind.h @@ -26,8 +26,8 @@ /** * @ingroup main - * @ingroup tqfindtqreplace - * @brief A generic implementation of the "tqfind" function. + * @ingroup findreplace + * @brief A generic implementation of the "find" function. * * @author S.R.Haque , David Faure , * Arend van Beelen jr. @@ -40,25 +40,25 @@ * * \b Example: * - * To use the class to implement a complete tqfind feature: + * To use the class to implement a complete find feature: * - * In the slot connected to the tqfind action, after using KFindDialog: + * In the slot connected to the find action, after using KFindDialog: * \code * - * // This creates a tqfind-next-prompt dialog if needed. - * m_tqfind = new KFind(pattern, options, this); + * // This creates a find-next-prompt dialog if needed. + * m_find = new KFind(pattern, options, this); * * // Connect highlight signal to code which handles highlighting * // of found text. - * connect( m_tqfind, TQT_SIGNAL( highlight( const TQString &, int, int ) ), + * connect( m_find, TQT_SIGNAL( highlight( const TQString &, int, int ) ), * this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) ); - * // Connect tqfindNext signal - called when pressing the button in the dialog - * connect( m_tqfind, TQT_SIGNAL( tqfindNext() ), + * // Connect findNext signal - called when pressing the button in the dialog + * connect( m_find, TQT_SIGNAL( findNext() ), * this, TQT_SLOT( slotFindNext() ) ); * \endcode * - * If you are using a non-modal tqfind dialog (the recommended new way - * in KDE-3.2), you should call right away m_tqfind->closeFindNextDialog(). + * If you are using a non-modal find dialog (the recommended new way + * in KDE-3.2), you should call right away m_find->closeFindNextDialog(). * * Then initialize the variables determining the "current position" * (to the cursor, if the option FromCursor is set, @@ -73,11 +73,11 @@ * { * KFind::Result res = KFind::NoMatch; * while ( res == KFind::NoMatch && ) { - * if ( m_tqfind->needData() ) - * m_tqfind->setData( ); + * if ( m_find->needData() ) + * m_find->setData( ); * * // Let KFind inspect the text fragment, and display a dialog if a match is found - * res = m_tqfind->tqfind(); + * res = m_find->find(); * * if ( res == KFind::NoMatch ) { * @@ -85,13 +85,13 @@ * } * * if ( res == KFind::NoMatch ) // i.e. at end - * displayFinalDialog(); delete m_tqfind; m_tqfind = 0L; - * or if ( m_tqfind->shouldRestart() ) { reinit (w/o FromCursor) and call slotFindNext(); } - * else { m_tqfind->closeFindNextDialog(); }> + * displayFinalDialog(); delete m_find; m_find = 0L; + * or if ( m_find->shouldRestart() ) { reinit (w/o FromCursor) and call slotFindNext(); } + * else { m_find->closeFindNextDialog(); }> * } * \endcode * - * Don't forget to delete m_tqfind in the destructor of your class, + * Don't forget to delete m_find in the destructor of your class, * unless you gave it a parent widget on construction. * * This implementation allows to have a "Find Next" action, which resumes the @@ -101,7 +101,7 @@ * FindBackwards and call slotFindNext() - and reset the value afterwards. */ class KUTILS_EXPORT KFind : - public TQObject + public QObject { Q_OBJECT @@ -111,7 +111,7 @@ public: * Only use this constructor if you don't use KFindDialog, or if * you use it as a modal dialog. * @param pattern The pattern to look for. - * @param options Options for the tqfind dialog. @see KFindDialog. + * @param options Options for the find dialog. @see KFindDialog. * @param parent The parent widget. */ KFind(const TQString &pattern, long options, TQWidget *parent); @@ -120,13 +120,13 @@ public: * This is the recommended constructor if you also use KFindDialog (non-modal). * You should pass the pointer to it here, so that when a message box * appears it has the right parent. Don't worry about deletion, KFind - * will notice if the tqfind dialog is closed. + * will notice if the find dialog is closed. * @param pattern The pattern to look for. - * @param options Options for the tqfind dialog. @see KFindDialog. + * @param options Options for the find dialog. @see KFindDialog. * @param parent The parent widget. - * @param tqfindDialog A pointer to the KFindDialog object. + * @param findDialog A pointer to the KFindDialog object. */ - KFind(const TQString &pattern, long options, TQWidget *parent, TQWidget* tqfindDialog); + KFind(const TQString &pattern, long options, TQWidget *parent, TQWidget* findDialog); /** * Destructor. @@ -134,7 +134,7 @@ public: virtual ~KFind(); /** - * Result enum. Holds information if the tqfind was successful. + * Result enum. Holds information if the find was successful. */ enum Result { NoMatch, ///< No match was found. @@ -150,24 +150,24 @@ public: bool needData() const; /** - * Call this when needData returns @c true, before calling tqfind(). + * Call this when needData returns @c true, before calling find(). * @param data the text fragment (line) * @param startPos if set, the index at which the search should start. * This is only necessary for the very first call to setData usually, - * for the 'tqfind in selection' feature. A value of -1 (the default value) + * for the 'find in selection' feature. A value of -1 (the default value) * means "process all the data", i.e. either 0 or data.length()-1 depending * on FindBackwards. */ void setData( const TQString& data, int startPos = -1 ); /** - * Call this when needData returns @c true, before calling tqfind(). The use of + * Call this when needData returns @c true, before calling find(). The use of * ID's is especially useful if you're using the FindIncremental option. * @param id the id of the text fragment * @param data the text fragment (line) * @param startPos if set, the index at which the search should start. * This is only necessary for the very first call to setData usually, - * for the 'tqfind in selection' feature. A value of -1 (the default value) + * for the 'find in selection' feature. A value of -1 (the default value) * means "process all the data", i.e. either 0 or data.length()-1 depending * on FindBackwards. * @@ -177,17 +177,17 @@ public: /** * Walk the text fragment (e.g. text-processor line, kspread cell) looking for matches. - * For each match, emits the highlight() signal and displays the tqfind-again dialog + * For each match, emits the highlight() signal and displays the find-again dialog * proceeding. * @return Whether or not there has been a match. */ - Result tqfind(); + Result find(); /** * Return the current options. * * Warning: this is usually the same value as the one passed to the constructor, - * but options might change _during_ the tqreplace operation: + * but options might change _during_ the replace operation: * e.g. the "All" button resets the PromptOnReplace flag. * * @return The current options. @see KFindDialog. @@ -233,7 +233,7 @@ public: /** * Virtual method, which allows applications to add extra checks for * validating a candidate match. It's only necessary to reimplement this - * if the tqfind dialog extension has been used to provide additional + * if the find dialog extension has been used to provide additional * criterias. * * @param text The current text fragment @@ -251,7 +251,7 @@ public: * search. In that case it makes sense to restart the search again. * * @param showNumMatches set to @c true if the dialog should show the number of - * matches. Set to @c false if the application provides a "tqfind previous" action, + * matches. Set to @c false if the application provides a "find previous" action, * in which case the match count will be erroneous when hitting the end, * and we could even be hitting the beginning of the document (so not all * matches have even been seen). @@ -274,7 +274,7 @@ public: * @param matchedlength The length of the string that was matched * @return The index at which a match was found, or -1 if no match was found. */ - static int tqfind( const TQString &text, const TQString &pattern, int index, long options, int *matchedlength ); + static int find( const TQString &text, const TQString &pattern, int index, long options, int *matchedlength ); /** * Search the given regular expression, and returns whether a match was found. If one is, @@ -289,7 +289,7 @@ public: * @param matchedlength The length of the string that was matched * @return The index at which a match was found, or -1 if no match was found. */ - static int tqfind( const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedlength ); + static int find( const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedlength ); /** * Displays the final dialog saying "no match was found", if that was the case. @@ -298,22 +298,22 @@ public: virtual void displayFinalDialog() const; /** - * Return (or create) the dialog that shows the "tqfind next?" prompt. + * Return (or create) the dialog that shows the "find next?" prompt. * Usually you don't need to call this. * One case where it can be useful, is when the user selects the "Find" - * menu item while a tqfind operation is under way. In that case, the + * menu item while a find operation is under way. In that case, the * program may want to call setActiveWindow() on that dialog. - * @return The tqfind next dialog. + * @return The find next dialog. */ - KDialogBase* tqfindNextDialog( bool create = false ); + KDialogBase* findNextDialog( bool create = false ); /** - * Close the "tqfind next?" dialog. The application should do this when + * Close the "find next?" dialog. The application should do this when * the last match was hit. If the application deletes the KFind, then - * "tqfind previous" won't be possible anymore. + * "find previous" won't be possible anymore. * * IMPORTANT: you should also call this if you are using a non-modal - * tqfind dialog, to tell KFind not to pop up its own dialog. + * find dialog, to tell KFind not to pop up its own dialog. */ void closeFindNextDialog(); @@ -329,7 +329,7 @@ public: signals: /** - * Connect to this signal to implement highlighting of found text during the tqfind + * Connect to this signal to implement highlighting of found text during the find * operation. * * If you've set data with setData(id, text), use the signal highlight(id, @@ -347,7 +347,7 @@ signals: void highlight(const TQString &text, int matchingIndex, int matchedLength); /** - * Connect to this signal to implement highlighting of found text during the tqfind + * Connect to this signal to implement highlighting of found text during the find * operation. * * Use this signal if you've set your data with setData(id, text), otherwise @@ -367,28 +367,28 @@ signals: void highlight(int id, int matchingIndex, int matchedLength); // ## TODO docu - // tqfindprevious will also emit tqfindNext, after temporarily switching the value + // findprevious will also emit findNext, after temporarily switching the value // of FindBackwards - void tqfindNext(); + void findNext(); /** * Emitted when the options have changed. - * This can happen e.g. with "Replace All", or if our 'tqfind next' dialog - * gets a "tqfind previous" one day. + * This can happen e.g. with "Replace All", or if our 'find next' dialog + * gets a "find previous" one day. */ void optionsChanged(); /** - * Emitted when the 'tqfind next' dialog is being closed. + * Emitted when the 'find next' dialog is being closed. * Some apps might want to remove the highlighted text when this happens. - * Apps without support for "Find Next" can also do m_tqfind->deleteLater() - * to terminate the tqfind operation. + * Apps without support for "Find Next" can also do m_find->deleteLater() + * to terminate the find operation. */ void dialogClosed(); protected: - TQWidget* tqparentWidget() const { return (TQWidget *)parent(); } + TQWidget* parentWidget() const { return (TQWidget *)parent(); } TQWidget* dialogsParent() const; protected slots: -- cgit v1.2.1