summaryrefslogtreecommitdiffstats
path: root/kutils
diff options
context:
space:
mode:
Diffstat (limited to 'kutils')
-rw-r--r--kutils/groups.dox4
-rw-r--r--kutils/kcmodulecontainer.cpp2
-rw-r--r--kutils/kcmodulecontainer.h2
-rw-r--r--kutils/kcmoduleinfo.cpp2
-rw-r--r--kutils/kcmoduleloader.cpp2
-rw-r--r--kutils/kcmoduleproxy.cpp8
-rw-r--r--kutils/kcmoduleproxy.h4
-rw-r--r--kutils/kcmultidialog.cpp4
-rw-r--r--kutils/kcmultidialog.h6
-rw-r--r--kutils/kfind.cpp76
-rw-r--r--kutils/kfind.h106
-rw-r--r--kutils/kfinddialog.cpp210
-rw-r--r--kutils/kfinddialog.h90
-rw-r--r--kutils/kmultitabbar.cpp114
-rw-r--r--kutils/kmultitabbar.h2
-rw-r--r--kutils/kpluginselector.cpp16
-rw-r--r--kutils/kpluginselector.h2
-rw-r--r--kutils/kpluginselector_p.h2
-rw-r--r--kutils/kreplace.cpp102
-rw-r--r--kutils/kreplace.h134
-rw-r--r--kutils/kreplacedialog.cpp50
-rw-r--r--kutils/kreplacedialog.h42
-rw-r--r--kutils/ksettings/README.dox10
-rw-r--r--kutils/ksettings/componentsdialog.cpp4
-rw-r--r--kutils/ksettings/dialog.cpp6
-rw-r--r--kutils/ksettings/dialog.h2
-rw-r--r--kutils/ksettings/dispatcher.cpp6
-rw-r--r--kutils/ksettings/dispatcher.h2
-rw-r--r--kutils/tests/Makefile.am16
-rw-r--r--kutils/tests/kfindtest.cpp122
-rw-r--r--kutils/tests/kfindtest.h10
-rw-r--r--kutils/tests/kreplacetest.cpp192
-rw-r--r--kutils/tests/kreplacetest.h10
33 files changed, 680 insertions, 680 deletions
diff --git a/kutils/groups.dox b/kutils/groups.dox
index 95d926d73..1b9866d03 100644
--- a/kutils/groups.dox
+++ b/kutils/groups.dox
@@ -7,9 +7,9 @@
*/
/**
-@defgroup findreplace Find and Replace classes
+@defgroup tqfindtqreplace Find and Replace classes
-These classes implement a generic find/replace function, along with
+These classes implement a generic tqfind/tqreplace function, along with
extensible dialogs.
*/
diff --git a/kutils/kcmodulecontainer.cpp b/kutils/kcmodulecontainer.cpp
index e75ecc3cf..efbae01b2 100644
--- a/kutils/kcmodulecontainer.cpp
+++ b/kutils/kcmodulecontainer.cpp
@@ -143,7 +143,7 @@ void KCModuleContainer::addModule( const TQString& module )
d->tabWidget->addTab( proxy, TQIconSet(KGlobal::iconLoader()->loadIcon(
proxy->moduleInfo().icon(), KIcon::Desktop)),
/* QT eats ampersands for dinner. But not this time. */
- proxy->moduleInfo().moduleName().replace( "&", "&&" ));
+ proxy->moduleInfo().moduleName().tqreplace( "&", "&&" ));
d->tabWidget->setTabToolTip( proxy, proxy->moduleInfo().comment() );
diff --git a/kutils/kcmodulecontainer.h b/kutils/kcmodulecontainer.h
index 7b8551b21..3e73e748f 100644
--- a/kutils/kcmodulecontainer.h
+++ b/kutils/kcmodulecontainer.h
@@ -39,7 +39,7 @@ class KCModuleProxy;
*
* The KCModuleContainer class is a convenience class for organizing a multiple set
* of KCModule. KCModuleContainer is a sub class of KCModule and builds an interface mainly
- * consisting of a tab widget where each tab contains one of the modules specified via one of the
+ * consisting of a tab widget where each tab tqcontains one of the modules specified via one of the
* constructors. KCModuleContainer can handle modules which requires root permissions. What you
* most likely want is the KCMODULECONTAINER macro. \n
* Sometimes it is of interest to detect in runtime whether a module should be loaded or not. This
diff --git a/kutils/kcmoduleinfo.cpp b/kutils/kcmoduleinfo.cpp
index fe2545a39..f2e65dc38 100644
--- a/kutils/kcmoduleinfo.cpp
+++ b/kutils/kcmoduleinfo.cpp
@@ -128,7 +128,7 @@ void KCModuleInfo::init(KService::Ptr s)
_service = s;
else
{
- kdDebug(712) << "Could not find the service." << endl;
+ kdDebug(712) << "Could not tqfind the service." << endl;
return;
}
diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp
index de1843b7c..d01a0c5b3 100644
--- a/kutils/kcmoduleloader.cpp
+++ b/kutils/kcmoduleloader.cpp
@@ -135,7 +135,7 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep
.arg( mod.moduleName() ),
i18n("<qt><p>The Lisa and lan:/ ioslave modules "
"are not installed by default in Kubuntu, because they are obsolete "
- "and replaced by zeroconf.<br> If you still wish to use them, you "
+ "and tqreplaced by zeroconf.<br> If you still wish to use them, you "
"should install the lisa package from the Universe repository.</p></qt>"),
parent );
} else {
diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp
index 9fd95f40f..213ea16c4 100644
--- a/kutils/kcmoduleproxy.cpp
+++ b/kutils/kcmoduleproxy.cpp
@@ -311,7 +311,7 @@ void KCModuleProxy::runAsRoot()
TQPalette pal( red );
pal.setColor( TQColorGroup::Background,
- colorGroup().background() );
+ tqcolorGroup().background() );
d->embedFrame->setPalette( pal );
d->embedFrame->setLineWidth( 2 );
d->embedFrame->setMidLineWidth( 2 );
@@ -323,7 +323,7 @@ void KCModuleProxy::runAsRoot()
TQLabel *lblBusy = new TQLabel(i18n("<big>Loading...</big>"), d->embedWidget, "lblBusy" );
lblBusy->setTextFormat(RichText);
- lblBusy->setAlignment(AlignCenter);
+ lblBusy->tqsetAlignment(AlignCenter);
lblBusy->setGeometry(0,0, d->kcm->width(), d->kcm->height());
lblBusy->show();
@@ -347,7 +347,7 @@ void KCModuleProxy::runAsRoot()
/* Remove all kdesu switches */
while( cmd.length() > 1 && cmd[ 0 ] == '-' )
- cmd = cmd.remove( 0, cmd.find( ' ' ) ).stripWhiteSpace();
+ cmd = cmd.remove( 0, cmd.tqfind( ' ' ) ).stripWhiteSpace();
}
if (cmd.left(8) == "kcmshell")
@@ -416,7 +416,7 @@ void KCModuleProxy::rootExited()
/* Such that the "ordinary" module loads again */
d->rootMode = false;
- d->topLayout->invalidate();
+ d->topLayout->tqinvalidate();
TQShowEvent ev;
showEvent( &ev );
diff --git a/kutils/kcmoduleproxy.h b/kutils/kcmoduleproxy.h
index d615edc1e..4323a1d78 100644
--- a/kutils/kcmoduleproxy.h
+++ b/kutils/kcmoduleproxy.h
@@ -39,14 +39,14 @@ class KProcess;
* @brief Encapsulates a KCModule for embedding.
*
* KCModuleProxy is a wrapper for KCModule intended for cases where
- * modules are to be displayed. It ensures layout is consistent, handles
+ * modules are to be displayed. It ensures tqlayout is consistent, handles
* root/administrator modules and in general takes care of the details
* needed for making a module available in an interface. A KCModuleProxy
* can be treated as a TQWidget, without worrying about the details specific
* for modules such as library loading. KCModuleProxy is not a sub class of KCModule
* but its API closely resembles KCModule's.\n
* Usually, an instance is created by passing one of the constructors a KService::Ptr,
- * KCModuleInfo or simply the name of the module and then added to the layout as any
+ * KCModuleInfo or simply the name of the module and then added to the tqlayout as any
* other widget. \n
* When the user have changed the module, changed( bool ) as well as changed ( KCModuleProxy * )
* is emitted. KCModuleProxy does not take care of prompting for saving - if the object is deleted while
diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp
index 33f243529..73456da89 100644
--- a/kutils/kcmultidialog.cpp
+++ b/kutils/kcmultidialog.cpp
@@ -148,7 +148,7 @@ void KCMultiDialog::apply()
TQStringList * names = moduleParentComponents[ m ];
kdDebug(710) << k_funcinfo << *names << " saved and added to the list" << endl;
for( TQStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
- if( updatedModules.find( *it ) == updatedModules.end() )
+ if( updatedModules.tqfind( *it ) == updatedModules.end() )
updatedModules.append( *it );
}
}
@@ -275,7 +275,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
return;
}
KCModuleProxy * module;
- if( m_orphanModules.contains( moduleinfo.service() ) )
+ if( m_orphanModules.tqcontains( moduleinfo.service() ) )
{
// the KCModule already exists - it was removed from the dialog in
// removeAllModules
diff --git a/kutils/kcmultidialog.h b/kutils/kcmultidialog.h
index df1707a9a..97d978667 100644
--- a/kutils/kcmultidialog.h
+++ b/kutils/kcmultidialog.h
@@ -72,8 +72,8 @@ public:
/**
- * Constructor for the predefined layout mode where you specify the
- * kind of layout (face) and also add buttons. Note that the User1 button
+ * Constructor for the predefined tqlayout mode where you specify the
+ * kind of tqlayout (face) and also add buttons. Note that the User1 button
* of KDialogBase is already used to provide a "Reset" button so only
* two more buttons are available to users of KCMultiDialog. When clicked
* they trigger slotUser2() and slotUser3().
@@ -212,7 +212,7 @@ protected slots:
/**
* This slot is called when the user presses the "Help" Button.
* It reads the DocPath field of the currently selected KControl
- * module's .desktop file to find the path to the documentation,
+ * module's .desktop file to tqfind the path to the documentation,
* which it then attempts to load.
*
* You can reimplement this slot if needed.
diff --git a/kutils/kfind.cpp b/kutils/kfind.cpp
index 7b2da6899..da77e13ae 100644
--- a/kutils/kfind.cpp
+++ b/kutils/kfind.cpp
@@ -48,7 +48,7 @@ KFindNextDialog::KFindNextDialog(const TQString &pattern, TQWidget *parent) :
User1 | Close,
User1,
false,
- KStdGuiItem::find())
+ KStdGuiItem::tqfind())
{
setMainWidget( new TQLabel( i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>").arg(pattern), this ) );
}
@@ -58,7 +58,7 @@ KFindNextDialog::KFindNextDialog(const TQString &pattern, TQWidget *parent) :
struct KFind::Private
{
Private() :
- findDialog(0),
+ tqfindDialog(0),
patternChanged(false),
matchedPattern(""),
incrementalPath(29, true),
@@ -103,7 +103,7 @@ struct KFind::Private
bool dirty;
};
- TQGuardedPtr<TQWidget> findDialog;
+ TQGuardedPtr<TQWidget> tqfindDialog;
bool patternChanged;
TQString matchedPattern;
TQDict<Match> incrementalPath;
@@ -123,11 +123,11 @@ KFind::KFind( const TQString &pattern, long options, TQWidget *parent )
init( pattern );
}
-KFind::KFind( const TQString &pattern, long options, TQWidget *parent, TQWidget *findDialog )
+KFind::KFind( const TQString &pattern, long options, TQWidget *parent, TQWidget *tqfindDialog )
: TQObject( parent )
{
d = new KFind::Private;
- d->findDialog = findDialog;
+ d->tqfindDialog = tqfindDialog;
m_options = options;
init( pattern );
}
@@ -158,11 +158,11 @@ bool KFind::needData() const
// always true when m_text is empty.
if (m_options & KFindDialog::FindBackwards)
// m_index==-1 and m_lastResult==Match means we haven't answered nomatch yet
- // This is important in the "replace with a prompt" case.
+ // This is important in the "tqreplace with a prompt" case.
return ( m_index < 0 && m_lastResult != Match );
else
// "index over length" test removed: we want to get a nomatch before we set data again
- // This is important in the "replace with a prompt" case.
+ // This is important in the "tqreplace with a prompt" case.
return m_index == INDEX_NOMATCH;
}
@@ -173,7 +173,7 @@ void KFind::setData( const TQString& data, int startPos )
void KFind::setData( int id, const TQString& data, int startPos )
{
- // cache the data for incremental find
+ // cache the data for incremental tqfind
if ( m_options & KFindDialog::FindIncremental )
{
if ( id != -1 )
@@ -207,18 +207,18 @@ void KFind::setData( int id, const TQString& data, int startPos )
}
}
-KDialogBase* KFind::findNextDialog( bool create )
+KDialogBase* KFind::tqfindNextDialog( bool create )
{
if ( !m_dialog && create )
{
- m_dialog = new KFindNextDialog( m_pattern, parentWidget() );
+ m_dialog = new KFindNextDialog( m_pattern, tqparentWidget() );
connect( m_dialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotFindNext() ) );
connect( m_dialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) );
}
return m_dialog;
}
-KFind::Result KFind::find()
+KFind::Result KFind::tqfind()
{
Q_ASSERT( m_index != INDEX_NOMATCH || d->patternChanged );
@@ -227,7 +227,7 @@ KFind::Result KFind::find()
// Move on before looking for the next match, _if_ we just found a match
if (m_options & KFindDialog::FindBackwards) {
m_index--;
- if ( m_index == -1 ) // don't call KFind::find with -1, it has a special meaning
+ if ( m_index == -1 ) // don't call KFind::tqfind with -1, it has a special meaning
{
m_lastResult = NoMatch;
return NoMatch;
@@ -250,7 +250,7 @@ KFind::Result KFind::find()
{
bool clean = true;
- // find the first result backwards on the path that isn't dirty
+ // tqfind the first result backwards on the path that isn't dirty
while ( d->data[match->dataId]->dirty == true &&
!m_pattern.isEmpty() )
{
@@ -330,14 +330,14 @@ KFind::Result KFind::find()
do
{
// if we have multiple data blocks in our cache, walk through these
- // blocks till we either searched all blocks or we find a match
+ // blocks till we either searched all blocks or we tqfind a match
do
{
// Find the next candidate match.
if ( m_options & KFindDialog::RegularExpression )
- m_index = KFind::find(m_text, *m_regExp, m_index, m_options, &m_matchedLength);
+ m_index = KFind::tqfind(m_text, *m_regExp, m_index, m_options, &m_matchedLength);
else
- m_index = KFind::find(m_text, m_pattern, m_index, m_options, &m_matchedLength);
+ m_index = KFind::tqfind(m_text, m_pattern, m_index, m_options, &m_matchedLength);
if ( m_options & KFindDialog::FindIncremental )
d->data[d->currentId]->dirty = false;
@@ -368,7 +368,7 @@ KFind::Result KFind::find()
delete d->emptyMatch;
d->emptyMatch = new Private::Match( d->currentId, m_index, m_matchedLength );
} else
- d->incrementalPath.replace(m_pattern, new Private::Match(d->currentId, m_index, m_matchedLength));
+ d->incrementalPath.tqreplace(m_pattern, new Private::Match(d->currentId, m_index, m_matchedLength));
if ( m_pattern.length() < d->matchedPattern.length() )
{
@@ -388,7 +388,7 @@ KFind::Result KFind::find()
emit highlight(m_text, m_index, m_matchedLength);
if ( !m_dialogClosed )
- findNextDialog(true)->show();
+ tqfindNextDialog(true)->show();
#ifdef DEBUG_FIND
kdDebug() << k_funcinfo << "Match. Next m_index=" << m_index << endl;
@@ -451,14 +451,14 @@ void KFind::startNewIncrementalSearch()
}
// static
-int KFind::find(const TQString &text, const TQString &pattern, int index, long options, int *matchedLength)
+int KFind::tqfind(const TQString &text, const TQString &pattern, int index, long options, int *matchedLength)
{
// Handle regular expressions in the appropriate way.
if (options & KFindDialog::RegularExpression)
{
TQRegExp regExp(pattern, options & KFindDialog::CaseSensitive);
- return find(text, regExp, index, options, matchedLength);
+ return tqfind(text, regExp, index, options, matchedLength);
}
bool caseSensitive = (options & KFindDialog::CaseSensitive);
@@ -470,8 +470,8 @@ int KFind::find(const TQString &text, const TQString &pattern, int index, long o
// Backward search, until the beginning of the line...
while (index >= 0)
{
- // ...find the next match.
- index = text.findRev(pattern, index, caseSensitive);
+ // ...tqfind the next match.
+ index = text.tqfindRev(pattern, index, caseSensitive);
if (index == -1)
break;
@@ -487,8 +487,8 @@ int KFind::find(const TQString &text, const TQString &pattern, int index, long o
// Forward search, until the end of the line...
while (index < (int)text.length())
{
- // ...find the next match.
- index = text.find(pattern, index, caseSensitive);
+ // ...tqfind the next match.
+ index = text.tqfind(pattern, index, caseSensitive);
if (index == -1)
break;
@@ -507,11 +507,11 @@ int KFind::find(const TQString &text, const TQString &pattern, int index, long o
// Non-whole-word search.
if (options & KFindDialog::FindBackwards)
{
- index = text.findRev(pattern, index, caseSensitive);
+ index = text.tqfindRev(pattern, index, caseSensitive);
}
else
{
- index = text.find(pattern, index, caseSensitive);
+ index = text.tqfind(pattern, index, caseSensitive);
}
if (index != -1)
{
@@ -522,7 +522,7 @@ int KFind::find(const TQString &text, const TQString &pattern, int index, long o
}
// static
-int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedLength)
+int KFind::tqfind(const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedLength)
{
if (options & KFindDialog::WholeWordsOnly)
{
@@ -531,8 +531,8 @@ int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long o
// Backward search, until the beginning of the line...
while (index >= 0)
{
- // ...find the next match.
- index = text.findRev(pattern, index);
+ // ...tqfind the next match.
+ index = text.tqfindRev(pattern, index);
if (index == -1)
break;
@@ -550,8 +550,8 @@ int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long o
// Forward search, until the end of the line...
while (index < (int)text.length())
{
- // ...find the next match.
- index = text.find(pattern, index);
+ // ...tqfind the next match.
+ index = text.tqfind(pattern, index);
if (index == -1)
break;
@@ -572,11 +572,11 @@ int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long o
// Non-whole-word search.
if (options & KFindDialog::FindBackwards)
{
- index = text.findRev(pattern, index);
+ index = text.tqfindRev(pattern, index);
}
else
{
- index = text.find(pattern, index);
+ index = text.tqfind(pattern, index);
}
if (index != -1)
{
@@ -607,7 +607,7 @@ bool KFind::isWholeWords(const TQString &text, int starts, int matchedLength)
void KFind::slotFindNext()
{
- emit findNext();
+ emit tqfindNext();
}
void KFind::slotDialogClosed()
@@ -628,7 +628,7 @@ void KFind::displayFinalDialog() const
bool KFind::shouldRestart( bool forceAsking, bool showNumMatches ) const
{
- // Only ask if we did a "find from cursor", otherwise it's pointless.
+ // Only ask if we did a "tqfind from cursor", otherwise it's pointless.
// Well, unless the user can modify the document during a search operation,
// hence the force boolean.
if ( !forceAsking && (m_options & KFindDialog::FromCursor) == 0 )
@@ -701,10 +701,10 @@ void KFind::setPattern( const TQString& pattern )
TQWidget* KFind::dialogsParent() const
{
- // If the find dialog is still up, it should get the focus when closing a message box
- // Otherwise, maybe the "find next?" dialog is up
+ // If the tqfind dialog is still up, it should get the focus when closing a message box
+ // Otherwise, maybe the "tqfind next?" dialog is up
// Otherwise, the "view" is the parent.
- return d->findDialog ? (TQWidget*)d->findDialog : ( m_dialog ? m_dialog : parentWidget() );
+ return d->tqfindDialog ? (TQWidget*)d->tqfindDialog : ( m_dialog ? m_dialog : tqparentWidget() );
}
#include "kfind.moc"
diff --git a/kutils/kfind.h b/kutils/kfind.h
index 502708dd1..089d261c3 100644
--- a/kutils/kfind.h
+++ b/kutils/kfind.h
@@ -26,8 +26,8 @@
/**
* @ingroup main
- * @ingroup findreplace
- * @brief A generic implementation of the "find" function.
+ * @ingroup tqfindtqreplace
+ * @brief A generic implementation of the "tqfind" function.
*
* @author S.R.Haque <srhaque@iee.org>, David Faure <faure@kde.org>,
* Arend van Beelen jr. <arend@auton.nl>
@@ -40,25 +40,25 @@
*
* \b Example:
*
- * To use the class to implement a complete find feature:
+ * To use the class to implement a complete tqfind feature:
*
- * In the slot connected to the find action, after using KFindDialog:
+ * In the slot connected to the tqfind action, after using KFindDialog:
* \code
*
- * // This creates a find-next-prompt dialog if needed.
- * m_find = new KFind(pattern, options, this);
+ * // This creates a tqfind-next-prompt dialog if needed.
+ * m_tqfind = new KFind(pattern, options, this);
*
* // Connect highlight signal to code which handles highlighting
* // of found text.
- * connect( m_find, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ * connect( m_tqfind, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
* this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
- * // Connect findNext signal - called when pressing the button in the dialog
- * connect( m_find, TQT_SIGNAL( findNext() ),
+ * // Connect tqfindNext signal - called when pressing the button in the dialog
+ * connect( m_tqfind, TQT_SIGNAL( tqfindNext() ),
* this, TQT_SLOT( slotFindNext() ) );
* \endcode
*
- * 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().
+ * 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().
*
* 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 && <position not at end> ) {
- * if ( m_find->needData() )
- * m_find->setData( <current text fragment> );
+ * if ( m_tqfind->needData() )
+ * m_tqfind->setData( <current text fragment> );
*
* // Let KFind inspect the text fragment, and display a dialog if a match is found
- * res = m_find->find();
+ * res = m_tqfind->tqfind();
*
* if ( res == KFind::NoMatch ) {
* <Move to the next text fragment, honoring the FindBackwards setting for the direction>
@@ -85,13 +85,13 @@
* }
*
* if ( res == KFind::NoMatch ) // i.e. at end
- * <Call either m_find->displayFinalDialog(); delete m_find; m_find = 0L;
- * or if ( m_find->shouldRestart() ) { reinit (w/o FromCursor) and call slotFindNext(); }
- * else { m_find->closeFindNextDialog(); }>
+ * <Call either m_tqfind->displayFinalDialog(); delete m_tqfind; m_tqfind = 0L;
+ * or if ( m_tqfind->shouldRestart() ) { reinit (w/o FromCursor) and call slotFindNext(); }
+ * else { m_tqfind->closeFindNextDialog(); }>
* }
* \endcode
*
- * Don't forget to delete m_find in the destructor of your class,
+ * Don't forget to delete m_tqfind 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 QObject
+ public TQObject
{
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 find dialog. @see KFindDialog.
+ * @param options Options for the tqfind 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 find dialog is closed.
+ * will notice if the tqfind dialog is closed.
* @param pattern The pattern to look for.
- * @param options Options for the find dialog. @see KFindDialog.
+ * @param options Options for the tqfind dialog. @see KFindDialog.
* @param parent The parent widget.
- * @param findDialog A pointer to the KFindDialog object.
+ * @param tqfindDialog A pointer to the KFindDialog object.
*/
- KFind(const TQString &pattern, long options, TQWidget *parent, TQWidget* findDialog);
+ KFind(const TQString &pattern, long options, TQWidget *parent, TQWidget* tqfindDialog);
/**
* Destructor.
@@ -134,7 +134,7 @@ public:
virtual ~KFind();
/**
- * Result enum. Holds information if the find was successful.
+ * Result enum. Holds information if the tqfind 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 find().
+ * Call this when needData returns @c true, before calling tqfind().
* @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 'find in selection' feature. A value of -1 (the default value)
+ * for the 'tqfind 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 find(). The use of
+ * Call this when needData returns @c true, before calling tqfind(). 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 'find in selection' feature. A value of -1 (the default value)
+ * for the 'tqfind 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 find-again dialog
+ * For each match, emits the highlight() signal and displays the tqfind-again dialog
* proceeding.
* @return Whether or not there has been a match.
*/
- Result find();
+ Result tqfind();
/**
* Return the current options.
*
* Warning: this is usually the same value as the one passed to the constructor,
- * but options might change _during_ the replace operation:
+ * but options might change _during_ the tqreplace 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 find dialog extension has been used to provide additional
+ * if the tqfind 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 "find previous" action,
+ * matches. Set to @c false if the application provides a "tqfind 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 find( const TQString &text, const TQString &pattern, int index, long options, int *matchedlength );
+ static int tqfind( 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 find( const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedlength );
+ static int tqfind( 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 "find next?" prompt.
+ * Return (or create) the dialog that shows the "tqfind 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 find operation is under way. In that case, the
+ * menu item while a tqfind operation is under way. In that case, the
* program may want to call setActiveWindow() on that dialog.
- * @return The find next dialog.
+ * @return The tqfind next dialog.
*/
- KDialogBase* findNextDialog( bool create = false );
+ KDialogBase* tqfindNextDialog( bool create = false );
/**
- * Close the "find next?" dialog. The application should do this when
+ * Close the "tqfind next?" dialog. The application should do this when
* the last match was hit. If the application deletes the KFind, then
- * "find previous" won't be possible anymore.
+ * "tqfind previous" won't be possible anymore.
*
* IMPORTANT: you should also call this if you are using a non-modal
- * find dialog, to tell KFind not to pop up its own dialog.
+ * tqfind 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 find
+ * Connect to this signal to implement highlighting of found text during the tqfind
* 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 find
+ * Connect to this signal to implement highlighting of found text during the tqfind
* 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
- // findprevious will also emit findNext, after temporarily switching the value
+ // tqfindprevious will also emit tqfindNext, after temporarily switching the value
// of FindBackwards
- void findNext();
+ void tqfindNext();
/**
* Emitted when the options have changed.
- * This can happen e.g. with "Replace All", or if our 'find next' dialog
- * gets a "find previous" one day.
+ * This can happen e.g. with "Replace All", or if our 'tqfind next' dialog
+ * gets a "tqfind previous" one day.
*/
void optionsChanged();
/**
- * Emitted when the 'find next' dialog is being closed.
+ * Emitted when the 'tqfind 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_find->deleteLater()
- * to terminate the find operation.
+ * Apps without support for "Find Next" can also do m_tqfind->deleteLater()
+ * to terminate the tqfind operation.
*/
void dialogClosed();
protected:
- TQWidget* parentWidget() const { return (TQWidget *)parent(); }
+ TQWidget* tqparentWidget() const { return (TQWidget *)parent(); }
TQWidget* dialogsParent() const;
protected slots:
diff --git a/kutils/kfinddialog.cpp b/kutils/kfinddialog.cpp
index 7cc6dff46..ee60d569e 100644
--- a/kutils/kfinddialog.cpp
+++ b/kutils/kfinddialog.cpp
@@ -47,36 +47,36 @@ public:
bool m_regexpDialogQueryDone;
long m_enabled; // uses Options to define which search options are enabled
bool m_initialShowDone;
- TQStringList findStrings;
+ TQStringList tqfindStrings;
TQString pattern;
};
-KFindDialog::KFindDialog(TQWidget *parent, const char *name, long options, const TQStringList &findStrings, bool hasSelection) :
+KFindDialog::KFindDialog(TQWidget *parent, const char *name, long options, const TQStringList &tqfindStrings, bool hasSelection) :
KDialogBase(parent, name, true, i18n("Find Text"), Ok | Cancel, Ok),
- m_findExtension (0),
- m_replaceExtension (0)
+ m_tqfindExtension (0),
+ m_tqreplaceExtension (0)
{
d = new KFindDialogPrivate;
- init(false, findStrings, hasSelection);
+ init(false, tqfindStrings, hasSelection);
setOptions(options);
setButtonCancel( KStdGuiItem::close() );
}
-KFindDialog::KFindDialog(bool modal, TQWidget *parent, const char *name, long options, const TQStringList &findStrings, bool hasSelection) :
+KFindDialog::KFindDialog(bool modal, TQWidget *parent, const char *name, long options, const TQStringList &tqfindStrings, bool hasSelection) :
KDialogBase(parent, name, modal, i18n("Find Text"), Ok | Cancel, Ok),
- m_findExtension (0),
- m_replaceExtension (0)
+ m_tqfindExtension (0),
+ m_tqreplaceExtension (0)
{
d = new KFindDialogPrivate;
- init(false, findStrings, hasSelection);
+ init(false, tqfindStrings, hasSelection);
setOptions(options);
setButtonCancel( KStdGuiItem::close() );
}
KFindDialog::KFindDialog(TQWidget *parent, const char *name, bool /*forReplace*/) :
KDialogBase(parent, name, true, i18n("Replace Text"), Ok | Cancel, Ok),
- m_findExtension (0),
- m_replaceExtension (0)
+ m_tqfindExtension (0),
+ m_tqreplaceExtension (0)
{
d = new KFindDialogPrivate;
setButtonCancel( KStdGuiItem::close() );
@@ -87,23 +87,23 @@ KFindDialog::~KFindDialog()
delete d;
}
-TQWidget *KFindDialog::findExtension()
+TQWidget *KFindDialog::tqfindExtension()
{
- if (!m_findExtension)
+ if (!m_tqfindExtension)
{
- m_findExtension = new TQWidget(m_findGrp);
- m_findLayout->addMultiCellWidget(m_findExtension, 3, 3, 0, 1);
+ m_tqfindExtension = new TQWidget(m_tqfindGrp);
+ m_tqfindLayout->addMultiCellWidget(m_tqfindExtension, 3, 3, 0, 1);
}
- return m_findExtension;
+ return m_tqfindExtension;
}
-TQStringList KFindDialog::findHistory() const
+TQStringList KFindDialog::tqfindHistory() const
{
- return m_find->historyItems();
+ return m_tqfind->historyItems();
}
-void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool hasSelection)
+void KFindDialog::init(bool forReplace, const TQStringList &tqfindStrings, bool hasSelection)
{
TQVBoxLayout *topLayout;
TQGridLayout *optionsLayout;
@@ -116,73 +116,73 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( 0 );
- m_findGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page);
- m_findGrp->layout()->setSpacing( KDialog::spacingHint() );
- // m_findGrp->layout()->setMargin( KDialog::marginHint() );
- m_findLayout = new TQGridLayout(m_findGrp->layout());
- m_findLayout->setSpacing( KDialog::spacingHint() );
- // m_findLayout->setMargin( KDialog::marginHint() );
-
- m_findLabel = new TQLabel(i18n("&Text to find:"), m_findGrp);
- m_find = new KHistoryCombo(true, m_findGrp);
- m_find->setMaxCount(10);
- m_find->setDuplicatesEnabled(false);
- m_regExp = new TQCheckBox(i18n("Regular e&xpression"), m_findGrp);
- m_regExpItem = new TQPushButton(i18n("&Edit..."), m_findGrp);
+ m_tqfindGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page);
+ m_tqfindGrp->tqlayout()->setSpacing( KDialog::spacingHint() );
+ // m_tqfindGrp->tqlayout()->setMargin( KDialog::marginHint() );
+ m_tqfindLayout = new TQGridLayout(m_tqfindGrp->tqlayout());
+ m_tqfindLayout->setSpacing( KDialog::spacingHint() );
+ // m_tqfindLayout->setMargin( KDialog::marginHint() );
+
+ m_tqfindLabel = new TQLabel(i18n("&Text to tqfind:"), m_tqfindGrp);
+ m_tqfind = new KHistoryCombo(true, m_tqfindGrp);
+ m_tqfind->setMaxCount(10);
+ m_tqfind->setDuplicatesEnabled(false);
+ m_regExp = new TQCheckBox(i18n("Regular e&xpression"), m_tqfindGrp);
+ m_regExpItem = new TQPushButton(i18n("&Edit..."), m_tqfindGrp);
m_regExpItem->setEnabled(false);
- m_findLayout->addWidget(m_findLabel, 0, 0);
- m_findLayout->addMultiCellWidget(m_find, 1, 1, 0, 1);
- m_findLayout->addWidget(m_regExp, 2, 0);
- m_findLayout->addWidget(m_regExpItem, 2, 1);
- topLayout->addWidget(m_findGrp);
-
- m_replaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page);
- m_replaceGrp->layout()->setSpacing( KDialog::spacingHint() );
- // m_replaceGrp->layout()->setMargin( KDialog::marginHint() );
- m_replaceLayout = new TQGridLayout(m_replaceGrp->layout());
- m_replaceLayout->setSpacing( KDialog::spacingHint() );
-// m_replaceLayout->setMargin( KDialog::marginHint() );
-
- m_replaceLabel = new TQLabel(i18n("Replace&ment text:"), m_replaceGrp);
- m_replace = new KHistoryCombo(true, m_replaceGrp);
- m_replace->setMaxCount(10);
- m_replace->setDuplicatesEnabled(false);
- m_backRef = new TQCheckBox(i18n("Use p&laceholders"), m_replaceGrp);
- m_backRefItem = new TQPushButton(i18n("Insert Place&holder"), m_replaceGrp);
+ m_tqfindLayout->addWidget(m_tqfindLabel, 0, 0);
+ m_tqfindLayout->addMultiCellWidget(m_tqfind, 1, 1, 0, 1);
+ m_tqfindLayout->addWidget(m_regExp, 2, 0);
+ m_tqfindLayout->addWidget(m_regExpItem, 2, 1);
+ topLayout->addWidget(m_tqfindGrp);
+
+ m_tqreplaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page);
+ m_tqreplaceGrp->tqlayout()->setSpacing( KDialog::spacingHint() );
+ // m_tqreplaceGrp->tqlayout()->setMargin( KDialog::marginHint() );
+ m_tqreplaceLayout = new TQGridLayout(m_tqreplaceGrp->tqlayout());
+ m_tqreplaceLayout->setSpacing( KDialog::spacingHint() );
+// m_tqreplaceLayout->setMargin( KDialog::marginHint() );
+
+ m_tqreplaceLabel = new TQLabel(i18n("Replace&ment text:"), m_tqreplaceGrp);
+ m_tqreplace = new KHistoryCombo(true, m_tqreplaceGrp);
+ m_tqreplace->setMaxCount(10);
+ m_tqreplace->setDuplicatesEnabled(false);
+ m_backRef = new TQCheckBox(i18n("Use p&laceholders"), m_tqreplaceGrp);
+ m_backRefItem = new TQPushButton(i18n("Insert Place&holder"), m_tqreplaceGrp);
m_backRefItem->setEnabled(false);
- m_replaceLayout->addWidget(m_replaceLabel, 0, 0);
- m_replaceLayout->addMultiCellWidget(m_replace, 1, 1, 0, 1);
- m_replaceLayout->addWidget(m_backRef, 2, 0);
- m_replaceLayout->addWidget(m_backRefItem, 2, 1);
- topLayout->addWidget(m_replaceGrp);
+ m_tqreplaceLayout->addWidget(m_tqreplaceLabel, 0, 0);
+ m_tqreplaceLayout->addMultiCellWidget(m_tqreplace, 1, 1, 0, 1);
+ m_tqreplaceLayout->addWidget(m_backRef, 2, 0);
+ m_tqreplaceLayout->addWidget(m_backRefItem, 2, 1);
+ topLayout->addWidget(m_tqreplaceGrp);
m_optionGrp = new TQGroupBox(0, Qt::Vertical, i18n("Options"), page);
- m_optionGrp->layout()->setSpacing(KDialog::spacingHint());
- // m_optionGrp->layout()->setMargin(KDialog::marginHint());
- optionsLayout = new TQGridLayout(m_optionGrp->layout());
+ m_optionGrp->tqlayout()->setSpacing(KDialog::spacingHint());
+ // m_optionGrp->tqlayout()->setMargin(KDialog::marginHint());
+ optionsLayout = new TQGridLayout(m_optionGrp->tqlayout());
optionsLayout->setSpacing( KDialog::spacingHint() );
// optionsLayout->setMargin( KDialog::marginHint() );
m_caseSensitive = new TQCheckBox(i18n("C&ase sensitive"), m_optionGrp);
m_wholeWordsOnly = new TQCheckBox(i18n("&Whole words only"), m_optionGrp);
m_fromCursor = new TQCheckBox(i18n("From c&ursor"), m_optionGrp);
- m_findBackwards = new TQCheckBox(i18n("Find &backwards"), m_optionGrp);
+ m_tqfindBackwards = new TQCheckBox(i18n("Find &backwards"), m_optionGrp);
m_selectedText = new TQCheckBox(i18n("&Selected text"), m_optionGrp);
setHasSelection( hasSelection );
- // If we have a selection, we make 'find in selection' default
+ // If we have a selection, we make 'tqfind in selection' default
// and if we don't, then the option has to be unchecked, obviously.
m_selectedText->setChecked( hasSelection );
slotSelectedTextToggled( hasSelection );
- m_promptOnReplace = new TQCheckBox(i18n("&Prompt on replace"), m_optionGrp);
+ m_promptOnReplace = new TQCheckBox(i18n("&Prompt on tqreplace"), m_optionGrp);
m_promptOnReplace->setChecked( true );
optionsLayout->addWidget(m_caseSensitive, 0, 0);
optionsLayout->addWidget(m_wholeWordsOnly, 1, 0);
optionsLayout->addWidget(m_fromCursor, 2, 0);
- optionsLayout->addWidget(m_findBackwards, 0, 1);
+ optionsLayout->addWidget(m_tqfindBackwards, 0, 1);
optionsLayout->addWidget(m_selectedText, 1, 1);
optionsLayout->addWidget(m_promptOnReplace, 2, 1);
topLayout->addWidget(m_optionGrp);
@@ -198,66 +198,66 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha
connect(m_regExpItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPatterns()));
connect(m_backRefItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPlaceholders()));
- connect(m_find, TQT_SIGNAL(textChanged ( const TQString & )),this, TQT_SLOT(textSearchChanged( const TQString & )));
+ connect(m_tqfind, TQT_SIGNAL(textChanged ( const TQString & )),this, TQT_SLOT(textSearchChanged( const TQString & )));
// tab order
- setTabOrder(m_find, m_regExp);
+ setTabOrder(m_tqfind, m_regExp);
setTabOrder(m_regExp, m_regExpItem);
- setTabOrder(m_regExpItem, m_replace);
- setTabOrder(m_replace, m_backRef);
+ setTabOrder(m_regExpItem, m_tqreplace);
+ setTabOrder(m_tqreplace, m_backRef);
setTabOrder(m_backRef, m_backRefItem);
setTabOrder(m_backRefItem, m_caseSensitive);
setTabOrder(m_caseSensitive, m_wholeWordsOnly);
setTabOrder(m_wholeWordsOnly, m_fromCursor);
- setTabOrder(m_fromCursor, m_findBackwards);
- setTabOrder(m_findBackwards, m_selectedText);
+ setTabOrder(m_fromCursor, m_tqfindBackwards);
+ setTabOrder(m_tqfindBackwards, m_selectedText);
setTabOrder(m_selectedText, m_promptOnReplace);
// buddies
- m_findLabel->setBuddy(m_find);
- m_replaceLabel->setBuddy(m_replace);
+ m_tqfindLabel->setBuddy(m_tqfind);
+ m_tqreplaceLabel->setBuddy(m_tqreplace);
if (!forReplace)
{
m_promptOnReplace->hide();
- m_replaceGrp->hide();
+ m_tqreplaceGrp->hide();
}
- d->findStrings = findStrings;
- m_find->setFocus();
+ d->tqfindStrings = tqfindStrings;
+ m_tqfind->setFocus();
enableButtonOK( !pattern().isEmpty() );
if (forReplace)
{
setButtonOK(KGuiItem( i18n("&Replace"), TQString::null,
- i18n("Start replace"),
+ i18n("Start tqreplace"),
i18n("<qt>If you press the <b>Replace</b> button, the text you entered "
"above is searched for within the document and any occurrence is "
- "replaced with the replacement text.</qt>")));
+ "tqreplaced with the tqreplacement text.</qt>")));
}
else
{
- setButtonOK(KGuiItem( i18n("&Find"), "find",
+ setButtonOK(KGuiItem( i18n("&Find"), "tqfind",
i18n("Start searching"),
i18n("<qt>If you press the <b>Find</b> button, the text you entered "
"above is searched for within the document.</qt>")));
}
// QWhatsthis texts
- TQWhatsThis::add ( m_find, i18n(
+ TQWhatsThis::add ( m_tqfind, i18n(
"Enter a pattern to search for, or select a previous pattern from "
"the list.") );
TQWhatsThis::add ( m_regExp, i18n(
"If enabled, search for a regular expression.") );
TQWhatsThis::add ( m_regExpItem, i18n(
"Click here to edit your regular expression using a graphical editor.") );
- TQWhatsThis::add ( m_replace, i18n(
- "Enter a replacement string, or select a previous one from the list.") );
+ TQWhatsThis::add ( m_tqreplace, i18n(
+ "Enter a tqreplacement string, or select a previous one from the list.") );
TQWhatsThis::add( m_backRef, i18n(
"<qt>If enabled, any occurrence of <code><b>\\N</b></code>, where "
- "<code><b>N</b></code> is a integer number, will be replaced with "
+ "<code><b>N</b></code> is a integer number, will be tqreplaced with "
"the corresponding capture (\"parenthesized substring\") from the "
"pattern.<p>To include (a literal <code><b>\\N</b></code> in your "
- "replacement, put an extra backslash in front of it, like "
+ "tqreplacement, put an extra backslash in front of it, like "
"<code><b>\\\\N</b></code>.</qt>") );
TQWhatsThis::add ( m_backRefItem, i18n(
"Click for a menu of available captures.") );
@@ -270,7 +270,7 @@ void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool ha
TQWhatsThis::add ( m_caseSensitive, i18n(
"Perform a case sensitive search: entering the pattern "
"'Joe' will not match 'joe' or 'JOE', only 'Joe'.") );
- TQWhatsThis::add ( m_findBackwards, i18n(
+ TQWhatsThis::add ( m_tqfindBackwards, i18n(
"Search backwards.") );
TQWhatsThis::add ( m_promptOnReplace, i18n(
"Ask before replacing each match found.") );
@@ -287,12 +287,12 @@ void KFindDialog::showEvent( TQShowEvent *e )
{
d->m_initialShowDone = true; // only once
kdDebug() << "showEvent\n";
- if (!d->findStrings.isEmpty())
- setFindHistory(d->findStrings);
- d->findStrings = TQStringList();
+ if (!d->tqfindStrings.isEmpty())
+ setFindHistory(d->tqfindStrings);
+ d->tqfindStrings = TQStringList();
if (!d->pattern.isEmpty()) {
- m_find->lineEdit()->setText( d->pattern );
- m_find->lineEdit()->selectAll();
+ m_tqfind->lineEdit()->setText( d->pattern );
+ m_tqfind->lineEdit()->selectAll();
d->pattern = TQString::null;
}
}
@@ -309,7 +309,7 @@ long KFindDialog::options() const
options |= WholeWordsOnly;
if (m_fromCursor->isChecked())
options |= FromCursor;
- if (m_findBackwards->isChecked())
+ if (m_tqfindBackwards->isChecked())
options |= FindBackwards;
if (m_selectedText->isChecked())
options |= SelectedText;
@@ -320,13 +320,13 @@ long KFindDialog::options() const
TQString KFindDialog::pattern() const
{
- return m_find->currentText();
+ return m_tqfind->currentText();
}
void KFindDialog::setPattern (const TQString &pattern)
{
- m_find->lineEdit()->setText( pattern );
- m_find->lineEdit()->selectAll();
+ m_tqfind->lineEdit()->setText( pattern );
+ m_tqfind->lineEdit()->selectAll();
d->pattern = pattern;
kdDebug() << "setPattern " << pattern<<endl;
}
@@ -335,12 +335,12 @@ void KFindDialog::setFindHistory(const TQStringList &strings)
{
if (strings.count() > 0)
{
- m_find->setHistoryItems(strings, true);
- m_find->lineEdit()->setText( strings.first() );
- m_find->lineEdit()->selectAll();
+ m_tqfind->setHistoryItems(strings, true);
+ m_tqfind->lineEdit()->setText( strings.first() );
+ m_tqfind->lineEdit()->selectAll();
}
else
- m_find->clearHistory();
+ m_tqfind->clearHistory();
}
void KFindDialog::setHasSelection(bool hasSelection)
@@ -376,8 +376,8 @@ void KFindDialog::setSupportsBackwardsFind( bool supports )
// ########## Shouldn't this hide the checkbox instead?
if (supports) d->m_enabled |= FindBackwards;
else d->m_enabled &= ~FindBackwards;
- m_findBackwards->setEnabled( supports );
- m_findBackwards->setChecked( supports && (options() & FindBackwards) );
+ m_tqfindBackwards->setEnabled( supports );
+ m_tqfindBackwards->setChecked( supports && (options() & FindBackwards) );
}
void KFindDialog::setSupportsCaseSensitiveFind( bool supports )
@@ -412,7 +412,7 @@ void KFindDialog::setOptions(long options)
m_caseSensitive->setChecked((d->m_enabled & CaseSensitive) && (options & CaseSensitive));
m_wholeWordsOnly->setChecked((d->m_enabled & WholeWordsOnly) && (options & WholeWordsOnly));
m_fromCursor->setChecked((d->m_enabled & FromCursor) && (options & FromCursor));
- m_findBackwards->setChecked((d->m_enabled & FindBackwards) && (options & FindBackwards));
+ m_tqfindBackwards->setChecked((d->m_enabled & FindBackwards) && (options & FindBackwards));
m_selectedText->setChecked((d->m_enabled & SelectedText) && (options & SelectedText));
m_regExp->setChecked((d->m_enabled & RegularExpression) && (options & RegularExpression));
}
@@ -476,7 +476,7 @@ void KFindDialog::showPatterns()
i = m_patterns->exec(m_regExpItem->mapToGlobal(m_regExpItem->rect().bottomLeft()));
if (i != -1)
{
- TQLineEdit *editor = m_find->lineEdit();
+ TQLineEdit *editor = m_tqfind->lineEdit();
editor->insert(items[i].regExp);
editor->setCursorPosition(editor->cursorPosition() + items[i].cursorAdjustment);
@@ -485,7 +485,7 @@ void KFindDialog::showPatterns()
}
// Create a popup menu with a list of backreference terms, to help the user
-// compose a regular expression replacement pattern.
+// compose a regular expression tqreplacement pattern.
void KFindDialog::showPlaceholders()
{
// Populate the popup menu.
@@ -499,7 +499,7 @@ void KFindDialog::showPlaceholders()
int i = m_placeholders->exec(m_backRefItem->mapToGlobal(m_backRefItem->rect().bottomLeft()));
if (i != -1)
{
- TQLineEdit *editor = m_replace->lineEdit();
+ TQLineEdit *editor = m_tqreplace->lineEdit();
editor->insert( TQString("\\%1").arg( i ) );
}
}
@@ -517,7 +517,7 @@ void KFindDialog::slotPlaceholdersAboutToShow()
void KFindDialog::slotOk()
{
- // Nothing to find?
+ // Nothing to tqfind?
if (pattern().isEmpty())
{
KMessageBox::error(this, i18n("You must enter some text to search for."));
@@ -535,10 +535,10 @@ void KFindDialog::slotOk()
return;
}
}
- m_find->addToHistory(pattern());
+ m_tqfind->addToHistory(pattern());
emit okClicked();
if ( testWFlags( WShowModal ) )
accept();
}
-// kate: space-indent on; indent-width 4; replace-tabs on;
+// kate: space-indent on; indent-width 4; tqreplace-tabs on;
#include "kfinddialog.moc"
diff --git a/kutils/kfinddialog.h b/kutils/kfinddialog.h
index fcf870836..25f8da8d4 100644
--- a/kutils/kfinddialog.h
+++ b/kutils/kfinddialog.h
@@ -32,20 +32,20 @@ class TQCheckBox;
/**
* @ingroup main
- * @ingroup findreplace
- * @brief A generic "find" dialog.
+ * @ingroup tqfindtqreplace
+ * @brief A generic "tqfind" dialog.
*
* @author S.R.Haque <srhaque@iee.org>
*
* \b Detail:
*
* This widget inherits from KDialogBase and implements
- * the following additional functionalities: a find string
+ * the following additional functionalities: a tqfind string
* object and an area for a user-defined widget to extend the dialog.
*
* \b Example:
*
- * To use the basic modal find dialog, and then run the search:
+ * To use the basic modal tqfind dialog, and then run the search:
*
* \code
* KFindDialog dlg(....)
@@ -55,20 +55,20 @@ class TQCheckBox;
* // proceed with KFind from here
* \endcode
*
- * To create a non-modal find dialog:
+ * To create a non-modal tqfind dialog:
* \code
- * if ( m_findDia )
- * KWin::setActiveWindow( m_findDia->winId() );
+ * if ( m_tqfindDia )
+ * KWin::setActiveWindow( m_tqfindDia->winId() );
* else
* {
- * m_findDia = new KFindDialog(false,...);
- * connect( m_findDia, TQT_SIGNAL(okClicked()), this, TQT_SLOT(findTextNext()) );
+ * m_tqfindDia = new KFindDialog(false,...);
+ * connect( m_tqfindDia, TQT_SIGNAL(okClicked()), this, TQT_SLOT(tqfindTextNext()) );
* }
* \endcode
- * Don't forget to delete and reset m_findDia when closed.
+ * Don't forget to delete and reset m_tqfindDia when closed.
* (But do NOT delete your KFind object at that point, it's needed for "Find Next")
*
- * To use your own extensions: see findExtension().
+ * To use your own extensions: see tqfindExtension().
*
*/
class KUTILS_EXPORT KFindDialog:
@@ -99,31 +99,31 @@ public:
};
/**
- * Construct a modal find dialog
+ * Construct a modal tqfind dialog
*
* @param parent The parent object of this widget.
* @param name The name of this widget.
* @param options A bitfield of the Options to be checked.
- * @param findStrings The find history, see findHistory()
+ * @param tqfindStrings The tqfind history, see tqfindHistory()
* @param hasSelection Whether a selection exists
*/
KFindDialog( TQWidget *parent = 0, const char *name = 0, long options = 0,
- const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
+ const TQStringList &tqfindStrings = TQStringList(), bool hasSelection = false );
// KDE4: fix ambiguity with private constructor
- // Maybe remove options (there's setOptions) and findStrings (setFindHistory) and hasSelection (setHasSelection)
+ // Maybe remove options (there's setOptions) and tqfindStrings (setFindHistory) and hasSelection (setHasSelection)
/**
- * Construct a non-modal find dialog
+ * Construct a non-modal tqfind dialog
*
* @param modal set to @c false to get a non-modal dialog
* @param parent The parent object of this widget.
* @param name The name of this widget.
* @param options A bitfield of the Options to be checked.
- * @param findStrings The find history, see findHistory()
+ * @param tqfindStrings The tqfind history, see tqfindHistory()
* @param hasSelection Whether a selection exists
*/
KFindDialog( bool modal, TQWidget *parent = 0, const char *name = 0, long options = 0,
- const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
+ const TQStringList &tqfindStrings = TQStringList(), bool hasSelection = false );
// KDE4: consider simplifying
/**
@@ -133,21 +133,21 @@ public:
/**
* Provide the list of @p strings to be displayed as the history
- * of find strings. @p strings might get truncated if it is
+ * of tqfind strings. @p strings might get truncated if it is
* too long.
*
- * @param history The find history.
- * @see findHistory
+ * @param history The tqfind history.
+ * @see tqfindHistory
*/
void setFindHistory( const TQStringList &history );
/**
* Returns the list of history items.
*
- * @return The find history.
+ * @return The tqfind history.
* @see setFindHistory
*/
- TQStringList findHistory() const;
+ TQStringList tqfindHistory() const;
/**
* Enable/disable the 'search in selection' option, depending
@@ -170,7 +170,7 @@ public:
* Enable/disable the 'Find backwards' option, depending
* on whether the application supports it.
*
- * @param supports @c true if the application supports backwards find
+ * @param supports @c true if the application supports backwards tqfind
* This is assumed to be the case by default.
* @since 3.4
*/
@@ -180,7 +180,7 @@ public:
* Enable/disable the 'Case sensitive' option, depending
* on whether the application supports it.
*
- * @param supports @c true if the application supports case sensitive find
+ * @param supports @c true if the application supports case sensitive tqfind
* This is assumed to be the case by default.
* @since 3.4
*/
@@ -190,7 +190,7 @@ public:
* Enable/disable the 'Whole words only' option, depending
* on whether the application supports it.
*
- * @param supports @c true if the application supports whole words only find
+ * @param supports @c true if the application supports whole words only tqfind
* This is assumed to be the case by default.
* @since 3.4
*/
@@ -200,7 +200,7 @@ public:
* Enable/disable the 'Regular expression' option, depending
* on whether the application supports it.
*
- * @param supports @c true if the application supports regular expression find
+ * @param supports @c true if the application supports regular expression tqfind
* This is assumed to be the case by default.
* @since 3.4
*/
@@ -224,13 +224,13 @@ public:
long options() const;
/**
- * Returns the pattern to find.
+ * Returns the pattern to tqfind.
* @return The search text.
*/
TQString pattern() const;
/**
- * Sets the pattern to find.
+ * Sets the pattern to tqfind.
* @param pattern The new search pattern.
*/
void setPattern ( const TQString &pattern );
@@ -242,7 +242,7 @@ public:
* widgets for the pattern string.
* @return An extensible TQWidget.
*/
- TQWidget *findExtension();
+ TQWidget *tqfindExtension();
protected slots:
@@ -264,44 +264,44 @@ private slots:
private:
- TQGroupBox *m_findGrp;
- TQLabel *m_findLabel;
- KHistoryCombo *m_find;
+ TQGroupBox *m_tqfindGrp;
+ TQLabel *m_tqfindLabel;
+ KHistoryCombo *m_tqfind;
TQCheckBox *m_regExp;
TQPushButton *m_regExpItem;
- TQGridLayout *m_findLayout;
- TQWidget *m_findExtension;
+ TQGridLayout *m_tqfindLayout;
+ TQWidget *m_tqfindExtension;
TQGroupBox *m_optionGrp;
TQCheckBox *m_wholeWordsOnly;
TQCheckBox *m_fromCursor;
TQCheckBox *m_selectedText;
TQCheckBox *m_caseSensitive;
- TQCheckBox *m_findBackwards;
+ TQCheckBox *m_tqfindBackwards;
TQPopupMenu *m_patterns;
- // Our dirty little secret is that we also implement the "replace" dialog. But we
+ // Our dirty little secret is that we also implement the "tqreplace" dialog. But we
// keep that fact hidden from all but our friends.
friend class KReplaceDialog;
/**
- * Construct a find dialog with a parent object and a name. This version of the
+ * Construct a tqfind dialog with a parent object and a name. This version of the
* constructor is for use by friends only!
*
- * @param forReplace Is this a replace dialog?
+ * @param forReplace Is this a tqreplace dialog?
*/
KFindDialog( TQWidget *parent, const char *name, bool forReplace );
- void init( bool forReplace, const TQStringList &findStrings, bool hasSelection );
+ void init( bool forReplace, const TQStringList &tqfindStrings, bool hasSelection );
- TQGroupBox *m_replaceGrp;
- TQLabel *m_replaceLabel;
- KHistoryCombo *m_replace;
+ TQGroupBox *m_tqreplaceGrp;
+ TQLabel *m_tqreplaceLabel;
+ KHistoryCombo *m_tqreplace;
TQCheckBox* m_backRef;
TQPushButton* m_backRefItem;
- TQGridLayout *m_replaceLayout;
- TQWidget *m_replaceExtension;
+ TQGridLayout *m_tqreplaceLayout;
+ TQWidget *m_tqreplaceExtension;
TQCheckBox* m_promptOnReplace;
diff --git a/kutils/kmultitabbar.cpp b/kutils/kmultitabbar.cpp
index a9b648736..22fd31d73 100644
--- a/kutils/kmultitabbar.cpp
+++ b/kutils/kmultitabbar.cpp
@@ -110,7 +110,7 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
mainLayout->setAutoAdd(true);
}
- viewport()->repaint();
+ viewport()->tqrepaint();
}
void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph )
@@ -120,9 +120,9 @@ void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clip
if (m_position==KMultiTabBar::Right)
{
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,0,0,viewport()->height());
- paint->setPen(colorGroup().background().dark(120));
+ paint->setPen(tqcolorGroup().background().dark(120));
paint->drawLine(1,0,1,viewport()->height());
@@ -130,28 +130,28 @@ void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clip
else
if (m_position==KMultiTabBar::Left)
{
- paint->setPen(colorGroup().light());
+ paint->setPen(tqcolorGroup().light());
paint->drawLine(23,0,23,viewport()->height());
paint->drawLine(22,0,22,viewport()->height());
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,0,0,viewport()->height());
}
else
if (m_position==KMultiTabBar::Bottom)
{
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,0,viewport()->width(),0);
- paint->setPen(colorGroup().background().dark(120));
+ paint->setPen(tqcolorGroup().background().dark(120));
paint->drawLine(0,1,viewport()->width(),1);
}
else
{
- paint->setPen(colorGroup().light());
+ paint->setPen(tqcolorGroup().light());
paint->drawLine(0,23,viewport()->width(),23);
paint->drawLine(0,22,viewport()->width(),22);
-/* paint->setPen(colorGroup().shadow());
+/* paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,0,0,viewport()->height());*/
}
@@ -188,8 +188,8 @@ void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev)
void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) {
/* kdDebug()<<"KMultiTabBarInternal::resizeEvent"<<endl;
- kdDebug()<<"KMultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl;
- kdDebug()<<"KMultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/
+ kdDebug()<<"KMultiTabBarInternal::resizeEvent - box tqgeometry"<<box->tqgeometry()<<endl;
+ kdDebug()<<"KMultiTabBarInternal::resizeEvent - tqgeometry"<<tqgeometry()<<endl;*/
if (ev) TQScrollView::resizeEvent(ev);
if ( (m_style==KMultiTabBar::KDEV3) ||
@@ -378,7 +378,7 @@ void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition p
m_position=pos;
for (uint i=0;i<m_tabs.count();i++)
m_tabs.at(i)->setTabsPosition(m_position);
- viewport()->repaint();
+ viewport()->tqrepaint();
}
KMultiTabBarButton::KMultiTabBarButton(const TQPixmap& pic,const TQString& text, TQPopupMenu *popup,
@@ -434,29 +434,29 @@ void KMultiTabBarButton::slotClicked()
void KMultiTabBarButton::setPosition(KMultiTabBar::KMultiTabBarPosition pos)
{
m_position=pos;
- repaint();
+ tqrepaint();
}
void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style)
{
m_style=style;
- repaint();
+ tqrepaint();
}
void KMultiTabBarButton::hideEvent( TQHideEvent* he) {
TQPushButton::hideEvent(he);
- KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
+ KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(tqparentWidget());
if (tb) tb->updateSeparator();
}
void KMultiTabBarButton::showEvent( TQShowEvent* he) {
TQPushButton::showEvent(he);
- KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
+ KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(tqparentWidget());
if (tb) tb->updateSeparator();
}
-TQSize KMultiTabBarButton::sizeHint() const
+TQSize KMultiTabBarButton::tqsizeHint() const
{
constPolish();
@@ -472,7 +472,7 @@ TQSize KMultiTabBarButton::sizeHint() const
}
#endif
if ( isMenuButton() )
- w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this);
+ w += style().tqpixelMetric(TQStyle::PM_MenuButtonIndicator, this);
if ( pixmap() ) {
TQPixmap *pm = (TQPixmap *)pixmap();
@@ -482,7 +482,7 @@ TQSize KMultiTabBarButton::sizeHint() const
TQString s( text() );
bool empty = s.isEmpty();
if ( empty )
- s = TQString::fromLatin1("XXXX");
+ s = TQString::tqfromLatin1("XXXX");
TQFontMetrics fm = fontMetrics();
TQSize sz = fm.size( ShowPrefix, s );
if(!empty || !w)
@@ -525,7 +525,7 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
}
setPosition(pos);
-// repaint();
+// tqrepaint();
}
void KMultiTabBarTab::setIcon(const TQString& icon)
@@ -577,12 +577,12 @@ void KMultiTabBarTab::updateState()
if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left)) {
setFixedWidth(24);
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
- setFixedHeight(KMultiTabBarButton::sizeHint().width());
+ setFixedHeight(KMultiTabBarButton::tqsizeHint().width());
} else setFixedHeight(36);
} else {
setFixedHeight(24);
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
- setFixedWidth(KMultiTabBarButton::sizeHint().width());
+ setFixedWidth(KMultiTabBarButton::tqsizeHint().width());
} else setFixedWidth(36);
}
} else {
@@ -633,7 +633,7 @@ void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) {
const int height = 24;
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right))
- sh=TQSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
+ sh=TQSize(this->height(),this->width());//KMultiTabBarButton::tqsizeHint();
else sh=TQSize(this->width(),this->height());
}
else
@@ -650,8 +650,8 @@ void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) {
if (isOn()) st|=TQStyle::Style_On;
- style().drawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
- style().drawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().tqdrawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), tqcolorGroup(),st);
+ style().tqdrawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), tqcolorGroup(),st);
switch (m_position) {
case KMultiTabBar::Left:
@@ -667,8 +667,8 @@ void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) {
paint->drawPixmap(0,0,pixmap);
break;
}
-// style().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()),
-// colorGroup(),TQStyle::Style_Enabled);
+// style().tqdrawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()),
+// tqcolorGroup(),TQStyle::Style_Enabled);
}
@@ -678,58 +678,58 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
TQPixmap pixmap;
if ( iconSet())
pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal );
- paint->fillRect(0, 0, 24, 24, colorGroup().background());
+ paint->fillRect(0, 0, 24, 24, tqcolorGroup().background());
if (!isOn())
{
if (m_position==KMultiTabBar::Right)
{
- paint->fillRect(0,0,21,21,TQBrush(colorGroup().background()));
+ paint->fillRect(0,0,21,21,TQBrush(tqcolorGroup().background()));
- paint->setPen(colorGroup().background().dark(150));
+ paint->setPen(tqcolorGroup().background().dark(150));
paint->drawLine(0,22,23,22);
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,0,0,23);
- paint->setPen(colorGroup().background().dark(120));
+ paint->setPen(tqcolorGroup().background().dark(120));
paint->drawLine(1,0,1,23);
}
else
if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top))
{
- paint->fillRect(0,1,23,22,TQBrush(colorGroup().background()));
+ paint->fillRect(0,1,23,22,TQBrush(tqcolorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
- paint->setPen(colorGroup().background().dark(120));
+ paint->setPen(tqcolorGroup().background().dark(120));
paint->drawLine(23,0,23,23);
- paint->setPen(colorGroup().light());
+ paint->setPen(tqcolorGroup().light());
paint->drawLine(0,22,23,22);
paint->drawLine(0,23,23,23);
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,0,23,0);
- paint->setPen(colorGroup().background().dark(120));
+ paint->setPen(tqcolorGroup().background().dark(120));
paint->drawLine(0,1,23,1);
}
else
{
- paint->setPen(colorGroup().background().dark(120));
+ paint->setPen(tqcolorGroup().background().dark(120));
paint->drawLine(0,23,23,23);
- paint->fillRect(0,0,23,21,TQBrush(colorGroup().background()));
+ paint->fillRect(0,0,23,21,TQBrush(tqcolorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
- paint->setPen(colorGroup().light());
+ paint->setPen(tqcolorGroup().light());
paint->drawLine(23,0,23,23);
paint->drawLine(22,0,22,23);
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,0,0,23);
}
@@ -740,12 +740,12 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
{
if (m_position==KMultiTabBar::Right)
{
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,height()-1,23,height()-1);
paint->drawLine(0,height()-2,23,height()-2);
paint->drawLine(23,0,23,height()-1);
paint->drawLine(22,0,22,height()-1);
- paint->fillRect(0,0,21,height()-3,TQBrush(colorGroup().light()));
+ paint->fillRect(0,0,21,height()-3,TQBrush(tqcolorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
@@ -755,9 +755,9 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
TQPixmap tpixmap(height()-25-3, width()-2);
TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light()));
- painter.setPen(colorGroup().text());
+ painter.setPen(tqcolorGroup().text());
painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(90);
@@ -769,25 +769,25 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
else
if (m_position==KMultiTabBar::Top)
{
- paint->fillRect(0,0,width()-1,23,TQBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,23,TQBrush(tqcolorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
- paint->setPen(colorGroup().text());
+ paint->setPen(tqcolorGroup().text());
paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
}
else
if (m_position==KMultiTabBar::Bottom)
{
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,23,width()-1,23);
paint->drawLine(0,22,width()-1,22);
- paint->fillRect(0,0,width()-1,21,TQBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,21,TQBrush(tqcolorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
- paint->setPen(colorGroup().text());
+ paint->setPen(tqcolorGroup().text());
paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
@@ -796,10 +796,10 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
{
- paint->setPen(colorGroup().shadow());
+ paint->setPen(tqcolorGroup().shadow());
paint->drawLine(0,height()-1,23,height()-1);
paint->drawLine(0,height()-2,23,height()-2);
- paint->fillRect(0,0,23,height()-3,TQBrush(colorGroup().light()));
+ paint->fillRect(0,0,23,height()-3,TQBrush(tqcolorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
@@ -809,9 +809,9 @@ void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
TQPixmap tpixmap(height()-25-3, width()-2);
TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light()));
- painter.setPen(colorGroup().text());
+ painter.setPen(tqcolorGroup().text());
painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(-90);
@@ -838,13 +838,13 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, TQWidget *parent,const char *nam
if (bm==Vertical)
{
m_l=new TQVBoxLayout(this);
- setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding, true);
+ tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding, true);
// setFixedWidth(24);
}
else
{
m_l=new TQHBoxLayout(this);
- setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, true);
+ tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, true);
// setFixedHeight(24);
}
m_l->setMargin(0);
@@ -989,7 +989,7 @@ void KMultiTabBar::fontChange(const TQFont& /* oldFont */)
{
for (uint i=0;i<tabs()->count();i++)
tabs()->at(i)->resize();
- repaint();
+ tqrepaint();
}
TQPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
diff --git a/kutils/kmultitabbar.h b/kutils/kmultitabbar.h
index f4ae54b9b..90506c203 100644
--- a/kutils/kmultitabbar.h
+++ b/kutils/kmultitabbar.h
@@ -239,7 +239,7 @@ public slots:
*/
void setText(const TQString &);
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
protected:
KMultiTabBar::KMultiTabBarPosition m_position;
diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp
index 1a64d05e9..c5145e16d 100644
--- a/kutils/kpluginselector.cpp
+++ b/kutils/kpluginselector.cpp
@@ -101,7 +101,7 @@ KPluginListViewToolTip::KPluginListViewToolTip( TQWidget *parent, KListView *lv
void KPluginListViewToolTip::maybeTip( const TQPoint &pos )
{
- if ( !parentWidget() || !m_listView )
+ if ( !tqparentWidget() || !m_listView )
return;
KPluginInfoLVI *item = dynamic_cast<KPluginInfoLVI *>( m_listView->itemAt( pos ) );
@@ -115,8 +115,8 @@ void KPluginListViewToolTip::maybeTip( const TQPoint &pos )
"<tr><td><b>License:</b></td><td>%4</td></tr></table></qt>" ).arg( item->pluginInfo()->comment(),
item->pluginInfo()->author(), item->pluginInfo()->version(), item->pluginInfo()->license() );
- //kdDebug( 702 ) << k_funcinfo << "Adding tooltip: itemRect: " << itemRect << ", tooltip: " << toolTip << endl;
- tip( m_listView->itemRect( item ), toolTip );
+ //kdDebug( 702 ) << k_funcinfo << "Adding tooltip: tqitemRect: " << tqitemRect << ", tooltip: " << toolTip << endl;
+ tip( m_listView->tqitemRect( item ), toolTip );
}
struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate
@@ -192,7 +192,7 @@ void KPluginSelectionWidget::init( const TQValueList<KPluginInfo*> & plugininfos
TQT_SLOT( executed( TQListViewItem * ) ) );
connect( listview, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this,
TQT_SLOT( executed( TQListViewItem * ) ) );
- listview->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
+ listview->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
listview->setAcceptDrops( false );
listview->setFullWidth( true );
listview->setSelectionModeExt( KListView::Single );
@@ -246,7 +246,7 @@ TQWidget * KPluginSelectionWidget::insertKCM( TQWidget * parent,
{
//FIXME: not very verbose
TQLabel * label = new TQLabel( i18n( "Error" ), parent );
- label->setAlignment( Qt::AlignCenter );
+ label->tqsetAlignment( Qt::AlignCenter );
return label;
}
@@ -332,7 +332,7 @@ void KPluginSelectionWidget::updateConfigPage( KPluginInfo * plugininfo,
d->kps->configPage( 1 );
else
{
- if( !d->widgetIDs.contains( plugininfo->pluginName() ) )
+ if( !d->widgetIDs.tqcontains( plugininfo->pluginName() ) )
// if no widget exists for the plugin create it
embeddPluginKCMs( plugininfo, checked );
else
@@ -464,7 +464,7 @@ void KPluginSelectionWidget::save()
names->append( TQString::null );
for( TQStringList::ConstIterator nameit = names->begin();
nameit != names->end(); ++nameit )
- if( updatedModules.find( *nameit ) == updatedModules.end() )
+ if( updatedModules.tqfind( *nameit ) == updatedModules.end() )
updatedModules.append( *nameit );
}
for( TQStringList::ConstIterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
@@ -536,7 +536,7 @@ KPluginSelector::KPluginSelector( TQWidget * parent, const char * name )
TQLabel * label = new TQLabel( i18n( "(This plugin is not configurable)" ),
d->widgetstack );
( new TQVBoxLayout( label, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
- label->setAlignment( Qt::AlignCenter );
+ label->tqsetAlignment( Qt::AlignCenter );
label->setMinimumSize( 200, 200 );
d->widgetstack->addWidget( label, 1 );
diff --git a/kutils/kpluginselector.h b/kutils/kpluginselector.h
index 0c2f1e55d..a39d440a6 100644
--- a/kutils/kpluginselector.h
+++ b/kutils/kpluginselector.h
@@ -144,7 +144,7 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
/**
* Set whether the area for showing the KCMs of the plugins should be
- * hidden if the plugin doesn't have a KCM or whether the layout should
+ * hidden if the plugin doesn't have a KCM or whether the tqlayout should
* rather stay static and only an message should be shown.
*
* By default the config page is not hidden.
diff --git a/kutils/kpluginselector_p.h b/kutils/kpluginselector_p.h
index 1333b2dc4..dca783ae6 100644
--- a/kutils/kpluginselector_p.h
+++ b/kutils/kpluginselector_p.h
@@ -108,7 +108,7 @@ class KPluginSelectionWidget : public QWidget
protected:
/**
* Reimplement in your subclass if you have special needs: The standard
- * implementation looks at the KPluginInfo objects to find the
+ * implementation looks at the KPluginInfo objects to tqfind the
* needed information. But if, for some reason, your program doesn't
* work with that here's your chance to get it working.
*
diff --git a/kutils/kreplace.cpp b/kutils/kreplace.cpp
index f825e93cc..856d330d5 100644
--- a/kutils/kreplace.cpp
+++ b/kutils/kreplace.cpp
@@ -35,7 +35,7 @@ class KReplaceNextDialog : public KDialogBase
{
public:
KReplaceNextDialog( TQWidget *parent );
- void setLabel( const TQString& pattern, const TQString& replacement );
+ void setLabel( const TQString& pattern, const TQString& tqreplacement );
private:
TQLabel* m_mainLabel;
};
@@ -50,28 +50,28 @@ KReplaceNextDialog::KReplaceNextDialog(TQWidget *parent) :
{
m_mainLabel = new TQLabel( this );
setMainWidget( m_mainLabel );
- resize(minimumSize());
+ resize(tqminimumSize());
}
-void KReplaceNextDialog::setLabel( const TQString& pattern, const TQString& replacement )
+void KReplaceNextDialog::setLabel( const TQString& pattern, const TQString& tqreplacement )
{
- m_mainLabel->setText( i18n("Replace '%1' with '%2'?").arg(pattern).arg(replacement) );
+ m_mainLabel->setText( i18n("Replace '%1' with '%2'?").arg(pattern).arg(tqreplacement) );
}
////
-KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent) :
+KReplace::KReplace(const TQString &pattern, const TQString &tqreplacement, long options, TQWidget *parent) :
KFind( pattern, options, parent )
{
- m_replacements = 0;
- m_replacement = replacement;
+ m_tqreplacements = 0;
+ m_tqreplacement = tqreplacement;
}
-KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget *dlg) :
+KReplace::KReplace(const TQString &pattern, const TQString &tqreplacement, long options, TQWidget *parent, TQWidget *dlg) :
KFind( pattern, options, parent, dlg )
{
- m_replacements = 0;
- m_replacement = replacement;
+ m_tqreplacements = 0;
+ m_tqreplacement = tqreplacement;
}
KReplace::~KReplace()
@@ -79,7 +79,7 @@ KReplace::~KReplace()
// KFind::~KFind will delete m_dialog
}
-KDialogBase* KReplace::replaceNextDialog( bool create )
+KDialogBase* KReplace::tqreplaceNextDialog( bool create )
{
if ( m_dialog || create )
return dialog();
@@ -90,7 +90,7 @@ KReplaceNextDialog* KReplace::dialog()
{
if ( !m_dialog )
{
- m_dialog = new KReplaceNextDialog( parentWidget() );
+ m_dialog = new KReplaceNextDialog( tqparentWidget() );
connect( m_dialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotReplaceAll() ) );
connect( m_dialog, TQT_SIGNAL( user2Clicked() ), this, TQT_SLOT( slotSkip() ) );
connect( m_dialog, TQT_SIGNAL( user3Clicked() ), this, TQT_SLOT( slotReplace() ) );
@@ -101,13 +101,13 @@ KReplaceNextDialog* KReplace::dialog()
void KReplace::displayFinalDialog() const
{
- if ( !m_replacements )
- KMessageBox::information(parentWidget(), i18n("No text was replaced."));
+ if ( !m_tqreplacements )
+ KMessageBox::information(tqparentWidget(), i18n("No text was tqreplaced."));
else
- KMessageBox::information(parentWidget(), i18n("1 replacement done.", "%n replacements done.", m_replacements ) );
+ KMessageBox::information(tqparentWidget(), i18n("1 tqreplacement done.", "%n tqreplacements done.", m_tqreplacements ) );
}
-KFind::Result KReplace::replace()
+KFind::Result KReplace::tqreplace()
{
#ifdef DEBUG_REPLACE
kdDebug() << k_funcinfo << "m_index=" << m_index << endl;
@@ -125,11 +125,11 @@ KFind::Result KReplace::replace()
#endif
// Find the next match.
if ( m_options & KReplaceDialog::RegularExpression )
- m_index = KFind::find(m_text, *m_regExp, m_index, m_options, &m_matchedLength);
+ m_index = KFind::tqfind(m_text, *m_regExp, m_index, m_options, &m_matchedLength);
else
- m_index = KFind::find(m_text, m_pattern, m_index, m_options, &m_matchedLength);
+ m_index = KFind::tqfind(m_text, m_pattern, m_index, m_options, &m_matchedLength);
#ifdef DEBUG_REPLACE
- kdDebug() << k_funcinfo << "KFind::find returned m_index=" << m_index << endl;
+ kdDebug() << k_funcinfo << "KFind::tqfind returned m_index=" << m_index << endl;
#endif
if ( m_index != -1 )
{
@@ -141,10 +141,10 @@ KFind::Result KReplace::replace()
#ifdef DEBUG_REPLACE
kdDebug() << k_funcinfo << "PromptOnReplace" << endl;
#endif
- // Display accurate initial string and replacement string, they can vary
+ // Display accurate initial string and tqreplacement string, they can vary
TQString matchedText = m_text.mid( m_index, m_matchedLength );
TQString rep = matchedText;
- KReplace::replace(rep, m_replacement, 0, m_options, m_matchedLength);
+ KReplace::tqreplace(rep, m_tqreplacement, 0, m_options, m_matchedLength);
dialog()->setLabel( matchedText, rep );
dialog()->show();
@@ -177,46 +177,46 @@ KFind::Result KReplace::replace()
return NoMatch;
}
-int KReplace::replace(TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength)
+int KReplace::tqreplace(TQString &text, const TQString &pattern, const TQString &tqreplacement, int index, long options, int *tqreplacedLength)
{
int matchedLength;
- index = KFind::find(text, pattern, index, options, &matchedLength);
+ index = KFind::tqfind(text, pattern, index, options, &matchedLength);
if (index != -1)
{
- *replacedLength = replace(text, replacement, index, options, matchedLength);
+ *tqreplacedLength = tqreplace(text, tqreplacement, index, options, matchedLength);
if (options & KReplaceDialog::FindBackwards)
index--;
else
- index += *replacedLength;
+ index += *tqreplacedLength;
}
return index;
}
-int KReplace::replace(TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength)
+int KReplace::tqreplace(TQString &text, const TQRegExp &pattern, const TQString &tqreplacement, int index, long options, int *tqreplacedLength)
{
int matchedLength;
- index = KFind::find(text, pattern, index, options, &matchedLength);
+ index = KFind::tqfind(text, pattern, index, options, &matchedLength);
if (index != -1)
{
- *replacedLength = replace(text, replacement, index, options, matchedLength);
+ *tqreplacedLength = tqreplace(text, tqreplacement, index, options, matchedLength);
if (options & KReplaceDialog::FindBackwards)
index--;
else
- index += *replacedLength;
+ index += *tqreplacedLength;
}
return index;
}
-int KReplace::replace(TQString &text, const TQString &replacement, int index, long options, int length)
+int KReplace::tqreplace(TQString &text, const TQString &tqreplacement, int index, long options, int length)
{
- TQString rep = replacement;
- // Backreferences: replace \0 with the right portion of 'text'
+ TQString rep = tqreplacement;
+ // Backreferences: tqreplace \0 with the right portion of 'text'
if ( options & KReplaceDialog::BackReference )
- rep.replace( "\\0", text.mid( index, length ) );
- // Then replace rep into the text
- text.replace(index, length, rep);
+ rep.tqreplace( "\\0", text.mid( index, length ) );
+ // Then tqreplace rep into the text
+ text.tqreplace(index, length, rep);
return rep.length();
}
@@ -225,7 +225,7 @@ void KReplace::slotReplaceAll()
doReplace();
m_options &= ~KReplaceDialog::PromptOnReplace;
emit optionsChanged();
- emit findNext();
+ emit tqfindNext();
}
void KReplace::slotSkip()
@@ -238,7 +238,7 @@ void KReplace::slotSkip()
delete m_dialog; // hide it again
m_dialog = 0L;
} else
- emit findNext();
+ emit tqfindNext();
}
void KReplace::slotReplace()
@@ -248,24 +248,24 @@ void KReplace::slotReplace()
delete m_dialog; // hide it again
m_dialog = 0L;
} else
- emit findNext();
+ emit tqfindNext();
}
void KReplace::doReplace()
{
- int replacedLength = KReplace::replace(m_text, m_replacement, m_index, m_options, m_matchedLength);
+ int tqreplacedLength = KReplace::tqreplace(m_text, m_tqreplacement, m_index, m_options, m_matchedLength);
- // Tell the world about the replacement we made, in case someone wants to
+ // Tell the world about the tqreplacement we made, in case someone wants to
// highlight it.
- emit replace(m_text, m_index, replacedLength, m_matchedLength);
+ emit tqreplace(m_text, m_index, tqreplacedLength, m_matchedLength);
#ifdef DEBUG_REPLACE
- kdDebug() << k_funcinfo << "after replace() signal: m_index=" << m_index << " replacedLength=" << replacedLength << endl;
+ kdDebug() << k_funcinfo << "after tqreplace() signal: m_index=" << m_index << " tqreplacedLength=" << tqreplacedLength << endl;
#endif
- m_replacements++;
+ m_tqreplacements++;
if (m_options & KReplaceDialog::FindBackwards)
m_index--;
else {
- m_index += replacedLength;
+ m_index += tqreplacedLength;
// when replacing the empty pattern, move on. See also kjs/regexp.cpp for how this should be done for regexps.
if ( m_pattern.isEmpty() )
++m_index;
@@ -278,13 +278,13 @@ void KReplace::doReplace()
void KReplace::resetCounts()
{
KFind::resetCounts();
- m_replacements = 0;
+ m_tqreplacements = 0;
}
bool KReplace::shouldRestart( bool forceAsking, bool showNumMatches ) const
{
- // Only ask if we did a "find from cursor", otherwise it's pointless.
- // ... Or if the prompt-on-replace option was set.
+ // Only ask if we did a "tqfind from cursor", otherwise it's pointless.
+ // ... Or if the prompt-on-tqreplace option was set.
// Well, unless the user can modify the document during a search operation,
// hence the force boolean.
if ( !forceAsking && (m_options & KFindDialog::FromCursor) == 0
@@ -296,10 +296,10 @@ bool KReplace::shouldRestart( bool forceAsking, bool showNumMatches ) const
TQString message;
if ( showNumMatches )
{
- if ( !m_replacements )
- message = i18n("No text was replaced.");
+ if ( !m_tqreplacements )
+ message = i18n("No text was tqreplaced.");
else
- message = i18n("1 replacement done.", "%n replacements done.", m_replacements );
+ message = i18n("1 tqreplacement done.", "%n tqreplacements done.", m_tqreplacements );
}
else
{
@@ -316,7 +316,7 @@ bool KReplace::shouldRestart( bool forceAsking, bool showNumMatches ) const
i18n("Do you want to restart search from the end?")
: i18n("Do you want to restart search at the beginning?");
- int ret = KMessageBox::questionYesNo( parentWidget(), message, TQString::null, i18n("Restart"), i18n("Stop") );
+ int ret = KMessageBox::questionYesNo( tqparentWidget(), message, TQString::null, i18n("Restart"), i18n("Stop") );
return( ret == KMessageBox::Yes );
}
diff --git a/kutils/kreplace.h b/kutils/kreplace.h
index ea385189b..3a44589b8 100644
--- a/kutils/kreplace.h
+++ b/kutils/kreplace.h
@@ -27,8 +27,8 @@ class KReplaceNextDialog;
/**
* @ingroup main
- * @ingroup findreplace
- * @brief A generic implementation of the "replace" function.
+ * @ingroup tqfindtqreplace
+ * @brief A generic implementation of the "tqreplace" function.
*
* @author S.R.Haque <srhaque@iee.org>, David Faure <faure@kde.org>
*
@@ -40,23 +40,23 @@ class KReplaceNextDialog;
*
* \b Example:
*
- * To use the class to implement a complete replace feature:
+ * To use the class to implement a complete tqreplace feature:
*
- * In the slot connect to the replace action, after using KReplaceDialog:
+ * In the slot connect to the tqreplace action, after using KReplaceDialog:
* \code
*
- * // This creates a replace-on-prompt dialog if needed.
- * m_replace = new KReplace(pattern, replacement, options, this);
+ * // This creates a tqreplace-on-prompt dialog if needed.
+ * m_tqreplace = new KReplace(pattern, tqreplacement, options, this);
*
* // Connect signals to code which handles highlighting
- * // of found text, and on-the-fly replacement.
- * connect( m_replace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ * // of found text, and on-the-fly tqreplacement.
+ * connect( m_tqreplace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
* this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
- * // Connect findNext signal - called when pressing the button in the dialog
- * connect( m_replace, TQT_SIGNAL( findNext() ),
+ * // Connect tqfindNext signal - called when pressing the button in the dialog
+ * connect( m_tqreplace, TQT_SIGNAL( tqfindNext() ),
* this, TQT_SLOT( slotReplaceNext() ) );
- * // Connect replace signal - called when doing a replacement
- * connect( m_replace, TQT_SIGNAL( replace(const TQString &, int, int, int) ),
+ * // Connect tqreplace signal - called when doing a tqreplacement
+ * connect( m_tqreplace, TQT_SIGNAL( tqreplace(const TQString &, int, int, int) ),
* this, TQT_SLOT( slotReplace(const TQString &, int, int, int) ) );
* \endcode
* Then initialize the variables determining the "current position"
@@ -72,11 +72,11 @@ class KReplaceNextDialog;
* {
* KFind::Result res = KFind::NoMatch;
* while ( res == KFind::NoMatch && <position not at end> ) {
- * if ( m_replace->needData() )
- * m_replace->setData( <current text fragment> );
+ * if ( m_tqreplace->needData() )
+ * m_tqreplace->setData( <current text fragment> );
*
* // Let KReplace inspect the text fragment, and display a dialog if a match is found
- * res = m_replace->replace();
+ * res = m_tqreplace->tqreplace();
*
* if ( res == KFind::NoMatch ) {
* <Move to the next text fragment, honoring the FindBackwards setting for the direction>
@@ -84,13 +84,13 @@ class KReplaceNextDialog;
* }
*
* if ( res == KFind::NoMatch ) // i.e. at end
- * <Call either m_replace->displayFinalDialog(); delete m_replace; m_replace = 0L;
- * or if ( m_replace->shouldRestart() ) { reinit (w/o FromCursor) and call slotReplaceNext(); }
- * else { m_replace->closeReplaceNextDialog(); }>
+ * <Call either m_tqreplace->displayFinalDialog(); delete m_tqreplace; m_tqreplace = 0L;
+ * or if ( m_tqreplace->shouldRestart() ) { reinit (w/o FromCursor) and call slotReplaceNext(); }
+ * else { m_tqreplace->closeReplaceNextDialog(); }>
* }
* \endcode
*
- * Don't forget delete m_find in the destructor of your class,
+ * Don't forget delete m_tqfind in the destructor of your class,
* unless you gave it a parent widget on construction.
*
*/
@@ -105,23 +105,23 @@ 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 replacement The replacement string.
- * @param options Options for the find dialog. @see KFindDialog and KReplaceDialog.
+ * @param tqreplacement The tqreplacement string.
+ * @param options Options for the tqfind dialog. @see KFindDialog and KReplaceDialog.
* @param parent The parent widget.
*/
- KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent = 0);
+ KReplace(const TQString &pattern, const TQString &tqreplacement, long options, TQWidget *parent = 0);
/**
* This is the recommended constructor if you also use KReplaceDialog (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, KReplace
- * will notice if the find dialog is closed.
+ * will notice if the tqfind dialog is closed.
* @param pattern The pattern to look for.
- * @param replacement The replacement string.
- * @param options Options for the find dialog. @see KFindDialog and KReplaceDialog.
+ * @param tqreplacement The tqreplacement string.
+ * @param options Options for the tqfind dialog. @see KFindDialog and KReplaceDialog.
* @param parent The parent widget.
- * @param replaceDialog A pointer to the KReplaceDialog object.
+ * @param tqreplaceDialog A pointer to the KReplaceDialog object.
*/
- KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget* replaceDialog);
+ KReplace(const TQString &pattern, const TQString &tqreplacement, long options, TQWidget *parent, TQWidget* tqreplaceDialog);
/**
* Destructor.
@@ -129,13 +129,13 @@ public:
virtual ~KReplace();
/**
- * Return the number of replacements made (i.e. the number of times
- * the replace signal was emitted).
- * Can be used in a dialog box to tell the user how many replacements were made.
+ * Return the number of tqreplacements made (i.e. the number of times
+ * the tqreplace signal was emitted).
+ * Can be used in a dialog box to tell the user how many tqreplacements were made.
* The final dialog does so already, unless you used setDisplayFinalDialog(false).
- * @return The number of replacements.
+ * @return The number of tqreplacements.
*/
- int numReplacements() const { return m_replacements; }
+ int numReplacements() const { return m_tqreplacements; }
/**
* Call this to reset the numMatches & numReplacements counts.
@@ -146,76 +146,76 @@ public:
/**
* Walk the text fragment (e.g. kwrite line, kspread cell) looking for matches.
- * For each match, if prompt-on-replace is specified, emits the highlight() signal
- * and displays the prompt-for-replace dialog before doing the replace.
+ * For each match, if prompt-on-tqreplace is specified, emits the highlight() signal
+ * and displays the prompt-for-tqreplace dialog before doing the tqreplace.
* @return Whether or not there has been a match.
*/
- Result replace();
+ Result tqreplace();
/**
- * Return (or create) the dialog that shows the "find next?" prompt.
+ * Return (or create) the dialog that shows the "tqfind 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 find operation is under way. In that case, the
+ * menu item while a tqfind operation is under way. In that case, the
* program may want to call setActiveWindow() on that dialog.
- * @return The replace next dialog.
+ * @return The tqreplace next dialog.
*/
- KDialogBase* replaceNextDialog( bool create = false );
+ KDialogBase* tqreplaceNextDialog( bool create = false );
/**
- * Close the "replace next?" dialog. The application should do this when
+ * Close the "tqreplace next?" dialog. The application should do this when
* the last match was hit. If the application deletes the KReplace, then
- * "find previous" won't be possible anymore.
+ * "tqfind previous" won't be possible anymore.
*/
void closeReplaceNextDialog();
/**
- * Searches the given string, replaces with the given replacement string,
+ * Searches the given string, tqreplaces with the given tqreplacement string,
* and returns whether a match was found. If one is,
- * the replacement string length is also returned.
+ * the tqreplacement string length is also returned.
*
* A performance optimised version of the function is provided for use
* with regular expressions.
*
* @param text The string to search.
* @param pattern The pattern to look for.
- * @param replacement The replacement string to insert into the text.
+ * @param tqreplacement The tqreplacement string to insert into the text.
* @param index The starting index into the string.
* @param options The options to use.
- * @param replacedLength Output parameter, contains the length of the replaced string.
- * Not always the same as replacement.length(), when backreferences are used.
+ * @param tqreplacedLength Output parameter, tqcontains the length of the tqreplaced string.
+ * Not always the same as tqreplacement.length(), when backreferences are used.
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int replace( TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength );
+ static int tqreplace( TQString &text, const TQString &pattern, const TQString &tqreplacement, int index, long options, int *tqreplacedLength );
/**
- * Searches the given regular expression, replaces with the given replacement string,
+ * Searches the given regular expression, tqreplaces with the given tqreplacement string,
* and returns whether a match was found. If one is,
- * the replacement string length is also returned.
+ * the tqreplacement string length is also returned.
*
* Another version of the function is provided for use with strings.
*
* @param text The string to search.
* @param pattern The regular expression pattern to look for.
- * @param replacement The replacement string to insert into the text.
+ * @param tqreplacement The tqreplacement string to insert into the text.
* @param index The starting index into the string.
* @param options The options to use.
- * @param replacedLength Output parameter, contains the length of the replaced string.
- * Not always the same as replacement.length(), when backreferences are used.
+ * @param tqreplacedLength Output parameter, tqcontains the length of the tqreplaced string.
+ * Not always the same as tqreplacement.length(), when backreferences are used.
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int replace( TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength );
+ static int tqreplace( TQString &text, const TQRegExp &pattern, const TQString &tqreplacement, int index, long options, int *tqreplacedLength );
/**
* Returns @c true if we should restart the search from scratch.
- * Can ask the user, or return @c false (if we already searched/replaced the
+ * Can ask the user, or return @c false (if we already searched/tqreplaced the
* whole document without the PromptOnReplace option).
*
* @param forceAsking set to @c true if the user modified the document during the
* 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 "find previous" action,
+ * matches. Set to @c false if the application provides a "tqfind 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).
@@ -225,7 +225,7 @@ public:
virtual bool shouldRestart( bool forceAsking = false, bool showNumMatches = true ) const;
/**
- * Displays the final dialog telling the user how many replacements were made.
+ * Displays the final dialog telling the user how many tqreplacements were made.
* Call either this or shouldRestart().
*/
virtual void displayFinalDialog() const;
@@ -233,20 +233,20 @@ public:
signals:
/**
- * Connect to this slot to implement updating of replaced text during the replace
+ * Connect to this slot to implement updating of tqreplaced text during the tqreplace
* operation.
*
- * Extra care must be taken to properly implement the "no prompt-on-replace" case.
+ * Extra care must be taken to properly implement the "no prompt-on-tqreplace" case.
* For instance highlight isn't emitted in that case (some code might rely on it),
- * and for performance reasons one should repaint after replace() ONLY if
- * prompt-on-replace was selected.
+ * and for performance reasons one should tqrepaint after tqreplace() ONLY if
+ * prompt-on-tqreplace was selected.
*
- * @param text The text, in which the replacement has already been done.
- * @param replacementIndex Starting index of the matched substring
- * @param replacedLength Length of the replacement string
+ * @param text The text, in which the tqreplacement has already been done.
+ * @param tqreplacementIndex Starting index of the matched substring
+ * @param tqreplacedLength Length of the tqreplacement string
* @param matchedLength Length of the matched string
*/
- void replace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
+ void tqreplace(const TQString &text, int tqreplacementIndex, int tqreplacedLength, int matchedLength);
protected slots:
@@ -257,10 +257,10 @@ protected slots:
private:
KReplaceNextDialog* dialog();
void doReplace();
- static int replace( TQString &text, const TQString &replacement, int index, long options, int length );
+ static int tqreplace( TQString &text, const TQString &tqreplacement, int index, long options, int length );
- TQString m_replacement;
- unsigned m_replacements;
+ TQString m_tqreplacement;
+ unsigned m_tqreplacements;
// Binary compatible extensibility.
class KReplacePrivate;
diff --git a/kutils/kreplacedialog.cpp b/kutils/kreplacedialog.cpp
index 88c006b4d..deef5b529 100644
--- a/kutils/kreplacedialog.cpp
+++ b/kutils/kreplacedialog.cpp
@@ -32,22 +32,22 @@
/**
* we need to insert the strings after the dialog is set
- * up, otherwise TQComboBox will deliver an aweful big sizeHint
- * for long replacement texts.
+ * up, otherwise TQComboBox will deliver an aweful big tqsizeHint
+ * for long tqreplacement texts.
*/
class KReplaceDialog::KReplaceDialogPrivate {
public:
KReplaceDialogPrivate() : m_initialShowDone(false) {}
- TQStringList replaceStrings;
+ TQStringList tqreplaceStrings;
bool m_initialShowDone;
};
-KReplaceDialog::KReplaceDialog(TQWidget *parent, const char *name, long options, const TQStringList &findStrings, const TQStringList &replaceStrings, bool hasSelection) :
+KReplaceDialog::KReplaceDialog(TQWidget *parent, const char *name, long options, const TQStringList &tqfindStrings, const TQStringList &tqreplaceStrings, bool hasSelection) :
KFindDialog(parent, name, true)
{
d = new KReplaceDialogPrivate;
- d->replaceStrings = replaceStrings;
- init(true, findStrings, hasSelection);
+ d->tqreplaceStrings = tqreplaceStrings;
+ init(true, tqfindStrings, hasSelection);
setOptions(options);
}
@@ -62,10 +62,10 @@ void KReplaceDialog::showEvent( TQShowEvent *e )
{
d->m_initialShowDone = true; // only once
- if (!d->replaceStrings.isEmpty())
+ if (!d->tqreplaceStrings.isEmpty())
{
- setReplacementHistory(d->replaceStrings);
- m_replace->lineEdit()->setText( d->replaceStrings[0] );
+ setReplacementHistory(d->tqreplaceStrings);
+ m_tqreplace->lineEdit()->setText( d->tqreplaceStrings[0] );
}
}
@@ -84,27 +84,27 @@ long KReplaceDialog::options() const
return options;
}
-TQWidget *KReplaceDialog::replaceExtension()
+TQWidget *KReplaceDialog::tqreplaceExtension()
{
- if (!m_replaceExtension)
+ if (!m_tqreplaceExtension)
{
- m_replaceExtension = new TQWidget(m_replaceGrp);
- m_replaceLayout->addMultiCellWidget(m_replaceExtension, 3, 3, 0, 1);
+ m_tqreplaceExtension = new TQWidget(m_tqreplaceGrp);
+ m_tqreplaceLayout->addMultiCellWidget(m_tqreplaceExtension, 3, 3, 0, 1);
}
- return m_replaceExtension;
+ return m_tqreplaceExtension;
}
-TQString KReplaceDialog::replacement() const
+TQString KReplaceDialog::tqreplacement() const
{
- return m_replace->currentText();
+ return m_tqreplace->currentText();
}
-TQStringList KReplaceDialog::replacementHistory() const
+TQStringList KReplaceDialog::tqreplacementHistory() const
{
- TQStringList lst = m_replace->historyItems();
+ TQStringList lst = m_tqreplace->historyItems();
// historyItems() doesn't tell us about the case of replacing with an empty string
- if ( m_replace->lineEdit()->text().isEmpty() )
+ if ( m_tqreplace->lineEdit()->text().isEmpty() )
lst.prepend( TQString::null );
return lst;
}
@@ -119,9 +119,9 @@ void KReplaceDialog::setOptions(long options)
void KReplaceDialog::setReplacementHistory(const TQStringList &strings)
{
if (strings.count() > 0)
- m_replace->setHistoryItems(strings, true);
+ m_tqreplace->setHistoryItems(strings, true);
else
- m_replace->clearHistory();
+ m_tqreplace->clearHistory();
}
void KReplaceDialog::slotOk()
@@ -133,13 +133,13 @@ void KReplaceDialog::slotOk()
int caps = r.numCaptures();
TQRegExp check(TQString("((?:\\\\)+)(\\d+)"));
int p = 0;
- TQString rep = replacement();
+ TQString rep = tqreplacement();
while ( (p = check.search( rep, p ) ) > -1 )
{
if ( check.cap(1).length()%2 && check.cap(2).toInt() > caps )
{
KMessageBox::information( this, i18n(
- "Your replacement string is referencing a capture greater than '\\%1', ").arg( caps ) +
+ "Your tqreplacement string is referencing a capture greater than '\\%1', ").arg( caps ) +
( caps ?
i18n("but your pattern only defines 1 capture.",
"but your pattern only defines %n captures.", caps ) :
@@ -153,8 +153,8 @@ void KReplaceDialog::slotOk()
}
KFindDialog::slotOk();
- m_replace->addToHistory(replacement());
+ m_tqreplace->addToHistory(tqreplacement());
}
-// kate: space-indent on; indent-width 4; replace-tabs on;
+// kate: space-indent on; indent-width 4; tqreplace-tabs on;
#include "kreplacedialog.moc"
diff --git a/kutils/kreplacedialog.h b/kutils/kreplacedialog.h
index 409666dbd..e4c59e333 100644
--- a/kutils/kreplacedialog.h
+++ b/kutils/kreplacedialog.h
@@ -33,20 +33,20 @@ class TQRect;
/**
* @ingroup main
- * @ingroup findreplace
- * @short A generic "replace" dialog.
+ * @ingroup tqfindtqreplace
+ * @short A generic "tqreplace" dialog.
*
* @author S.R.Haque <srhaque@iee.org>
*
* \b Detail:
*
* This widget inherits from KFindDialog and implements
- * the following additional functionalities: a replacement string
+ * the following additional functionalities: a tqreplacement string
* object and an area for a user-defined widget to extend the dialog.
*
* \b Example:
*
- * To use the basic replace dialog:
+ * To use the basic tqreplace dialog:
*
* \code
* \endcode
@@ -68,25 +68,25 @@ public:
*/
enum Options
{
- PromptOnReplace = 256, ///< Should the user be prompted before the replace operation?
+ PromptOnReplace = 256, ///< Should the user be prompted before the tqreplace operation?
BackReference = 512
};
/**
- * Construct a replace dialog.read-only or rather select-only combo box with a
+ * Construct a tqreplace dialog.read-only or rather select-only combo box with a
* parent object and a name.
*
* @param parent The parent object of this widget
* @param name The name of this widget
* @param options A bitfield of the Options to be enabled.
- * @param findStrings A TQStringList to insert in the combo box of text to find
- * @param replaceStrings A TQStringList to insert in the combo box of text to
- * replace with
+ * @param tqfindStrings A TQStringList to insert in the combo box of text to tqfind
+ * @param tqreplaceStrings A TQStringList to insert in the combo box of text to
+ * tqreplace with
* @param hasSelection Whether a selection exists
*/
KReplaceDialog( TQWidget *parent = 0, const char *name = 0, long options = 0,
- const TQStringList &findStrings = TQStringList(),
- const TQStringList &replaceStrings = TQStringList(),
+ const TQStringList &tqfindStrings = TQStringList(),
+ const TQStringList &tqreplaceStrings = TQStringList(),
bool hasSelection = true );
/**
@@ -96,21 +96,21 @@ public:
/**
* Provide the list of @p strings to be displayed as the history
- * of replacement strings. @p strings might get truncated if it is
+ * of tqreplacement strings. @p strings might get truncated if it is
* too long.
*
- * @param history The replacement history.
- * @see replacementHistory
+ * @param history The tqreplacement history.
+ * @see tqreplacementHistory
*/
void setReplacementHistory( const TQStringList &history );
/**
* Returns the list of history items.
*
- * @return The replacement history.
+ * @return The tqreplacement history.
* @see setReplacementHistory
*/
- TQStringList replacementHistory() const;
+ TQStringList tqreplacementHistory() const;
/**
* Set the options which are enabled.
@@ -130,19 +130,19 @@ public:
long options() const;
/**
- * Returns the replacement string.
- * @return The replacement string.
+ * Returns the tqreplacement string.
+ * @return The tqreplacement string.
*/
- TQString replacement() const;
+ TQString tqreplacement() const;
/**
* Returns an empty widget which the user may fill with additional UI
* elements as required. The widget occupies the width of the dialog,
* and is positioned immediately the regular expression support widgets
- * for the replacement string.
+ * for the tqreplacement string.
* @return An extensible TQWidget.
*/
- TQWidget *replaceExtension();
+ TQWidget *tqreplaceExtension();
protected slots:
diff --git a/kutils/ksettings/README.dox b/kutils/ksettings/README.dox
index 0660324c1..4f9803efc 100644
--- a/kutils/ksettings/README.dox
+++ b/kutils/ksettings/README.dox
@@ -35,7 +35,7 @@ KSettings::Dialog:
m_dlg = new KSettings::Dialog( QStringList::split( ';', "component1;component2" ) );
\endcode
-The KSettings::Dialog object will be destructed automatically by the QObject
+The KSettings::Dialog object will be destructed automatically by the TQObject
mechanisms.
@@ -85,7 +85,7 @@ object for every registered instance name: \ref KSettings::Dispatcher::configFor
<hr>
<h3>3. The .desktop file for the page</h3>
-The .desktop file holds all the information for the dialog to find the page and
+The .desktop file holds all the information for the dialog to tqfind the page and
insert it at the right place (with the right icon, name and comment).
An example file:
@@ -123,7 +123,7 @@ Some explanation for those keys:
is used by the first two \ref KSettings::Dialog constructors. The Dialog will
use all modules that set X-KDE-ParentApp to
KGlobal::instance()->instanceName(). It
- should be pretty easy to find out what name that is: look at the first
+ should be pretty easy to tqfind out what name that is: look at the first
argument to the KAboutData ctor.
- X-KDE-ParentComponents is a list of the components (plugin/KPart/whatever)
this config page belongs to. Normally there is only one component.
@@ -146,7 +146,7 @@ Some explanation for those keys:
<hr>
-<h3>4. The .setdlg file for hierarchical (TreeList) page layouts</h3>
+<h3>4. The .setdlg file for hierarchical (TreeList) page tqlayouts</h3>
If your config dialog should show a tree of pages in the config dialog you need
to define that hierarchy with a .setdlg file.
@@ -155,7 +155,7 @@ The file should be installed in apps/&lt;appname&gt;/&lt;appname&gt;.setdlg. If
plugins need to merge in they will install their file to
apps/&lt;appname&gt;/ksettingsdialog/&lt;pluginname&gt;.setdlg.
-A .setdlg file contains one or more blocks like the following:
+A .setdlg file tqcontains one or more blocks like the following:
\verbatim
[id]
diff --git a/kutils/ksettings/componentsdialog.cpp b/kutils/ksettings/componentsdialog.cpp
index cb3695e05..04d6649fe 100644
--- a/kutils/ksettings/componentsdialog.cpp
+++ b/kutils/ksettings/componentsdialog.cpp
@@ -59,9 +59,9 @@ ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name )
d->iconwidget = new TQLabel( d->infowidget );
( void )new KSeparator( d->infowidget );
d->commentwidget = new TQLabel( d->infowidget );
- d->commentwidget->setAlignment( Qt::WordBreak );
+ d->commentwidget->tqsetAlignment( Qt::WordBreak );
d->descriptionwidget = new TQLabel( d->infowidget );
- d->descriptionwidget->setAlignment( Qt::WordBreak );
+ d->descriptionwidget->tqsetAlignment( Qt::WordBreak );
d->listview->addColumn( TQString::null );
d->listview->header()->hide();
diff --git a/kutils/ksettings/dialog.cpp b/kutils/ksettings/dialog.cpp
index 35ad153ef..f6913f194 100644
--- a/kutils/ksettings/dialog.cpp
+++ b/kutils/ksettings/dialog.cpp
@@ -108,7 +108,7 @@ class PageNode
if( **i < **j )
{
finished = false;
- qSwap( *i, *j );
+ tqSwap( *i, *j );
lastswapped = j;
}
--i;
@@ -484,12 +484,12 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const
pcit != parentComponents.end(); ++pcit )
{
// if the parentComponent is not registered ignore it
- if( d->registeredComponents.find( *pcit ) ==
+ if( d->registeredComponents.tqfind( *pcit ) ==
d->registeredComponents.end() )
continue;
// we check if the parent component is a plugin
- if( ! d->plugininfomap.contains( *pcit ) )
+ if( ! d->plugininfomap.tqcontains( *pcit ) )
{
// if not the KCModule must be enabled
enabled = true;
diff --git a/kutils/ksettings/dialog.h b/kutils/ksettings/dialog.h
index c83caeeff..13f348287 100644
--- a/kutils/ksettings/dialog.h
+++ b/kutils/ksettings/dialog.h
@@ -70,7 +70,7 @@ namespace KSettings
* @author Matthias Kretz <kretz@kde.org>
* @since 3.2
*/
-class KUTILS_EXPORT Dialog : public QObject
+class KUTILS_EXPORT Dialog : public TQObject
{
friend class PageNode;
Q_OBJECT
diff --git a/kutils/ksettings/dispatcher.cpp b/kutils/ksettings/dispatcher.cpp
index 7f20c1bc3..b3a92f600 100644
--- a/kutils/ksettings/dispatcher.cpp
+++ b/kutils/ksettings/dispatcher.cpp
@@ -67,7 +67,7 @@ void Dispatcher::registerInstance( KInstance * instance, TQObject * recv, const
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
m_instanceName[ recv ] = instanceName;
TQSignal * sig;
- if( m_instanceInfo.contains( instanceName ) )
+ if( m_instanceInfo.tqcontains( instanceName ) )
{
sig = m_instanceInfo[ instanceName ].signal;
}
@@ -86,7 +86,7 @@ void Dispatcher::registerInstance( KInstance * instance, TQObject * recv, const
KConfig * Dispatcher::configForInstanceName( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << endl;
- if( m_instanceInfo.contains( instanceName ) )
+ if( m_instanceInfo.tqcontains( instanceName ) )
{
KInstance * inst = m_instanceInfo[ instanceName ].instance;
if( inst )
@@ -111,7 +111,7 @@ void Dispatcher::reparseConfiguration( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
// check if the instanceName is valid:
- if( ! m_instanceInfo.contains( instanceName ) )
+ if( ! m_instanceInfo.tqcontains( instanceName ) )
return;
// first we reparse the config of the instance so that the KConfig object
// will be up to date
diff --git a/kutils/ksettings/dispatcher.h b/kutils/ksettings/dispatcher.h
index 55e30412e..8bbe79fca 100644
--- a/kutils/ksettings/dispatcher.h
+++ b/kutils/ksettings/dispatcher.h
@@ -48,7 +48,7 @@ namespace KSettings
* @author Matthias Kretz <kretz@kde.org>
* @since 3.2
*/
-class KUTILS_EXPORT Dispatcher : public QObject
+class KUTILS_EXPORT Dispatcher : public TQObject
{
friend class KStaticDeleter<Dispatcher>;
diff --git a/kutils/tests/Makefile.am b/kutils/tests/Makefile.am
index 3bde7a9a2..747b2af2d 100644
--- a/kutils/tests/Makefile.am
+++ b/kutils/tests/Makefile.am
@@ -1,16 +1,16 @@
INCLUDES = $(all_includes)
-check_PROGRAMS = kfindtest kreplacetest
+check_PROGRAMS = ktqfindtest ktqreplacetest
-TESTS = kfindtest kreplacetest
+TESTS = ktqfindtest ktqreplacetest
-kfindtest_SOURCES = kfindtest.cpp
-kfindtest_LDADD = ../libkutils.la
-kfindtest_LDFLAGS = $(all_libraries)
+ktqfindtest_SOURCES = ktqfindtest.cpp
+ktqfindtest_LDADD = ../libkutils.la
+ktqfindtest_LDFLAGS = $(all_libraries)
-kreplacetest_SOURCES = kreplacetest.cpp
-kreplacetest_LDADD = ../libkutils.la
-kreplacetest_LDFLAGS = $(all_libraries)
+ktqreplacetest_SOURCES = ktqreplacetest.cpp
+ktqreplacetest_LDADD = ../libkutils.la
+ktqreplacetest_LDFLAGS = $(all_libraries)
METASOURCES = AUTO
diff --git a/kutils/tests/kfindtest.cpp b/kutils/tests/kfindtest.cpp
index 1652eb625..5db237a89 100644
--- a/kutils/tests/kfindtest.cpp
+++ b/kutils/tests/kfindtest.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include "../kfind.h"
-#include "../kfinddialog.h"
-#include "kfindtest.h"
+#include "../ktqfind.h"
+#include "../ktqfinddialog.h"
+#include "ktqfindtest.h"
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -47,21 +47,21 @@ static bool check(TQString txt, TQString a, TQString b) // from kurltest
void KFindTest::changeText(uint line, const TQString &text)
{
Q_ASSERT(line < m_text.count());
- Q_ASSERT(m_find != 0);
+ Q_ASSERT(m_tqfind != 0);
m_line = line;
m_text[line] = text;
- m_find->setData(line, text);
+ m_tqfind->setData(line, text);
}
-void KFindTest::find(const TQString &pattern, long options)
+void KFindTest::tqfind(const TQString &pattern, long options)
{
- delete m_find;
- m_find = new KFind(pattern, options, 0);
+ delete m_tqfind;
+ m_tqfind = new KFind(pattern, options, 0);
- connect(m_find, TQT_SIGNAL(highlight(const TQString &, int, int)),
+ connect(m_tqfind, TQT_SIGNAL(highlight(const TQString &, int, int)),
TQT_SLOT(slotHighlight(const TQString &, int, int)));
- connect(m_find, TQT_SIGNAL(highlight(int, int, int)),
+ connect(m_tqfind, TQT_SIGNAL(highlight(int, int, int)),
TQT_SLOT(slotHighlight(int, int, int)));
m_line = 0;
@@ -69,23 +69,23 @@ void KFindTest::find(const TQString &pattern, long options)
do
{
if(options & KFindDialog::FindIncremental)
- m_find->setData(m_line, m_text[m_line]);
+ m_tqfind->setData(m_line, m_text[m_line]);
else
- m_find->setData(m_text[m_line]);
+ m_tqfind->setData(m_text[m_line]);
m_line++;
- result = m_find->find();
+ result = m_tqfind->tqfind();
} while(result == KFind::NoMatch && m_line < m_text.count());
}
-void KFindTest::findNext(const TQString &pattern)
+void KFindTest::tqfindNext(const TQString &pattern)
{
- Q_ASSERT(m_find != 0);
+ Q_ASSERT(m_tqfind != 0);
if(!pattern.isNull())
{
- m_find->setPattern(pattern);
+ m_tqfind->setPattern(pattern);
}
KFind::Result result = KFind::NoMatch;
@@ -93,20 +93,20 @@ void KFindTest::findNext(const TQString &pattern)
{
//kdDebug() << "m_line: " << m_line << endl;
- result = m_find->find();
+ result = m_tqfind->tqfind();
if(result == KFind::NoMatch && m_line < m_text.count())
{
//kdDebug() << "incrementing m_line..." << endl;
- if(m_find->options() & KFindDialog::FindIncremental)
- m_find->setData(m_line, m_text[m_line]);
+ if(m_tqfind->options() & KFindDialog::FindIncremental)
+ m_tqfind->setData(m_line, m_text[m_line]);
else
- m_find->setData(m_text[m_line]);
+ m_tqfind->setData(m_text[m_line]);
m_line++;
}
} while(result == KFind::NoMatch && m_line < m_text.count());
- //kdDebug() << "find next completed" << m_line << endl;
+ //kdDebug() << "tqfind next completed" << m_line << endl;
}
void KFindTest::slotHighlight(const TQString &text, int index, int matchedLength)
@@ -123,7 +123,7 @@ void KFindTest::slotHighlight(int id, int index, int matchedLength)
int main(int argc, char **argv)
{
- KCmdLineArgs::init(argc, argv, "kfindtest", "KFindTest", 0, 0, false);
+ KCmdLineArgs::init(argc, argv, "ktqfindtest", "KFindTest", 0, 0, false);
KApplication app;
TQString text = "This file is part of the KDE project.\n"
@@ -183,13 +183,13 @@ int main(int argc, char **argv)
kdDebug() << "Plain static search..." << endl;
- // first we do a simple text searching the text and doing a few find nexts
- test->find("This", 0);
- test->findNext();
- test->findNext();
- test->findNext();
- test->findNext();
- test->findNext();
+ // first we do a simple text searching the text and doing a few tqfind nexts
+ test->tqfind("This", 0);
+ test->tqfindNext();
+ test->tqfindNext();
+ test->tqfindNext();
+ test->tqfindNext();
+ test->tqfindNext();
check("result", test->hits().join(""), output1);
test->clearHits();
@@ -198,20 +198,20 @@ int main(int argc, char **argv)
kdDebug() << "FindIncremental with static contents..." << endl;
// now we'll do some searches using FindIncremental
- test->find("", KFindDialog::FindIncremental);
- test->findNext("i");
- test->findNext("is");
- test->findNext("ist");
- test->findNext();
- test->findNext("istri");
- test->findNext("istr");
- test->findNext("ist");
- test->findNext("is");
- test->findNext("W");
- test->findNext("WA");
- test->findNext("WARRANTY");
- test->findNext("Free");
- test->findNext("Software Foundation");
+ test->tqfind("", KFindDialog::FindIncremental);
+ test->tqfindNext("i");
+ test->tqfindNext("is");
+ test->tqfindNext("ist");
+ test->tqfindNext();
+ test->tqfindNext("istri");
+ test->tqfindNext("istr");
+ test->tqfindNext("ist");
+ test->tqfindNext("is");
+ test->tqfindNext("W");
+ test->tqfindNext("WA");
+ test->tqfindNext("WARRANTY");
+ test->tqfindNext("Free");
+ test->tqfindNext("Software Foundation");
check("result", test->hits().join(""), output2);
test->clearHits();
@@ -220,25 +220,25 @@ int main(int argc, char **argv)
kdDebug() << "FindIncremental with dynamic contents..." << endl;
// now do that again but with pages that change between searches
- test->find("", KFindDialog::FindIncremental);
- test->findNext("i");
- test->findNext("is");
- test->findNext("ist");
- test->findNext("istr");
- test->findNext();
+ test->tqfind("", KFindDialog::FindIncremental);
+ test->tqfindNext("i");
+ test->tqfindNext("is");
+ test->tqfindNext("ist");
+ test->tqfindNext("istr");
+ test->tqfindNext();
test->changeText(1, "The second line now looks a whole lot different.");
- test->findNext("istri");
- test->findNext("istr");
- test->findNext("ist");
- test->findNext("is");
- test->findNext("i");
- test->findNext("W");
- test->findNext("WA");
- test->findNext("WARRANTY");
+ test->tqfindNext("istri");
+ test->tqfindNext("istr");
+ test->tqfindNext("ist");
+ test->tqfindNext("is");
+ test->tqfindNext("i");
+ test->tqfindNext("W");
+ test->tqfindNext("WA");
+ test->tqfindNext("WARRANTY");
test->changeText(6, " but WITHOUT ANY xxxx; without even the implied warranty of");
- test->findNext("WARRAN");
- test->findNext("Free");
- test->findNext("Software Foundation");
+ test->tqfindNext("WARRAN");
+ test->tqfindNext("Free");
+ test->tqfindNext("Software Foundation");
check("result", test->hits().join(""), output3);
test->clearHits();
@@ -249,4 +249,4 @@ int main(int argc, char **argv)
return 0;
}
-#include "kfindtest.moc"
+#include "ktqfindtest.moc"
diff --git a/kutils/tests/kfindtest.h b/kutils/tests/kfindtest.h
index b3be84a8b..254215217 100644
--- a/kutils/tests/kfindtest.h
+++ b/kutils/tests/kfindtest.h
@@ -25,20 +25,20 @@
class KFind;
-class KFindTest : public QObject
+class KFindTest : public TQObject
{
Q_OBJECT
public:
KFindTest(const TQStringList &text) :
TQObject(0),
- m_find(0),
+ m_tqfind(0),
m_text(text),
m_line(0)
{}
- void find(const TQString &pattern, long options = 0);
- void findNext(const TQString &pattern = TQString::null);
+ void tqfind(const TQString &pattern, long options = 0);
+ void tqfindNext(const TQString &pattern = TQString::null);
void changeText(uint line, const TQString &text);
@@ -50,7 +50,7 @@ class KFindTest : public QObject
void slotHighlight(int id, int index, int matchedLengthlength);
private:
- KFind *m_find;
+ KFind *m_tqfind;
TQStringList m_text;
uint m_line;
TQStringList m_hits;
diff --git a/kutils/tests/kreplacetest.cpp b/kutils/tests/kreplacetest.cpp
index a810b7706..e12474b43 100644
--- a/kutils/tests/kreplacetest.cpp
+++ b/kutils/tests/kreplacetest.cpp
@@ -23,44 +23,44 @@
#include <kapplication.h>
#include <tqeventloop.h>
#include <kpushbutton.h>
-#include "../kreplace.h"
-#include "../kreplacedialog.h"
+#include "../ktqreplace.h"
+#include "../ktqreplacedialog.h"
-#include "kreplacetest.h"
+#include "ktqreplacetest.h"
#include <kdebug.h>
#include <stdlib.h>
-void KReplaceTest::replace( const TQString &pattern, const TQString &replacement, long options )
+void KReplaceTest::tqreplace( const TQString &pattern, const TQString &tqreplacement, long options )
{
m_needEventLoop = false;
- // This creates a replace-next-prompt dialog if needed.
- m_replace = new KReplace(pattern, replacement, options);
+ // This creates a tqreplace-next-prompt dialog if needed.
+ m_tqreplace = new KReplace(pattern, tqreplacement, options);
// Connect highlight signal to code which handles highlighting
// of found text.
- connect(m_replace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ connect(m_tqreplace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
- // Connect findNext signal - called when pressing the button in the dialog
- connect(m_replace, TQT_SIGNAL( findNext() ),
+ // Connect tqfindNext signal - called when pressing the button in the dialog
+ connect(m_tqreplace, TQT_SIGNAL( tqfindNext() ),
this, TQT_SLOT( slotReplaceNext() ) );
- // Connect replace signal - called when doing a replacement
- connect(m_replace, TQT_SIGNAL( replace(const TQString &, int, int, int) ),
+ // Connect tqreplace signal - called when doing a tqreplacement
+ connect(m_tqreplace, TQT_SIGNAL( tqreplace(const TQString &, int, int, int) ),
this, TQT_SLOT( slotReplace(const TQString &, int, int, int) ) );
// Go to initial position
if ( (options & KReplaceDialog::FromCursor) == 0 )
{
- if ( m_replace->options() & KFindDialog::FindBackwards )
+ if ( m_tqreplace->options() & KFindDialog::FindBackwards )
m_currentPos = m_text.fromLast();
else
m_currentPos = m_text.begin();
}
- // Launch first replacement
+ // Launch first tqreplacement
slotReplaceNext();
if ( m_needEventLoop )
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
void KReplaceTest::slotHighlight( const TQString &str, int matchingIndex, int matchedLength )
@@ -72,17 +72,17 @@ void KReplaceTest::slotHighlight( const TQString &str, int matchingIndex, int ma
// animateClick triggers a timer, hence the enterloop/exitloop
// Calling slotReplace directly would lead to infinite loop anyway (Match never returned,
// so slotReplaceNext never returns)
- if ( m_replace->options() & KReplaceDialog::PromptOnReplace ) {
- m_replace->replaceNextDialog( false )->actionButton( (KDialogBase::ButtonCode)m_button )->animateClick();
+ if ( m_tqreplace->options() & KReplaceDialog::PromptOnReplace ) {
+ m_tqreplace->tqreplaceNextDialog( false )->actionButton( (KDialogBase::ButtonCode)m_button )->animateClick();
m_needEventLoop = true;
}
}
-void KReplaceTest::slotReplace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength)
+void KReplaceTest::slotReplace(const TQString &text, int tqreplacementIndex, int tqreplacedLength, int matchedLength)
{
- kdDebug() << "slotReplace index=" << replacementIndex << " replacedLength=" << replacedLength << " matchedLength=" << matchedLength << " text=" << text.left( 50 ) << endl;
- *m_currentPos = text; // KReplace hacked the replacement into 'text' in already.
+ kdDebug() << "slotReplace index=" << tqreplacementIndex << " tqreplacedLength=" << tqreplacedLength << " matchedLength=" << matchedLength << " text=" << text.left( 50 ) << endl;
+ *m_currentPos = text; // KReplace hacked the tqreplacement into 'text' in already.
}
void KReplaceTest::slotReplaceNext()
@@ -90,14 +90,14 @@ void KReplaceTest::slotReplaceNext()
//kdDebug() << k_funcinfo << endl;
KFind::Result res = KFind::NoMatch;
while ( res == KFind::NoMatch && m_currentPos != m_text.end() ) {
- if ( m_replace->needData() )
- m_replace->setData( *m_currentPos );
+ if ( m_tqreplace->needData() )
+ m_tqreplace->setData( *m_currentPos );
// Let KReplace inspect the text fragment, and display a dialog if a match is found
- res = m_replace->replace();
+ res = m_tqreplace->tqreplace();
if ( res == KFind::NoMatch ) {
- if ( m_replace->options() & KFindDialog::FindBackwards )
+ if ( m_tqreplace->options() & KFindDialog::FindBackwards )
m_currentPos--;
else
m_currentPos++;
@@ -106,8 +106,8 @@ void KReplaceTest::slotReplaceNext()
#if 0 // commented out so that this test doesn't require interaction
if ( res == KFind::NoMatch ) // i.e. at end
- if ( m_replace->shouldRestart() ) {
- if ( m_replace->options() & KFindDialog::FindBackwards )
+ if ( m_tqreplace->shouldRestart() ) {
+ if ( m_tqreplace->options() & KFindDialog::FindBackwards )
m_currentPos = m_text.fromLast();
else
m_currentPos = m_text.begin();
@@ -115,7 +115,7 @@ void KReplaceTest::slotReplaceNext()
}
#endif
if ( res == KFind::NoMatch && m_needEventLoop )
- qApp->eventLoop()->exitLoop();
+ tqApp->eventLoop()->exitLoop();
}
void KReplaceTest::print()
@@ -126,16 +126,16 @@ void KReplaceTest::print()
}
/* button is the button that we emulate pressing, when options includes PromptOnReplace.
- Valid possibilities are User1 (replace all) and User3 (replace) */
+ Valid possibilities are User1 (tqreplace all) and User3 (tqreplace) */
static void testReplaceSimple( int options, int button = 0 )
{
kdDebug() << "testReplaceSimple: " << options << endl;
KReplaceTest test( TQString( "hellohello" ), button );
- test.replace( "hello", "HELLO", options );
+ test.tqreplace( "hello", "HELLO", options );
TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "HELLOHELLO" ) {
- kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'HELLOHELLO'" << endl;
+ kdError() << "ASSERT FAILED: tqreplaced text is '" << textLines[ 0 ] << "' instead of 'HELLOHELLO'" << endl;
exit(1);
}
}
@@ -146,11 +146,11 @@ static void testReplaceBlank( int options, int button = 0 )
{
kdDebug() << "testReplaceBlank: " << options << endl;
KReplaceTest test( TQString( "aaaaaa" ), button );
- test.replace( "a", "", options );
+ test.tqreplace( "a", "", options );
TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( !textLines[ 0 ].isEmpty() ) {
- kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of ''" << endl;
+ kdError() << "ASSERT FAILED: tqreplaced text is '" << textLines[ 0 ] << "' instead of ''" << endl;
exit(1);
}
}
@@ -161,11 +161,11 @@ static void testReplaceBlankSearch( int options, int button = 0 )
{
kdDebug() << "testReplaceBlankSearch: " << options << endl;
KReplaceTest test( TQString( "bbbb" ), button );
- test.replace( "", "foo", options );
+ test.tqreplace( "", "foo", options );
TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "foobfoobfoobfoobfoo" ) {
- kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'foobfoobfoobfoobfoo'" << endl;
+ kdError() << "ASSERT FAILED: tqreplaced text is '" << textLines[ 0 ] << "' instead of 'foobfoobfoobfoobfoo'" << endl;
exit(1);
}
}
@@ -173,13 +173,13 @@ static void testReplaceBlankSearch( int options, int button = 0 )
static void testReplaceLonger( int options, int button = 0 )
{
kdDebug() << "testReplaceLonger: " << options << endl;
- // Standard test of a replacement string longer than the matched string
+ // Standard test of a tqreplacement string longer than the matched string
KReplaceTest test( TQString( "aaaa" ), button );
- test.replace( "a", "bb", options );
+ test.tqreplace( "a", "bb", options );
TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "bbbbbbbb" ) {
- kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'bbbbbbbb'" << endl;
+ kdError() << "ASSERT FAILED: tqreplaced text is '" << textLines[ 0 ] << "' instead of 'bbbbbbbb'" << endl;
exit(1);
}
}
@@ -187,13 +187,13 @@ static void testReplaceLonger( int options, int button = 0 )
static void testReplaceLongerInclude( int options, int button = 0 )
{
kdDebug() << "testReplaceLongerInclude: " << options << endl;
- // Similar test, where the replacement string includes the search string
+ // Similar test, where the tqreplacement string includes the search string
KReplaceTest test( TQString( "a foo b" ), button );
- test.replace( "foo", "foobar", options );
+ test.tqreplace( "foo", "foobar", options );
TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "a foobar b" ) {
- kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'a foobar b'" << endl;
+ kdError() << "ASSERT FAILED: tqreplaced text is '" << textLines[ 0 ] << "' instead of 'a foobar b'" << endl;
exit(1);
}
}
@@ -201,13 +201,13 @@ static void testReplaceLongerInclude( int options, int button = 0 )
static void testReplaceLongerInclude2( int options, int button = 0 )
{
kdDebug() << "testReplaceLongerInclude2: " << options << endl;
- // Similar test, but with more chances of matches inside the replacement string
+ // Similar test, but with more chances of matches inside the tqreplacement string
KReplaceTest test( TQString( "aaaa" ), button );
- test.replace( "a", "aa", options );
+ test.tqreplace( "a", "aa", options );
TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "aaaaaaaa" ) {
- kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'aaaaaaaa'" << endl;
+ kdError() << "ASSERT FAILED: tqreplaced text is '" << textLines[ 0 ] << "' instead of 'aaaaaaaa'" << endl;
exit(1);
}
}
@@ -217,99 +217,99 @@ static void testReplaceBackRef( int options, int button = 0 )
{
kdDebug() << "testReplaceBackRef: " << options << endl;
KReplaceTest test( TQString( "abc def" ), button );
- test.replace( "abc", "(\\0)", options );
+ test.tqreplace( "abc", "(\\0)", options );
TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
TQString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def";
if ( textLines[ 0 ] != expected ) {
- kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'" << endl;
+ kdError() << "ASSERT FAILED: tqreplaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'" << endl;
exit(1);
}
}
-static void testReplacementHistory( const TQStringList& findHistory, const TQStringList& replaceHistory )
+static void testReplacementHistory( const TQStringList& tqfindHistory, const TQStringList& tqreplaceHistory )
{
- KReplaceDialog dlg( 0, 0, 0, findHistory, replaceHistory );
+ KReplaceDialog dlg( 0, 0, 0, tqfindHistory, tqreplaceHistory );
dlg.show();
- kdDebug() << "testReplacementHistory:" << dlg.replacementHistory() << endl;
- assert( dlg.replacementHistory() == replaceHistory );
+ kdDebug() << "testReplacementHistory:" << dlg.tqreplacementHistory() << endl;
+ assert( dlg.tqreplacementHistory() == tqreplaceHistory );
}
static void testReplacementHistory()
{
- TQStringList findHistory;
- TQStringList replaceHistory;
- findHistory << "foo" << "bar";
- replaceHistory << "FOO" << "BAR";
- testReplacementHistory( findHistory, replaceHistory );
-
- findHistory.clear();
- replaceHistory.clear();
- findHistory << "foo" << "bar";
- replaceHistory << TQString::null << "baz"; // #130831
- testReplacementHistory( findHistory, replaceHistory );
+ TQStringList tqfindHistory;
+ TQStringList tqreplaceHistory;
+ tqfindHistory << "foo" << "bar";
+ tqreplaceHistory << "FOO" << "BAR";
+ testReplacementHistory( tqfindHistory, tqreplaceHistory );
+
+ tqfindHistory.clear();
+ tqreplaceHistory.clear();
+ tqfindHistory << "foo" << "bar";
+ tqreplaceHistory << TQString::null << "baz"; // #130831
+ testReplacementHistory( tqfindHistory, tqreplaceHistory );
}
int main( int argc, char **argv )
{
- KCmdLineArgs::init(argc, argv, "kreplacetest", 0, 0);
+ KCmdLineArgs::init(argc, argv, "ktqreplacetest", 0, 0);
KApplication app;
testReplacementHistory(); // #130831
testReplaceBlank( 0 );
- testReplaceBlank( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBlank( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceBlank( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBlank( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceBlank( KReplaceDialog::FindBackwards, 0 );
- testReplaceBlank( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBlank( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceBlank( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBlank( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceBlankSearch( 0 );
- testReplaceBlankSearch( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBlankSearch( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceBlankSearch( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBlankSearch( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceBlankSearch( KReplaceDialog::FindBackwards, 0 );
- testReplaceBlankSearch( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBlankSearch( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceBlankSearch( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBlankSearch( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceSimple( 0 );
- testReplaceSimple( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceSimple( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceSimple( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceSimple( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceSimple( KReplaceDialog::FindBackwards, 0 );
- testReplaceSimple( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceSimple( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceSimple( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceSimple( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceLonger( 0 );
- testReplaceLonger( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceLonger( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceLonger( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceLonger( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceLonger( KReplaceDialog::FindBackwards, 0 );
- testReplaceLonger( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceLonger( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceLonger( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceLonger( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceLongerInclude( 0 );
- testReplaceLongerInclude( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceLongerInclude( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceLongerInclude( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceLongerInclude( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceLongerInclude( KReplaceDialog::FindBackwards, 0 );
- testReplaceLongerInclude( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceLongerInclude( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceLongerInclude( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceLongerInclude( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceLongerInclude2( 0 );
- testReplaceLongerInclude2( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceLongerInclude2( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceLongerInclude2( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceLongerInclude2( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceLongerInclude2( KReplaceDialog::FindBackwards, 0 );
- testReplaceLongerInclude2( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceLongerInclude2( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceLongerInclude2( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceLongerInclude2( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceBackRef( 0 );
- testReplaceBackRef( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBackRef( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceBackRef( KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBackRef( KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceBackRef( KReplaceDialog::FindBackwards, 0 );
- testReplaceBackRef( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBackRef( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
- testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceBackRef( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBackRef( KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
+ testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards, 0 );
- testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
- testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
+ testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // tqreplace
+ testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // tqreplace all
TQString text = "This file is part of the KDE project.\n"
"This library is free software; you can redistribute it and/or\n"
@@ -331,12 +331,12 @@ int main( int argc, char **argv )
"free";
KReplaceTest test( TQStringList::split( '\n', text, true ), 0 );
- test.replace( "GNU", "KDE", 0 );
- test.replace( "free", "*free*", 0 );
- test.replace( "This", "THIS*", KFindDialog::FindBackwards );
+ test.tqreplace( "GNU", "KDE", 0 );
+ test.tqreplace( "free", "*free*", 0 );
+ test.tqreplace( "This", "THIS*", KFindDialog::FindBackwards );
test.print();
//return app.exec();
return 0;
}
-#include "kreplacetest.moc"
+#include "ktqreplacetest.moc"
diff --git a/kutils/tests/kreplacetest.h b/kutils/tests/kreplacetest.h
index ff85ca34b..4a4252849 100644
--- a/kutils/tests/kreplacetest.h
+++ b/kutils/tests/kreplacetest.h
@@ -25,26 +25,26 @@
class KReplace;
-class KReplaceTest : public QObject
+class KReplaceTest : public TQObject
{
Q_OBJECT
public:
KReplaceTest( const TQStringList& text, int button )
- : TQObject( 0L ), m_text( text ), m_replace( 0 ), m_button( button ) {}
+ : TQObject( 0L ), m_text( text ), m_tqreplace( 0 ), m_button( button ) {}
- void replace( const TQString &pattern, const TQString &replacement, long options );
+ void tqreplace( const TQString &pattern, const TQString &tqreplacement, long options );
void print();
const TQStringList& textLines() const { return m_text; }
public slots:
void slotHighlight( const TQString &, int, int );
void slotReplaceNext();
- void slotReplace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
+ void slotReplace(const TQString &text, int tqreplacementIndex, int tqreplacedLength, int matchedLength);
private:
TQStringList::Iterator m_currentPos;
TQStringList m_text;
- KReplace* m_replace;
+ KReplace* m_tqreplace;
bool m_needEventLoop;
int m_button;
};