summaryrefslogtreecommitdiffstats
path: root/khelpcenter
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /khelpcenter
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khelpcenter')
-rw-r--r--khelpcenter/docentry.cpp66
-rw-r--r--khelpcenter/docentry.h84
-rw-r--r--khelpcenter/docmetainfo.cpp36
-rw-r--r--khelpcenter/docmetainfo.h22
-rw-r--r--khelpcenter/fontdialog.cpp54
-rw-r--r--khelpcenter/fontdialog.h4
-rw-r--r--khelpcenter/formatter.cpp46
-rw-r--r--khelpcenter/formatter.h22
-rw-r--r--khelpcenter/glossary.cpp108
-rw-r--r--khelpcenter/glossary.h64
-rw-r--r--khelpcenter/history.cpp50
-rw-r--r--khelpcenter/history.h12
-rw-r--r--khelpcenter/htmlsearch.cpp10
-rw-r--r--khelpcenter/htmlsearch.h10
-rw-r--r--khelpcenter/htmlsearch/htmlsearch.cpp112
-rw-r--r--khelpcenter/htmlsearch/htmlsearch.h22
-rw-r--r--khelpcenter/htmlsearch/kcmhtmlsearch.cpp146
-rw-r--r--khelpcenter/htmlsearch/kcmhtmlsearch.h12
-rw-r--r--khelpcenter/htmlsearch/klangcombo.cpp16
-rw-r--r--khelpcenter/htmlsearch/klangcombo.h6
-rw-r--r--khelpcenter/htmlsearch/ktagcombobox.cpp86
-rw-r--r--khelpcenter/htmlsearch/ktagcombobox.h34
-rw-r--r--khelpcenter/htmlsearch/progressdialog.cpp26
-rw-r--r--khelpcenter/htmlsearch/progressdialog.h4
-rw-r--r--khelpcenter/htmlsearchconfig.cpp64
-rw-r--r--khelpcenter/htmlsearchconfig.h6
-rw-r--r--khelpcenter/infotree.cpp42
-rw-r--r--khelpcenter/infotree.h4
-rw-r--r--khelpcenter/kcmhelpcenter.cpp152
-rw-r--r--khelpcenter/kcmhelpcenter.h44
-rw-r--r--khelpcenter/khc_indexbuilder.cpp56
-rw-r--r--khelpcenter/khc_indexbuilder.h14
-rw-r--r--khelpcenter/mainwindow.cpp126
-rw-r--r--khelpcenter/mainwindow.h14
-rw-r--r--khelpcenter/navigator.cpp180
-rw-r--r--khelpcenter/navigator.h46
-rw-r--r--khelpcenter/navigatorappitem.cpp30
-rw-r--r--khelpcenter/navigatorappitem.h22
-rw-r--r--khelpcenter/navigatoritem.cpp22
-rw-r--r--khelpcenter/navigatoritem.h14
-rw-r--r--khelpcenter/plugintraverser.cpp4
-rw-r--r--khelpcenter/plugintraverser.h4
-rw-r--r--khelpcenter/scopeitem.h10
-rw-r--r--khelpcenter/scrollkeepertreebuilder.cpp46
-rw-r--r--khelpcenter/scrollkeepertreebuilder.h14
-rw-r--r--khelpcenter/searchengine.cpp114
-rw-r--r--khelpcenter/searchengine.h54
-rw-r--r--khelpcenter/searchhandler.cpp70
-rw-r--r--khelpcenter/searchhandler.h40
-rw-r--r--khelpcenter/searchwidget.cpp86
-rw-r--r--khelpcenter/searchwidget.h28
-rw-r--r--khelpcenter/testmetainfo.cpp12
-rw-r--r--khelpcenter/toc.cpp108
-rw-r--r--khelpcenter/toc.h24
-rw-r--r--khelpcenter/treebuilder.cpp6
-rw-r--r--khelpcenter/treebuilder.h6
-rw-r--r--khelpcenter/view.cpp80
-rw-r--r--khelpcenter/view.h26
58 files changed, 1310 insertions, 1310 deletions
diff --git a/khelpcenter/docentry.cpp b/khelpcenter/docentry.cpp
index 77966451b..716c4d99e 100644
--- a/khelpcenter/docentry.cpp
+++ b/khelpcenter/docentry.cpp
@@ -1,5 +1,5 @@
-#include <qregexp.h>
-#include <qfileinfo.h>
+#include <tqregexp.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kdesktopfile.h>
@@ -18,8 +18,8 @@ DocEntry::DocEntry()
init();
}
-DocEntry::DocEntry( const QString &name, const QString &url,
- const QString &icon )
+DocEntry::DocEntry( const TQString &name, const TQString &url,
+ const TQString &icon )
{
init();
@@ -37,32 +37,32 @@ void DocEntry::init()
mNextSibling = 0;
}
-void DocEntry::setName( const QString &name )
+void DocEntry::setName( const TQString &name )
{
mName = name;
}
-QString DocEntry::name() const
+TQString DocEntry::name() const
{
return mName;
}
-void DocEntry::setSearch( const QString &search )
+void DocEntry::setSearch( const TQString &search )
{
mSearch = search;
}
-QString DocEntry::search() const
+TQString DocEntry::search() const
{
return mSearch;
}
-void DocEntry::setIcon( const QString &icon )
+void DocEntry::setIcon( const TQString &icon )
{
mIcon = icon;
}
-QString DocEntry::icon() const
+TQString DocEntry::icon() const
{
if ( !mIcon.isEmpty() ) return mIcon;
@@ -72,67 +72,67 @@ QString DocEntry::icon() const
else return "document2";
}
-void DocEntry::setUrl( const QString &url )
+void DocEntry::setUrl( const TQString &url )
{
mUrl = url;
}
-QString DocEntry::url() const
+TQString DocEntry::url() const
{
if ( !mUrl.isEmpty() ) return mUrl;
- if ( identifier().isEmpty() ) return QString::null;
+ if ( identifier().isEmpty() ) return TQString::null;
return "khelpcenter:" + identifier();
}
-void DocEntry::setInfo( const QString &info )
+void DocEntry::setInfo( const TQString &info )
{
mInfo = info;
}
-QString DocEntry::info() const
+TQString DocEntry::info() const
{
return mInfo;
}
-void DocEntry::setLang( const QString &lang )
+void DocEntry::setLang( const TQString &lang )
{
mLang = lang;
}
-QString DocEntry::lang() const
+TQString DocEntry::lang() const
{
return mLang;
}
-void DocEntry::setIdentifier( const QString &identifier )
+void DocEntry::setIdentifier( const TQString &identifier )
{
mIdentifier = identifier;
}
-QString DocEntry::identifier() const
+TQString DocEntry::identifier() const
{
if ( mIdentifier.isEmpty() ) mIdentifier = KApplication::randomString( 15 );
return mIdentifier;
}
-void DocEntry::setIndexer( const QString &indexer )
+void DocEntry::setIndexer( const TQString &indexer )
{
mIndexer = indexer;
}
-QString DocEntry::indexer() const
+TQString DocEntry::indexer() const
{
return mIndexer;
}
-void DocEntry::setIndexTestFile( const QString &indexTestFile )
+void DocEntry::setIndexTestFile( const TQString &indexTestFile )
{
mIndexTestFile = indexTestFile;
}
-QString DocEntry::indexTestFile() const
+TQString DocEntry::indexTestFile() const
{
return mIndexTestFile;
}
@@ -147,27 +147,27 @@ int DocEntry::weight() const
return mWeight;
}
-void DocEntry::setSearchMethod( const QString &method )
+void DocEntry::setSearchMethod( const TQString &method )
{
mSearchMethod = method;
}
-QString DocEntry::searchMethod() const
+TQString DocEntry::searchMethod() const
{
return mSearchMethod;
}
-void DocEntry::setDocumentType( const QString &str )
+void DocEntry::setDocumentType( const TQString &str )
{
mDocumentType = str;
}
-QString DocEntry::documentType() const
+TQString DocEntry::documentType() const
{
return mDocumentType;
}
-QString DocEntry::khelpcenterSpecial() const
+TQString DocEntry::khelpcenterSpecial() const
{
return mKhelpcenterSpecial;
}
@@ -202,7 +202,7 @@ bool DocEntry::isDirectory() const
return mDirectory;
}
-bool DocEntry::readFromFile( const QString &fileName )
+bool DocEntry::readFromFile( const TQString &fileName )
{
KDesktopFile file( fileName );
@@ -215,7 +215,7 @@ bool DocEntry::readFromFile( const QString &fileName )
mLang = file.readEntry( "Lang", "en" );
mIdentifier = file.readEntry( "X-DOC-Identifier" );
if ( mIdentifier.isEmpty() ) {
- QFileInfo fi( fileName );
+ TQFileInfo fi( fileName );
mIdentifier = fi.baseName( true );
}
mIndexer = file.readEntry( "X-DOC-Indexer" );
@@ -233,9 +233,9 @@ bool DocEntry::readFromFile( const QString &fileName )
return true;
}
-bool DocEntry::indexExists( const QString &indexDir )
+bool DocEntry::indexExists( const TQString &indexDir )
{
- QString testFile;
+ TQString testFile;
if ( mIndexTestFile.isEmpty() ) {
testFile = identifier() + ".exists";
} else {
@@ -244,7 +244,7 @@ bool DocEntry::indexExists( const QString &indexDir )
if ( !testFile.startsWith( "/" ) ) testFile = indexDir + "/" + testFile;
- return QFile::exists( testFile );
+ return TQFile::exists( testFile );
}
bool DocEntry::docExists() const
diff --git a/khelpcenter/docentry.h b/khelpcenter/docentry.h
index a2ba6b9c4..d86cde9d2 100644
--- a/khelpcenter/docentry.h
+++ b/khelpcenter/docentry.h
@@ -1,53 +1,53 @@
#ifndef DOCENTRY_H
#define DOCENTRY_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace KHC {
class DocEntry
{
public:
- typedef QValueList<DocEntry *> List;
+ typedef TQValueList<DocEntry *> List;
DocEntry();
- DocEntry( const QString &name, const QString &url = QString::null,
- const QString &icon = QString::null );
+ DocEntry( const TQString &name, const TQString &url = TQString::null,
+ const TQString &icon = TQString::null );
- void setName( const QString & );
- QString name() const;
+ void setName( const TQString & );
+ TQString name() const;
- void setSearch( const QString & );
- QString search() const;
+ void setSearch( const TQString & );
+ TQString search() const;
- void setIcon( const QString & );
- QString icon() const;
+ void setIcon( const TQString & );
+ TQString icon() const;
- void setUrl( const QString & );
- QString url() const;
+ void setUrl( const TQString & );
+ TQString url() const;
- void setInfo( const QString & );
- QString info() const;
+ void setInfo( const TQString & );
+ TQString info() const;
- void setLang( const QString & );
- QString lang() const;
+ void setLang( const TQString & );
+ TQString lang() const;
- void setIdentifier( const QString & );
- QString identifier() const;
+ void setIdentifier( const TQString & );
+ TQString identifier() const;
- void setIndexer( const QString & );
- QString indexer() const;
+ void setIndexer( const TQString & );
+ TQString indexer() const;
- void setIndexTestFile( const QString & );
- QString indexTestFile() const;
+ void setIndexTestFile( const TQString & );
+ TQString indexTestFile() const;
void setWeight( int );
int weight() const;
- void setSearchMethod( const QString & );
- QString searchMethod() const;
+ void setSearchMethod( const TQString & );
+ TQString searchMethod() const;
void enableSearch( bool enabled );
bool searchEnabled() const;
@@ -55,15 +55,15 @@ class DocEntry
void setSearchEnabledDefault( bool enabled );
bool searchEnabledDefault() const;
- void setDocumentType( const QString & );
- QString documentType() const;
+ void setDocumentType( const TQString & );
+ TQString documentType() const;
void setDirectory( bool );
bool isDirectory() const;
- bool readFromFile( const QString &fileName );
+ bool readFromFile( const TQString &fileName );
- bool indexExists( const QString &indexDir );
+ bool indexExists( const TQString &indexDir );
bool docExists() const;
@@ -78,7 +78,7 @@ class DocEntry
void setNextSibling( DocEntry * );
DocEntry *nextSibling();
- QString khelpcenterSpecial() const;
+ TQString khelpcenterSpecial() const;
bool isSearchable();
@@ -88,23 +88,23 @@ class DocEntry
void init();
private:
- QString mName;
- QString mSearch;
- QString mIcon;
- QString mUrl;
- QString mInfo;
- QString mLang;
- mutable QString mIdentifier;
- QString mIndexer;
- QString mIndexTestFile;
+ TQString mName;
+ TQString mSearch;
+ TQString mIcon;
+ TQString mUrl;
+ TQString mInfo;
+ TQString mLang;
+ mutable TQString mIdentifier;
+ TQString mIndexer;
+ TQString mIndexTestFile;
int mWeight;
- QString mSearchMethod;
+ TQString mSearchMethod;
bool mSearchEnabled;
bool mSearchEnabledDefault;
- QString mDocumentType;
+ TQString mDocumentType;
bool mDirectory;
- QString mKhelpcenterSpecial;
+ TQString mKhelpcenterSpecial;
List mChildren;
DocEntry *mParent;
diff --git a/khelpcenter/docmetainfo.cpp b/khelpcenter/docmetainfo.cpp
index 591d4d4a4..4d6dd6fad 100644
--- a/khelpcenter/docmetainfo.cpp
+++ b/khelpcenter/docmetainfo.cpp
@@ -1,4 +1,4 @@
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -48,14 +48,14 @@ DocMetaInfo::~DocMetaInfo()
mSelf = 0;
}
-DocEntry *DocMetaInfo::addDocEntry( const QString &fileName )
+DocEntry *DocMetaInfo::addDocEntry( const TQString &fileName )
{
- QFileInfo fi( fileName );
+ TQFileInfo fi( fileName );
if ( !fi.exists() ) return 0;
- QString extension = fi.extension();
- QStringList extensions = QStringList::split( '.', extension );
- QString lang;
+ TQString extension = fi.extension();
+ TQStringList extensions = TQStringList::split( '.', extension );
+ TQString lang;
if ( extensions.count() >= 2 ) {
lang = extensions[ extensions.count() - 2 ];
}
@@ -76,7 +76,7 @@ DocEntry *DocMetaInfo::addDocEntry( const QString &fileName )
if ( entry->searchMethod().lower() == "htdig" ) {
mHtmlSearch->setupDocEntry( entry );
}
- QString indexer = entry->indexer();
+ TQString indexer = entry->indexer();
indexer.replace( "%f", fileName );
entry->setIndexer( indexer );
addDocEntry( entry );
@@ -103,18 +103,18 @@ DocEntry::List DocMetaInfo::searchEntries()
return mSearchEntries;
}
-QString DocMetaInfo::languageName( const QString &langcode )
+TQString DocMetaInfo::languageName( const TQString &langcode )
{
if ( langcode == "en" ) return i18n("English");
- QString cfgfile = locate( "locale",
- QString::fromLatin1( "%1/entry.desktop" ).arg( langcode ) );
+ TQString cfgfile = locate( "locale",
+ TQString::fromLatin1( "%1/entry.desktop" ).arg( langcode ) );
kdDebug() << "-- langcode: " << langcode << " cfgfile: " << cfgfile << endl;
KSimpleConfig cfg( cfgfile );
cfg.setGroup( "KCM Locale" );
- QString name = cfg.readEntry( "Name", langcode );
+ TQString name = cfg.readEntry( "Name", langcode );
return name;
}
@@ -127,14 +127,14 @@ void DocMetaInfo::scanMetaInfo( bool force )
kdDebug( 1400 ) << "LANGS: " << mLanguages.join( " " ) << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = mLanguages.begin(); it != mLanguages.end(); ++it ) {
mLanguageNames.insert( *it, languageName( *it ) );
}
KConfig config( "khelpcenterrc" );
config.setGroup( "General" );
- QStringList metaInfos = config.readListEntry( "MetaInfoDirs" );
+ TQStringList metaInfos = config.readListEntry( "MetaInfoDirs" );
if ( metaInfos.isEmpty() ) {
KStandardDirs* kstd = KGlobal::dirs();
@@ -149,19 +149,19 @@ void DocMetaInfo::scanMetaInfo( bool force )
mLoaded = true;
}
-DocEntry *DocMetaInfo::scanMetaInfoDir( const QString &dirName,
+DocEntry *DocMetaInfo::scanMetaInfoDir( const TQString &dirName,
DocEntry *parent )
{
- QDir dir( dirName );
+ TQDir dir( dirName );
if ( !dir.exists() ) return 0;
const QFileInfoList *entryList = dir.entryInfoList();
QFileInfoListIterator it( *entryList );
- QFileInfo *fi;
+ TQFileInfo *fi;
for( ; ( fi = it.current() ); ++it ) {
DocEntry *entry = 0;
if ( fi->isDir() && fi->fileName() != "." && fi->fileName() != ".." ) {
- DocEntry *dirEntry = addDirEntry( QDir( fi->absFilePath() ), parent );
+ DocEntry *dirEntry = addDirEntry( TQDir( fi->absFilePath() ), parent );
entry = scanMetaInfoDir( fi->absFilePath(), dirEntry );
} else if ( fi->extension( false ) == "desktop" ) {
entry = addDocEntry( fi->absFilePath() );
@@ -172,7 +172,7 @@ DocEntry *DocMetaInfo::scanMetaInfoDir( const QString &dirName,
return 0;
}
-DocEntry *DocMetaInfo::addDirEntry( const QDir &dir, DocEntry *parent )
+DocEntry *DocMetaInfo::addDirEntry( const TQDir &dir, DocEntry *parent )
{
DocEntry *dirEntry = addDocEntry( dir.absPath() + "/.directory" );
diff --git a/khelpcenter/docmetainfo.h b/khelpcenter/docmetainfo.h
index fbca60792..9b6871fa7 100644
--- a/khelpcenter/docmetainfo.h
+++ b/khelpcenter/docmetainfo.h
@@ -1,11 +1,11 @@
#ifndef DOCMETAINFO_H
#define DOCMETAINFO_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qdir.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqdir.h>
+#include <tqmap.h>
#include "docentry.h"
@@ -29,7 +29,7 @@ class DocMetaInfo
void scanMetaInfo( bool force = false );
- DocEntry *addDocEntry( const QString &fileName );
+ DocEntry *addDocEntry( const TQString &fileName );
void addDocEntry( DocEntry * );
@@ -44,11 +44,11 @@ class DocMetaInfo
void endProcess( DocEntry *entry, DocEntryTraverser *traverser );
void endTraverseEntries( DocEntryTraverser * );
- static QString languageName( const QString &langcode );
+ static TQString languageName( const TQString &langcode );
protected:
- DocEntry *scanMetaInfoDir( const QString &filename, DocEntry *parent );
- DocEntry *addDirEntry( const QDir &dir, DocEntry *parent );
+ DocEntry *scanMetaInfoDir( const TQString &filename, DocEntry *parent );
+ DocEntry *addDirEntry( const TQDir &dir, DocEntry *parent );
void traverseEntry( DocEntry *, DocEntryTraverser * );
private:
@@ -63,9 +63,9 @@ class DocMetaInfo
DocEntry mRootEntry;
- QStringList mLanguages;
+ TQStringList mLanguages;
- QMap<QString,QString> mLanguageNames;
+ TQMap<TQString,TQString> mLanguageNames;
HTMLSearch *mHtmlSearch;
diff --git a/khelpcenter/fontdialog.cpp b/khelpcenter/fontdialog.cpp
index fb7b5e525..7aa25aa36 100644
--- a/khelpcenter/fontdialog.cpp
+++ b/khelpcenter/fontdialog.cpp
@@ -28,14 +28,14 @@
#include <klocale.h>
#include <knuminput.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
using namespace KHC;
-FontDialog::FontDialog( QWidget *parent, const char *name )
+FontDialog::FontDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Font Configuration" ),
Ok | Cancel )
{
@@ -56,20 +56,20 @@ void FontDialog::slotOk()
void FontDialog::setupFontSizesBox()
{
- QGroupBox *gb = new QGroupBox( i18n( "Sizes" ), mainWidget() );
+ TQGroupBox *gb = new TQGroupBox( i18n( "Sizes" ), mainWidget() );
- QGridLayout *layout = new QGridLayout( gb );
+ TQGridLayout *layout = new TQGridLayout( gb );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() * 2 );
- QLabel *lMinFontSize = new QLabel( i18n( "M&inimum font size:" ), gb );
+ TQLabel *lMinFontSize = new TQLabel( i18n( "M&inimum font size:" ), gb );
layout->addWidget( lMinFontSize, 0, 0 );
m_minFontSize = new KIntNumInput( gb );
layout->addWidget( m_minFontSize, 0, 1 );
m_minFontSize->setRange( 1, 20 );
lMinFontSize->setBuddy( m_minFontSize );
- QLabel *lMedFontSize = new QLabel( i18n( "M&edium font size:" ), gb );
+ TQLabel *lMedFontSize = new TQLabel( i18n( "M&edium font size:" ), gb );
layout->addWidget( lMedFontSize, 1, 0 );
m_medFontSize = new KIntNumInput( gb );
layout->addWidget( m_medFontSize, 1, 1 );
@@ -79,43 +79,43 @@ void FontDialog::setupFontSizesBox()
void FontDialog::setupFontTypesBox()
{
- QGroupBox *gb = new QGroupBox( i18n( "Fonts" ), mainWidget() );
+ TQGroupBox *gb = new TQGroupBox( i18n( "Fonts" ), mainWidget() );
- QGridLayout *layout = new QGridLayout( gb );
+ TQGridLayout *layout = new TQGridLayout( gb );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() * 2 );
- QLabel *lStandardFont = new QLabel( i18n( "S&tandard font:" ), gb );
+ TQLabel *lStandardFont = new TQLabel( i18n( "S&tandard font:" ), gb );
layout->addWidget( lStandardFont, 0, 0 );
m_standardFontCombo = new KFontCombo( gb );
layout->addWidget( m_standardFontCombo, 0, 1 );
lStandardFont->setBuddy( m_standardFontCombo );
- QLabel *lFixedFont = new QLabel( i18n( "F&ixed font:" ), gb );
+ TQLabel *lFixedFont = new TQLabel( i18n( "F&ixed font:" ), gb );
layout->addWidget( lFixedFont, 1, 0 );
m_fixedFontCombo = new KFontCombo( gb );
layout->addWidget( m_fixedFontCombo, 1, 1 );
lFixedFont->setBuddy( m_fixedFontCombo );
- QLabel *lSerifFont = new QLabel( i18n( "S&erif font:" ), gb );
+ TQLabel *lSerifFont = new TQLabel( i18n( "S&erif font:" ), gb );
layout->addWidget( lSerifFont, 2, 0 );
m_serifFontCombo = new KFontCombo( gb );
layout->addWidget( m_serifFontCombo, 2, 1 );
lSerifFont->setBuddy( m_serifFontCombo );
- QLabel *lSansSerifFont = new QLabel( i18n( "S&ans serif font:" ), gb );
+ TQLabel *lSansSerifFont = new TQLabel( i18n( "S&ans serif font:" ), gb );
layout->addWidget( lSansSerifFont, 3, 0 );
m_sansSerifFontCombo = new KFontCombo( gb );
layout->addWidget( m_sansSerifFontCombo, 3, 1 );
lSansSerifFont->setBuddy( m_sansSerifFontCombo );
- QLabel *lItalicFont = new QLabel( i18n( "&Italic font:" ), gb );
+ TQLabel *lItalicFont = new TQLabel( i18n( "&Italic font:" ), gb );
layout->addWidget( lItalicFont, 4, 0 );
m_italicFontCombo = new KFontCombo( gb );
layout->addWidget( m_italicFontCombo, 4, 1 );
lItalicFont->setBuddy( m_italicFontCombo );
- QLabel *lFantasyFont = new QLabel( i18n( "&Fantasy font:" ), gb );
+ TQLabel *lFantasyFont = new TQLabel( i18n( "&Fantasy font:" ), gb );
layout->addWidget( lFantasyFont, 5, 0 );
m_fantasyFontCombo = new KFontCombo( gb );
layout->addWidget( m_fantasyFontCombo, 5, 1 );
@@ -124,24 +124,24 @@ void FontDialog::setupFontTypesBox()
void FontDialog::setupFontEncodingBox()
{
- QGroupBox *gb = new QGroupBox( i18n( "Encoding" ), mainWidget() );
+ TQGroupBox *gb = new TQGroupBox( i18n( "Encoding" ), mainWidget() );
- QGridLayout *layout = new QGridLayout( gb );
+ TQGridLayout *layout = new TQGridLayout( gb );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() * 2 );
- QLabel *lDefaultEncoding = new QLabel( i18n( "&Default encoding:" ), gb );
+ TQLabel *lDefaultEncoding = new TQLabel( i18n( "&Default encoding:" ), gb );
layout->addWidget( lDefaultEncoding, 0, 0 );
m_defaultEncoding = new KComboBox( false, gb );
layout->addWidget( m_defaultEncoding, 0, 1 );
- QStringList encodings = KGlobal::charsets()->availableEncodingNames();
+ TQStringList encodings = KGlobal::charsets()->availableEncodingNames();
encodings.prepend( i18n( "Use Language Encoding" ) );
m_defaultEncoding->insertStringList( encodings );
lDefaultEncoding->setBuddy( m_defaultEncoding );
- QLabel *lFontSizeAdjustement = new QLabel( i18n( "&Font size adjustment:" ), gb );
+ TQLabel *lFontSizeAdjustement = new TQLabel( i18n( "&Font size adjustment:" ), gb );
layout->addWidget( lFontSizeAdjustement, 1, 0 );
- m_fontSizeAdjustement = new QSpinBox( -5, 5, 1, gb );
+ m_fontSizeAdjustement = new TQSpinBox( -5, 5, 1, gb );
layout->addWidget( m_fontSizeAdjustement, 1, 1 );
lFontSizeAdjustement->setBuddy( m_fontSizeAdjustement );
}
@@ -155,7 +155,7 @@ void FontDialog::load()
m_minFontSize->setValue( cfg->readNumEntry( "MinimumFontSize", HTML_DEFAULT_MIN_FONT_SIZE ) );
m_medFontSize->setValue( cfg->readNumEntry( "MediumFontSize", 10 ) );
- QStringList fonts = cfg->readListEntry( "Fonts" );
+ TQStringList fonts = cfg->readListEntry( "Fonts" );
if ( fonts.isEmpty() )
fonts << KGlobalSettings::generalFont().family()
<< KGlobalSettings::fixedFont().family()
@@ -189,19 +189,19 @@ void FontDialog::save()
cfg->writeEntry( "MinimumFontSize", m_minFontSize->value() );
cfg->writeEntry( "MediumFontSize", m_medFontSize->value() );
- QStringList fonts;
+ TQStringList fonts;
fonts << m_standardFontCombo->currentText()
<< m_fixedFontCombo->currentText()
<< m_serifFontCombo->currentText()
<< m_sansSerifFontCombo->currentText()
<< m_italicFontCombo->currentText()
<< m_fantasyFontCombo->currentText()
- << QString::number( m_fontSizeAdjustement->value() );
+ << TQString::number( m_fontSizeAdjustement->value() );
cfg->writeEntry( "Fonts", fonts );
if ( m_defaultEncoding->currentText() == i18n( "Use Language Encoding" ) )
- cfg->writeEntry( "DefaultEncoding", QString::null );
+ cfg->writeEntry( "DefaultEncoding", TQString::null );
else
cfg->writeEntry( "DefaultEncoding", m_defaultEncoding->currentText() );
}
diff --git a/khelpcenter/fontdialog.h b/khelpcenter/fontdialog.h
index fc468cd28..4a46fcd10 100644
--- a/khelpcenter/fontdialog.h
+++ b/khelpcenter/fontdialog.h
@@ -35,7 +35,7 @@ class FontDialog : public KDialogBase
{
Q_OBJECT
public:
- FontDialog( QWidget *parent, const char *name = 0 );
+ FontDialog( TQWidget *parent, const char *name = 0 );
protected slots:
virtual void slotOk();
@@ -57,7 +57,7 @@ class FontDialog : public KDialogBase
KFontCombo *m_italicFontCombo;
KFontCombo *m_fantasyFontCombo;
KComboBox *m_defaultEncoding;
- QSpinBox *m_fontSizeAdjustement;
+ TQSpinBox *m_fontSizeAdjustement;
};
}
diff --git a/khelpcenter/formatter.cpp b/khelpcenter/formatter.cpp
index e31c9d433..b9f394289 100644
--- a/khelpcenter/formatter.cpp
+++ b/khelpcenter/formatter.cpp
@@ -26,8 +26,8 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
using namespace KHC;
@@ -44,7 +44,7 @@ bool Formatter::readTemplates()
{
KConfig *cfg = KGlobal::config();
cfg->setGroup( "Templates" );
- QString mainTemplate = cfg->readEntry( "MainTemplate" );
+ TQString mainTemplate = cfg->readEntry( "MainTemplate" );
if ( mainTemplate.isEmpty() ) {
mainTemplate = locate( "appdata", "maintemplate" );
@@ -55,20 +55,20 @@ bool Formatter::readTemplates()
return false;
}
- QFile f( mainTemplate );
+ TQFile f( mainTemplate );
if ( !f.open( IO_ReadOnly ) ) {
kdWarning() << "Unable to open main template file '" << mainTemplate
<< "'." << endl;
return false;
}
- QTextStream ts( &f );
- QString line;
+ TQTextStream ts( &f );
+ TQString line;
enum State { IDLE, SINGLELINE, MULTILINE };
State state = IDLE;
- QString symbol;
- QString endMarker;
- QString value;
+ TQString symbol;
+ TQString endMarker;
+ TQString value;
while( !( line = ts.readLine() ).isNull() ) {
switch ( state ) {
case IDLE:
@@ -107,18 +107,18 @@ bool Formatter::readTemplates()
f.close();
#if 0
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for( it = mSymbols.begin(); it != mSymbols.end(); ++it ) {
kdDebug() << "KEY: " << it.key() << endl;
kdDebug() << "VALUE: " << it.data() << endl;
}
#endif
- QStringList requiredSymbols;
+ TQStringList requiredSymbols;
requiredSymbols << "HEADER" << "FOOTER";
bool success = true;
- QStringList::ConstIterator it2;
+ TQStringList::ConstIterator it2;
for( it2 = requiredSymbols.begin(); it2 != requiredSymbols.end(); ++it2 ) {
if ( !mSymbols.contains( *it2 ) ) {
success = false;
@@ -132,9 +132,9 @@ bool Formatter::readTemplates()
return success;
}
-QString Formatter::header( const QString &title )
+TQString Formatter::header( const TQString &title )
{
- QString s;
+ TQString s;
if ( mHasTemplate ) {
s = mSymbols[ "HEADER" ];
s.replace( "--TITLE:--", title );
@@ -144,7 +144,7 @@ QString Formatter::header( const QString &title )
return s;
}
-QString Formatter::footer()
+TQString Formatter::footer()
{
if ( mHasTemplate ) {
return mSymbols[ "FOOTER" ];
@@ -153,33 +153,33 @@ QString Formatter::footer()
}
}
-QString Formatter::separator()
+TQString Formatter::separator()
{
// return "<table width=100%><tr><td bgcolor=\"#7B8962\">&nbsp;"
// "</td></tr></table>";
return "<hr>";
}
-QString Formatter::docTitle( const QString &title )
+TQString Formatter::docTitle( const TQString &title )
{
return "<h3><font color=\"red\">" + title + "</font></h3>";
}
-QString Formatter::sectionHeader( const QString &section )
+TQString Formatter::sectionHeader( const TQString &section )
{
return "<h2><font color=\"blue\">" + section + "</font></h2>";
}
-QString Formatter::processResult( const QString &data )
+TQString Formatter::processResult( const TQString &data )
{
- QString result;
+ TQString result;
enum { Header, BodyTag, Body, Footer };
int state = Header;
for( uint i = 0; i < data.length(); ++i ) {
- QChar c = data[i];
+ TQChar c = data[i];
switch ( state ) {
case Header:
if ( c == '<' && data.mid( i, 5 ).lower() == "<body" ) {
@@ -209,12 +209,12 @@ QString Formatter::processResult( const QString &data )
else return result;
}
-QString Formatter::paragraph( const QString &str )
+TQString Formatter::paragraph( const TQString &str )
{
return "<p>" + str + "</p>";
}
-QString Formatter::title( const QString &title )
+TQString Formatter::title( const TQString &title )
{
return "<h2>" + title + "</h2>";
}
diff --git a/khelpcenter/formatter.h b/khelpcenter/formatter.h
index 97e03c171..9710a0dca 100644
--- a/khelpcenter/formatter.h
+++ b/khelpcenter/formatter.h
@@ -20,8 +20,8 @@
#ifndef KHC_FORMATTER_H
#define KHC_FORMATTER_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
namespace KHC {
@@ -33,19 +33,19 @@ class Formatter
bool readTemplates();
- virtual QString header( const QString &title );
- virtual QString footer();
- virtual QString separator();
- virtual QString docTitle( const QString & );
- virtual QString sectionHeader( const QString & );
- virtual QString paragraph( const QString & );
- virtual QString title( const QString & );
+ virtual TQString header( const TQString &title );
+ virtual TQString footer();
+ virtual TQString separator();
+ virtual TQString docTitle( const TQString & );
+ virtual TQString sectionHeader( const TQString & );
+ virtual TQString paragraph( const TQString & );
+ virtual TQString title( const TQString & );
- virtual QString processResult( const QString & );
+ virtual TQString processResult( const TQString & );
private:
bool mHasTemplate;
- QMap<QString,QString> mSymbols;
+ TQMap<TQString,TQString> mSymbols;
};
}
diff --git a/khelpcenter/glossary.cpp b/khelpcenter/glossary.cpp
index 6d19aac53..dc596372e 100644
--- a/khelpcenter/glossary.cpp
+++ b/khelpcenter/glossary.cpp
@@ -30,7 +30,7 @@
#include <kstandarddirs.h>
#include <kstatusbar.h>
-#include <qheader.h>
+#include <tqheader.h>
#include <sys/stat.h>
@@ -39,7 +39,7 @@ using namespace KHC;
class SectionItem : public KListViewItem
{
public:
- SectionItem( QListViewItem *parent, const QString &text )
+ SectionItem( TQListViewItem *parent, const TQString &text )
: KListViewItem( parent, text )
{
setOpen( false );
@@ -49,7 +49,7 @@ class SectionItem : public KListViewItem
{
KListViewItem::setOpen(open);
- setPixmap( 0, SmallIcon( QString::fromLatin1( open ? "contents" : "contents2" ) ) );
+ setPixmap( 0, SmallIcon( TQString::fromLatin1( open ? "contents" : "contents2" ) ) );
}
};
@@ -57,29 +57,29 @@ class SectionItem : public KListViewItem
class EntryItem : public KListViewItem
{
public:
- EntryItem( SectionItem *parent, const QString &term, const QString &id )
+ EntryItem( SectionItem *parent, const TQString &term, const TQString &id )
: KListViewItem( parent, term ),
m_id( id )
{
}
- QString id() const { return m_id; }
+ TQString id() const { return m_id; }
private:
- QString m_id;
+ TQString m_id;
};
-Glossary::Glossary( QWidget *parent ) : KListView( parent )
+Glossary::Glossary( TQWidget *parent ) : KListView( parent )
{
m_initialized = false;
- connect( this, SIGNAL( clicked( QListViewItem * ) ),
- this, SLOT( treeItemSelected( QListViewItem * ) ) );
- connect( this, SIGNAL( returnPressed( QListViewItem * ) ),
- this, SLOT( treeItemSelected( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ this, TQT_SLOT( treeItemSelected( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ this, TQT_SLOT( treeItemSelected( TQListViewItem * ) ) );
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
- addColumn( QString::null );
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ addColumn( TQString::null );
header()->hide();
setAllColumnsShowFocus( true );
setRootIsDecorated( true );
@@ -92,7 +92,7 @@ Glossary::Glossary( QWidget *parent ) : KListView( parent )
m_cacheFile = locateLocal( "cache", "help/glossary.xml" );
- m_sourceFile = View::View::langLookup( QString::fromLatin1( "khelpcenter/glossary/index.docbook" ) );
+ m_sourceFile = View::View::langLookup( TQString::fromLatin1( "khelpcenter/glossary/index.docbook" ) );
m_config = kapp->config();
m_config->setGroup( "Glossary" );
@@ -117,14 +117,14 @@ Glossary::~Glossary()
m_glossEntries.clear();
}
-const GlossaryEntry &Glossary::entry( const QString &id ) const
+const GlossaryEntry &Glossary::entry( const TQString &id ) const
{
return *m_glossEntries[ id ];
}
Glossary::CacheStatus Glossary::cacheStatus() const
{
- if ( !QFile::exists( m_cacheFile ) ||
+ if ( !TQFile::exists( m_cacheFile ) ||
m_config->readPathEntry( "CachedGlossary" ) != m_sourceFile ||
m_config->readNumEntry( "CachedGlossaryTimestamp" ) != glossaryCTime() )
return NeedRebuild;
@@ -135,7 +135,7 @@ Glossary::CacheStatus Glossary::cacheStatus() const
int Glossary::glossaryCTime() const
{
struct stat stat_buf;
- stat( QFile::encodeName( m_sourceFile ).data(), &stat_buf );
+ stat( TQFile::encodeName( m_sourceFile ).data(), &stat_buf );
return stat_buf.st_ctime;
}
@@ -147,13 +147,13 @@ void Glossary::rebuildGlossaryCache()
mainWindow->statusBar()->message( i18n( "Rebuilding cache..." ) );
KProcess *meinproc = new KProcess;
- connect( meinproc, SIGNAL( processExited( KProcess * ) ),
- this, SLOT( meinprocExited( KProcess * ) ) );
+ connect( meinproc, TQT_SIGNAL( processExited( KProcess * ) ),
+ this, TQT_SLOT( meinprocExited( KProcess * ) ) );
- *meinproc << locate( "exe", QString::fromLatin1( "meinproc" ) );
- *meinproc << QString::fromLatin1( "--output" ) << m_cacheFile;
- *meinproc << QString::fromLatin1( "--stylesheet" )
- << locate( "data", QString::fromLatin1( "khelpcenter/glossary.xslt" ) );
+ *meinproc << locate( "exe", TQString::fromLatin1( "meinproc" ) );
+ *meinproc << TQString::fromLatin1( "--output" ) << m_cacheFile;
+ *meinproc << TQString::fromLatin1( "--stylesheet" )
+ << locate( "data", TQString::fromLatin1( "khelpcenter/glossary.xslt" ) );
*meinproc << m_sourceFile;
meinproc->start( KProcess::NotifyOnExit );
@@ -163,7 +163,7 @@ void Glossary::meinprocExited( KProcess *meinproc )
{
delete meinproc;
- if ( !QFile::exists( m_cacheFile ) )
+ if ( !TQFile::exists( m_cacheFile ) )
return;
m_config->writePathEntry( "CachedGlossary", m_sourceFile );
@@ -181,36 +181,36 @@ void Glossary::meinprocExited( KProcess *meinproc )
void Glossary::buildGlossaryTree()
{
- QFile cacheFile(m_cacheFile);
+ TQFile cacheFile(m_cacheFile);
if ( !cacheFile.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &cacheFile ) )
return;
- QDomNodeList sectionNodes = doc.documentElement().elementsByTagName( QString::fromLatin1( "section" ) );
+ TQDomNodeList sectionNodes = doc.documentElement().elementsByTagName( TQString::fromLatin1( "section" ) );
for ( unsigned int i = 0; i < sectionNodes.count(); i++ ) {
- QDomElement sectionElement = sectionNodes.item( i ).toElement();
- QString title = sectionElement.attribute( QString::fromLatin1( "title" ) );
+ TQDomElement sectionElement = sectionNodes.item( i ).toElement();
+ TQString title = sectionElement.attribute( TQString::fromLatin1( "title" ) );
SectionItem *topicSection = new SectionItem( m_byTopicItem, title );
- QDomNodeList entryNodes = sectionElement.elementsByTagName( QString::fromLatin1( "entry" ) );
+ TQDomNodeList entryNodes = sectionElement.elementsByTagName( TQString::fromLatin1( "entry" ) );
for ( unsigned int j = 0; j < entryNodes.count(); j++ ) {
- QDomElement entryElement = entryNodes.item( j ).toElement();
+ TQDomElement entryElement = entryNodes.item( j ).toElement();
- QString entryId = entryElement.attribute( QString::fromLatin1( "id" ) );
+ TQString entryId = entryElement.attribute( TQString::fromLatin1( "id" ) );
if ( entryId.isNull() )
continue;
- QDomElement termElement = childElement( entryElement, QString::fromLatin1( "term" ) );
- QString term = termElement.text().simplifyWhiteSpace();
+ TQDomElement termElement = childElement( entryElement, TQString::fromLatin1( "term" ) );
+ TQString term = termElement.text().simplifyWhiteSpace();
EntryItem *entry = new EntryItem(topicSection, term, entryId );
m_idDict.insert( entryId, entry );
SectionItem *alphabSection = 0L;
- for ( QListViewItemIterator it( m_alphabItem ); it.current(); it++ )
+ for ( TQListViewItemIterator it( m_alphabItem ); it.current(); it++ )
if ( it.current()->text( 0 ) == term[ 0 ].upper() ) {
alphabSection = static_cast<SectionItem *>( it.current() );
break;
@@ -221,19 +221,19 @@ void Glossary::buildGlossaryTree()
new EntryItem( alphabSection, term, entryId );
- QDomElement definitionElement = childElement( entryElement, QString::fromLatin1( "definition" ) );
- QString definition = definitionElement.text().simplifyWhiteSpace();
+ TQDomElement definitionElement = childElement( entryElement, TQString::fromLatin1( "definition" ) );
+ TQString definition = definitionElement.text().simplifyWhiteSpace();
GlossaryEntryXRef::List seeAlso;
- QDomElement referencesElement = childElement( entryElement, QString::fromLatin1( "references" ) );
- QDomNodeList referenceNodes = referencesElement.elementsByTagName( QString::fromLatin1( "reference" ) );
+ TQDomElement referencesElement = childElement( entryElement, TQString::fromLatin1( "references" ) );
+ TQDomNodeList referenceNodes = referencesElement.elementsByTagName( TQString::fromLatin1( "reference" ) );
if ( referenceNodes.count() > 0 )
for ( unsigned int k = 0; k < referenceNodes.count(); k++ ) {
- QDomElement referenceElement = referenceNodes.item( k ).toElement();
+ TQDomElement referenceElement = referenceNodes.item( k ).toElement();
- QString term = referenceElement.attribute( QString::fromLatin1( "term" ) );
- QString id = referenceElement.attribute( QString::fromLatin1( "id" ) );
+ TQString term = referenceElement.attribute( TQString::fromLatin1( "term" ) );
+ TQString id = referenceElement.attribute( TQString::fromLatin1( "id" ) );
seeAlso += GlossaryEntryXRef( term, id );
}
@@ -243,7 +243,7 @@ void Glossary::buildGlossaryTree()
}
}
-void Glossary::treeItemSelected( QListViewItem *item )
+void Glossary::treeItemSelected( TQListViewItem *item )
{
if ( !item )
return;
@@ -254,40 +254,40 @@ void Glossary::treeItemSelected( QListViewItem *item )
item->setOpen( !item->isOpen() );
}
-QDomElement Glossary::childElement( const QDomElement &element, const QString &name )
+TQDomElement Glossary::childElement( const TQDomElement &element, const TQString &name )
{
- QDomElement e;
+ TQDomElement e;
for ( e = element.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement() )
if ( e.tagName() == name )
break;
return e;
}
-QString Glossary::entryToHtml( const GlossaryEntry &entry )
+TQString Glossary::entryToHtml( const GlossaryEntry &entry )
{
- QFile htmlFile( locate("data", "khelpcenter/glossary.html.in" ) );
+ TQFile htmlFile( locate("data", "khelpcenter/glossary.html.in" ) );
if (!htmlFile.open(IO_ReadOnly))
- return QString( "<html><head></head><body><h3>%1</h3>%2</body></html>" )
+ return TQString( "<html><head></head><body><h3>%1</h3>%2</body></html>" )
.arg( i18n( "Error" ) )
.arg( i18n( "Unable to show selected glossary entry: unable to open "
"file 'glossary.html.in'!" ) );
- QString seeAlso;
+ TQString seeAlso;
if (!entry.seeAlso().isEmpty()) {
seeAlso = i18n("See also: ");
GlossaryEntryXRef::List seeAlsos = entry.seeAlso();
GlossaryEntryXRef::List::ConstIterator it = seeAlsos.begin();
GlossaryEntryXRef::List::ConstIterator end = seeAlsos.end();
for (; it != end; ++it) {
- seeAlso += QString::fromLatin1("<a href=\"glossentry:");
+ seeAlso += TQString::fromLatin1("<a href=\"glossentry:");
seeAlso += (*it).id();
- seeAlso += QString::fromLatin1("\">") + (*it).term();
- seeAlso += QString::fromLatin1("</a>, ");
+ seeAlso += TQString::fromLatin1("\">") + (*it).term();
+ seeAlso += TQString::fromLatin1("</a>, ");
}
seeAlso = seeAlso.left(seeAlso.length() - 2);
}
- QTextStream htmlStream(&htmlFile);
+ TQTextStream htmlStream(&htmlFile);
return htmlStream.read()
.arg( i18n( "KDE Glossary" ) )
.arg( entry.term() )
@@ -301,7 +301,7 @@ QString Glossary::entryToHtml( const GlossaryEntry &entry )
.arg( View::langLookup( "khelpcenter/kdelogo2.png" ) );
}
-void Glossary::slotSelectGlossEntry( const QString &id )
+void Glossary::slotSelectGlossEntry( const TQString &id )
{
EntryItem *newItem = m_idDict.find( id );
if ( newItem == 0 )
diff --git a/khelpcenter/glossary.h b/khelpcenter/glossary.h
index 56a4425c3..79ed7fb93 100644
--- a/khelpcenter/glossary.h
+++ b/khelpcenter/glossary.h
@@ -22,9 +22,9 @@
#include <klistview.h>
-#include <qdict.h>
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
class KConfig;
class KProcess;
@@ -35,41 +35,41 @@ namespace KHC {
class GlossaryEntryXRef
{
- friend QDataStream &operator>>( QDataStream &, GlossaryEntryXRef & );
+ friend TQDataStream &operator>>( TQDataStream &, GlossaryEntryXRef & );
public:
- typedef QValueList<GlossaryEntryXRef> List;
+ typedef TQValueList<GlossaryEntryXRef> List;
GlossaryEntryXRef() {}
- GlossaryEntryXRef( const QString &term, const QString &id ) :
+ GlossaryEntryXRef( const TQString &term, const TQString &id ) :
m_term( term ),
m_id( id )
{
}
- QString term() const { return m_term; }
- QString id() const { return m_id; }
+ TQString term() const { return m_term; }
+ TQString id() const { return m_id; }
private:
- QString m_term;
- QString m_id;
+ TQString m_term;
+ TQString m_id;
};
-inline QDataStream &operator<<( QDataStream &stream, const GlossaryEntryXRef &e )
+inline TQDataStream &operator<<( TQDataStream &stream, const GlossaryEntryXRef &e )
{
return stream << e.term() << e.id();
}
-inline QDataStream &operator>>( QDataStream &stream, GlossaryEntryXRef &e )
+inline TQDataStream &operator>>( TQDataStream &stream, GlossaryEntryXRef &e )
{
return stream >> e.m_term >> e.m_id;
}
class GlossaryEntry
{
- friend QDataStream &operator>>( QDataStream &, GlossaryEntry & );
+ friend TQDataStream &operator>>( TQDataStream &, GlossaryEntry & );
public:
GlossaryEntry() {}
- GlossaryEntry( const QString &term, const QString &definition,
+ GlossaryEntry( const TQString &term, const TQString &definition,
const GlossaryEntryXRef::List &seeAlso ) :
m_term( term ),
m_definition( definition ),
@@ -77,22 +77,22 @@ class GlossaryEntry
{
}
- QString term() const { return m_term; }
- QString definition() const { return m_definition; }
+ TQString term() const { return m_term; }
+ TQString definition() const { return m_definition; }
GlossaryEntryXRef::List seeAlso() const { return m_seeAlso; }
private:
- QString m_term;
- QString m_definition;
+ TQString m_term;
+ TQString m_definition;
GlossaryEntryXRef::List m_seeAlso;
};
-inline QDataStream &operator<<( QDataStream &stream, const GlossaryEntry &e )
+inline TQDataStream &operator<<( TQDataStream &stream, const GlossaryEntry &e )
{
return stream << e.term() << e.definition() << e.seeAlso();
}
-inline QDataStream &operator>>( QDataStream &stream, GlossaryEntry &e )
+inline TQDataStream &operator>>( TQDataStream &stream, GlossaryEntry &e )
{
return stream >> e.m_term >> e.m_definition >> e.m_seeAlso;
}
@@ -101,24 +101,24 @@ class Glossary : public KListView
{
Q_OBJECT
public:
- Glossary( QWidget *parent );
+ Glossary( TQWidget *parent );
virtual ~Glossary();
- const GlossaryEntry &entry( const QString &id ) const;
+ const GlossaryEntry &entry( const TQString &id ) const;
- static QString entryToHtml( const GlossaryEntry &entry );
+ static TQString entryToHtml( const GlossaryEntry &entry );
virtual void show();
public slots:
- void slotSelectGlossEntry( const QString &id );
+ void slotSelectGlossEntry( const TQString &id );
signals:
void entrySelected( const GlossaryEntry &entry );
private slots:
void meinprocExited( KProcess *meinproc );
- void treeItemSelected( QListViewItem *item );
+ void treeItemSelected( TQListViewItem *item );
private:
enum CacheStatus { NeedRebuild, CacheOk };
@@ -127,16 +127,16 @@ class Glossary : public KListView
int glossaryCTime() const;
void rebuildGlossaryCache();
void buildGlossaryTree();
- QDomElement childElement( const QDomElement &e, const QString &name );
+ TQDomElement childElement( const TQDomElement &e, const TQString &name );
KConfig *m_config;
- QListViewItem *m_byTopicItem;
- QListViewItem *m_alphabItem;
- QString m_sourceFile;
- QString m_cacheFile;
+ TQListViewItem *m_byTopicItem;
+ TQListViewItem *m_alphabItem;
+ TQString m_sourceFile;
+ TQString m_cacheFile;
CacheStatus m_status;
- QDict<GlossaryEntry> m_glossEntries;
- QDict<EntryItem> m_idDict;
+ TQDict<GlossaryEntry> m_glossEntries;
+ TQDict<EntryItem> m_idDict;
bool m_initialized;
};
diff --git a/khelpcenter/history.cpp b/khelpcenter/history.cpp
index 9162d7640..9a90831f7 100644
--- a/khelpcenter/history.cpp
+++ b/khelpcenter/history.cpp
@@ -41,7 +41,7 @@ History &History::self()
return *m_instance;
}
-History::History() : QObject(),
+History::History() : TQObject(),
m_goBuffer( 0 )
{
m_entries.setAutoDelete( true );
@@ -56,31 +56,31 @@ void History::setupActions( KActionCollection *coll )
QPair<KGuiItem, KGuiItem> backForward = KStdGuiItem::backAndForward();
m_backAction = new KToolBarPopupAction( backForward.first, ALT+Key_Left,
- this, SLOT( back() ), coll, "back" );
- connect( m_backAction->popupMenu(), SIGNAL( activated( int ) ),
- SLOT( backActivated( int ) ) );
- connect( m_backAction->popupMenu(), SIGNAL( aboutToShow() ),
- SLOT( fillBackMenu() ) );
+ this, TQT_SLOT( back() ), coll, "back" );
+ connect( m_backAction->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( backActivated( int ) ) );
+ connect( m_backAction->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( fillBackMenu() ) );
m_backAction->setEnabled( false );
m_forwardAction = new KToolBarPopupAction( backForward.second, ALT+Key_Right,
- this, SLOT( forward() ), coll,
+ this, TQT_SLOT( forward() ), coll,
"forward" );
- connect( m_forwardAction->popupMenu(), SIGNAL( activated( int ) ),
- SLOT( forwardActivated( int ) ) );
- connect( m_forwardAction->popupMenu(), SIGNAL( aboutToShow() ),
- SLOT( fillForwardMenu() ) );
+ connect( m_forwardAction->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( forwardActivated( int ) ) );
+ connect( m_forwardAction->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( fillForwardMenu() ) );
m_forwardAction->setEnabled( false );
}
void History::installMenuBarHook( KMainWindow *mainWindow )
{
- QPopupMenu *goMenu = dynamic_cast<QPopupMenu *>(
+ TQPopupMenu *goMenu = dynamic_cast<TQPopupMenu *>(
mainWindow->guiFactory()->container( "go_web", mainWindow ) );
if ( goMenu ) {
- connect( goMenu, SIGNAL( aboutToShow() ), SLOT( fillGoMenu() ) );
- connect( goMenu, SIGNAL( activated( int ) ),
- SLOT( goMenuActivated( int ) ) );
+ connect( goMenu, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( fillGoMenu() ) );
+ connect( goMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( goMenuActivated( int ) ) );
m_goMenuIndex = goMenu->count();
}
}
@@ -123,7 +123,7 @@ void History::updateCurrentEntry( View *view )
Entry *current = m_entries.current();
- QDataStream stream( current->buffer, IO_WriteOnly );
+ TQDataStream stream( current->buffer, IO_WriteOnly );
view->browserExtension()->saveState( stream );
current->view = view;
@@ -178,7 +178,7 @@ void History::goHistoryActivated( int steps )
if ( m_goBuffer )
return;
m_goBuffer = steps;
- QTimer::singleShot( 0, this, SLOT( goHistoryDelayed() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( goHistoryDelayed() ) );
}
void History::goHistoryDelayed()
@@ -231,7 +231,7 @@ void History::goHistory( int steps )
Entry h( *current );
h.buffer.detach();
- QDataStream stream( h.buffer, IO_ReadOnly );
+ TQDataStream stream( h.buffer, IO_ReadOnly );
h.view->closeURL();
updateCurrentEntry( h.view );
@@ -242,14 +242,14 @@ void History::goHistory( int steps )
void History::fillBackMenu()
{
- QPopupMenu *menu = m_backAction->popupMenu();
+ TQPopupMenu *menu = m_backAction->popupMenu();
menu->clear();
fillHistoryPopup( menu, true, false, false );
}
void History::fillForwardMenu()
{
- QPopupMenu *menu = m_forwardAction->popupMenu();
+ TQPopupMenu *menu = m_forwardAction->popupMenu();
menu->clear();
fillHistoryPopup( menu, false, true, false );
}
@@ -257,7 +257,7 @@ void History::fillForwardMenu()
void History::fillGoMenu()
{
KMainWindow *mainWindow = static_cast<KMainWindow *>( kapp->mainWidget() );
- QPopupMenu *goMenu = dynamic_cast<QPopupMenu *>( mainWindow->guiFactory()->container( QString::fromLatin1( "go" ), mainWindow ) );
+ TQPopupMenu *goMenu = dynamic_cast<TQPopupMenu *>( mainWindow->guiFactory()->container( TQString::fromLatin1( "go" ), mainWindow ) );
if ( !goMenu || m_goMenuIndex == -1 )
return;
@@ -290,7 +290,7 @@ void History::fillGoMenu()
void History::goMenuActivated( int id )
{
KMainWindow *mainWindow = static_cast<KMainWindow *>( kapp->mainWidget() );
- QPopupMenu *goMenu = dynamic_cast<QPopupMenu *>( mainWindow->guiFactory()->container( QString::fromLatin1( "go" ), mainWindow ) );
+ TQPopupMenu *goMenu = dynamic_cast<TQPopupMenu *>( mainWindow->guiFactory()->container( TQString::fromLatin1( "go" ), mainWindow ) );
if ( !goMenu )
return;
@@ -306,12 +306,12 @@ void History::goMenuActivated( int id )
}
}
-void History::fillHistoryPopup( QPopupMenu *popup, bool onlyBack, bool onlyForward, bool checkCurrentItem, uint startPos )
+void History::fillHistoryPopup( TQPopupMenu *popup, bool onlyBack, bool onlyForward, bool checkCurrentItem, uint startPos )
{
Q_ASSERT ( popup ); // kill me if this 0... :/
Entry * current = m_entries.current();
- QPtrListIterator<Entry> it( m_entries );
+ TQPtrListIterator<Entry> it( m_entries );
if (onlyBack || onlyForward)
{
it += m_entries.at(); // Jump to current item
@@ -322,7 +322,7 @@ void History::fillHistoryPopup( QPopupMenu *popup, bool onlyBack, bool onlyForwa
uint i = 0;
while ( it.current() )
{
- QString text = it.current()->title;
+ TQString text = it.current()->title;
text = KStringHandler::csqueeze(text, 50); //CT: squeeze
text.replace( "&", "&&" );
if ( checkCurrentItem && it.current() == current )
diff --git a/khelpcenter/history.h b/khelpcenter/history.h
index 2198016b7..3a32b3e3f 100644
--- a/khelpcenter/history.h
+++ b/khelpcenter/history.h
@@ -22,8 +22,8 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class KActionCollection;
class KMainWindow;
@@ -45,8 +45,8 @@ class History : public QObject
View *view;
KURL url;
- QString title;
- QByteArray buffer;
+ TQString title;
+ TQByteArray buffer;
bool search;
};
@@ -85,11 +85,11 @@ class History : public QObject
bool canGoBack() const;
bool canGoForward() const;
- void fillHistoryPopup( QPopupMenu *, bool, bool, bool, uint = 0 );
+ void fillHistoryPopup( TQPopupMenu *, bool, bool, bool, uint = 0 );
static History *m_instance;
- QPtrList<Entry> m_entries;
+ TQPtrList<Entry> m_entries;
int m_goBuffer;
diff --git a/khelpcenter/htmlsearch.cpp b/khelpcenter/htmlsearch.cpp
index 9c469ae88..3a130883a 100644
--- a/khelpcenter/htmlsearch.cpp
+++ b/khelpcenter/htmlsearch.cpp
@@ -35,9 +35,9 @@ void HTMLSearch::setupDocEntry( KHC::DocEntry *entry )
// entry->dump();
}
-QString HTMLSearch::defaultSearch( KHC::DocEntry *entry )
+TQString HTMLSearch::defaultSearch( KHC::DocEntry *entry )
{
- QString htsearch = "cgi:";
+ TQString htsearch = "cgi:";
htsearch += mConfig->readPathEntry( "htsearch" );
htsearch += "?words=%k&method=and&format=-desc&config=";
htsearch += entry->identifier();
@@ -45,15 +45,15 @@ QString HTMLSearch::defaultSearch( KHC::DocEntry *entry )
return htsearch;
}
-QString HTMLSearch::defaultIndexer( KHC::DocEntry * )
+TQString HTMLSearch::defaultIndexer( KHC::DocEntry * )
{
- QString indexer = mConfig->readPathEntry( "indexer" );
+ TQString indexer = mConfig->readPathEntry( "indexer" );
indexer += " --indexdir=%i %f";
return indexer;
}
-QString HTMLSearch::defaultIndexTestFile( KHC::DocEntry *entry )
+TQString HTMLSearch::defaultIndexTestFile( KHC::DocEntry *entry )
{
return entry->identifier() + ".exists";
}
diff --git a/khelpcenter/htmlsearch.h b/khelpcenter/htmlsearch.h
index 84fb91813..6a98b5ec3 100644
--- a/khelpcenter/htmlsearch.h
+++ b/khelpcenter/htmlsearch.h
@@ -1,8 +1,8 @@
#ifndef KHC_HTMLSEARCH_H
#define KHC_HTMLSEARCH_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class KConfig;
@@ -19,9 +19,9 @@ class HTMLSearch : public QObject
void setupDocEntry( KHC::DocEntry * );
- QString defaultSearch( KHC::DocEntry * );
- QString defaultIndexer( KHC::DocEntry * );
- QString defaultIndexTestFile( KHC::DocEntry * );
+ TQString defaultSearch( KHC::DocEntry * );
+ TQString defaultIndexer( KHC::DocEntry * );
+ TQString defaultIndexTestFile( KHC::DocEntry * );
private:
KConfig *mConfig;
diff --git a/khelpcenter/htmlsearch/htmlsearch.cpp b/khelpcenter/htmlsearch/htmlsearch.cpp
index 02d09d142..c47300190 100644
--- a/khelpcenter/htmlsearch/htmlsearch.cpp
+++ b/khelpcenter/htmlsearch/htmlsearch.cpp
@@ -1,5 +1,5 @@
-#include <qregexp.h>
-#include <qdir.h>
+#include <tqregexp.h>
+#include <tqdir.h>
#include <assert.h>
#include <kapplication.h>
@@ -15,31 +15,31 @@
HTMLSearch::HTMLSearch()
- : QObject(), _proc(0)
+ : TQObject(), _proc(0)
{
}
-QString HTMLSearch::dataPath(const QString& _lang)
+TQString HTMLSearch::dataPath(const TQString& _lang)
{
- return kapp->dirs()->saveLocation("data", QString("khelpcenter/%1").arg(_lang));
+ return kapp->dirs()->saveLocation("data", TQString("khelpcenter/%1").arg(_lang));
}
-void HTMLSearch::scanDir(const QString& dir)
+void HTMLSearch::scanDir(const TQString& dir)
{
assert( dir.at( dir.length() - 1 ) == '/' );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
if ( KStandardDirs::exists( dir + "index.docbook" ) ) {
_files.append(dir + "index.docbook");
progress->setFilesScanned(++_filesScanned);
} else {
- QDir d(dir, "*.html", QDir::Name|QDir::IgnoreCase, QDir::Files | QDir::Readable);
- QStringList const &list = d.entryList();
- QString adir = d.canonicalPath () + "/";
- QString file;
+ TQDir d(dir, "*.html", TQDir::Name|TQDir::IgnoreCase, TQDir::Files | TQDir::Readable);
+ TQStringList const &list = d.entryList();
+ TQString adir = d.canonicalPath () + "/";
+ TQString file;
for (it=list.begin(); it != list.end(); ++it)
{
file = adir + *it;
@@ -50,8 +50,8 @@ void HTMLSearch::scanDir(const QString& dir)
}
}
- QDir d2(dir, QString::null, QDir::Name|QDir::IgnoreCase, QDir::Dirs);
- QStringList const &dlist = d2.entryList();
+ TQDir d2(dir, TQString::null, TQDir::Name|TQDir::IgnoreCase, TQDir::Dirs);
+ TQStringList const &dlist = d2.entryList();
for (it=dlist.begin(); it != dlist.end(); ++it)
if (*it != "." && *it != "..")
{
@@ -61,9 +61,9 @@ void HTMLSearch::scanDir(const QString& dir)
}
-bool HTMLSearch::saveFilesList(const QString& _lang)
+bool HTMLSearch::saveFilesList(const TQString& _lang)
{
- QStringList dirs;
+ TQStringList dirs;
// throw away old files list
_files.clear();
@@ -80,8 +80,8 @@ bool HTMLSearch::saveFilesList(const QString& _lang)
// TODO: Man and Info!!
// add local urls
- QStringList add = config->readListEntry("Paths");
- QStringList::Iterator it;
+ TQStringList add = config->readListEntry("Paths");
+ TQStringList::Iterator it;
for (it = add.begin(); it != add.end(); ++it) {
if ( ( *it ).at( ( *it ).length() - 1 ) != '/' )
( *it ) += '/';
@@ -99,20 +99,20 @@ bool HTMLSearch::saveFilesList(const QString& _lang)
}
-bool HTMLSearch::createConfig(const QString& _lang)
+bool HTMLSearch::createConfig(const TQString& _lang)
{
- QString fname = dataPath(_lang) + "/htdig.conf";
+ TQString fname = dataPath(_lang) + "/htdig.conf";
// locate the common dir
- QString wrapper = locate("data", QString("khelpcenter/%1/wrapper.html").arg(_lang));
+ TQString wrapper = locate("data", TQString("khelpcenter/%1/wrapper.html").arg(_lang));
if (wrapper.isEmpty())
- wrapper = locate("data", QString("khelpcenter/en/wrapper.html"));
+ wrapper = locate("data", TQString("khelpcenter/en/wrapper.html"));
if (wrapper.isEmpty())
return false;
wrapper = wrapper.left(wrapper.length() - 12);
// locate the image dir
- QString images = locate("data", "khelpcenter/pics/star.png");
+ TQString images = locate("data", "khelpcenter/pics/star.png");
if (images.isEmpty())
return false;
images = images.left(images.length() - 8);
@@ -120,7 +120,7 @@ bool HTMLSearch::createConfig(const QString& _lang)
// This is an example replacement for the default bad_words file
// distributed with ht://Dig. It was compiled by Marjolein Katsma
// <HSH@taxon.demon.nl>.
- QString bad_words = i18n( "List of words to exclude from index",
+ TQString bad_words = i18n( "List of words to exclude from index",
"above:about:according:across:actually:\n"
"adj:after:afterwards:again:against:all:\n"
"almost:alone:along:already:also:although:\n"
@@ -175,14 +175,14 @@ bool HTMLSearch::createConfig(const QString& _lang)
"would:wouldnt:yes:yet:you:youd:youll:your:\n"
"youre:yours:yourself:yourselves:youve" );
- QFile f;
+ TQFile f;
f.setName( dataPath(_lang) + "/bad_words" );
if (f.open(IO_WriteOnly))
{
- QTextStream ts( &f );
- QStringList words = QStringList::split ( QRegExp ( "[\n:]" ),
+ TQTextStream ts( &f );
+ TQStringList words = TQStringList::split ( TQRegExp ( "[\n:]" ),
bad_words, false);
- for ( QStringList::ConstIterator it = words.begin();
+ for ( TQStringList::ConstIterator it = words.begin();
it != words.end(); ++it )
ts << *it << endl;
f.close();
@@ -193,7 +193,7 @@ bool HTMLSearch::createConfig(const QString& _lang)
{
kdDebug() << "Writing config for " << _lang << " to " << fname << endl;
- QTextStream ts(&f);
+ TQTextStream ts(&f);
ts << "database_dir:\t\t" << dataPath(_lang) << endl;
ts << "start_url:\t\t`" << dataPath(_lang) << "/files`" << endl;
@@ -221,7 +221,7 @@ bool HTMLSearch::createConfig(const QString& _lang)
#define CHUNK_SIZE 15
-bool HTMLSearch::generateIndex(QString _lang, QWidget *parent)
+bool HTMLSearch::generateIndex(TQString _lang, TQWidget *parent)
{
if (_lang == "C")
_lang = "en";
@@ -243,7 +243,7 @@ bool HTMLSearch::generateIndex(QString _lang, QWidget *parent)
// run htdig ------------------------------------------------------
KConfig *config = new KConfig("khelpcenterrc", true);
KConfigGroupSaver saver(config, "htdig");
- QString exe = config->readPathEntry("htdig", kapp->dirs()->findExe("htdig"));
+ TQString exe = config->readPathEntry("htdig", kapp->dirs()->findExe("htdig"));
if (exe.isEmpty())
{
@@ -258,7 +258,7 @@ bool HTMLSearch::generateIndex(QString _lang, QWidget *parent)
progress->setFilesToDig(_filesToDig);
_filesDigged = 0;
- QDir d; d.mkdir(dataPath(_lang));
+ TQDir d; d.mkdir(dataPath(_lang));
while (!done)
{
@@ -276,19 +276,19 @@ bool HTMLSearch::generateIndex(QString _lang, QWidget *parent)
kdDebug() << "Running htdig" << endl;
- connect(_proc, SIGNAL(receivedStdout(KProcess *,char*,int)),
- this, SLOT(htdigStdout(KProcess *,char*,int)));
+ connect(_proc, TQT_SIGNAL(receivedStdout(KProcess *,char*,int)),
+ this, TQT_SLOT(htdigStdout(KProcess *,char*,int)));
- connect(_proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(htdigExited(KProcess *)));
+ connect(_proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(htdigExited(KProcess *)));
_htdigRunning = true;
// write out file
- QFile f(dataPath(_lang)+"/files");
+ TQFile f(dataPath(_lang)+"/files");
if (f.open(IO_WriteOnly))
{
- QTextStream ts(&f);
+ TQTextStream ts(&f);
for (int i=0; i<CHUNK_SIZE; ++i, ++count)
if (count < _filesToDig) {
@@ -340,8 +340,8 @@ bool HTMLSearch::generateIndex(QString _lang, QWidget *parent)
kdDebug() << "Running htmerge" << endl;
- connect(_proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(htmergeExited(KProcess *)));
+ connect(_proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(htmergeExited(KProcess *)));
_htmergeRunning = true;
@@ -372,7 +372,7 @@ bool HTMLSearch::generateIndex(QString _lang, QWidget *parent)
void HTMLSearch::htdigStdout(KProcess *, char *buffer, int len)
{
- QString line = QString(buffer).left(len);
+ TQString line = TQString(buffer).left(len);
int cnt=0, index=-1;
while ( (index = line.find("file://", index+1)) > 0)
@@ -407,7 +407,7 @@ void HTMLSearch::htmergeExited(KProcess *)
void HTMLSearch::htsearchStdout(KProcess *, char *buffer, int len)
{
- _searchResult += QString::fromLocal8Bit(buffer,len);
+ _searchResult += TQString::fromLocal8Bit(buffer,len);
}
@@ -419,35 +419,35 @@ void HTMLSearch::htsearchExited(KProcess *)
}
-QString HTMLSearch::search(QString _lang, QString words, QString method, int matches,
- QString format, QString sort)
+TQString HTMLSearch::search(TQString _lang, TQString words, TQString method, int matches,
+ TQString format, TQString sort)
{
if (_lang == "C")
_lang = "en";
createConfig(_lang);
- QString result = dataPath(_lang)+"/result.html";
+ TQString result = dataPath(_lang)+"/result.html";
// run htsearch ----------------------------------------------------
KConfig *config = new KConfig("khelpcenterrc", true);
KConfigGroupSaver saver(config, "htdig");
- QString exe = config->readPathEntry("htsearch", kapp->dirs()->findExe("htsearch"));
+ TQString exe = config->readPathEntry("htsearch", kapp->dirs()->findExe("htsearch"));
if (exe.isEmpty())
{
delete config;
- return QString::null;
+ return TQString::null;
}
_proc = new KProcess();
*_proc << exe << "-c" << dataPath(_lang)+"/htdig.conf" <<
- QString("words=%1;method=%2;matchesperpage=%3;format=%4;sort=%5").arg(words).arg(method).arg(matches).arg(format).arg(sort);
+ TQString("words=%1;method=%2;matchesperpage=%3;format=%4;sort=%5").arg(words).arg(method).arg(matches).arg(format).arg(sort);
kdDebug() << "Running htsearch" << endl;
- connect(_proc, SIGNAL(receivedStdout(KProcess *,char*,int)),
- this, SLOT(htsearchStdout(KProcess *,char*,int)));
- connect(_proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(htsearchExited(KProcess *)));
+ connect(_proc, TQT_SIGNAL(receivedStdout(KProcess *,char*,int)),
+ this, TQT_SLOT(htsearchStdout(KProcess *,char*,int)));
+ connect(_proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(htsearchExited(KProcess *)));
_htsearchRunning = true;
_searchResult = "";
@@ -461,20 +461,20 @@ QString HTMLSearch::search(QString _lang, QString words, QString method, int mat
kdDebug() << "Error running htsearch... returning now" << endl;
delete _proc;
delete config;
- return QString::null;
+ return TQString::null;
}
delete _proc;
// modify the search result
_searchResult = _searchResult.replace("http://localhost/", "file:/");
- _searchResult = _searchResult.replace("Content-type: text/html", QString::null);
+ _searchResult = _searchResult.replace("Content-type: text/html", TQString::null);
// dump the search result
- QFile f(result);
+ TQFile f(result);
if (f.open(IO_WriteOnly))
{
- QTextStream ts(&f);
+ TQTextStream ts(&f);
ts << _searchResult << endl;
@@ -483,5 +483,5 @@ QString HTMLSearch::search(QString _lang, QString words, QString method, int mat
return result;
}
delete config;
- return QString::null;
+ return TQString::null;
}
diff --git a/khelpcenter/htmlsearch/htmlsearch.h b/khelpcenter/htmlsearch/htmlsearch.h
index f5568218c..2f4031782 100644
--- a/khelpcenter/htmlsearch/htmlsearch.h
+++ b/khelpcenter/htmlsearch/htmlsearch.h
@@ -2,8 +2,8 @@
#define __HTMLSEARCH_H__
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class QWidget;
@@ -24,10 +24,10 @@ public:
HTMLSearch();
- bool generateIndex(QString lang, QWidget *parent=0);
+ bool generateIndex(TQString lang, TQWidget *parent=0);
- QString search(QString lang, QString words, QString method="and", int matches=10,
- QString format="builtin-long", QString sort="score");
+ TQString search(TQString lang, TQString words, TQString method="and", int matches=10,
+ TQString format="builtin-long", TQString sort="score");
protected slots:
@@ -41,21 +41,21 @@ protected slots:
protected:
- QString dataPath(const QString& lang);
+ TQString dataPath(const TQString& lang);
- bool saveFilesList(const QString& lang);
- void scanDir(const QString& dir);
+ bool saveFilesList(const TQString& lang);
+ void scanDir(const TQString& dir);
- bool createConfig(const QString& lang);
+ bool createConfig(const TQString& lang);
private:
- QStringList _files;
+ TQStringList _files;
KProcess *_proc;
int _filesToDig, _filesDigged, _filesScanned;
volatile bool _htdigRunning, _htmergeRunning, _htsearchRunning;
- QString _searchResult;
+ TQString _searchResult;
ProgressDialog *progress;
};
diff --git a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp
index 20ab149b4..9dfc5e350 100644
--- a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp
+++ b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp
@@ -18,13 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kurllabel.h>
#include <kapplication.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
#include <kfiledialog.h>
#include <kprocess.h>
#include "klangcombo.h"
@@ -34,119 +34,119 @@
#include "kcmhtmlsearch.moc"
-KHTMLSearchConfig::KHTMLSearchConfig(QWidget *parent, const char *name)
+KHTMLSearchConfig::KHTMLSearchConfig(TQWidget *parent, const char *name)
: KCModule(parent, name), indexProc(0)
{
- QVBoxLayout *vbox = new QVBoxLayout(this, 5);
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, 5);
- QGroupBox *gb = new QGroupBox(i18n("ht://dig"), this);
+ TQGroupBox *gb = new TQGroupBox(i18n("ht://dig"), this);
vbox->addWidget(gb);
- QGridLayout *grid = new QGridLayout(gb, 3,2, 6,6);
+ TQGridLayout *grid = new TQGridLayout(gb, 3,2, 6,6);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
- QLabel *l = new QLabel(i18n("The fulltext search feature makes use of the "
+ TQLabel *l = new TQLabel(i18n("The fulltext search feature makes use of the "
"ht://dig HTML search engine. "
"You can get ht://dig at the"), gb);
- l->setAlignment(QLabel::WordBreak);
+ l->setAlignment(TQLabel::WordBreak);
l->setMinimumSize(l->sizeHint());
grid->addMultiCellWidget(l, 1, 1, 0, 1);
- QWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) );
+ TQWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) );
KURLLabel *url = new KURLLabel(gb);
url->setURL("http://www.htdig.org");
url->setText(i18n("ht://dig home page"));
- url->setAlignment(QLabel::AlignHCenter);
+ url->setAlignment(TQLabel::AlignHCenter);
grid->addMultiCellWidget(url, 2,2, 0, 1);
- connect(url, SIGNAL(leftClickedURL(const QString&)),
- this, SLOT(urlClicked(const QString&)));
+ connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ this, TQT_SLOT(urlClicked(const TQString&)));
- gb = new QGroupBox(i18n("Program Locations"), this);
+ gb = new TQGroupBox(i18n("Program Locations"), this);
vbox->addWidget(gb);
- grid = new QGridLayout(gb, 4,2, 6,6);
+ grid = new TQGridLayout(gb, 4,2, 6,6);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
htdigBin = new KURLRequester(gb);
- l = new QLabel(htdigBin, i18n("ht&dig"), gb);
+ l = new TQLabel(htdigBin, i18n("ht&dig"), gb);
l->setBuddy( htdigBin );
grid->addWidget(l, 1,0);
grid->addWidget(htdigBin, 1,1);
- connect(htdigBin->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(configChanged()));
- QString wtstr = i18n( "Enter the path to your htdig program here, e.g. /usr/local/bin/htdig" );
- QWhatsThis::add( htdigBin, wtstr );
- QWhatsThis::add( l, wtstr );
+ connect(htdigBin->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(configChanged()));
+ TQString wtstr = i18n( "Enter the path to your htdig program here, e.g. /usr/local/bin/htdig" );
+ TQWhatsThis::add( htdigBin, wtstr );
+ TQWhatsThis::add( l, wtstr );
htsearchBin = new KURLRequester(gb);
- l = new QLabel(htsearchBin, i18n("ht&search"), gb);
+ l = new TQLabel(htsearchBin, i18n("ht&search"), gb);
l->setBuddy( htsearchBin );
grid->addWidget(l, 2,0);
grid->addWidget(htsearchBin, 2,1);
- connect(htsearchBin->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(configChanged()));
+ connect(htsearchBin->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(configChanged()));
wtstr = i18n( "Enter the path to your htsearch program here, e.g. /usr/local/bin/htsearch" );
- QWhatsThis::add( htsearchBin, wtstr );
- QWhatsThis::add( l, wtstr );
+ TQWhatsThis::add( htsearchBin, wtstr );
+ TQWhatsThis::add( l, wtstr );
htmergeBin = new KURLRequester(gb);
- l = new QLabel(htmergeBin, i18n("ht&merge"), gb);
+ l = new TQLabel(htmergeBin, i18n("ht&merge"), gb);
l->setBuddy( htmergeBin );
grid->addWidget(l, 3,0);
grid->addWidget(htmergeBin, 3,1);
- connect(htmergeBin->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(configChanged()));
+ connect(htmergeBin->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(configChanged()));
wtstr = i18n( "Enter the path to your htmerge program here, e.g. /usr/local/bin/htmerge" );
- QWhatsThis::add( htmergeBin, wtstr );
- QWhatsThis::add( l, wtstr );
+ TQWhatsThis::add( htmergeBin, wtstr );
+ TQWhatsThis::add( l, wtstr );
- QHBoxLayout *hbox = new QHBoxLayout(vbox);
+ TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
- gb = new QGroupBox(i18n("Scope"), this);
+ gb = new TQGroupBox(i18n("Scope"), this);
hbox->addWidget(gb);
- QWhatsThis::add( gb, i18n( "Here you can select which parts of the documentation should be included in the fulltext search index. Available options are the KDE Help pages, the installed man pages, and the installed info pages. You can select any number of these." ) );
+ TQWhatsThis::add( gb, i18n( "Here you can select which parts of the documentation should be included in the fulltext search index. Available options are the KDE Help pages, the installed man pages, and the installed info pages. You can select any number of these." ) );
- QVBoxLayout *vvbox = new QVBoxLayout(gb, 6,2);
+ TQVBoxLayout *vvbox = new TQVBoxLayout(gb, 6,2);
vvbox->addSpacing(gb->fontMetrics().lineSpacing());
- indexKDE = new QCheckBox(i18n("&KDE help"), gb);
+ indexKDE = new TQCheckBox(i18n("&KDE help"), gb);
vvbox->addWidget(indexKDE);
- connect(indexKDE, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(indexKDE, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
- indexMan = new QCheckBox(i18n("&Man pages"), gb);
+ indexMan = new TQCheckBox(i18n("&Man pages"), gb);
vvbox->addWidget(indexMan);
indexMan->setEnabled(false),
- connect(indexMan, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(indexMan, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
- indexInfo = new QCheckBox(i18n("&Info pages"), gb);
+ indexInfo = new TQCheckBox(i18n("&Info pages"), gb);
vvbox->addWidget(indexInfo);
indexInfo->setEnabled(false);
- connect(indexInfo, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(indexInfo, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
- gb = new QGroupBox(i18n("Additional Search Paths"), this);
+ gb = new TQGroupBox(i18n("Additional Search Paths"), this);
hbox->addWidget(gb);
- QWhatsThis::add( gb, i18n( "Here you can add additional paths to search for documentation. To add a path, click on the <em>Add...</em> button and select the folder from where additional documentation should be searched. You can remove folders by clicking on the <em>Delete</em> button." ) );
+ TQWhatsThis::add( gb, i18n( "Here you can add additional paths to search for documentation. To add a path, click on the <em>Add...</em> button and select the folder from where additional documentation should be searched. You can remove folders by clicking on the <em>Delete</em> button." ) );
- grid = new QGridLayout(gb, 4,3, 6,2);
+ grid = new TQGridLayout(gb, 4,3, 6,2);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
- addButton = new QPushButton(i18n("Add..."), gb);
+ addButton = new TQPushButton(i18n("Add..."), gb);
grid->addWidget(addButton, 1,0);
- delButton = new QPushButton(i18n("Delete"), gb);
+ delButton = new TQPushButton(i18n("Delete"), gb);
grid->addWidget(delButton, 2,0);
searchPaths = new KListBox(gb);
grid->addMultiCellWidget(searchPaths, 1,3, 1,1);
grid->setRowStretch(2,2);
- gb = new QGroupBox(i18n("Language Settings"), this);
+ gb = new TQGroupBox(i18n("Language Settings"), this);
vbox->addWidget(gb);
- QWhatsThis::add(gb, i18n("Here you can select the language you want to create the index for."));
+ TQWhatsThis::add(gb, i18n("Here you can select the language you want to create the index for."));
language = new KLanguageCombo(gb);
- l = new QLabel(language, i18n("&Language"), gb);
- vvbox = new QVBoxLayout(gb, 6,2);
+ l = new TQLabel(language, i18n("&Language"), gb);
+ vvbox = new TQVBoxLayout(gb, 6,2);
vvbox->addSpacing(gb->fontMetrics().lineSpacing());
- hbox = new QHBoxLayout(vvbox, 6);
+ hbox = new TQHBoxLayout(vvbox, 6);
hbox->addWidget(l);
hbox->addWidget(language,1);
hbox->addStretch(1);
@@ -155,16 +155,16 @@ KHTMLSearchConfig::KHTMLSearchConfig(QWidget *parent, const char *name)
vbox->addStretch(1);
- runButton = new QPushButton(i18n("Generate Index..."), this);
- QWhatsThis::add( runButton, i18n( "Click this button to generate the index for the fulltext search." ) );
+ runButton = new TQPushButton(i18n("Generate Index..."), this);
+ TQWhatsThis::add( runButton, i18n( "Click this button to generate the index for the fulltext search." ) );
runButton->setFixedSize(runButton->sizeHint());
vbox->addWidget(runButton, AlignRight);
- connect(runButton, SIGNAL(clicked()), this, SLOT(generateIndex()));
+ connect(runButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(generateIndex()));
- connect(addButton, SIGNAL(clicked()), this, SLOT(addClicked()));
- connect(delButton, SIGNAL(clicked()), this, SLOT(delClicked()));
- connect(searchPaths, SIGNAL(highlighted(const QString &)),
- this, SLOT(pathSelected(const QString &)));
+ connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addClicked()));
+ connect(delButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(delClicked()));
+ connect(searchPaths, TQT_SIGNAL(highlighted(const TQString &)),
+ this, TQT_SLOT(pathSelected(const TQString &)));
checkButtons();
@@ -178,17 +178,17 @@ void KHTMLSearchConfig::loadLanguages()
language->clear();
// add all languages to the list
- QStringList langs = KGlobal::dirs()->findAllResources("locale",
- QString::fromLatin1("*/entry.desktop"));
+ TQStringList langs = KGlobal::dirs()->findAllResources("locale",
+ TQString::fromLatin1("*/entry.desktop"));
langs.sort();
- for (QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it)
+ for (TQStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it)
{
KSimpleConfig entry(*it);
- entry.setGroup(QString::fromLatin1("KCM Locale"));
- QString name = entry.readEntry(QString::fromLatin1("Name"), KGlobal::locale()->translate("without name"));
+ entry.setGroup(TQString::fromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::fromLatin1("Name"), KGlobal::locale()->translate("without name"));
- QString path = *it;
+ TQString path = *it;
int index = path.findRev('/');
path = path.left(index);
index = path.findRev('/');
@@ -198,13 +198,13 @@ void KHTMLSearchConfig::loadLanguages()
}
-QString KHTMLSearchConfig::quickHelp() const
+TQString KHTMLSearchConfig::quickHelp() const
{
return i18n( "<h1>Help Index</h1> This configuration module lets you configure the ht://dig engine which can be used for fulltext search in the KDE documentation as well as other system documentation like man and info pages." );
}
-void KHTMLSearchConfig::pathSelected(const QString &)
+void KHTMLSearchConfig::pathSelected(const TQString &)
{
checkButtons();
}
@@ -219,7 +219,7 @@ void KHTMLSearchConfig::checkButtons()
void KHTMLSearchConfig::addClicked()
{
- QString dir = KFileDialog::getExistingDirectory();
+ TQString dir = KFileDialog::getExistingDirectory();
if (!dir.isEmpty())
{
@@ -265,14 +265,14 @@ void KHTMLSearchConfig::load()
indexMan->setChecked(config->readBoolEntry("Man", false));
indexInfo->setChecked(config->readBoolEntry("Info", false));
- QStringList l = config->readPathListEntry("Paths");
+ TQStringList l = config->readPathListEntry("Paths");
searchPaths->clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it=l.begin(); it != l.end(); ++it)
searchPaths->insertItem(*it);
config->setGroup("Locale");
- QString lang = config->readEntry("Search Language", KGlobal::locale()->language());
+ TQString lang = config->readEntry("Search Language", KGlobal::locale()->language());
language->setCurrentItem(lang);
emit changed(false);
@@ -293,7 +293,7 @@ void KHTMLSearchConfig::save()
config->writeEntry("Man", indexMan->isChecked());
config->writeEntry("Info", indexInfo->isChecked());
- QStringList l;
+ TQStringList l;
for (uint i=0; i<searchPaths->count(); ++i)
l.append(searchPaths->text(i));
config->writePathEntry("Paths", l);
@@ -326,7 +326,7 @@ void KHTMLSearchConfig::defaults()
}
-void KHTMLSearchConfig::urlClicked(const QString &url)
+void KHTMLSearchConfig::urlClicked(const TQString &url)
{
kapp->invokeBrowser(url);
}
@@ -336,7 +336,7 @@ void KHTMLSearchConfig::generateIndex()
{
save();
- QString exe = kapp->dirs()->findExe("khtmlindex");
+ TQString exe = kapp->dirs()->findExe("khtmlindex");
if (exe.isEmpty())
return;
@@ -345,8 +345,8 @@ void KHTMLSearchConfig::generateIndex()
indexProc = new KProcess;
*indexProc << exe << "--lang" << language->currentTag();
- connect(indexProc, SIGNAL(processExited(KProcess *)),
- this, SLOT(indexTerminated(KProcess *)));
+ connect(indexProc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(indexTerminated(KProcess *)));
runButton->setEnabled(false);
@@ -362,7 +362,7 @@ void KHTMLSearchConfig::indexTerminated(KProcess *)
extern "C"
{
- KDE_EXPORT KCModule *create_htmlsearch(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_htmlsearch(TQWidget *parent, const char *name)
{
KGlobal::locale()->insertCatalogue("kcmhtmlsearch");
return new KHTMLSearchConfig(parent, name);
diff --git a/khelpcenter/htmlsearch/kcmhtmlsearch.h b/khelpcenter/htmlsearch/kcmhtmlsearch.h
index 630f5aeda..bf6e91bbc 100644
--- a/khelpcenter/htmlsearch/kcmhtmlsearch.h
+++ b/khelpcenter/htmlsearch/kcmhtmlsearch.h
@@ -39,14 +39,14 @@ class KHTMLSearchConfig : public KCModule
public:
- KHTMLSearchConfig(QWidget *parent = 0L, const char *name = 0L);
+ KHTMLSearchConfig(TQWidget *parent = 0L, const char *name = 0L);
virtual ~KHTMLSearchConfig();
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
int buttons();
@@ -56,8 +56,8 @@ protected slots:
void configChanged();
void addClicked();
void delClicked();
- void pathSelected(const QString &);
- void urlClicked(const QString&);
+ void pathSelected(const TQString &);
+ void urlClicked(const TQString&);
void generateIndex();
void indexTerminated(KProcess *proc);
@@ -69,8 +69,8 @@ private:
void loadLanguages();
KURLRequester *htdigBin, *htsearchBin, *htmergeBin;
- QCheckBox *indexKDE, *indexMan, *indexInfo;
- QPushButton *addButton, *delButton, *runButton;
+ TQCheckBox *indexKDE, *indexMan, *indexInfo;
+ TQPushButton *addButton, *delButton, *runButton;
KListBox *searchPaths;
KLanguageCombo *language;
diff --git a/khelpcenter/htmlsearch/klangcombo.cpp b/khelpcenter/htmlsearch/klangcombo.cpp
index 0b41ea1e9..308109d12 100644
--- a/khelpcenter/htmlsearch/klangcombo.cpp
+++ b/khelpcenter/htmlsearch/klangcombo.cpp
@@ -21,7 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qiconset.h>
+#include <tqiconset.h>
#include <kstandarddirs.h>
@@ -32,21 +32,21 @@ KLanguageCombo::~KLanguageCombo ()
{
}
-KLanguageCombo::KLanguageCombo (QWidget * parent, const char *name)
+KLanguageCombo::KLanguageCombo (TQWidget * parent, const char *name)
: KTagComboBox(parent, name)
{
}
-void KLanguageCombo::insertLanguage(const QString& path, const QString& name, const QString& sub, const QString &submenu, int index)
+void KLanguageCombo::insertLanguage(const TQString& path, const TQString& name, const TQString& sub, const TQString &submenu, int index)
{
- QString output = name + QString::fromLatin1(" (") + path + QString::fromLatin1(")");
- QPixmap flag(locate("locale", sub + path + QString::fromLatin1("/flag.png")));
- insertItem(QIconSet(flag), output, path, submenu, index);
+ TQString output = name + TQString::fromLatin1(" (") + path + TQString::fromLatin1(")");
+ TQPixmap flag(locate("locale", sub + path + TQString::fromLatin1("/flag.png")));
+ insertItem(TQIconSet(flag), output, path, submenu, index);
}
-void KLanguageCombo::changeLanguage(const QString& name, int i)
+void KLanguageCombo::changeLanguage(const TQString& name, int i)
{
if (i < 0 || i >= count()) return;
- QString output = name + QString::fromLatin1(" (") + tag(i) + QString::fromLatin1(")");
+ TQString output = name + TQString::fromLatin1(" (") + tag(i) + TQString::fromLatin1(")");
changeItem(output, i);
}
diff --git a/khelpcenter/htmlsearch/klangcombo.h b/khelpcenter/htmlsearch/klangcombo.h
index 1c556ae64..4ca6e2f3b 100644
--- a/khelpcenter/htmlsearch/klangcombo.h
+++ b/khelpcenter/htmlsearch/klangcombo.h
@@ -37,11 +37,11 @@ class KLanguageCombo : public KTagComboBox
Q_OBJECT
public:
- KLanguageCombo(QWidget *parent=0, const char *name=0);
+ KLanguageCombo(TQWidget *parent=0, const char *name=0);
~KLanguageCombo();
- void insertLanguage(const QString& path, const QString& name, const QString& sub = QString::null, const QString &submenu = QString::null, int index = -1);
- void changeLanguage(const QString& name, int i);
+ void insertLanguage(const TQString& path, const TQString& name, const TQString& sub = TQString::null, const TQString &submenu = TQString::null, int index = -1);
+ void changeLanguage(const TQString& name, int i);
};
#endif
diff --git a/khelpcenter/htmlsearch/ktagcombobox.cpp b/khelpcenter/htmlsearch/ktagcombobox.cpp
index eea4c149f..871f5c9cf 100644
--- a/khelpcenter/htmlsearch/ktagcombobox.cpp
+++ b/khelpcenter/htmlsearch/ktagcombobox.cpp
@@ -22,8 +22,8 @@
*/
#define INCLUDE_MENUITEM_DEF 1
-#include <qpainter.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
@@ -36,8 +36,8 @@ KTagComboBox::~KTagComboBox ()
delete tags;
}
-KTagComboBox::KTagComboBox (QWidget * parent, const char *name)
- : QComboBox(parent, name),
+KTagComboBox::KTagComboBox (TQWidget * parent, const char *name)
+ : TQComboBox(parent, name),
popup(0),
old_popup(0)
{
@@ -48,10 +48,10 @@ KTagComboBox::KTagComboBox (QWidget * parent, const char *name)
void KTagComboBox::popupMenu()
{
- popup->popup( mapToGlobal( QPoint(0,0) ), current );
+ popup->popup( mapToGlobal( TQPoint(0,0) ), current );
}
-void KTagComboBox::keyPressEvent( QKeyEvent *e )
+void KTagComboBox::keyPressEvent( TQKeyEvent *e )
{
int c;
@@ -73,7 +73,7 @@ void KTagComboBox::keyPressEvent( QKeyEvent *e )
emit activated( c );
}
-void KTagComboBox::mousePressEvent( QMouseEvent * )
+void KTagComboBox::mousePressEvent( TQMouseEvent * )
{
popupMenu();
}
@@ -97,11 +97,11 @@ void KTagComboBox::clear()
delete old_popup;
old_popup = popup;
- popup = new QPopupMenu(this);
- connect( popup, SIGNAL(activated(int)),
- SLOT(internalActivate(int)) );
- connect( popup, SIGNAL(highlighted(int)),
- SLOT(internalHighlight(int)) );
+ popup = new TQPopupMenu(this);
+ connect( popup, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(internalActivate(int)) );
+ connect( popup, TQT_SIGNAL(highlighted(int)),
+ TQT_SLOT(internalHighlight(int)) );
}
int KTagComboBox::count() const
@@ -109,7 +109,7 @@ int KTagComboBox::count() const
return tags->count();
}
-static inline void checkInsertPos(QPopupMenu *popup, const QString & str, int &index)
+static inline void checkInsertPos(TQPopupMenu *popup, const TQString & str, int &index)
{
if (index == -2) index = popup->count();
if (index != -1) return;
@@ -131,14 +131,14 @@ static inline void checkInsertPos(QPopupMenu *popup, const QString & str, int &i
index = a; // it doesn't really matter ... a == b here.
}
-static inline QPopupMenu *checkInsertIndex(QPopupMenu *popup, const QStringList *tags, const QString &submenu)
+static inline TQPopupMenu *checkInsertIndex(TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu)
{
int pos = tags->findIndex(submenu);
- QPopupMenu *pi = 0;
+ TQPopupMenu *pi = 0;
if (pos != -1)
{
- QMenuItem *p = popup->findItem(pos);
+ TQMenuItem *p = popup->findItem(pos);
pi = p?p->popup():0;
}
if (!pi) pi = popup;
@@ -146,50 +146,50 @@ static inline QPopupMenu *checkInsertIndex(QPopupMenu *popup, const QStringList
return pi;
}
-void KTagComboBox::insertItem(const QIconSet& icon, const QString &text, const QString &tag, const QString &submenu, int index )
+void KTagComboBox::insertItem(const TQIconSet& icon, const TQString &text, const TQString &tag, const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
+ TQPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
checkInsertPos(pi, text, index);
pi->insertItem(icon, text, count(), index);
tags->append(tag);
}
-void KTagComboBox::insertItem(const QString &text, const QString &tag, const QString &submenu, int index )
+void KTagComboBox::insertItem(const TQString &text, const TQString &tag, const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
+ TQPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
checkInsertPos(pi, text, index);
pi->insertItem(text, count(), index);
tags->append(tag);
}
-void KTagComboBox::insertSeparator(const QString &submenu, int index)
+void KTagComboBox::insertSeparator(const TQString &submenu, int index)
{
- QPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
+ TQPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
pi->insertSeparator(index);
- tags->append(QString::null);
+ tags->append(TQString::null);
}
-void KTagComboBox::insertSubmenu(const QString &text, const QString &tag, const QString &submenu, int index)
+void KTagComboBox::insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu, int index)
{
- QPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
- QPopupMenu *p = new QPopupMenu(pi);
+ TQPopupMenu *pi = checkInsertIndex(popup, tags, submenu);
+ TQPopupMenu *p = new TQPopupMenu(pi);
checkInsertPos(pi, text, index);
pi->insertItem(text, p, count(), index);
tags->append(tag);
- connect( p, SIGNAL(activated(int)),
- SLOT(internalActivate(int)) );
- connect( p, SIGNAL(highlighted(int)),
- SLOT(internalHighlight(int)) );
+ connect( p, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(internalActivate(int)) );
+ connect( p, TQT_SIGNAL(highlighted(int)),
+ TQT_SLOT(internalHighlight(int)) );
}
-void KTagComboBox::paintEvent( QPaintEvent * ev)
+void KTagComboBox::paintEvent( TQPaintEvent * ev)
{
- QComboBox::paintEvent(ev);
+ TQComboBox::paintEvent(ev);
- QPainter p (this);
+ TQPainter p (this);
// Text
- QRect clip(2, 2, width() - 4, height() - 4);
+ TQRect clip(2, 2, width() - 4, height() - 4);
#if 0
if ( hasFocus() && style().guiStyle() != MotifStyle )
p.setPen( colorGroup().highlightedText() );
@@ -197,29 +197,29 @@ void KTagComboBox::paintEvent( QPaintEvent * ev)
p.drawText(clip, AlignCenter | SingleLine, popup->text( current ));
// Icon
- QIconSet *icon = popup->iconSet( this->current );
+ TQIconSet *icon = popup->iconSet( this->current );
if (icon) {
- QPixmap pm = icon->pixmap();
+ TQPixmap pm = icon->pixmap();
p.drawPixmap( 4, (height()-pm.height())/2, pm );
}
}
-bool KTagComboBox::containsTag( const QString &str ) const
+bool KTagComboBox::containsTag( const TQString &str ) const
{
return tags->contains(str) > 0;
}
-QString KTagComboBox::currentTag() const
+TQString KTagComboBox::currentTag() const
{
return *tags->at(currentItem());
}
-QString KTagComboBox::tag(int i) const
+TQString KTagComboBox::tag(int i) const
{
if (i < 0 || i >= count())
{
kdDebug() << "KTagComboBox::tag(), unknown tag " << i << endl;
- return QString::null;
+ return TQString::null;
}
return *tags->at(i);
}
@@ -236,7 +236,7 @@ void KTagComboBox::setCurrentItem(int i)
repaint();
}
-void KTagComboBox::setCurrentItem(const QString &code)
+void KTagComboBox::setCurrentItem(const TQString &code)
{
int i = tags->findIndex(code);
if (code.isNull())
@@ -245,8 +245,8 @@ void KTagComboBox::setCurrentItem(const QString &code)
setCurrentItem(i);
}
-void KTagComboBox::setFont( const QFont &font )
+void KTagComboBox::setFont( const TQFont &font )
{
- QComboBox::setFont( font );
+ TQComboBox::setFont( font );
popup->setFont( font );
}
diff --git a/khelpcenter/htmlsearch/ktagcombobox.h b/khelpcenter/htmlsearch/ktagcombobox.h
index 28aad2dc8..a246e2140 100644
--- a/khelpcenter/htmlsearch/ktagcombobox.h
+++ b/khelpcenter/htmlsearch/ktagcombobox.h
@@ -25,13 +25,13 @@
#ifndef __KTAGCOMBOBOX_H__
#define __KTAGCOMBOBOX_H__
-#include <qcombobox.h>
+#include <tqcombobox.h>
class QPopupMenu;
/*
* This class should be just like qcombobox, but it should be possible
- * to have have a QIconSet for each entry, and each entry should have a tag.
+ * to have have a TQIconSet for each entry, and each entry should have a tag.
*
* It has also support for sub menues.
*/
@@ -40,13 +40,13 @@ class KTagComboBox : public QComboBox
Q_OBJECT
public:
- KTagComboBox(QWidget *parent=0, const char *name=0);
+ KTagComboBox(TQWidget *parent=0, const char *name=0);
~KTagComboBox();
- void insertItem(const QIconSet& icon, const QString &text, const QString &tag, const QString &submenu = QString::null, int index=-1 );
- void insertItem(const QString &text, const QString &tag, const QString &submenu = QString::null, int index=-1 );
- void insertSeparator(const QString &submenu = QString::null, int index=-1 );
- void insertSubmenu(const QString &text, const QString &tag, const QString &submenu = QString::null, int index=-1);
+ void insertItem(const TQIconSet& icon, const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1 );
+ void insertItem(const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1 );
+ void insertSeparator(const TQString &submenu = TQString::null, int index=-1 );
+ void insertSubmenu(const TQString &text, const TQString &tag, const TQString &submenu = TQString::null, int index=-1);
int count() const;
void clear();
@@ -54,19 +54,19 @@ public:
/*
* Tag of the selected item
*/
- QString currentTag() const;
- QString tag ( int i ) const;
- bool containsTag (const QString &str ) const;
+ TQString currentTag() const;
+ TQString tag ( int i ) const;
+ bool containsTag (const TQString &str ) const;
/*
* Set the current item
*/
int currentItem() const;
void setCurrentItem(int i);
- void setCurrentItem(const QString &code);
+ void setCurrentItem(const TQString &code);
// widget stuff
- virtual void setFont( const QFont & );
+ virtual void setFont( const TQFont & );
signals:
void activated( int index );
@@ -77,15 +77,15 @@ private slots:
void internalHighlight( int );
protected:
- void paintEvent( QPaintEvent * );
- void mousePressEvent( QMouseEvent * );
- void keyPressEvent( QKeyEvent *e );
+ void paintEvent( TQPaintEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void keyPressEvent( TQKeyEvent *e );
void popupMenu();
private:
// work space for the new class
- QStringList *tags;
- QPopupMenu *popup, *old_popup;
+ TQStringList *tags;
+ TQPopupMenu *popup, *old_popup;
int current;
};
diff --git a/khelpcenter/htmlsearch/progressdialog.cpp b/khelpcenter/htmlsearch/progressdialog.cpp
index 497c90324..e7eafedb1 100644
--- a/khelpcenter/htmlsearch/progressdialog.cpp
+++ b/khelpcenter/htmlsearch/progressdialog.cpp
@@ -1,5 +1,5 @@
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -10,35 +10,35 @@
#include "progressdialog.moc"
-ProgressDialog::ProgressDialog(QWidget *parent, const char *name)
+ProgressDialog::ProgressDialog(TQWidget *parent, const char *name)
: KDialogBase(KDialogBase::Plain, i18n("Generating Index"), Cancel, Cancel,
parent, name, false)
{
- QGridLayout *grid = new QGridLayout(plainPage(), 5,3, spacingHint());
+ TQGridLayout *grid = new TQGridLayout(plainPage(), 5,3, spacingHint());
- QLabel *l = new QLabel(i18n("Scanning for files"), plainPage());
+ TQLabel *l = new TQLabel(i18n("Scanning for files"), plainPage());
grid->addMultiCellWidget(l, 0,0, 1,2);
- filesScanned = new QLabel(plainPage());
+ filesScanned = new TQLabel(plainPage());
grid->addWidget(filesScanned, 1,2);
setFilesScanned(0);
- check1 = new QLabel(plainPage());
+ check1 = new TQLabel(plainPage());
grid->addWidget(check1, 0,0);
- l = new QLabel(i18n("Extracting search terms"), plainPage());
+ l = new TQLabel(i18n("Extracting search terms"), plainPage());
grid->addMultiCellWidget(l, 2,2, 1,2);
bar = new KProgress(plainPage());
grid->addWidget(bar, 3,2);
- check2 = new QLabel(plainPage());
+ check2 = new TQLabel(plainPage());
grid->addWidget(check2, 2,0);
- l = new QLabel(i18n("Generating index..."), plainPage());
+ l = new TQLabel(i18n("Generating index..."), plainPage());
grid->addMultiCellWidget(l, 4,4, 1,2);
- check3 = new QLabel(plainPage());
+ check3 = new TQLabel(plainPage());
grid->addWidget(check3, 4,0);
setState(0);
@@ -67,8 +67,8 @@ void ProgressDialog::setFilesDigged(int n)
void ProgressDialog::setState(int n)
{
- QPixmap unchecked = QPixmap(locate("data", "khelpcenter/pics/unchecked.xpm"));
- QPixmap checked = QPixmap(locate("data", "khelpcenter/pics/checked.xpm"));
+ TQPixmap unchecked = TQPixmap(locate("data", "khelpcenter/pics/unchecked.xpm"));
+ TQPixmap checked = TQPixmap(locate("data", "khelpcenter/pics/checked.xpm"));
check1->setPixmap( n > 0 ? checked : unchecked);
check2->setPixmap( n > 1 ? checked : unchecked);
diff --git a/khelpcenter/htmlsearch/progressdialog.h b/khelpcenter/htmlsearch/progressdialog.h
index 9c18f2d01..4152e7537 100644
--- a/khelpcenter/htmlsearch/progressdialog.h
+++ b/khelpcenter/htmlsearch/progressdialog.h
@@ -16,7 +16,7 @@ class ProgressDialog : public KDialogBase
public:
- ProgressDialog(QWidget *parent=0, const char *name=0);
+ ProgressDialog(TQWidget *parent=0, const char *name=0);
void setFilesScanned(int s);
void setFilesToDig(int d);
@@ -26,7 +26,7 @@ public:
private:
- QLabel *filesScanned, *check1, *check2, *check3;
+ TQLabel *filesScanned, *check1, *check2, *check3;
KProgress *bar;
};
diff --git a/khelpcenter/htmlsearchconfig.cpp b/khelpcenter/htmlsearchconfig.cpp
index 999deb274..ea6dff669 100644
--- a/khelpcenter/htmlsearchconfig.cpp
+++ b/khelpcenter/htmlsearchconfig.cpp
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -35,74 +35,74 @@
namespace KHC {
-HtmlSearchConfig::HtmlSearchConfig(QWidget *parent, const char *name)
- : QWidget(parent, name)
+HtmlSearchConfig::HtmlSearchConfig(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- QVBoxLayout *vbox = new QVBoxLayout(this, 5);
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, 5);
- QGroupBox *gb = new QGroupBox(i18n("ht://dig"), this);
+ TQGroupBox *gb = new TQGroupBox(i18n("ht://dig"), this);
vbox->addWidget(gb);
- QGridLayout *grid = new QGridLayout(gb, 3,2, 6,6);
+ TQGridLayout *grid = new TQGridLayout(gb, 3,2, 6,6);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
- QLabel *l = new QLabel(i18n("The fulltext search feature makes use of the "
+ TQLabel *l = new TQLabel(i18n("The fulltext search feature makes use of the "
"ht://dig HTML search engine. "
"You can get ht://dig at the"), gb);
- l->setAlignment(QLabel::WordBreak);
+ l->setAlignment(TQLabel::WordBreak);
l->setMinimumSize(l->sizeHint());
grid->addMultiCellWidget(l, 1, 1, 0, 1);
- QWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) );
+ TQWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) );
KURLLabel *url = new KURLLabel(gb);
url->setURL("http://www.htdig.org");
url->setText(i18n("ht://dig home page"));
- url->setAlignment(QLabel::AlignHCenter);
+ url->setAlignment(TQLabel::AlignHCenter);
grid->addMultiCellWidget(url, 2,2, 0, 1);
- connect(url, SIGNAL(leftClickedURL(const QString&)),
- this, SLOT(urlClicked(const QString&)));
+ connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ this, TQT_SLOT(urlClicked(const TQString&)));
- gb = new QGroupBox(i18n("Program Locations"), this);
+ gb = new TQGroupBox(i18n("Program Locations"), this);
vbox->addWidget(gb);
- grid = new QGridLayout(gb, 4,2, 6,6);
+ grid = new TQGridLayout(gb, 4,2, 6,6);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
mHtsearchUrl = new KURLRequester(gb);
- l = new QLabel(mHtsearchUrl, i18n("htsearch:"), gb);
+ l = new TQLabel(mHtsearchUrl, i18n("htsearch:"), gb);
l->setBuddy( mHtsearchUrl );
grid->addWidget(l, 1,0);
grid->addWidget(mHtsearchUrl, 1,1);
- connect( mHtsearchUrl->lineEdit(), SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
- QString wtstr = i18n( "Enter the URL of the htsearch CGI program." );
- QWhatsThis::add( mHtsearchUrl, wtstr );
- QWhatsThis::add( l, wtstr );
+ connect( mHtsearchUrl->lineEdit(), TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
+ TQString wtstr = i18n( "Enter the URL of the htsearch CGI program." );
+ TQWhatsThis::add( mHtsearchUrl, wtstr );
+ TQWhatsThis::add( l, wtstr );
mIndexerBin = new KURLRequester(gb);
- l = new QLabel(mIndexerBin, i18n("Indexer:"), gb);
+ l = new TQLabel(mIndexerBin, i18n("Indexer:"), gb);
l->setBuddy( mIndexerBin );
grid->addWidget(l, 2,0);
grid->addWidget(mIndexerBin, 2,1);
- connect( mIndexerBin->lineEdit(), SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
+ connect( mIndexerBin->lineEdit(), TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
wtstr = i18n( "Enter the path to your htdig indexer program here." );
- QWhatsThis::add( mIndexerBin, wtstr );
- QWhatsThis::add( l, wtstr );
+ TQWhatsThis::add( mIndexerBin, wtstr );
+ TQWhatsThis::add( l, wtstr );
mDbDir = new KURLRequester(gb);
mDbDir->setMode( KFile::Directory | KFile::LocalOnly );
- l = new QLabel(mDbDir, i18n("htdig database:"), gb);
+ l = new TQLabel(mDbDir, i18n("htdig database:"), gb);
l->setBuddy( mDbDir );
grid->addWidget(l, 3,0);
grid->addWidget(mDbDir, 3,1);
- connect( mDbDir->lineEdit(), SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
+ connect( mDbDir->lineEdit(), TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
wtstr = i18n( "Enter the path to the htdig database folder." );
- QWhatsThis::add( mDbDir, wtstr );
- QWhatsThis::add( l, wtstr );
+ TQWhatsThis::add( mDbDir, wtstr );
+ TQWhatsThis::add( l, wtstr );
}
HtmlSearchConfig::~HtmlSearchConfig()
@@ -142,7 +142,7 @@ void HtmlSearchConfig::defaults()
mDbDir->lineEdit()->setText("/opt/www/htdig/db/" );
}
-void HtmlSearchConfig::urlClicked(const QString &url)
+void HtmlSearchConfig::urlClicked(const TQString &url)
{
kapp->invokeBrowser(url);
}
diff --git a/khelpcenter/htmlsearchconfig.h b/khelpcenter/htmlsearchconfig.h
index bd3b2f27f..ef74cce5d 100644
--- a/khelpcenter/htmlsearchconfig.h
+++ b/khelpcenter/htmlsearchconfig.h
@@ -21,7 +21,7 @@
#ifndef KHC_HTMLSEARCHCONFIG_H
#define KHC_HTMLSEARCHCONFIG_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KURLRequester;
class KConfig;
@@ -32,7 +32,7 @@ class HtmlSearchConfig : public QWidget
{
Q_OBJECT
public:
- HtmlSearchConfig(QWidget *parent = 0L, const char *name = 0L);
+ HtmlSearchConfig(TQWidget *parent = 0L, const char *name = 0L);
virtual ~HtmlSearchConfig();
void load( KConfig * );
@@ -44,7 +44,7 @@ class HtmlSearchConfig : public QWidget
void changed();
protected slots:
- void urlClicked(const QString&);
+ void urlClicked(const TQString&);
private:
KURLRequester *mHtsearchUrl;
diff --git a/khelpcenter/infotree.cpp b/khelpcenter/infotree.cpp
index 61f44a109..a23cce174 100644
--- a/khelpcenter/infotree.cpp
+++ b/khelpcenter/infotree.cpp
@@ -32,8 +32,8 @@
#include <kstandarddirs.h>
#include <kurl.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <stdlib.h> // for getenv()
@@ -42,7 +42,7 @@ using namespace KHC;
class InfoCategoryItem : public NavigatorItem
{
public:
- InfoCategoryItem( NavigatorItem *parent, const QString &text );
+ InfoCategoryItem( NavigatorItem *parent, const TQString &text );
virtual void setOpen( bool open );
};
@@ -50,10 +50,10 @@ class InfoCategoryItem : public NavigatorItem
class InfoNodeItem : public NavigatorItem
{
public:
- InfoNodeItem( InfoCategoryItem *parent, const QString &text );
+ InfoNodeItem( InfoCategoryItem *parent, const TQString &text );
};
-InfoCategoryItem::InfoCategoryItem( NavigatorItem *parent, const QString &text )
+InfoCategoryItem::InfoCategoryItem( NavigatorItem *parent, const TQString &text )
: NavigatorItem( new DocEntry( text ), parent )
{
setAutoDeleteDocEntry( true );
@@ -69,14 +69,14 @@ void InfoCategoryItem::setOpen( bool open )
else setPixmap( 0, SmallIcon( "contents2" ) );
}
-InfoNodeItem::InfoNodeItem( InfoCategoryItem *parent, const QString &text )
+InfoNodeItem::InfoNodeItem( InfoCategoryItem *parent, const TQString &text )
: NavigatorItem( new DocEntry( text ), parent )
{
setAutoDeleteDocEntry( true );
// kdDebug( 1400 ) << "Created info node item: " << text << endl;
}
-InfoTree::InfoTree( QObject *parent, const char *name )
+InfoTree::InfoTree( TQObject *parent, const char *name )
: TreeBuilder( parent, name ),
m_parentItem( 0 )
{
@@ -97,7 +97,7 @@ void InfoTree::build( NavigatorItem *parent )
KConfig *cfg = kapp->config();
cfg->setGroup( "Info pages" );
- QStringList infoDirFiles = cfg->readListEntry( "Search paths" );
+ TQStringList infoDirFiles = cfg->readListEntry( "Search paths" );
// Default paths taken fron kdebase/kioslave/info/kde-info2html.conf
if ( infoDirFiles.isEmpty() ) {
infoDirFiles << "/usr/share/info";
@@ -110,35 +110,35 @@ void InfoTree::build( NavigatorItem *parent )
infoDirFiles << "/usr/X11R6/lib/xemacs/info";
}
- QString infoPath = ::getenv( "INFOPATH" );
+ TQString infoPath = ::getenv( "INFOPATH" );
if ( !infoPath.isEmpty() )
- infoDirFiles += QStringList::split( ':', infoPath );
+ infoDirFiles += TQStringList::split( ':', infoPath );
- QStringList::ConstIterator it = infoDirFiles.begin();
- QStringList::ConstIterator end = infoDirFiles.end();
+ TQStringList::ConstIterator it = infoDirFiles.begin();
+ TQStringList::ConstIterator end = infoDirFiles.end();
for ( ; it != end; ++it ) {
- QString infoDirFileName = *it + "/dir";
- if ( QFile::exists( infoDirFileName ) )
+ TQString infoDirFileName = *it + "/dir";
+ if ( TQFile::exists( infoDirFileName ) )
parseInfoDirFile( infoDirFileName );
}
m_alphabItem->sortChildItems( 0, true /* ascending */ );
}
-void InfoTree::parseInfoDirFile( const QString &infoDirFileName )
+void InfoTree::parseInfoDirFile( const TQString &infoDirFileName )
{
kdDebug( 1400 ) << "Parsing info dir file " << infoDirFileName << endl;
- QFile infoDirFile( infoDirFileName );
+ TQFile infoDirFile( infoDirFileName );
if ( !infoDirFile.open( IO_ReadOnly ) )
return;
- QTextStream stream( &infoDirFile );
+ TQTextStream stream( &infoDirFile );
// Skip introduction blurb.
while ( !stream.eof() && !stream.readLine().startsWith( "* Menu:" ) );
while ( !stream.eof() ) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if ( s.stripWhiteSpace().isEmpty() )
continue;
@@ -151,8 +151,8 @@ void InfoTree::parseInfoDirFile( const QString &infoDirFileName )
const int closeBrace = s.find( ")", openBrace );
const int dot = s.find( ".", closeBrace );
- QString appName = s.mid( 2, colon - 2 );
- QString url = "info:/" + s.mid( openBrace + 1, closeBrace - openBrace - 1 );
+ TQString appName = s.mid( 2, colon - 2 );
+ TQString url = "info:/" + s.mid( openBrace + 1, closeBrace - openBrace - 1 );
if ( dot - closeBrace > 1 )
url += "/" + s.mid( closeBrace + 1, dot - closeBrace - 1 );
else
@@ -162,7 +162,7 @@ void InfoTree::parseInfoDirFile( const QString &infoDirFileName )
item->entry()->setUrl( url );
InfoCategoryItem *alphabSection = 0;
- for ( QListViewItem* it=m_alphabItem->firstChild(); it; it=it->nextSibling() ) {
+ for ( TQListViewItem* it=m_alphabItem->firstChild(); it; it=it->nextSibling() ) {
if ( it->text( 0 ) == appName[ 0 ].upper() ) {
alphabSection = static_cast<InfoCategoryItem *>( it );
break;
diff --git a/khelpcenter/infotree.h b/khelpcenter/infotree.h
index a7f2c5c5d..e5516a3d2 100644
--- a/khelpcenter/infotree.h
+++ b/khelpcenter/infotree.h
@@ -31,12 +31,12 @@ namespace KHC
{
Q_OBJECT
public:
- InfoTree( QObject *parent, const char *name = 0 );
+ InfoTree( TQObject *parent, const char *name = 0 );
virtual void build( NavigatorItem *parentItem );
private:
- void parseInfoDirFile( const QString &fileName );
+ void parseInfoDirFile( const TQString &fileName );
NavigatorItem *m_parentItem;
NavigatorItem *m_alphabItem;
diff --git a/khelpcenter/kcmhelpcenter.cpp b/khelpcenter/kcmhelpcenter.cpp
index 3c122b3b3..c3b3e3094 100644
--- a/khelpcenter/kcmhelpcenter.cpp
+++ b/khelpcenter/kcmhelpcenter.cpp
@@ -41,30 +41,30 @@
#include <kmessagebox.h>
#include <klistview.h>
#include <klineedit.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qdir.h>
-#include <qtabwidget.h>
-#include <qprogressbar.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qtextedit.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
+#include <tqtabwidget.h>
+#include <tqprogressbar.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqtextedit.h>
+#include <tqregexp.h>
#include <unistd.h>
#include <sys/types.h>
using namespace KHC;
-IndexDirDialog::IndexDirDialog( QWidget *parent )
+IndexDirDialog::IndexDirDialog( TQWidget *parent )
: KDialogBase( parent, 0, true, i18n("Change Index Folder"), Ok | Cancel )
{
- QFrame *topFrame = makeMainWidget();
+ TQFrame *topFrame = makeMainWidget();
- QBoxLayout *urlLayout = new QHBoxLayout( topFrame );
+ TQBoxLayout *urlLayout = new TQHBoxLayout( topFrame );
- QLabel *label = new QLabel( i18n("Index folder:"), topFrame );
+ TQLabel *label = new TQLabel( i18n("Index folder:"), topFrame );
urlLayout->addWidget( label );
mIndexUrlRequester = new KURLRequester( topFrame );
@@ -73,11 +73,11 @@ IndexDirDialog::IndexDirDialog( QWidget *parent )
urlLayout->addWidget( mIndexUrlRequester );
mIndexUrlRequester->setURL( Prefs::indexDirectory() );
- connect(mIndexUrlRequester->lineEdit(),SIGNAL(textChanged ( const QString & )), this, SLOT(slotUrlChanged( const QString &)));
+ connect(mIndexUrlRequester->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(slotUrlChanged( const TQString &)));
slotUrlChanged( mIndexUrlRequester->lineEdit()->text() );
}
-void IndexDirDialog::slotUrlChanged( const QString &_url )
+void IndexDirDialog::slotUrlChanged( const TQString &_url )
{
enableButtonOK( !_url.isEmpty() );
}
@@ -90,43 +90,43 @@ void IndexDirDialog::slotOk()
}
-IndexProgressDialog::IndexProgressDialog( QWidget *parent )
+IndexProgressDialog::IndexProgressDialog( TQWidget *parent )
: KDialog( parent, "IndexProgressDialog", true ),
mFinished( true )
{
setCaption( i18n("Build Search Indices") );
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setMargin( marginHint() );
topLayout->setSpacing( spacingHint() );
- mLabel = new QLabel( this );
+ mLabel = new TQLabel( this );
mLabel->setAlignment( AlignHCenter );
topLayout->addWidget( mLabel );
- mProgressBar = new QProgressBar( this );
+ mProgressBar = new TQProgressBar( this );
topLayout->addWidget( mProgressBar );
- mLogLabel = new QLabel( i18n("Index creation log:"), this );
+ mLogLabel = new TQLabel( i18n("Index creation log:"), this );
topLayout->addWidget( mLogLabel );
- mLogView = new QTextEdit( this );
+ mLogView = new TQTextEdit( this );
mLogView->setTextFormat( LogText );
mLogView->setMinimumHeight( 200 );
topLayout->addWidget( mLogView, 1 );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
buttonLayout->addStretch( 1 );
- mDetailsButton = new QPushButton( this );
- connect( mDetailsButton, SIGNAL( clicked() ), SLOT( toggleDetails() ) );
+ mDetailsButton = new TQPushButton( this );
+ connect( mDetailsButton, TQT_SIGNAL( clicked() ), TQT_SLOT( toggleDetails() ) );
buttonLayout->addWidget( mDetailsButton );
hideDetails();
- mEndButton = new QPushButton( this );
- connect( mEndButton, SIGNAL( clicked() ), SLOT( slotEnd() ) );
+ mEndButton = new TQPushButton( this );
+ connect( mEndButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEnd() ) );
buttonLayout->addWidget( mEndButton );
setFinished( false );
@@ -154,7 +154,7 @@ void IndexProgressDialog::advanceProgress()
mProgressBar->setProgress( mProgressBar->progress() + 1 );
}
-void IndexProgressDialog::setLabelText( const QString &text )
+void IndexProgressDialog::setLabelText( const TQString &text )
{
mLabel->setText( text );
}
@@ -178,7 +178,7 @@ void IndexProgressDialog::setFinished( bool finished )
}
}
-void IndexProgressDialog::appendLog( const QString &text )
+void IndexProgressDialog::appendLog( const TQString &text )
{
mLogView->append( text );
}
@@ -202,7 +202,7 @@ void IndexProgressDialog::toggleDetails()
mLogLabel->show();
mLogView->show();
mDetailsButton->setText( i18n("Details <<") );
- QSize size = cfg->readSizeEntry( "size" );
+ TQSize size = cfg->readSizeEntry( "size" );
if ( !size.isEmpty() ) resize( size );
} else {
cfg->writeEntry( "size", size() );
@@ -220,7 +220,7 @@ void IndexProgressDialog::hideDetails()
}
-KCMHelpCenter::KCMHelpCenter( KHC::SearchEngine *engine, QWidget *parent,
+KCMHelpCenter::KCMHelpCenter( KHC::SearchEngine *engine, TQWidget *parent,
const char *name)
: DCOPObject( "kcmhelpcenter" ),
KDialogBase( parent, name, false, i18n("Build Search Index"),
@@ -228,7 +228,7 @@ KCMHelpCenter::KCMHelpCenter( KHC::SearchEngine *engine, QWidget *parent,
mEngine( engine ), mProgressDialog( 0 ), mCurrentEntry( 0 ), mCmdFile( 0 ),
mProcess( 0 ), mIsClosing( false ), mRunAsRoot( false )
{
- QWidget *widget = makeMainWidget();
+ TQWidget *widget = makeMainWidget();
setupMainWidget( widget );
@@ -246,8 +246,8 @@ KCMHelpCenter::KCMHelpCenter( KHC::SearchEngine *engine, QWidget *parent,
if ( !success ) kdError() << "connect DCOP signal failed" << endl;
success = kapp->dcopClient()->connectDCOPSignal( "khc_indexbuilder",
- 0, "buildIndexError(QString)", "kcmhelpcenter",
- "slotIndexError(QString)", false );
+ 0, "buildIndexError(TQString)", "kcmhelpcenter",
+ "slotIndexError(TQString)", false );
if ( !success ) kdError() << "connect DCOP signal failed" << endl;
resize( configDialogSize( "IndexDialog" ) );
@@ -258,19 +258,19 @@ KCMHelpCenter::~KCMHelpCenter()
saveDialogSize( "IndexDialog" );
}
-void KCMHelpCenter::setupMainWidget( QWidget *parent )
+void KCMHelpCenter::setupMainWidget( TQWidget *parent )
{
- QVBoxLayout *topLayout = new QVBoxLayout( parent );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( parent );
topLayout->setSpacing( KDialog::spacingHint() );
- QString helpText =
+ TQString helpText =
i18n("To be able to search a document, there needs to exist a search\n"
"index. The status column of the list below shows, if an index\n"
"for a document exists.\n") +
i18n("To create an index check the box in the list and press the\n"
"\"Build Index\" button.\n");
- QLabel *label = new QLabel( helpText, parent );
+ TQLabel *label = new TQLabel( helpText, parent );
topLayout->addWidget( label );
mListView = new KListView( parent );
@@ -279,22 +279,22 @@ void KCMHelpCenter::setupMainWidget( QWidget *parent )
mListView->addColumn( i18n("Status") );
mListView->setColumnAlignment( 1, AlignCenter );
topLayout->addWidget( mListView );
- connect( mListView, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( checkSelection() ) );
+ connect( mListView, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ TQT_SLOT( checkSelection() ) );
- QBoxLayout *urlLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *urlLayout = new TQHBoxLayout( topLayout );
- QLabel *urlLabel = new QLabel( i18n("Index folder:"), parent );
+ TQLabel *urlLabel = new TQLabel( i18n("Index folder:"), parent );
urlLayout->addWidget( urlLabel );
- mIndexDirLabel = new QLabel( parent );
+ mIndexDirLabel = new TQLabel( parent );
urlLayout->addWidget( mIndexDirLabel, 1 );
- QPushButton *button = new QPushButton( i18n("Change..."), parent );
- connect( button, SIGNAL( clicked() ), SLOT( showIndexDirDialog() ) );
+ TQPushButton *button = new TQPushButton( i18n("Change..."), parent );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showIndexDirDialog() ) );
urlLayout->addWidget( button );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
buttonLayout->addStretch( 1 );
}
@@ -307,7 +307,7 @@ bool KCMHelpCenter::save()
{
kdDebug(1401) << "KCMHelpCenter::save()" << endl;
- if ( !QFile::exists( Prefs::indexDirectory() ) ) {
+ if ( !TQFile::exists( Prefs::indexDirectory() ) ) {
KMessageBox::sorry( this,
i18n("<qt>The folder <b>%1</b> does not exist; unable to create index.</qt>")
.arg( Prefs::indexDirectory() ) );
@@ -341,10 +341,10 @@ void KCMHelpCenter::load()
void KCMHelpCenter::updateStatus()
{
- QListViewItemIterator it( mListView );
+ TQListViewItemIterator it( mListView );
while ( it.current() != 0 ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
- QString status;
+ TQString status;
if ( item->entry()->indexExists( Prefs::indexDirectory() ) ) {
status = i18n("OK");
item->setOn( false );
@@ -372,12 +372,12 @@ bool KCMHelpCenter::buildIndex()
mIndexQueue.clear();
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
int maxWidth = 0;
mCmdFile = new KTempFile;
mCmdFile->setAutoDelete( true );
- QTextStream *ts = mCmdFile->textStream();
+ TQTextStream *ts = mCmdFile->textStream();
if ( !ts ) {
kdError() << "Error opening command file." << endl;
deleteCmdFile();
@@ -388,13 +388,13 @@ bool KCMHelpCenter::buildIndex()
bool hasError = false;
- QListViewItemIterator it( mListView );
+ TQListViewItemIterator it( mListView );
while ( it.current() != 0 ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
if ( item->isOn() ) {
DocEntry *entry = item->entry();
- QString docText = i18n("Document '%1' (%2):\n")
+ TQString docText = i18n("Document '%1' (%2):\n")
.arg( entry->identifier() )
.arg( entry->name() );
if ( entry->documentType().isEmpty() ) {
@@ -409,16 +409,16 @@ bool KCMHelpCenter::buildIndex()
.arg( entry->documentType() ) );
hasError = true;
} else {
- QString indexer = handler->indexCommand( entry->identifier() );
+ TQString indexer = handler->indexCommand( entry->identifier() );
if ( indexer.isEmpty() ) {
KMessageBox::sorry( this, docText +
i18n("No indexing command specified for document type '%1'.")
.arg( entry->documentType() ) );
hasError = true;
} else {
- indexer.replace( QRegExp( "%i" ), entry->identifier() );
- indexer.replace( QRegExp( "%d" ), Prefs::indexDirectory() );
- indexer.replace( QRegExp( "%p" ), entry->url() );
+ indexer.replace( TQRegExp( "%i" ), entry->identifier() );
+ indexer.replace( TQRegExp( "%d" ), Prefs::indexDirectory() );
+ indexer.replace( TQRegExp( "%p" ), entry->url() );
kdDebug() << "INDEXER: " << indexer << endl;
*ts << indexer << endl;
@@ -441,14 +441,14 @@ bool KCMHelpCenter::buildIndex()
}
mCurrentEntry = mIndexQueue.begin();
- QString name = (*mCurrentEntry)->name();
+ TQString name = (*mCurrentEntry)->name();
if ( !mProgressDialog ) {
mProgressDialog = new IndexProgressDialog( this );
- connect( mProgressDialog, SIGNAL( cancelled() ),
- SLOT( cancelBuildIndex() ) );
- connect( mProgressDialog, SIGNAL( closed() ),
- SLOT( slotProgressClosed() ) );
+ connect( mProgressDialog, TQT_SIGNAL( cancelled() ),
+ TQT_SLOT( cancelBuildIndex() ) );
+ connect( mProgressDialog, TQT_SIGNAL( closed() ),
+ TQT_SLOT( slotProgressClosed() ) );
}
mProgressDialog->setLabelText( name );
mProgressDialog->setTotalSteps( mIndexQueue.count() );
@@ -475,12 +475,12 @@ void KCMHelpCenter::startIndexProcess()
*mProcess << mCmdFile->name();
*mProcess << Prefs::indexDirectory();
- connect( mProcess, SIGNAL( processExited( KProcess * ) ),
- SLOT( slotIndexFinished( KProcess * ) ) );
- connect( mProcess, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- SLOT( slotReceivedStdout(KProcess *, char *, int ) ) );
- connect( mProcess, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
+ connect( mProcess, TQT_SIGNAL( processExited( KProcess * ) ),
+ TQT_SLOT( slotIndexFinished( KProcess * ) ) );
+ connect( mProcess, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ TQT_SLOT( slotReceivedStdout(KProcess *, char *, int ) ) );
+ connect( mProcess, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) {
kdError() << "KCMHelpcenter::startIndexProcess(): Failed to start process."
@@ -543,8 +543,8 @@ void KCMHelpCenter::slotIndexFinished( KProcess *proc )
mProgressDialog->setFinished( true );
}
- mStdOut = QString();
- mStdErr = QString();
+ mStdOut = TQString();
+ mStdErr = TQString();
if ( mIsClosing ) {
if ( !mProgressDialog->isVisible() ) {
@@ -578,7 +578,7 @@ void KCMHelpCenter::slotIndexProgress()
advanceProgress();
}
-void KCMHelpCenter::slotIndexError( const QString &str )
+void KCMHelpCenter::slotIndexError( const TQString &str )
{
if( !mProcess )
return;
@@ -601,7 +601,7 @@ void KCMHelpCenter::advanceProgress()
mProgressDialog->advanceProgress();
mCurrentEntry++;
if ( mCurrentEntry != mIndexQueue.end() ) {
- QString name = (*mCurrentEntry)->name();
+ TQString name = (*mCurrentEntry)->name();
mProgressDialog->setLabelText( name );
}
}
@@ -609,7 +609,7 @@ void KCMHelpCenter::advanceProgress()
void KCMHelpCenter::slotReceivedStdout( KProcess *, char *buffer, int buflen )
{
- QString text = QString::fromLocal8Bit( buffer, buflen );
+ TQString text = TQString::fromLocal8Bit( buffer, buflen );
int pos = text.findRev( '\n' );
if ( pos < 0 ) {
mStdOut.append( text );
@@ -623,7 +623,7 @@ void KCMHelpCenter::slotReceivedStdout( KProcess *, char *buffer, int buflen )
void KCMHelpCenter::slotReceivedStderr( KProcess *, char *buffer, int buflen )
{
- QString text = QString::fromLocal8Bit( buffer, buflen );
+ TQString text = TQString::fromLocal8Bit( buffer, buflen );
int pos = text.findRev( '\n' );
if ( pos < 0 ) {
mStdErr.append( text );
@@ -654,7 +654,7 @@ void KCMHelpCenter::slotProgressClosed()
void KCMHelpCenter::showIndexDirDialog()
{
IndexDirDialog dlg( this );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
load();
}
}
@@ -663,7 +663,7 @@ void KCMHelpCenter::checkSelection()
{
int count = 0;
- QListViewItemIterator it( mListView );
+ TQListViewItemIterator it( mListView );
while ( it.current() != 0 ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
if ( item->isOn() ) {
diff --git a/khelpcenter/kcmhelpcenter.h b/khelpcenter/kcmhelpcenter.h
index 8a7b1f4c5..3ff7b6054 100644
--- a/khelpcenter/kcmhelpcenter.h
+++ b/khelpcenter/kcmhelpcenter.h
@@ -49,11 +49,11 @@ class IndexDirDialog : public KDialogBase
{
Q_OBJECT
public:
- IndexDirDialog( QWidget *parent );
+ IndexDirDialog( TQWidget *parent );
protected slots:
void slotOk();
- void slotUrlChanged( const QString &_url);
+ void slotUrlChanged( const TQString &_url);
private:
KURLRequester *mIndexUrlRequester;
};
@@ -62,16 +62,16 @@ class IndexProgressDialog : public KDialog
{
Q_OBJECT
public:
- IndexProgressDialog( QWidget *parent );
+ IndexProgressDialog( TQWidget *parent );
~IndexProgressDialog();
void setTotalSteps( int );
void advanceProgress();
- void setLabelText( const QString & );
+ void setLabelText( const TQString & );
void setMinimumLabelWidth( int width );
void setFinished( bool );
- void appendLog( const QString &text );
+ void appendLog( const TQString &text );
signals:
void closed();
@@ -85,12 +85,12 @@ class IndexProgressDialog : public KDialog
void toggleDetails();
private:
- QLabel *mLabel;
- QProgressBar *mProgressBar;
- QLabel *mLogLabel;
- QTextEdit *mLogView;
- QPushButton *mDetailsButton;
- QPushButton *mEndButton;
+ TQLabel *mLabel;
+ TQProgressBar *mProgressBar;
+ TQLabel *mLogLabel;
+ TQTextEdit *mLogView;
+ TQPushButton *mDetailsButton;
+ TQPushButton *mEndButton;
bool mFinished;
};
@@ -100,14 +100,14 @@ class KCMHelpCenterIface : virtual public DCOPObject
K_DCOP
k_dcop:
virtual void slotIndexProgress() = 0;
- virtual void slotIndexError( const QString & ) = 0;
+ virtual void slotIndexError( const TQString & ) = 0;
};
class KCMHelpCenter : public KDialogBase, virtual public KCMHelpCenterIface
{
Q_OBJECT
public:
- KCMHelpCenter( KHC::SearchEngine *, QWidget *parent = 0,
+ KCMHelpCenter( KHC::SearchEngine *, TQWidget *parent = 0,
const char *name = 0 );
~KCMHelpCenter();
@@ -125,7 +125,7 @@ class KCMHelpCenter : public KDialogBase, virtual public KCMHelpCenterIface
void cancelBuildIndex();
void slotIndexFinished( KProcess * );
void slotIndexProgress();
- void slotIndexError( const QString & );
+ void slotIndexError( const TQString & );
void slotReceivedStdout(KProcess *proc, char *buffer, int buflen);
void slotReceivedStderr(KProcess *proc, char *buffer, int buflen);
void slotProgressClosed();
@@ -137,7 +137,7 @@ class KCMHelpCenter : public KDialogBase, virtual public KCMHelpCenterIface
void checkSelection();
protected:
- void setupMainWidget( QWidget *parent );
+ void setupMainWidget( TQWidget *parent );
void updateStatus();
void startIndexProcess();
@@ -150,19 +150,19 @@ class KCMHelpCenter : public KDialogBase, virtual public KCMHelpCenterIface
KHC::SearchEngine *mEngine;
KListView *mListView;
- QLabel *mIndexDirLabel;
- QPushButton *mBuildButton;
+ TQLabel *mIndexDirLabel;
+ TQPushButton *mBuildButton;
IndexProgressDialog *mProgressDialog;
- QValueList<KHC::DocEntry *> mIndexQueue;
- QValueList<KHC::DocEntry *>::ConstIterator mCurrentEntry;
+ TQValueList<KHC::DocEntry *> mIndexQueue;
+ TQValueList<KHC::DocEntry *>::ConstIterator mCurrentEntry;
KConfig *mConfig;
KAboutData *mAboutData;
KHC::HtmlSearchConfig *mHtmlSearchTab;
- QWidget *mScopeTab;
+ TQWidget *mScopeTab;
KTempFile *mCmdFile;
@@ -170,8 +170,8 @@ class KCMHelpCenter : public KDialogBase, virtual public KCMHelpCenterIface
bool mIsClosing;
- QString mStdOut;
- QString mStdErr;
+ TQString mStdOut;
+ TQString mStdErr;
bool mRunAsRoot;
};
diff --git a/khelpcenter/khc_indexbuilder.cpp b/khelpcenter/khc_indexbuilder.cpp
index ef7c239cc..8da4e8f34 100644
--- a/khelpcenter/khc_indexbuilder.cpp
+++ b/khelpcenter/khc_indexbuilder.cpp
@@ -33,10 +33,10 @@
#include <kstandarddirs.h>
#include <kconfig.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
#include <unistd.h>
#include <stdlib.h>
@@ -44,7 +44,7 @@
using namespace KHC;
-IndexBuilder::IndexBuilder(const QString& cmdFile)
+IndexBuilder::IndexBuilder(const TQString& cmdFile)
{
m_cmdFile = cmdFile;
kdDebug(1402) << "IndexBuilder()" << endl;
@@ -52,14 +52,14 @@ IndexBuilder::IndexBuilder(const QString& cmdFile)
void IndexBuilder::buildIndices()
{
- QFile f( m_cmdFile );
+ TQFile f( m_cmdFile );
if ( !f.open( IO_ReadOnly ) ) {
kdError() << "Unable to open file '" << m_cmdFile << "'" << endl;
exit( 1 );
}
kdDebug(1402) << "Opened file '" << m_cmdFile << "'" << endl;
- QTextStream ts( &f );
- QString line = ts.readLine();
+ TQTextStream ts( &f );
+ TQString line = ts.readLine();
while ( !line.isNull() ) {
kdDebug(1402) << "LINE: " << line << endl;
mCmdQueue.append( line );
@@ -73,30 +73,30 @@ void IndexBuilder::processCmdQueue()
{
kdDebug(1402) << "IndexBuilder::processCmdQueue()" << endl;
- QStringList::Iterator it = mCmdQueue.begin();
+ TQStringList::Iterator it = mCmdQueue.begin();
if ( it == mCmdQueue.end() ) {
quit();
return;
}
- QString cmd = *it;
+ TQString cmd = *it;
kdDebug(1402) << "PROCESS: " << cmd << endl;
KProcess *proc = new KProcess;
proc->setRunPrivileged( true );
- QStringList args = QStringList::split( " ", cmd );
+ TQStringList args = TQStringList::split( " ", cmd );
*proc << args;
- connect( proc, SIGNAL( processExited( KProcess * ) ),
- SLOT( slotProcessExited( KProcess * ) ) );
- connect( proc, SIGNAL( receivedStdout(KProcess *, char *, int ) ),
- SLOT( slotReceivedStdout(KProcess *, char *, int ) ) );
- connect( proc, SIGNAL( receivedStderr(KProcess *, char *, int ) ),
- SLOT( slotReceivedStderr(KProcess *, char *, int ) ) );
+ connect( proc, TQT_SIGNAL( processExited( KProcess * ) ),
+ TQT_SLOT( slotProcessExited( KProcess * ) ) );
+ connect( proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int ) ),
+ TQT_SLOT( slotReceivedStdout(KProcess *, char *, int ) ) );
+ connect( proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int ) ),
+ TQT_SLOT( slotReceivedStderr(KProcess *, char *, int ) ) );
mCmdQueue.remove( it );
@@ -126,31 +126,31 @@ void IndexBuilder::slotProcessExited( KProcess *proc )
void IndexBuilder::slotReceivedStdout( KProcess *, char *buffer, int buflen )
{
- QString text = QString::fromLocal8Bit( buffer, buflen );
+ TQString text = TQString::fromLocal8Bit( buffer, buflen );
std::cout << text.local8Bit().data() << std::flush;
}
void IndexBuilder::slotReceivedStderr( KProcess *, char *buffer, int buflen )
{
- QString text = QString::fromLocal8Bit( buffer, buflen );
+ TQString text = TQString::fromLocal8Bit( buffer, buflen );
std::cerr << text.local8Bit().data() << std::flush;
}
-void IndexBuilder::sendErrorSignal( const QString &error )
+void IndexBuilder::sendErrorSignal( const TQString &error )
{
kdDebug(1402) << "IndexBuilder::sendErrorSignal()" << endl;
- QByteArray params;
- QDataStream stream( params, IO_WriteOnly );
+ TQByteArray params;
+ TQDataStream stream( params, IO_WriteOnly );
stream << error;
- kapp->dcopClient()->emitDCOPSignal("buildIndexError(QString)", params );
+ kapp->dcopClient()->emitDCOPSignal("buildIndexError(TQString)", params );
}
void IndexBuilder::sendProgressSignal()
{
kdDebug(1402) << "IndexBuilder::sendProgressSignal()" << endl;
- kapp->dcopClient()->emitDCOPSignal("buildIndexProgress()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal("buildIndexProgress()", TQByteArray() );
}
void IndexBuilder::quit()
@@ -192,13 +192,13 @@ int main( int argc, char **argv )
return 1;
}
- QString cmdFile = args->arg( 0 );
- QString indexDir = args->arg( 1 );
+ TQString cmdFile = args->arg( 0 );
+ TQString indexDir = args->arg( 1 );
kdDebug(1402) << "cmdFile: " << cmdFile << endl;
kdDebug(1402) << "indexDir: " << indexDir << endl;
- QFile file( indexDir + "/testaccess" );
+ TQFile file( indexDir + "/testaccess" );
if ( !file.open( IO_WriteOnly ) || file.putch( ' ' ) < 0 ) {
kdDebug(1402) << "access denied" << endl;
return 2;
@@ -211,7 +211,7 @@ int main( int argc, char **argv )
IndexBuilder builder(cmdFile);
- QTimer::singleShot(0, &builder, SLOT(buildIndices()));
+ TQTimer::singleShot(0, &builder, TQT_SLOT(buildIndices()));
return app.exec();
}
diff --git a/khelpcenter/khc_indexbuilder.h b/khelpcenter/khc_indexbuilder.h
index 4bd5415a2..96ca25890 100644
--- a/khelpcenter/khc_indexbuilder.h
+++ b/khelpcenter/khc_indexbuilder.h
@@ -23,8 +23,8 @@
#include <kuniqueapplication.h>
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
class KProcess;
@@ -34,10 +34,10 @@ class IndexBuilder : public QObject
{
Q_OBJECT
public:
- IndexBuilder(const QString& cmdFile);
+ IndexBuilder(const TQString& cmdFile);
void sendProgressSignal();
- void sendErrorSignal( const QString &error );
+ void sendErrorSignal( const TQString &error );
void quit();
void processCmdQueue();
@@ -49,9 +49,9 @@ class IndexBuilder : public QObject
void slotReceivedStderr( KProcess *, char *buffer, int buflen );
private:
- QString m_cmdFile;
- QTimer mTimer;
- QStringList mCmdQueue;
+ TQString m_cmdFile;
+ TQTimer mTimer;
+ TQStringList mCmdQueue;
};
}
diff --git a/khelpcenter/mainwindow.cpp b/khelpcenter/mainwindow.cpp
index 4082b39d0..0e54d9236 100644
--- a/khelpcenter/mainwindow.cpp
+++ b/khelpcenter/mainwindow.cpp
@@ -42,9 +42,9 @@
#include <kstdaccel.h>
#include <kdialogbase.h>
-#include <qsplitter.h>
-#include <qtextedit.h>
-#include <qlayout.h>
+#include <tqsplitter.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
#include <stdlib.h>
#include <assert.h>
@@ -54,15 +54,15 @@ using namespace KHC;
class LogDialog : public KDialogBase
{
public:
- LogDialog( QWidget *parent = 0 )
+ LogDialog( TQWidget *parent = 0 )
: KDialogBase( Plain, i18n("Search Error Log"), Ok, Ok, parent, 0,
false )
{
- QFrame *topFrame = plainPage();
+ TQFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mTextView = new QTextEdit( topFrame );
+ mTextView = new TQTextEdit( topFrame );
mTextView->setTextFormat( LogText );
topLayout->addWidget( mTextView );
@@ -74,13 +74,13 @@ class LogDialog : public KDialogBase
saveDialogSize( "logdialog" );
}
- void setLog( const QString &log )
+ void setLog( const TQString &log )
{
mTextView->setText( log );
}
private:
- QTextEdit *mTextView;
+ TQTextEdit *mTextView;
};
@@ -88,44 +88,44 @@ MainWindow::MainWindow()
: KMainWindow(0, "MainWindow"), DCOPObject( "KHelpCenterIface" ),
mLogDialog( 0 )
{
- mSplitter = new QSplitter( this );
+ mSplitter = new TQSplitter( this );
mDoc = new View( mSplitter, 0, this, 0, KHTMLPart::DefaultGUI, actionCollection() );
- connect( mDoc, SIGNAL( setWindowCaption( const QString & ) ),
- SLOT( setCaption( const QString & ) ) );
- connect( mDoc, SIGNAL( setStatusBarText( const QString & ) ),
- SLOT( statusBarMessage( const QString & ) ) );
- connect( mDoc, SIGNAL( onURL( const QString & ) ),
- SLOT( statusBarMessage( const QString & ) ) );
- connect( mDoc, SIGNAL( started( KIO::Job * ) ),
- SLOT( slotStarted( KIO::Job * ) ) );
- connect( mDoc, SIGNAL( completed() ),
- SLOT( documentCompleted() ) );
- connect( mDoc, SIGNAL( searchResultCacheAvailable() ),
- SLOT( enableLastSearchAction() ) );
-
- connect( mDoc, SIGNAL( selectionChanged() ),
- SLOT( enableCopyTextAction() ) );
+ connect( mDoc, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ TQT_SLOT( setCaption( const TQString & ) ) );
+ connect( mDoc, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ TQT_SLOT( statusBarMessage( const TQString & ) ) );
+ connect( mDoc, TQT_SIGNAL( onURL( const TQString & ) ),
+ TQT_SLOT( statusBarMessage( const TQString & ) ) );
+ connect( mDoc, TQT_SIGNAL( started( KIO::Job * ) ),
+ TQT_SLOT( slotStarted( KIO::Job * ) ) );
+ connect( mDoc, TQT_SIGNAL( completed() ),
+ TQT_SLOT( documentCompleted() ) );
+ connect( mDoc, TQT_SIGNAL( searchResultCacheAvailable() ),
+ TQT_SLOT( enableLastSearchAction() ) );
+
+ connect( mDoc, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( enableCopyTextAction() ) );
statusBar()->insertItem(i18n("Preparing Index"), 0, 1);
statusBar()->setItemAlignment(0, AlignLeft | AlignVCenter);
connect( mDoc->browserExtension(),
- SIGNAL( openURLRequest( const KURL &,
+ TQT_SIGNAL( openURLRequest( const KURL &,
const KParts::URLArgs & ) ),
- SLOT( slotOpenURLRequest( const KURL &,
+ TQT_SLOT( slotOpenURLRequest( const KURL &,
const KParts::URLArgs & ) ) );
mNavigator = new Navigator( mDoc, mSplitter, "nav" );
- connect( mNavigator, SIGNAL( itemSelected( const QString & ) ),
- SLOT( viewUrl( const QString & ) ) );
- connect( mNavigator, SIGNAL( glossSelected( const GlossaryEntry & ) ),
- SLOT( slotGlossSelected( const GlossaryEntry & ) ) );
+ connect( mNavigator, TQT_SIGNAL( itemSelected( const TQString & ) ),
+ TQT_SLOT( viewUrl( const TQString & ) ) );
+ connect( mNavigator, TQT_SIGNAL( glossSelected( const GlossaryEntry & ) ),
+ TQT_SLOT( slotGlossSelected( const GlossaryEntry & ) ) );
mSplitter->moveToFirst(mNavigator);
- mSplitter->setResizeMode(mNavigator, QSplitter::KeepSize);
+ mSplitter->setResizeMode(mNavigator, TQSplitter::KeepSize);
setCentralWidget( mSplitter );
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << 220 << 580;
mSplitter->setSizes(sizes);
setGeometry(366, 0, 800, 600);
@@ -150,10 +150,10 @@ MainWindow::MainWindow()
History::self().installMenuBarHook( this );
- connect( &History::self(), SIGNAL( goInternalUrl( const KURL & ) ),
- mNavigator, SLOT( openInternalUrl( const KURL & ) ) );
- connect( &History::self(), SIGNAL( goUrl( const KURL & ) ),
- mNavigator, SLOT( selectItem( const KURL & ) ) );
+ connect( &History::self(), TQT_SIGNAL( goInternalUrl( const KURL & ) ),
+ mNavigator, TQT_SLOT( openInternalUrl( const KURL & ) ) );
+ connect( &History::self(), TQT_SIGNAL( goUrl( const KURL & ) ),
+ mNavigator, TQT_SLOT( selectItem( const KURL & ) ) );
statusBarMessage(i18n("Ready"));
enableCopyTextAction();
@@ -187,7 +187,7 @@ void MainWindow::readConfig()
{
KConfig *config = KGlobal::config();
config->setGroup( "MainWindowState" );
- QValueList<int> sizes = config->readIntListEntry( "Splitter" );
+ TQValueList<int> sizes = config->readIntListEntry( "Splitter" );
if ( sizes.count() == 2 ) {
mSplitter->setSizes( sizes );
}
@@ -208,48 +208,48 @@ void MainWindow::writeConfig()
void MainWindow::setupActions()
{
- KStdAction::quit( this, SLOT( close() ), actionCollection() );
- KStdAction::print( this, SLOT( print() ), actionCollection(),
+ KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() );
+ KStdAction::print( this, TQT_SLOT( print() ), actionCollection(),
"printFrame" );
- KAction *prevPage = new KAction( i18n( "Previous Page" ), CTRL+Key_PageUp, mDoc, SLOT( prevPage() ),
+ KAction *prevPage = new KAction( i18n( "Previous Page" ), CTRL+Key_PageUp, mDoc, TQT_SLOT( prevPage() ),
actionCollection(), "prevPage" );
prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) );
- KAction *nextPage = new KAction( i18n( "Next Page" ), CTRL + Key_PageDown, mDoc, SLOT( nextPage() ),
+ KAction *nextPage = new KAction( i18n( "Next Page" ), CTRL + Key_PageDown, mDoc, TQT_SLOT( nextPage() ),
actionCollection(), "nextPage" );
nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
- KAction *home = KStdAction::home( this, SLOT( slotShowHome() ), actionCollection() );
+ KAction *home = KStdAction::home( this, TQT_SLOT( slotShowHome() ), actionCollection() );
home->setText(i18n("Table of &Contents"));
home->setToolTip(i18n("Table of contents"));
home->setWhatsThis(i18n("Go back to the table of contents"));
- mCopyText = KStdAction::copy( this, SLOT(slotCopySelectedText()), actionCollection(), "copy_text");
+ mCopyText = KStdAction::copy( this, TQT_SLOT(slotCopySelectedText()), actionCollection(), "copy_text");
mLastSearchAction = new KAction( i18n("&Last Search Result"), 0, this,
- SLOT( slotLastSearch() ),
+ TQT_SLOT( slotLastSearch() ),
actionCollection(), "lastsearch" );
mLastSearchAction->setEnabled( false );
new KAction( i18n("Build Search Index..."), 0, mNavigator,
- SLOT( showIndexDialog() ), actionCollection(), "build_index" );
- KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ),
+ TQT_SLOT( showIndexDialog() ), actionCollection(), "build_index" );
+ KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ),
actionCollection() );
KConfig *cfg = KGlobal::config();
cfg->setGroup( "Debug" );
if ( cfg->readBoolEntry( "SearchErrorLog", false ) ) {
new KAction( i18n("Show Search Error Log"), 0, this,
- SLOT( showSearchStderr() ), actionCollection(),
+ TQT_SLOT( showSearchStderr() ), actionCollection(),
"show_search_stderr" );
}
History::self().setupActions( actionCollection() );
- new KAction( i18n( "Configure Fonts..." ), KShortcut(), this, SLOT( slotConfigureFonts() ), actionCollection(), "configure_fonts" );
- new KAction( i18n( "Increase Font Sizes" ), "viewmag+", KShortcut(), this, SLOT( slotIncFontSizes() ), actionCollection(), "incFontSizes" );
- new KAction( i18n( "Decrease Font Sizes" ), "viewmag-", KShortcut(), this, SLOT( slotDecFontSizes() ), actionCollection(), "decFontSizes" );
+ new KAction( i18n( "Configure Fonts..." ), KShortcut(), this, TQT_SLOT( slotConfigureFonts() ), actionCollection(), "configure_fonts" );
+ new KAction( i18n( "Increase Font Sizes" ), "viewmag+", KShortcut(), this, TQT_SLOT( slotIncFontSizes() ), actionCollection(), "incFontSizes" );
+ new KAction( i18n( "Decrease Font Sizes" ), "viewmag-", KShortcut(), this, TQT_SLOT( slotDecFontSizes() ), actionCollection(), "decFontSizes" );
}
void MainWindow::slotCopySelectedText()
@@ -265,8 +265,8 @@ void MainWindow::print()
void MainWindow::slotStarted(KIO::Job *job)
{
if (job)
- connect(job, SIGNAL(infoMessage( KIO::Job *, const QString &)),
- SLOT(slotInfoMessage(KIO::Job *, const QString &)));
+ connect(job, TQT_SIGNAL(infoMessage( KIO::Job *, const TQString &)),
+ TQT_SLOT(slotInfoMessage(KIO::Job *, const TQString &)));
History::self().updateActions();
}
@@ -286,7 +286,7 @@ void MainWindow::slotOpenURLRequest( const KURL &url,
viewUrl( url, args );
}
-void MainWindow::viewUrl( const QString &url )
+void MainWindow::viewUrl( const TQString &url )
{
viewUrl( KURL( url ) );
}
@@ -295,7 +295,7 @@ void MainWindow::viewUrl( const KURL &url, const KParts::URLArgs &args )
{
stop();
- QString proto = url.protocol().lower();
+ TQString proto = url.protocol().lower();
if ( proto == "khelpcenter" ) {
History::self().createEntry();
@@ -325,8 +325,8 @@ void MainWindow::viewUrl( const KURL &url, const KParts::URLArgs &args )
mDoc->browserExtension()->setURLArgs( args );
- if ( proto == QString::fromLatin1("glossentry") ) {
- QString decodedEntryId = KURL::decode_string( url.encodedPathAndQuery() );
+ if ( proto == TQString::fromLatin1("glossentry") ) {
+ TQString decodedEntryId = KURL::decode_string( url.encodedPathAndQuery() );
slotGlossSelected( mNavigator->glossEntry( decodedEntryId ) );
mNavigator->slotSelectGlossEntry( decodedEntryId );
} else {
@@ -342,22 +342,22 @@ void MainWindow::documentCompleted()
History::self().updateActions();
}
-void MainWindow::slotInfoMessage(KIO::Job *, const QString &m)
+void MainWindow::slotInfoMessage(KIO::Job *, const TQString &m)
{
statusBarMessage(m);
}
-void MainWindow::statusBarMessage(const QString &m)
+void MainWindow::statusBarMessage(const TQString &m)
{
statusBar()->changeItem(m, 0);
}
-void MainWindow::openUrl( const QString &url )
+void MainWindow::openUrl( const TQString &url )
{
openUrl( KURL( url ) );
}
-void MainWindow::openUrl( const QString &url, const QCString& startup_id )
+void MainWindow::openUrl( const TQString &url, const TQCString& startup_id )
{
KStartupInfo::setNewStartupId( this, startup_id );
openUrl( KURL( url ) );
@@ -419,7 +419,7 @@ void MainWindow::enableLastSearchAction()
void MainWindow::showSearchStderr()
{
- QString log = mNavigator->searchEngine()->errorLog();
+ TQString log = mNavigator->searchEngine()->errorLog();
if ( !mLogDialog ) {
mLogDialog = new LogDialog( this );
@@ -458,7 +458,7 @@ void MainWindow::updateZoomActions()
void MainWindow::slotConfigureFonts()
{
FontDialog dlg( this );
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
mDoc->slotReload();
}
diff --git a/khelpcenter/mainwindow.h b/khelpcenter/mainwindow.h
index aba2d3421..9970b61fd 100644
--- a/khelpcenter/mainwindow.h
+++ b/khelpcenter/mainwindow.h
@@ -1,7 +1,7 @@
#ifndef __mainwindow_h__
#define __mainwindow_h__
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kmainwindow.h>
#include <kio/job.h>
@@ -31,14 +31,14 @@ class MainWindow : public KMainWindow, public DCOPObject
~MainWindow();
k_dcop:
- void openUrl( const QString &url );
- void openUrl( const QString &url, const QCString& startup_id );
+ void openUrl( const TQString &url );
+ void openUrl( const TQString &url, const TQCString& startup_id );
void showHome();
void lastSearch();
public slots:
void print();
- void statusBarMessage(const QString &m);
+ void statusBarMessage(const TQString &m);
void slotShowHome();
void slotLastSearch();
void showSearchStderr();
@@ -50,7 +50,7 @@ class MainWindow : public KMainWindow, public DCOPObject
/**
Show document corresponding to given URL in viewer part.
*/
- void viewUrl( const QString & );
+ void viewUrl( const TQString & );
/**
Open document corresponding to given URL, i.e. show it in the viewer part
@@ -77,7 +77,7 @@ class MainWindow : public KMainWindow, public DCOPObject
private slots:
void slotGlossSelected(const GlossaryEntry &entry);
void slotStarted(KIO::Job *job);
- void slotInfoMessage(KIO::Job *, const QString &);
+ void slotInfoMessage(KIO::Job *, const TQString &);
void goInternalUrl( const KURL & );
/**
This function is called when the user clicks on a link in the viewer part.
@@ -93,7 +93,7 @@ class MainWindow : public KMainWindow, public DCOPObject
private:
void updateZoomActions();
- QSplitter *mSplitter;
+ TQSplitter *mSplitter;
View *mDoc;
Navigator *mNavigator;
diff --git a/khelpcenter/navigator.cpp b/khelpcenter/navigator.cpp
index 652bf899d..48ae76dd0 100644
--- a/khelpcenter/navigator.cpp
+++ b/khelpcenter/navigator.cpp
@@ -23,19 +23,19 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <kaction.h>
#include <kapplication.h>
@@ -76,8 +76,8 @@
using namespace KHC;
-Navigator::Navigator( View *view, QWidget *parent, const char *name )
- : QWidget( parent, name ), mIndexDialog( 0 ),
+Navigator::Navigator( View *view, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mIndexDialog( 0 ),
mView( view ), mSelected( false )
{
KConfig *config = kapp->config();
@@ -85,43 +85,43 @@ Navigator::Navigator( View *view, QWidget *parent, const char *name )
mShowMissingDocs = config->readBoolEntry("ShowMissingDocs",false);
mSearchEngine = new SearchEngine( view );
- connect( mSearchEngine, SIGNAL( searchFinished() ),
- SLOT( slotSearchFinished() ) );
+ connect( mSearchEngine, TQT_SIGNAL( searchFinished() ),
+ TQT_SLOT( slotSearchFinished() ) );
DocMetaInfo::self()->scanMetaInfo();
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- mSearchFrame = new QFrame( this );
+ mSearchFrame = new TQFrame( this );
topLayout->addWidget( mSearchFrame );
- QBoxLayout *searchLayout = new QHBoxLayout( mSearchFrame );
+ TQBoxLayout *searchLayout = new TQHBoxLayout( mSearchFrame );
searchLayout->setSpacing( KDialog::spacingHint() );
searchLayout->setMargin( 6 );
- QPushButton *clearButton = new QPushButton( mSearchFrame );
+ TQPushButton *clearButton = new TQPushButton( mSearchFrame );
clearButton->setIconSet( KApplication::reverseLayout() ?
SmallIconSet( "clear_left" ) : SmallIconSet("locationbar_erase") );
searchLayout->addWidget( clearButton );
- connect( clearButton, SIGNAL( clicked() ), SLOT( clearSearch() ) );
- QToolTip::add( clearButton, i18n("Clear search") );
+ connect( clearButton, TQT_SIGNAL( clicked() ), TQT_SLOT( clearSearch() ) );
+ TQToolTip::add( clearButton, i18n("Clear search") );
- mSearchEdit = new QLineEdit( mSearchFrame );
+ mSearchEdit = new TQLineEdit( mSearchFrame );
searchLayout->addWidget( mSearchEdit );
- connect( mSearchEdit, SIGNAL( returnPressed() ), SLOT( slotSearch() ) );
- connect( mSearchEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( checkSearchButton() ) );
+ connect( mSearchEdit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotSearch() ) );
+ connect( mSearchEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( checkSearchButton() ) );
- mSearchButton = new QPushButton( i18n("&Search"), mSearchFrame );
+ mSearchButton = new TQPushButton( i18n("&Search"), mSearchFrame );
searchLayout->addWidget( mSearchButton );
- connect( mSearchButton, SIGNAL( clicked() ), SLOT( slotSearch() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSearch() ) );
clearButton->setFixedHeight( mSearchButton->height() );
- mTabWidget = new QTabWidget( this );
+ mTabWidget = new TQTabWidget( this );
topLayout->addWidget( mTabWidget );
- connect( mTabWidget, SIGNAL( currentChanged( QWidget * ) ),
- SLOT( slotTabChanged( QWidget * ) ) );
+ connect( mTabWidget, TQT_SIGNAL( currentChanged( TQWidget * ) ),
+ TQT_SLOT( slotTabChanged( TQWidget * ) ) );
setupContentsTab();
setupGlossaryTab();
@@ -160,29 +160,29 @@ bool Navigator::showMissingDocs() const
void Navigator::setupContentsTab()
{
mContentsTree = new KListView( mTabWidget );
- mContentsTree->setFrameStyle(QFrame::Panel | QFrame::Sunken);
- mContentsTree->addColumn(QString::null);
+ mContentsTree->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
+ mContentsTree->addColumn(TQString::null);
mContentsTree->setAllColumnsShowFocus(true);
mContentsTree->header()->hide();
mContentsTree->setRootIsDecorated(false);
mContentsTree->setSorting(-1, false);
- connect(mContentsTree, SIGNAL(clicked(QListViewItem*)),
- SLOT(slotItemSelected(QListViewItem*)));
- connect(mContentsTree, SIGNAL(returnPressed(QListViewItem*)),
- SLOT(slotItemSelected(QListViewItem*)));
+ connect(mContentsTree, TQT_SIGNAL(clicked(TQListViewItem*)),
+ TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(mContentsTree, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(slotItemSelected(TQListViewItem*)));
mTabWidget->addTab(mContentsTree, i18n("&Contents"));
}
void Navigator::setupSearchTab()
{
mSearchWidget = new SearchWidget( mSearchEngine, mTabWidget );
- connect( mSearchWidget, SIGNAL( searchResult( const QString & ) ),
- SLOT( slotShowSearchResult( const QString & ) ) );
- connect( mSearchWidget, SIGNAL( scopeCountChanged( int ) ),
- SLOT( checkSearchButton() ) );
- connect( mSearchWidget, SIGNAL( showIndexDialog() ),
- SLOT( showIndexDialog() ) );
+ connect( mSearchWidget, TQT_SIGNAL( searchResult( const TQString & ) ),
+ TQT_SLOT( slotShowSearchResult( const TQString & ) ) );
+ connect( mSearchWidget, TQT_SIGNAL( scopeCountChanged( int ) ),
+ TQT_SLOT( checkSearchButton() ) );
+ connect( mSearchWidget, TQT_SIGNAL( showIndexDialog() ),
+ TQT_SLOT( showIndexDialog() ) );
mTabWidget->addTab( mSearchWidget, i18n("Search Options"));
}
@@ -190,8 +190,8 @@ void Navigator::setupSearchTab()
void Navigator::setupGlossaryTab()
{
mGlossaryTree = new Glossary( mTabWidget );
- connect( mGlossaryTree, SIGNAL( entrySelected( const GlossaryEntry & ) ),
- this, SIGNAL( glossSelected( const GlossaryEntry & ) ) );
+ connect( mGlossaryTree, TQT_SIGNAL( entrySelected( const GlossaryEntry & ) ),
+ this, TQT_SIGNAL( glossSelected( const GlossaryEntry & ) ) );
mTabWidget->addTab( mGlossaryTree, i18n( "G&lossary" ) );
}
@@ -211,7 +211,7 @@ void Navigator::insertPlugins()
#endif
}
-void Navigator::insertParentAppDocs( const QString &name, NavigatorItem *topItem )
+void Navigator::insertParentAppDocs( const TQString &name, NavigatorItem *topItem )
{
kdDebug(1400) << "Requested plugin documents for ID " << name << endl;
@@ -223,30 +223,30 @@ void Navigator::insertParentAppDocs( const QString &name, NavigatorItem *topItem
KServiceGroup::List::ConstIterator it = entries.begin();
KServiceGroup::List::ConstIterator end = entries.end();
for ( ; it != end; ++it ) {
- QString desktopFile = ( *it )->entryPath();
- if ( QDir::isRelativePath( desktopFile ) )
+ TQString desktopFile = ( *it )->entryPath();
+ if ( TQDir::isRelativePath( desktopFile ) )
desktopFile = locate( "apps", desktopFile );
createItemFromDesktopFile( topItem, desktopFile );
}
}
-void Navigator::insertIOSlaveDocs( const QString &name, NavigatorItem *topItem )
+void Navigator::insertIOSlaveDocs( const TQString &name, NavigatorItem *topItem )
{
kdDebug(1400) << "Requested IOSlave documents for ID " << name << endl;
#if KDE_IS_VERSION( 3, 1, 90 )
- QStringList list = KProtocolInfo::protocols();
+ TQStringList list = KProtocolInfo::protocols();
list.sort();
NavigatorItem *prevItem = 0;
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
{
- QString docPath = KProtocolInfo::docPath(*it);
+ TQString docPath = KProtocolInfo::docPath(*it);
if ( !docPath.isNull() )
{
// First parameter is ignored if second is an absolute path
KURL url(KURL("help:/"), docPath);
- QString icon = KProtocolInfo::icon(*it);
+ TQString icon = KProtocolInfo::icon(*it);
if ( icon.isEmpty() ) icon = "document2";
DocEntry *entry = new DocEntry( *it, url.url(), icon );
NavigatorItem *item = new NavigatorItem( entry, topItem, prevItem );
@@ -261,25 +261,25 @@ void Navigator::insertIOSlaveDocs( const QString &name, NavigatorItem *topItem )
void Navigator::insertAppletDocs( NavigatorItem *topItem )
{
- QDir appletDir( locate( "data", QString::fromLatin1( "kicker/applets/" ) ) );
- appletDir.setNameFilter( QString::fromLatin1( "*.desktop" ) );
+ TQDir appletDir( locate( "data", TQString::fromLatin1( "kicker/applets/" ) ) );
+ appletDir.setNameFilter( TQString::fromLatin1( "*.desktop" ) );
- QStringList files = appletDir.entryList( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = files.begin();
- QStringList::ConstIterator end = files.end();
+ TQStringList files = appletDir.entryList( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = files.begin();
+ TQStringList::ConstIterator end = files.end();
for ( ; it != end; ++it )
createItemFromDesktopFile( topItem, appletDir.absPath() + "/" + *it );
}
void Navigator::createItemFromDesktopFile( NavigatorItem *topItem,
- const QString &file )
+ const TQString &file )
{
KDesktopFile desktopFile( file );
- QString docPath = desktopFile.readDocPath();
+ TQString docPath = desktopFile.readDocPath();
if ( !docPath.isNull() ) {
// First parameter is ignored if second is an absolute path
KURL url(KURL("help:/"), docPath);
- QString icon = desktopFile.readIcon();
+ TQString icon = desktopFile.readIcon();
if ( icon.isEmpty() ) icon = "document2";
DocEntry *entry = new DocEntry( desktopFile.readName(), url.url(), icon );
NavigatorItem *item = new NavigatorItem( entry, topItem );
@@ -316,7 +316,7 @@ void Navigator::selectItem( const KURL &url )
if (url.hasRef())
{
alternativeURL.setQuery("anchor="+url.ref());
- alternativeURL.setRef(QString::null);
+ alternativeURL.setRef(TQString::null);
}
// If the navigator already has the given URL selected, do nothing.
@@ -332,14 +332,14 @@ void Navigator::selectItem( const KURL &url )
// First, populate the NavigatorAppItems if we don't want the home page
if ( url != homeURL() ) {
- for ( QListViewItem *item = mContentsTree->firstChild(); item;
+ for ( TQListViewItem *item = mContentsTree->firstChild(); item;
item = item->nextSibling() ) {
NavigatorAppItem *appItem = dynamic_cast<NavigatorAppItem *>( item );
if ( appItem ) appItem->populate( true /* recursive */ );
}
}
- QListViewItemIterator it( mContentsTree );
+ TQListViewItemIterator it( mContentsTree );
while ( it.current() ) {
NavigatorItem *item = static_cast<NavigatorItem *>( it.current() );
KURL itemUrl( item->entry()->url() );
@@ -367,7 +367,7 @@ void Navigator::clearSelection()
mSelected = false;
}
-void Navigator::slotItemSelected( QListViewItem *currentItem )
+void Navigator::slotItemSelected( TQListViewItem *currentItem )
{
if ( !currentItem ) return;
@@ -397,7 +397,7 @@ void Navigator::slotItemSelected( QListViewItem *currentItem )
kdDebug( 1400 ) << "slotItemSelected(): Trying to build TOC for "
<< item->entry()->name() << endl;
tocTree->setApplication( url.directory() );
- QString doc = View::langLookup( url.path() );
+ TQString doc = View::langLookup( url.path() );
// Enforce the original .docbook version, in case langLookup returns a
// cached version
if ( !doc.isNull() ) {
@@ -438,26 +438,26 @@ void Navigator::showOverview( NavigatorItem *item, const KURL &url )
{
mView->beginInternal( url );
- QString fileName = locate( "data", "khelpcenter/index.html.in" );
+ TQString fileName = locate( "data", "khelpcenter/index.html.in" );
if ( fileName.isEmpty() )
return;
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
return;
- QTextStream stream( &file );
- QString res = stream.read();
+ TQTextStream stream( &file );
+ TQString res = stream.read();
- QString title,name,content;
+ TQString title,name,content;
uint childCount;
if ( item ) {
title = item->entry()->name();
name = item->entry()->name();
- QString info = item->entry()->info();
+ TQString info = item->entry()->info();
if ( !info.isEmpty() ) content = "<p>" + info + "</p>\n";
childCount = item->childCount();
@@ -469,7 +469,7 @@ void Navigator::showOverview( NavigatorItem *item, const KURL &url )
}
if ( childCount > 0 ) {
- QListViewItem *child;
+ TQListViewItem *child;
if ( item ) child = item->firstChild();
else child = mContentsTree->firstChild();
@@ -487,11 +487,11 @@ void Navigator::showOverview( NavigatorItem *item, const KURL &url )
mView->end();
}
-QString Navigator::createChildrenList( QListViewItem *child )
+TQString Navigator::createChildrenList( TQListViewItem *child )
{
++mDirLevel;
- QString t;
+ TQString t;
t += "<ul>\n";
@@ -534,10 +534,10 @@ void Navigator::slotSearch()
if ( mSearchEngine->isRunning() ) return;
- QString words = mSearchEdit->text();
- QString method = mSearchWidget->method();
+ TQString words = mSearchEdit->text();
+ TQString method = mSearchWidget->method();
int pages = mSearchWidget->pages();
- QString scope = mSearchWidget->scope();
+ TQString scope = mSearchWidget->scope();
kdDebug(1400) << "Navigator::slotSearch() words: " << words << endl;
kdDebug(1400) << "Navigator::slotSearch() scope: " << scope << endl;
@@ -546,7 +546,7 @@ void Navigator::slotSearch()
// disable search Button during searches
mSearchButton->setEnabled(false);
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
if ( !mSearchEngine->search( words, method, pages, scope ) ) {
slotSearchFinished();
@@ -554,9 +554,9 @@ void Navigator::slotSearch()
}
}
-void Navigator::slotShowSearchResult( const QString &url )
+void Navigator::slotShowSearchResult( const TQString &url )
{
- QString u = url;
+ TQString u = url;
u.replace( "%k", mSearchEdit->text() );
emit itemSelected( u );
@@ -565,7 +565,7 @@ void Navigator::slotShowSearchResult( const QString &url )
void Navigator::slotSearchFinished()
{
mSearchButton->setEnabled(true);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
kdDebug( 1400 ) << "Search finished." << endl;
}
@@ -591,10 +591,10 @@ bool Navigator::checkSearchIndex()
if ( mIndexDialog && mIndexDialog->isShown() ) return true;
- QString text = i18n( "A search index does not yet exist. Do you want "
+ TQString text = i18n( "A search index does not yet exist. Do you want "
"to create the index now?" );
- int result = KMessageBox::questionYesNo( this, text, QString::null,
+ int result = KMessageBox::questionYesNo( this, text, TQString::null,
i18n("Create"),
i18n("Do Not Create"),
"indexcreation" );
@@ -606,12 +606,12 @@ bool Navigator::checkSearchIndex()
return true;
}
-void Navigator::slotTabChanged( QWidget *wid )
+void Navigator::slotTabChanged( TQWidget *wid )
{
if ( wid == mSearchWidget ) checkSearchIndex();
}
-void Navigator::slotSelectGlossEntry( const QString &id )
+void Navigator::slotSelectGlossEntry( const TQString &id )
{
mGlossaryTree->slotSelectGlossEntry( id );
}
@@ -633,8 +633,8 @@ void Navigator::showIndexDialog()
{
if ( !mIndexDialog ) {
mIndexDialog = new KCMHelpCenter( mSearchEngine, this );
- connect( mIndexDialog, SIGNAL( searchIndexUpdated() ), mSearchWidget,
- SLOT( updateScopeList() ) );
+ connect( mIndexDialog, TQT_SIGNAL( searchIndexUpdated() ), mSearchWidget,
+ TQT_SLOT( updateScopeList() ) );
}
mIndexDialog->show();
mIndexDialog->raise();
@@ -664,7 +664,7 @@ void Navigator::writeConfig()
void Navigator::clearSearch()
{
- mSearchEdit->setText( QString::null );
+ mSearchEdit->setText( TQString::null );
}
#include "navigator.moc"
diff --git a/khelpcenter/navigator.h b/khelpcenter/navigator.h
index 5e28c0460..92430585f 100644
--- a/khelpcenter/navigator.h
+++ b/khelpcenter/navigator.h
@@ -26,13 +26,13 @@
#include <klistview.h>
#include <kurl.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qptrlist.h>
-#include <qtabwidget.h>
-#include <qlistview.h>
-#include <qdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqptrlist.h>
+#include <tqtabwidget.h>
+#include <tqlistview.h>
+#include <tqdict.h>
class QPushButton;
@@ -56,7 +56,7 @@ class Navigator : public QWidget
{
Q_OBJECT
public:
- Navigator(View *, QWidget *parent=0, const char *name=0);
+ Navigator(View *, TQWidget *parent=0, const char *name=0);
virtual ~Navigator();
KURL homeURL();
@@ -64,16 +64,16 @@ class Navigator : public QWidget
SearchEngine *searchEngine() const;
Formatter *formatter() const;
- const GlossaryEntry &glossEntry(const QString &term) const { return mGlossaryTree->entry( term ); }
+ const GlossaryEntry &glossEntry(const TQString &term) const { return mGlossaryTree->entry( term ); }
- void insertParentAppDocs( const QString &name, NavigatorItem *parent );
+ void insertParentAppDocs( const TQString &name, NavigatorItem *parent );
void insertAppletDocs( NavigatorItem *parent );
NavigatorItem *insertScrollKeeperDocs( NavigatorItem *parentItem,
NavigatorItem *after );
void insertInfoDocs( NavigatorItem *parentItem );
- void insertIOSlaveDocs(const QString &, NavigatorItem*parent);
+ void insertIOSlaveDocs(const TQString &, NavigatorItem*parent);
- void createItemFromDesktopFile( NavigatorItem *item, const QString &name );
+ void createItemFromDesktopFile( NavigatorItem *item, const TQString &name );
bool showMissingDocs() const;
@@ -86,20 +86,20 @@ class Navigator : public QWidget
public slots:
void openInternalUrl( const KURL &url );
- void slotItemSelected(QListViewItem* index);
+ void slotItemSelected(TQListViewItem* index);
void slotSearch();
- void slotShowSearchResult( const QString & );
- void slotSelectGlossEntry( const QString &id );
+ void slotShowSearchResult( const TQString & );
+ void slotSelectGlossEntry( const TQString &id );
void selectItem( const KURL &url );
void showIndexDialog();
signals:
- void itemSelected(const QString& itemURL);
+ void itemSelected(const TQString& itemURL);
void glossSelected(const GlossaryEntry &entry);
protected slots:
void slotSearchFinished();
- void slotTabChanged( QWidget * );
+ void slotTabChanged( TQWidget * );
void checkSearchButton();
bool checkSearchIndex();
@@ -107,7 +107,7 @@ class Navigator : public QWidget
void clearSearch();
protected:
- QString createChildrenList( QListViewItem *child );
+ TQString createChildrenList( TQListViewItem *child );
private:
void setupContentsTab();
@@ -124,13 +124,13 @@ class Navigator : public QWidget
SearchWidget *mSearchWidget;
KCMHelpCenter *mIndexDialog;
- QTabWidget *mTabWidget;
+ TQTabWidget *mTabWidget;
- QFrame *mSearchFrame;
- QLineEdit *mSearchEdit;
- QPushButton *mSearchButton;
+ TQFrame *mSearchFrame;
+ TQLineEdit *mSearchEdit;
+ TQPushButton *mSearchButton;
- QPtrList<NavigatorItem> manualItems, pluginItems;
+ TQPtrList<NavigatorItem> manualItems, pluginItems;
bool mShowMissingDocs;
diff --git a/khelpcenter/navigatorappitem.cpp b/khelpcenter/navigatorappitem.cpp
index ca1dabe1f..f22a0064d 100644
--- a/khelpcenter/navigatorappitem.cpp
+++ b/khelpcenter/navigatorappitem.cpp
@@ -26,8 +26,8 @@
using namespace KHC;
-NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QListView *parent,
- const QString &relPath )
+NavigatorAppItem::NavigatorAppItem( DocEntry *entry, TQListView *parent,
+ const TQString &relPath )
: NavigatorItem( entry, parent ),
mRelpath( relPath ),
mPopulated( false )
@@ -35,8 +35,8 @@ NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QListView *parent,
setExpandable( true );
}
-NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QListViewItem *parent,
- const QString &relPath )
+NavigatorAppItem::NavigatorAppItem( DocEntry *entry, TQListViewItem *parent,
+ const TQString &relPath )
: NavigatorItem( entry, parent ),
mRelpath( relPath ),
mPopulated( false )
@@ -44,23 +44,23 @@ NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QListViewItem *parent,
setExpandable( true );
}
-NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QListView *parent,
- QListViewItem *after )
+NavigatorAppItem::NavigatorAppItem( DocEntry *entry, TQListView *parent,
+ TQListViewItem *after )
: NavigatorItem( entry, parent, after ),
mPopulated( false )
{
setExpandable( true );
}
-NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QListViewItem *parent,
- QListViewItem *after )
+NavigatorAppItem::NavigatorAppItem( DocEntry *entry, TQListViewItem *parent,
+ TQListViewItem *after )
: NavigatorItem( entry, parent, after ),
mPopulated( false )
{
setExpandable( true );
}
-void NavigatorAppItem::setRelpath( const QString &relpath )
+void NavigatorAppItem::setRelpath( const TQString &relpath )
{
mRelpath = relpath;
}
@@ -75,7 +75,7 @@ void NavigatorAppItem::setOpen(bool open)
<< mRelpath << ")" << endl;
populate();
}
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
}
void NavigatorAppItem::populate( bool recursive )
@@ -97,7 +97,7 @@ void NavigatorAppItem::populate( bool recursive )
KService::Ptr s;
NavigatorItem *item;
KServiceGroup::Ptr g;
- QString url;
+ TQString url;
switch ( e->sycocaType() ) {
case KST_KService:
@@ -132,16 +132,16 @@ void NavigatorAppItem::populate( bool recursive )
mPopulated = true;
}
-QString NavigatorAppItem::documentationURL( KService *s )
+TQString NavigatorAppItem::documentationURL( KService *s )
{
- QString docPath = s->property( "DocPath" ).toString();
+ TQString docPath = s->property( "DocPath" ).toString();
if ( docPath.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( docPath.startsWith( "file:") || docPath.startsWith( "http:" ) )
return docPath;
- return QString( "help:/" ) + docPath;
+ return TQString( "help:/" ) + docPath;
}
// vim:ts=2:sw=2:et
diff --git a/khelpcenter/navigatorappitem.h b/khelpcenter/navigatorappitem.h
index 8690c52e5..95b9e51b6 100644
--- a/khelpcenter/navigatorappitem.h
+++ b/khelpcenter/navigatorappitem.h
@@ -29,26 +29,26 @@ namespace KHC {
class NavigatorAppItem : public NavigatorItem
{
public:
- NavigatorAppItem( DocEntry *entry, QListView *parent,
- const QString &relPath );
- NavigatorAppItem( DocEntry *entry, QListViewItem *parent,
- const QString &relPath );
+ NavigatorAppItem( DocEntry *entry, TQListView *parent,
+ const TQString &relPath );
+ NavigatorAppItem( DocEntry *entry, TQListViewItem *parent,
+ const TQString &relPath );
- NavigatorAppItem( DocEntry *entry, QListView *parent,
- QListViewItem *after );
- NavigatorAppItem( DocEntry *entry, QListViewItem *parent,
- QListViewItem *after );
+ NavigatorAppItem( DocEntry *entry, TQListView *parent,
+ TQListViewItem *after );
+ NavigatorAppItem( DocEntry *entry, TQListViewItem *parent,
+ TQListViewItem *after );
- void setRelpath( const QString & );
+ void setRelpath( const TQString & );
virtual void setOpen(bool);
void populate( bool recursive = false );
protected:
- QString documentationURL( KService *s );
+ TQString documentationURL( KService *s );
private:
- QString mRelpath;
+ TQString mRelpath;
bool mPopulated;
};
diff --git a/khelpcenter/navigatoritem.cpp b/khelpcenter/navigatoritem.cpp
index d2ad548b9..045e23542 100644
--- a/khelpcenter/navigatoritem.cpp
+++ b/khelpcenter/navigatoritem.cpp
@@ -28,28 +28,28 @@
using namespace KHC;
-NavigatorItem::NavigatorItem( DocEntry *entry, QListView *parent,
- QListViewItem *after )
- : QListViewItem( parent, after )
+NavigatorItem::NavigatorItem( DocEntry *entry, TQListView *parent,
+ TQListViewItem *after )
+ : TQListViewItem( parent, after )
{
init( entry );
}
-NavigatorItem::NavigatorItem( DocEntry *entry, QListViewItem *parent,
- QListViewItem *after )
- : QListViewItem( parent, after )
+NavigatorItem::NavigatorItem( DocEntry *entry, TQListViewItem *parent,
+ TQListViewItem *after )
+ : TQListViewItem( parent, after )
{
init( entry );
}
-NavigatorItem::NavigatorItem( DocEntry *entry, QListView *parent )
- : QListViewItem( parent )
+NavigatorItem::NavigatorItem( DocEntry *entry, TQListView *parent )
+ : TQListViewItem( parent )
{
init( entry );
}
-NavigatorItem::NavigatorItem( DocEntry *entry, QListViewItem *parent )
- : QListViewItem( parent )
+NavigatorItem::NavigatorItem( DocEntry *entry, TQListViewItem *parent )
+ : TQListViewItem( parent )
{
init( entry );
}
@@ -94,7 +94,7 @@ TOC *NavigatorItem::createTOC()
void NavigatorItem::setOpen( bool open )
{
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
if ( entry()->icon().isEmpty() || entry()->icon() == "contents2" ) {
if ( open && childCount() > 0 ) setPixmap( 0, SmallIcon( "contents" ) );
diff --git a/khelpcenter/navigatoritem.h b/khelpcenter/navigatoritem.h
index 4337a47f9..50d2465c4 100644
--- a/khelpcenter/navigatoritem.h
+++ b/khelpcenter/navigatoritem.h
@@ -20,7 +20,7 @@
#ifndef KHC_NAVIGATORITEM_H
#define KHC_NAVIGATORITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
namespace KHC {
@@ -30,13 +30,13 @@ class DocEntry;
class NavigatorItem : public QListViewItem
{
public:
- NavigatorItem( DocEntry *entry, QListView *parent );
- NavigatorItem( DocEntry *entry, QListViewItem *parent );
+ NavigatorItem( DocEntry *entry, TQListView *parent );
+ NavigatorItem( DocEntry *entry, TQListViewItem *parent );
- NavigatorItem( DocEntry *entry, QListView *parent,
- QListViewItem *after );
- NavigatorItem( DocEntry *entry, QListViewItem *parent,
- QListViewItem *after );
+ NavigatorItem( DocEntry *entry, TQListView *parent,
+ TQListViewItem *after );
+ NavigatorItem( DocEntry *entry, TQListViewItem *parent,
+ TQListViewItem *after );
~NavigatorItem();
diff --git a/khelpcenter/plugintraverser.cpp b/khelpcenter/plugintraverser.cpp
index 3f7609627..82e8f2e26 100644
--- a/khelpcenter/plugintraverser.cpp
+++ b/khelpcenter/plugintraverser.cpp
@@ -28,11 +28,11 @@
#include <kdebug.h>
#include <kiconloader.h>
-#include <qlistview.h>
+#include <tqlistview.h>
using namespace KHC;
-PluginTraverser::PluginTraverser( Navigator *navigator, QListView *parent )
+PluginTraverser::PluginTraverser( Navigator *navigator, TQListView *parent )
: DocEntryTraverser(),
mListView( parent ),
mParentItem( 0 ),
diff --git a/khelpcenter/plugintraverser.h b/khelpcenter/plugintraverser.h
index be37017a5..7d1f4b4a1 100644
--- a/khelpcenter/plugintraverser.h
+++ b/khelpcenter/plugintraverser.h
@@ -32,7 +32,7 @@ namespace KHC {
class PluginTraverser : public DocEntryTraverser
{
public:
- PluginTraverser( Navigator *navigator, QListView *parent );
+ PluginTraverser( Navigator *navigator, TQListView *parent );
PluginTraverser( Navigator *navigator, NavigatorItem *parent );
virtual void process( DocEntry *entry );
@@ -40,7 +40,7 @@ namespace KHC {
virtual DocEntryTraverser *createChild( DocEntry *entry );
private:
- QListView *mListView;
+ TQListView *mListView;
NavigatorItem *mParentItem;
NavigatorItem *mCurrentItem;
diff --git a/khelpcenter/scopeitem.h b/khelpcenter/scopeitem.h
index 33152060f..9b828a54f 100644
--- a/khelpcenter/scopeitem.h
+++ b/khelpcenter/scopeitem.h
@@ -1,7 +1,7 @@
#ifndef SCOPEITEM_H
#define SCOPEITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "docmetainfo.h"
@@ -10,12 +10,12 @@ namespace KHC {
class ScopeItem : public QCheckListItem
{
public:
- ScopeItem( QListView *parent, DocEntry *entry )
- : QCheckListItem( parent, entry->name(), QCheckListItem::CheckBox ),
+ ScopeItem( TQListView *parent, DocEntry *entry )
+ : TQCheckListItem( parent, entry->name(), TQCheckListItem::CheckBox ),
mEntry( entry ), mObserver( 0 ) {}
- ScopeItem( QListViewItem *parent, DocEntry *entry )
- : QCheckListItem( parent, entry->name(), QCheckListItem::CheckBox ),
+ ScopeItem( TQListViewItem *parent, DocEntry *entry )
+ : TQCheckListItem( parent, entry->name(), TQCheckListItem::CheckBox ),
mEntry( entry ), mObserver( 0 ) {}
DocEntry *entry()const { return mEntry; }
diff --git a/khelpcenter/scrollkeepertreebuilder.cpp b/khelpcenter/scrollkeepertreebuilder.cpp
index b2a363eab..20a4b0851 100644
--- a/khelpcenter/scrollkeepertreebuilder.cpp
+++ b/khelpcenter/scrollkeepertreebuilder.cpp
@@ -30,14 +30,14 @@
#include <klocale.h>
#include <kprocio.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqregexp.h>
using namespace KHC;
-ScrollKeeperTreeBuilder::ScrollKeeperTreeBuilder( QObject *parent, const char *name )
- : QObject( parent, name )
+ScrollKeeperTreeBuilder::ScrollKeeperTreeBuilder( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
loadConfig();
}
@@ -54,27 +54,27 @@ void ScrollKeeperTreeBuilder::loadConfig()
NavigatorItem *ScrollKeeperTreeBuilder::build( NavigatorItem *parent,
NavigatorItem *after )
{
- QString lang = KGlobal::locale()->language();
+ TQString lang = KGlobal::locale()->language();
kdDebug(1400) << "ScrollKeeper language: " << lang << endl;
KProcIO proc;
proc << "scrollkeeper-get-content-list";
proc << lang;
- connect(&proc,SIGNAL(readReady(KProcIO *)),SLOT(getContentsList(KProcIO *)));
+ connect(&proc,TQT_SIGNAL(readReady(KProcIO *)),TQT_SLOT(getContentsList(KProcIO *)));
if (!proc.start(KProcess::Block)) {
kdDebug(1400) << "Could not execute scrollkeeper-get-content-list" << endl;
return 0;
}
- if (!QFile::exists(mContentsList)) {
+ if (!TQFile::exists(mContentsList)) {
kdDebug(1400) << "Scrollkeeper contents file '" << mContentsList
<< "' does not exist." << endl;
return 0;
}
- QDomDocument doc("ScrollKeeperContentsList");
- QFile f(mContentsList);
+ TQDomDocument doc("ScrollKeeperContentsList");
+ TQFile f(mContentsList);
if ( !f.open( IO_ReadOnly ) )
return 0;
if ( !doc.setContent( &f ) ) {
@@ -86,13 +86,13 @@ NavigatorItem *ScrollKeeperTreeBuilder::build( NavigatorItem *parent,
// Create top-level item
mItems.append(parent);
- QDomElement docElem = doc.documentElement();
+ TQDomElement docElem = doc.documentElement();
NavigatorItem *result = 0;
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() ) {
if (e.tagName() == "sect") {
NavigatorItem *createdItem;
@@ -108,7 +108,7 @@ NavigatorItem *ScrollKeeperTreeBuilder::build( NavigatorItem *parent,
void ScrollKeeperTreeBuilder::getContentsList( KProcIO *proc )
{
- QString filename;
+ TQString filename;
proc->readln( filename, true );
mContentsList = filename;
@@ -116,7 +116,7 @@ void ScrollKeeperTreeBuilder::getContentsList( KProcIO *proc )
int ScrollKeeperTreeBuilder::insertSection( NavigatorItem *parent,
NavigatorItem *after,
- const QDomNode &sectNode,
+ const TQDomNode &sectNode,
NavigatorItem *&sectItem )
{
DocEntry *entry = new DocEntry( "", "", "contents2" );
@@ -126,9 +126,9 @@ int ScrollKeeperTreeBuilder::insertSection( NavigatorItem *parent,
int numDocs = 0; // Number of docs created in this section
- QDomNode n = sectNode.firstChild();
+ TQDomNode n = sectNode.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() ) {
if ( e.tagName() == "title" ) {
entry->setName( e.text() );
@@ -154,18 +154,18 @@ int ScrollKeeperTreeBuilder::insertSection( NavigatorItem *parent,
}
void ScrollKeeperTreeBuilder::insertDoc( NavigatorItem *parent,
- const QDomNode &docNode )
+ const TQDomNode &docNode )
{
DocEntry *entry = new DocEntry( "", "", "document2" );
NavigatorItem *docItem = new NavigatorItem( entry, parent );
docItem->setAutoDeleteDocEntry( true );
mItems.append( docItem );
- QString url;
+ TQString url;
- QDomNode n = docNode.firstChild();
+ TQDomNode n = docNode.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() ) {
if ( e.tagName() == "doctitle" ) {
entry->setName( e.text() );
@@ -173,14 +173,14 @@ void ScrollKeeperTreeBuilder::insertDoc( NavigatorItem *parent,
} else if ( e.tagName() == "docsource" ) {
url.append( e.text() );
} else if ( e.tagName() == "docformat" ) {
- QString mimeType = e.text();
+ TQString mimeType = e.text();
if ( mimeType == "text/html") {
// Let the HTML part figure out how to get the doc
} else if ( mimeType == "text/xml" ) {
if ( url.left( 5 ) == "file:" ) url = url.mid( 5 );
url.prepend( "ghelp:" );
#if 0
- url.replace( QRegExp( ".xml$" ), ".html" );
+ url.replace( TQRegExp( ".xml$" ), ".html" );
#endif
} else if ( mimeType == "text/sgml" ) {
// GNOME docs use this type. We don't have a real viewer for this.
diff --git a/khelpcenter/scrollkeepertreebuilder.h b/khelpcenter/scrollkeepertreebuilder.h
index 522e7b8f9..aec8351e8 100644
--- a/khelpcenter/scrollkeepertreebuilder.h
+++ b/khelpcenter/scrollkeepertreebuilder.h
@@ -20,8 +20,8 @@
#ifndef KHC_SCROLLKEEPERTREEBUILDER_H
#define KHC_SCROLLKEEPERTREEBUILDER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "navigatoritem.h"
@@ -35,7 +35,7 @@ class ScrollKeeperTreeBuilder : public QObject
{
Q_OBJECT
public:
- ScrollKeeperTreeBuilder( QObject *parent, const char *name = 0 );
+ ScrollKeeperTreeBuilder( TQObject *parent, const char *name = 0 );
NavigatorItem *build( NavigatorItem *parent, NavigatorItem *after );
@@ -45,12 +45,12 @@ class ScrollKeeperTreeBuilder : public QObject
private:
void loadConfig();
int insertSection( NavigatorItem *parent, NavigatorItem *after,
- const QDomNode &sectNode, NavigatorItem *&created );
- void insertDoc( NavigatorItem *parent, const QDomNode &docNode );
+ const TQDomNode &sectNode, NavigatorItem *&created );
+ void insertDoc( NavigatorItem *parent, const TQDomNode &docNode );
bool mShowEmptyDirs;
- QString mContentsList;
- QPtrList<NavigatorItem> mItems;
+ TQString mContentsList;
+ TQPtrList<NavigatorItem> mItems;
};
}
diff --git a/khelpcenter/searchengine.cpp b/khelpcenter/searchengine.cpp
index 2156ee244..b779afc8e 100644
--- a/khelpcenter/searchengine.cpp
+++ b/khelpcenter/searchengine.cpp
@@ -1,6 +1,6 @@
#include "stdlib.h"
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@ SearchTraverser::SearchTraverser( SearchEngine *engine, int level ) :
{
#if 0
kdDebug() << "SearchTraverser(): " << mLevel
- << " 0x" << QString::number( int( this ), 16 ) << endl;
+ << " 0x" << TQString::number( int( this ), 16 ) << endl;
#endif
}
@@ -33,10 +33,10 @@ SearchTraverser::~SearchTraverser()
{
#if 0
kdDebug() << "~SearchTraverser(): " << mLevel
- << " 0x" << QString::number( int( this ), 16 ) << endl;
+ << " 0x" << TQString::number( int( this ), 16 ) << endl;
#endif
- QString section;
+ TQString section;
if ( parentEntry() ) {
section = parentEntry()->name();
} else {
@@ -71,7 +71,7 @@ void SearchTraverser::startProcess( DocEntry *entry )
SearchHandler *handler = mEngine->handler( entry->documentType() );
if ( !handler ) {
- QString txt;
+ TQString txt;
if ( entry->documentType().isEmpty() ) {
txt = i18n("Error: No document type specified.");
} else {
@@ -92,22 +92,22 @@ void SearchTraverser::startProcess( DocEntry *entry )
void SearchTraverser::connectHandler( SearchHandler *handler )
{
- QMap<SearchHandler *,int>::Iterator it;
+ TQMap<SearchHandler *,int>::Iterator it;
it = mConnectCount.find( handler );
int count = 0;
if ( it != mConnectCount.end() ) count = *it;
if ( count == 0 ) {
- connect( handler, SIGNAL( searchError( SearchHandler *, DocEntry *, const QString & ) ),
- SLOT( showSearchError( SearchHandler *, DocEntry *, const QString & ) ) );
- connect( handler, SIGNAL( searchFinished( SearchHandler *, DocEntry *, const QString & ) ),
- SLOT( showSearchResult( SearchHandler *, DocEntry *, const QString & ) ) );
+ connect( handler, TQT_SIGNAL( searchError( SearchHandler *, DocEntry *, const TQString & ) ),
+ TQT_SLOT( showSearchError( SearchHandler *, DocEntry *, const TQString & ) ) );
+ connect( handler, TQT_SIGNAL( searchFinished( SearchHandler *, DocEntry *, const TQString & ) ),
+ TQT_SLOT( showSearchResult( SearchHandler *, DocEntry *, const TQString & ) ) );
}
mConnectCount[ handler ] = ++count;
}
void SearchTraverser::disconnectHandler( SearchHandler *handler )
{
- QMap<SearchHandler *,int>::Iterator it;
+ TQMap<SearchHandler *,int>::Iterator it;
it = mConnectCount.find( handler );
if ( it == mConnectCount.end() ) {
kdError() << "SearchTraverser::disconnectHandler() handler not connected."
@@ -116,10 +116,10 @@ void SearchTraverser::disconnectHandler( SearchHandler *handler )
int count = *it;
--count;
if ( count == 0 ) {
- disconnect( handler, SIGNAL( searchError( SearchHandler *, DocEntry *, const QString & ) ),
- this, SLOT( showSearchError( SearchHandler *, DocEntry *, const QString & ) ) );
- disconnect( handler, SIGNAL( searchFinished( SearchHandler *, DocEntry *, const QString & ) ),
- this, SLOT( showSearchResult( SearchHandler *, DocEntry *, const QString & ) ) );
+ disconnect( handler, TQT_SIGNAL( searchError( SearchHandler *, DocEntry *, const TQString & ) ),
+ this, TQT_SLOT( showSearchError( SearchHandler *, DocEntry *, const TQString & ) ) );
+ disconnect( handler, TQT_SIGNAL( searchFinished( SearchHandler *, DocEntry *, const TQString & ) ),
+ this, TQT_SLOT( showSearchResult( SearchHandler *, DocEntry *, const TQString & ) ) );
}
mConnectCount[ handler ] = count;
}
@@ -161,7 +161,7 @@ void SearchTraverser::deleteTraverser()
}
}
-void SearchTraverser::showSearchError( SearchHandler *handler, DocEntry *entry, const QString &error )
+void SearchTraverser::showSearchError( SearchHandler *handler, DocEntry *entry, const TQString &error )
{
// kdDebug() << "SearchTraverser::showSearchError(): " << entry->name()
// << endl;
@@ -176,7 +176,7 @@ void SearchTraverser::showSearchError( SearchHandler *handler, DocEntry *entry,
mNotifyee->endProcess( entry, this );
}
-void SearchTraverser::showSearchResult( SearchHandler *handler, DocEntry *entry, const QString &result )
+void SearchTraverser::showSearchResult( SearchHandler *handler, DocEntry *entry, const TQString &result )
{
// kdDebug() << "SearchTraverser::showSearchResult(): " << entry->name()
// << endl;
@@ -201,7 +201,7 @@ void SearchTraverser::finishTraversal()
SearchEngine::SearchEngine( View *destination )
- : QObject(),
+ : TQObject(),
mProc( 0 ), mSearchRunning( false ), mView( destination ),
mRootTraverser( 0 )
{
@@ -215,21 +215,21 @@ SearchEngine::~SearchEngine()
bool SearchEngine::initSearchHandlers()
{
- QStringList resources = KGlobal::dirs()->findAllResources(
+ TQStringList resources = KGlobal::dirs()->findAllResources(
"appdata", "searchhandlers/*.desktop" );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = resources.begin(); it != resources.end(); ++it ) {
- QString filename = *it;
+ TQString filename = *it;
kdDebug() << "SearchEngine::initSearchHandlers(): " << filename << endl;
SearchHandler *handler = SearchHandler::initFromFile( filename );
if ( !handler || !handler->checkPaths() ) {
- QString txt = i18n("Unable to initialize SearchHandler from file '%1'.")
+ TQString txt = i18n("Unable to initialize SearchHandler from file '%1'.")
.arg( filename );
kdWarning() << txt << endl;
// KMessageBox::sorry( mView->widget(), txt );
} else {
- QStringList documentTypes = handler->documentTypes();
- QStringList::ConstIterator it;
+ TQStringList documentTypes = handler->documentTypes();
+ TQStringList::ConstIterator it;
for( it = documentTypes.begin(); it != documentTypes.end(); ++it ) {
mHandlers.insert( *it, handler );
}
@@ -237,7 +237,7 @@ bool SearchEngine::initSearchHandlers()
}
if ( mHandlers.isEmpty() ) {
- QString txt = i18n("No valid search handler found.");
+ TQString txt = i18n("No valid search handler found.");
kdWarning() << txt << endl;
// KMessageBox::sorry( mView->widget(), txt );
return false;
@@ -251,7 +251,7 @@ void SearchEngine::searchStdout(KProcess *, char *buffer, int len)
if ( !buffer || len == 0 )
return;
- QString bufferStr;
+ TQString bufferStr;
char *p;
p = (char*) malloc( sizeof(char) * (len+1) );
p = strncpy( p, buffer, len );
@@ -267,7 +267,7 @@ void SearchEngine::searchStderr(KProcess *, char *buffer, int len)
if ( !buffer || len == 0 )
return;
- mStderr.append( QString::fromUtf8( buffer, len ) );
+ mStderr.append( TQString::fromUtf8( buffer, len ) );
}
void SearchEngine::searchExited(KProcess *)
@@ -276,8 +276,8 @@ void SearchEngine::searchExited(KProcess *)
mSearchRunning = false;
}
-bool SearchEngine::search( QString words, QString method, int matches,
- QString scope )
+bool SearchEngine::search( TQString words, TQString method, int matches,
+ TQString scope )
{
if ( mSearchRunning ) return false;
@@ -288,14 +288,14 @@ bool SearchEngine::search( QString words, QString method, int matches,
mScope = scope;
// Saner variables to store search parameters:
- mWordList = QStringList::split( " ", words );
+ mWordList = TQStringList::split( " ", words );
mMaxResults = matches;
if ( method == "or" ) mOperation = Or;
else mOperation = And;
KConfig *cfg = KGlobal::config();
cfg->setGroup( "Search" );
- QString commonSearchProgram = cfg->readPathEntry( "CommonProgram" );
+ TQString commonSearchProgram = cfg->readPathEntry( "CommonProgram" );
bool useCommon = cfg->readBoolEntry( "UseCommonProgram", false );
if ( commonSearchProgram.isEmpty() || !useCommon ) {
@@ -303,7 +303,7 @@ bool SearchEngine::search( QString words, QString method, int matches,
return false;
}
- QString txt = i18n("Search Results for '%1':").arg( QStyleSheet::escape(words) );
+ TQString txt = i18n("Search Results for '%1':").arg( TQStyleSheet::escape(words) );
mStderr = "<b>" + txt + "</b>\n";
@@ -320,7 +320,7 @@ bool SearchEngine::search( QString words, QString method, int matches,
return true;
} else {
- QString lang = KGlobal::locale()->language().left(2);
+ TQString lang = KGlobal::locale()->language().left(2);
if ( lang.lower() == "c" || lang.lower() == "posix" )
lang = "en";
@@ -334,7 +334,7 @@ bool SearchEngine::search( QString words, QString method, int matches,
// replace whitespace with a '+'
mWords = mWords.stripWhiteSpace();
mWords = mWords.simplifyWhiteSpace();
- mWords.replace(QRegExp("\\s"), "+");
+ mWords.replace(TQRegExp("\\s"), "+");
commonSearchProgram = substituteSearchQuery( commonSearchProgram );
@@ -342,22 +342,22 @@ bool SearchEngine::search( QString words, QString method, int matches,
mProc = new KProcess();
- QStringList cmd = QStringList::split( " ", commonSearchProgram );
- QStringList::ConstIterator it;
+ TQStringList cmd = TQStringList::split( " ", commonSearchProgram );
+ TQStringList::ConstIterator it;
for( it = cmd.begin(); it != cmd.end(); ++it ) {
- QString arg = *it;
+ TQString arg = *it;
if ( arg.left( 1 ) == "\"" && arg.right( 1 ) =="\"" ) {
arg = arg.mid( 1, arg.length() - 2 );
}
*mProc << arg.utf8();
}
- connect( mProc, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- SLOT( searchStdout( KProcess *, char *, int ) ) );
- connect( mProc, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- SLOT( searchStderr( KProcess *, char *, int ) ) );
- connect( mProc, SIGNAL( processExited( KProcess * ) ),
- SLOT( searchExited( KProcess * ) ) );
+ connect( mProc, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ TQT_SLOT( searchStdout( KProcess *, char *, int ) ) );
+ connect( mProc, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ TQT_SLOT( searchStderr( KProcess *, char *, int ) ) );
+ connect( mProc, TQT_SIGNAL( processExited( KProcess * ) ),
+ TQT_SLOT( searchExited( KProcess * ) ) );
mSearchRunning = true;
mSearchResult = "";
@@ -392,11 +392,11 @@ bool SearchEngine::search( QString words, QString method, int matches,
return true;
}
-QString SearchEngine::substituteSearchQuery( const QString &query )
+TQString SearchEngine::substituteSearchQuery( const TQString &query )
{
- QString result = query;
+ TQString result = query;
result.replace( "%k", mWords );
- result.replace( "%n", QString::number( mMatches ) );
+ result.replace( "%n", TQString::number( mMatches ) );
result.replace( "%m", mMethod );
result.replace( "%l", mLang );
result.replace( "%s", mScope );
@@ -404,15 +404,15 @@ QString SearchEngine::substituteSearchQuery( const QString &query )
return result;
}
-QString SearchEngine::substituteSearchQuery( const QString &query,
- const QString &identifier, const QStringList &words, int maxResults,
- Operation operation, const QString &lang )
+TQString SearchEngine::substituteSearchQuery( const TQString &query,
+ const TQString &identifier, const TQStringList &words, int maxResults,
+ Operation operation, const TQString &lang )
{
- QString result = query;
+ TQString result = query;
result.replace( "%i", identifier );
result.replace( "%w", words.join( "+" ) );
- result.replace( "%m", QString::number( maxResults ) );
- QString o;
+ result.replace( "%m", TQString::number( maxResults ) );
+ TQString o;
if ( operation == Or ) o = "or";
else o = "and";
result.replace( "%o", o );
@@ -440,12 +440,12 @@ void SearchEngine::finishSearch()
emit searchFinished();
}
-QString SearchEngine::errorLog() const
+TQString SearchEngine::errorLog() const
{
return mStderr;
}
-void SearchEngine::logError( DocEntry *entry, const QString &msg )
+void SearchEngine::logError( DocEntry *entry, const TQString &msg )
{
mStderr += entry->identifier() + ": " + msg;
}
@@ -455,16 +455,16 @@ bool SearchEngine::isRunning() const
return mSearchRunning;
}
-SearchHandler *SearchEngine::handler( const QString &documentType ) const
+SearchHandler *SearchEngine::handler( const TQString &documentType ) const
{
- QMap<QString,SearchHandler *>::ConstIterator it;
+ TQMap<TQString,SearchHandler *>::ConstIterator it;
it = mHandlers.find( documentType );
if ( it == mHandlers.end() ) return 0;
else return *it;
}
-QStringList SearchEngine::words() const
+TQStringList SearchEngine::words() const
{
return mWordList;
}
diff --git a/khelpcenter/searchengine.h b/khelpcenter/searchengine.h
index 1528fe6d0..1bf390a07 100644
--- a/khelpcenter/searchengine.h
+++ b/khelpcenter/searchengine.h
@@ -1,9 +1,9 @@
#ifndef SEARCHENGINE_H
#define SEARCHENGINE_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kpixmap.h>
#include <kio/job.h>
@@ -22,7 +22,7 @@ class SearchEngine;
class View;
class SearchHandler;
-class SearchTraverser : public QObject, public DocEntryTraverser
+class SearchTraverser : public TQObject, public DocEntryTraverser
{
Q_OBJECT
public:
@@ -46,8 +46,8 @@ class SearchTraverser : public QObject, public DocEntryTraverser
void disconnectHandler( SearchHandler *handler );
protected slots:
- void showSearchResult( SearchHandler *, DocEntry *, const QString &result );
- void showSearchError( SearchHandler *, DocEntry *, const QString &error );
+ void showSearchResult( SearchHandler *, DocEntry *, const TQString &result );
+ void showSearchError( SearchHandler *, DocEntry *, const TQString &error );
private:
const int mMaxLevel;
@@ -56,11 +56,11 @@ class SearchTraverser : public QObject, public DocEntryTraverser
int mLevel;
DocEntry *mEntry;
- QString mJobData;
+ TQString mJobData;
- QString mResult;
+ TQString mResult;
- QMap<SearchHandler *, int> mConnectCount;
+ TQMap<SearchHandler *, int> mConnectCount;
};
@@ -75,35 +75,35 @@ class SearchEngine : public QObject
bool initSearchHandlers();
- bool search( QString words, QString method = "and", int matches = 5,
- QString scope = "" );
+ bool search( TQString words, TQString method = "and", int matches = 5,
+ TQString scope = "" );
Formatter *formatter() const;
View *view() const;
- QString substituteSearchQuery( const QString &query );
+ TQString substituteSearchQuery( const TQString &query );
- static QString substituteSearchQuery( const QString &query,
- const QString &identifier, const QStringList &words, int maxResults,
- Operation operation, const QString &lang );
+ static TQString substituteSearchQuery( const TQString &query,
+ const TQString &identifier, const TQStringList &words, int maxResults,
+ Operation operation, const TQString &lang );
void finishSearch();
/**
Append error message to error log.
*/
- void logError( DocEntry *entry, const QString &msg );
+ void logError( DocEntry *entry, const TQString &msg );
/**
Return error log.
*/
- QString errorLog() const;
+ TQString errorLog() const;
bool isRunning() const;
- SearchHandler *handler( const QString &documentType ) const;
+ SearchHandler *handler( const TQString &documentType ) const;
- QStringList words() const;
+ TQStringList words() const;
int maxResults() const;
Operation operation() const;
@@ -124,25 +124,25 @@ class SearchEngine : public QObject
private:
KProcess *mProc;
bool mSearchRunning;
- QString mSearchResult;
+ TQString mSearchResult;
- QString mStderr;
+ TQString mStderr;
View *mView;
- QString mWords;
+ TQString mWords;
int mMatches;
- QString mMethod;
- QString mLang;
- QString mScope;
+ TQString mMethod;
+ TQString mLang;
+ TQString mScope;
- QStringList mWordList;
+ TQStringList mWordList;
int mMaxResults;
Operation mOperation;
DocEntryTraverser *mRootTraverser;
- QMap<QString, SearchHandler *> mHandlers;
+ TQMap<TQString, SearchHandler *> mHandlers;
};
}
diff --git a/khelpcenter/searchhandler.cpp b/khelpcenter/searchhandler.cpp
index a25d2fe49..9c34d7399 100644
--- a/khelpcenter/searchhandler.cpp
+++ b/khelpcenter/searchhandler.cpp
@@ -40,7 +40,7 @@ SearchHandler::SearchHandler()
mLang = KGlobal::locale()->language().left( 2 );
}
-SearchHandler *SearchHandler::initFromFile( const QString &filename )
+SearchHandler *SearchHandler::initFromFile( const TQString &filename )
{
SearchHandler *handler = new SearchHandler;
@@ -54,14 +54,14 @@ SearchHandler *SearchHandler::initFromFile( const QString &filename )
return handler;
}
-QStringList SearchHandler::documentTypes() const
+TQStringList SearchHandler::documentTypes() const
{
return mDocumentTypes;
}
-QString SearchHandler::indexCommand( const QString &identifier )
+TQString SearchHandler::indexCommand( const TQString &identifier )
{
- QString cmd = mIndexCommand;
+ TQString cmd = mIndexCommand;
cmd.replace( "%i", identifier );
cmd.replace( "%d", Prefs::indexDirectory() );
cmd.replace( "%l", mLang );
@@ -79,9 +79,9 @@ bool SearchHandler::checkPaths() const
return true;
}
-bool SearchHandler::checkBinary( const QString &cmd ) const
+bool SearchHandler::checkBinary( const TQString &cmd ) const
{
- QString binary;
+ TQString binary;
int pos = cmd.find( ' ' );
if ( pos < 0 ) binary = cmd;
@@ -90,36 +90,36 @@ bool SearchHandler::checkBinary( const QString &cmd ) const
return !KStandardDirs::findExe( binary ).isEmpty();
}
-void SearchHandler::search( DocEntry *entry, const QStringList &words,
+void SearchHandler::search( DocEntry *entry, const TQStringList &words,
int maxResults,
SearchEngine::Operation operation )
{
kdDebug() << "SearchHandler::search(): " << entry->identifier() << endl;
if ( !mSearchCommand.isEmpty() ) {
- QString cmdString = SearchEngine::substituteSearchQuery( mSearchCommand,
+ TQString cmdString = SearchEngine::substituteSearchQuery( mSearchCommand,
entry->identifier(), words, maxResults, operation, mLang );
kdDebug() << "SearchHandler::search() CMD: " << cmdString << endl;
KProcess *proc = new KProcess();
- QStringList cmd = QStringList::split( " ", cmdString );
- QStringList::ConstIterator it;
+ TQStringList cmd = TQStringList::split( " ", cmdString );
+ TQStringList::ConstIterator it;
for( it = cmd.begin(); it != cmd.end(); ++it ) {
- QString arg = *it;
+ TQString arg = *it;
if ( arg.left( 1 ) == "\"" && arg.right( 1 ) =="\"" ) {
arg = arg.mid( 1, arg.length() - 2 );
}
*proc << arg.utf8();
}
- connect( proc, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- SLOT( searchStdout( KProcess *, char *, int ) ) );
- connect( proc, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- SLOT( searchStderr( KProcess *, char *, int ) ) );
- connect( proc, SIGNAL( processExited( KProcess * ) ),
- SLOT( searchExited( KProcess * ) ) );
+ connect( proc, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ TQT_SLOT( searchStdout( KProcess *, char *, int ) ) );
+ connect( proc, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ TQT_SLOT( searchStderr( KProcess *, char *, int ) ) );
+ connect( proc, TQT_SIGNAL( processExited( KProcess * ) ),
+ TQT_SLOT( searchExited( KProcess * ) ) );
SearchJob *searchJob = new SearchJob;
searchJob->mEntry = entry;
@@ -129,27 +129,27 @@ void SearchHandler::search( DocEntry *entry, const QStringList &words,
mProcessJobs.insert( proc, searchJob );
if ( !proc->start( KProcess::NotifyOnExit, KProcess::All ) ) {
- QString txt = i18n("Error executing search command '%1'.").arg( cmdString );
+ TQString txt = i18n("Error executing search command '%1'.").arg( cmdString );
emit searchFinished( this, entry, txt );
}
} else if ( !mSearchUrl.isEmpty() ) {
- QString urlString = SearchEngine::substituteSearchQuery( mSearchUrl,
+ TQString urlString = SearchEngine::substituteSearchQuery( mSearchUrl,
entry->identifier(), words, maxResults, operation, mLang );
kdDebug() << "SearchHandler::search() URL: " << urlString << endl;
KIO::TransferJob *job = KIO::get( KURL( urlString ) );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) );
SearchJob *searchJob = new SearchJob;
searchJob->mEntry = entry;
searchJob->mKioJob = job;
mKioJobs.insert( job, searchJob );
} else {
- QString txt = i18n("No search command or URL specified.");
+ TQString txt = i18n("No search command or URL specified.");
emit searchFinished( this, entry, txt );
return;
}
@@ -160,13 +160,13 @@ void SearchHandler::searchStdout( KProcess *proc, char *buffer, int len )
if ( !buffer || len == 0 )
return;
- QString bufferStr;
+ TQString bufferStr;
char *p;
p = (char*) malloc( sizeof(char) * ( len + 1 ) );
p = strncpy( p, buffer, len );
p[len] = '\0';
- QMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc );
+ TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc );
if ( it != mProcessJobs.end() ) {
(*it)->mResult += bufferStr.fromUtf8( p );
}
@@ -179,9 +179,9 @@ void SearchHandler::searchStderr( KProcess *proc, char *buffer, int len )
if ( !buffer || len == 0 )
return;
- QMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc );
+ TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc );
if ( it != mProcessJobs.end() ) {
- (*it)->mError += QString::fromUtf8( buffer, len );
+ (*it)->mError += TQString::fromUtf8( buffer, len );
}
}
@@ -189,11 +189,11 @@ void SearchHandler::searchExited( KProcess *proc )
{
// kdDebug() << "SearchHandler::searchExited()" << endl;
- QString result;
- QString error;
+ TQString result;
+ TQString error;
DocEntry *entry = 0;
- QMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc );
+ TQMap<KProcess *, SearchJob *>::ConstIterator it = mProcessJobs.find( proc );
if ( it != mProcessJobs.end() ) {
SearchJob *j = *it;
entry = j->mEntry;
@@ -215,10 +215,10 @@ void SearchHandler::searchExited( KProcess *proc )
void SearchHandler::slotJobResult( KIO::Job *job )
{
- QString result;
+ TQString result;
DocEntry *entry = 0;
- QMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.find( job );
+ TQMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.find( job );
if ( it != mKioJobs.end() ) {
SearchJob *j = *it;
@@ -236,11 +236,11 @@ void SearchHandler::slotJobResult( KIO::Job *job )
}
}
-void SearchHandler::slotJobData( KIO::Job *job, const QByteArray &data )
+void SearchHandler::slotJobData( KIO::Job *job, const TQByteArray &data )
{
// kdDebug() << "SearchHandler::slotJobData()" << endl;
- QMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.find( job );
+ TQMap<KIO::Job *, SearchJob *>::ConstIterator it = mKioJobs.find( job );
if ( it != mKioJobs.end() ) {
(*it)->mResult += data.data();
}
diff --git a/khelpcenter/searchhandler.h b/khelpcenter/searchhandler.h
index 3b0979bd4..13a6a56c1 100644
--- a/khelpcenter/searchhandler.h
+++ b/khelpcenter/searchhandler.h
@@ -22,8 +22,8 @@
#include "searchengine.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
namespace KIO {
class Job;
@@ -41,34 +41,34 @@ class SearchJob
KProcess *mProcess;
KIO::Job *mKioJob;
- QString mCmd;
+ TQString mCmd;
- QString mResult;
- QString mError;
+ TQString mResult;
+ TQString mError;
};
class SearchHandler : public QObject
{
Q_OBJECT
public:
- static SearchHandler *initFromFile( const QString &filename );
+ static SearchHandler *initFromFile( const TQString &filename );
- void search( DocEntry *, const QStringList &words,
+ void search( DocEntry *, const TQStringList &words,
int maxResults = 10,
SearchEngine::Operation operation = SearchEngine::And );
- QString indexCommand( const QString &identifier );
+ TQString indexCommand( const TQString &identifier );
- QStringList documentTypes() const;
+ TQStringList documentTypes() const;
bool checkPaths() const;
signals:
- void searchFinished( SearchHandler *, DocEntry *, const QString & );
- void searchError( SearchHandler *, DocEntry *, const QString & );
+ void searchFinished( SearchHandler *, DocEntry *, const TQString & );
+ void searchError( SearchHandler *, DocEntry *, const TQString & );
protected:
- bool checkBinary( const QString &cmd ) const;
+ bool checkBinary( const TQString &cmd ) const;
protected slots:
void searchStdout( KProcess *proc, char *buffer, int buflen );
@@ -76,20 +76,20 @@ class SearchHandler : public QObject
void searchExited( KProcess *proc );
void slotJobResult( KIO::Job *job );
- void slotJobData( KIO::Job *, const QByteArray &data );
+ void slotJobData( KIO::Job *, const TQByteArray &data );
private:
SearchHandler();
- QString mLang;
+ TQString mLang;
- QString mSearchCommand;
- QString mSearchUrl;
- QString mIndexCommand;
- QStringList mDocumentTypes;
+ TQString mSearchCommand;
+ TQString mSearchUrl;
+ TQString mIndexCommand;
+ TQStringList mDocumentTypes;
- QMap<KProcess *,SearchJob *> mProcessJobs;
- QMap<KIO::Job *,SearchJob *> mKioJobs;
+ TQMap<KProcess *,SearchJob *> mProcessJobs;
+ TQMap<KIO::Job *,SearchJob *> mKioJobs;
};
}
diff --git a/khelpcenter/searchwidget.cpp b/khelpcenter/searchwidget.cpp
index a8f140969..bae623133 100644
--- a/khelpcenter/searchwidget.cpp
+++ b/khelpcenter/searchwidget.cpp
@@ -23,10 +23,10 @@
#include <unistd.h>
#include <errno.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
#include <ksimpleconfig.h>
#include <kapplication.h>
@@ -44,68 +44,68 @@
namespace KHC {
-SearchWidget::SearchWidget( SearchEngine *engine, QWidget *parent )
- : QWidget( parent ), DCOPObject( "SearchWidget" ), mEngine( engine ),
+SearchWidget::SearchWidget( SearchEngine *engine, TQWidget *parent )
+ : TQWidget( parent ), DCOPObject( "SearchWidget" ), mEngine( engine ),
mScopeCount( 0 )
{
- QBoxLayout *topLayout = new QVBoxLayout( this, 2, 2 );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, 2, 2 );
- QBoxLayout *hLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *hLayout = new TQHBoxLayout( topLayout );
- mMethodCombo = new QComboBox( this );
+ mMethodCombo = new TQComboBox( this );
mMethodCombo->insertItem( i18n("and") );
mMethodCombo->insertItem( i18n("or") );
- QLabel *l = new QLabel( mMethodCombo, i18n("&Method:"), this );
+ TQLabel *l = new TQLabel( mMethodCombo, i18n("&Method:"), this );
hLayout->addWidget( l );
hLayout->addWidget( mMethodCombo );
- hLayout = new QHBoxLayout( topLayout );
+ hLayout = new TQHBoxLayout( topLayout );
- mPagesCombo = new QComboBox( this );
+ mPagesCombo = new TQComboBox( this );
mPagesCombo->insertItem( "5" );
mPagesCombo->insertItem( "10" );
mPagesCombo->insertItem( "25" );
mPagesCombo->insertItem( "50" );
mPagesCombo->insertItem( "1000" );
- l = new QLabel( mPagesCombo, i18n("Max. &results:"), this );
+ l = new TQLabel( mPagesCombo, i18n("Max. &results:"), this );
hLayout->addWidget( l );
hLayout->addWidget( mPagesCombo );
- hLayout = new QHBoxLayout( topLayout );
+ hLayout = new TQHBoxLayout( topLayout );
- mScopeCombo = new QComboBox( this );
+ mScopeCombo = new TQComboBox( this );
for (int i=0; i < ScopeNum; ++i ) {
mScopeCombo->insertItem( scopeSelectionLabel( i ) );
}
- connect( mScopeCombo, SIGNAL( activated( int ) ),
- SLOT( scopeSelectionChanged( int ) ) );
+ connect( mScopeCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( scopeSelectionChanged( int ) ) );
- l = new QLabel( mScopeCombo, i18n("&Scope selection:"), this );
+ l = new TQLabel( mScopeCombo, i18n("&Scope selection:"), this );
hLayout->addWidget( l );
hLayout->addWidget( mScopeCombo );
- mScopeListView = new QListView( this );
+ mScopeListView = new TQListView( this );
mScopeListView->setRootIsDecorated( true );
mScopeListView->addColumn( i18n("Scope") );
topLayout->addWidget( mScopeListView, 1 );
- QPushButton *indexButton = new QPushButton( i18n("Build Search &Index..."),
+ TQPushButton *indexButton = new TQPushButton( i18n("Build Search &Index..."),
this );
- connect( indexButton, SIGNAL( clicked() ), SIGNAL( showIndexDialog() ) );
+ connect( indexButton, TQT_SIGNAL( clicked() ), TQT_SIGNAL( showIndexDialog() ) );
topLayout->addWidget( indexButton );
// FIXME: Use SearchHandler on double-clicked document
#if 0
- connect( mScopeListView, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( scopeDoubleClicked( QListViewItem * ) ) );
+ connect( mScopeListView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( scopeDoubleClicked( TQListViewItem * ) ) );
#endif
- connect( mScopeListView, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( scopeClicked( QListViewItem * ) ) );
+ connect( mScopeListView, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ TQT_SLOT( scopeClicked( TQListViewItem * ) ) );
}
@@ -128,7 +128,7 @@ void SearchWidget::readConfig( KConfig *cfg )
if ( scopeSelection == ScopeCustom ) {
cfg->setGroup( "Custom Search Scope" );
- QListViewItemIterator it( mScopeListView );
+ TQListViewItemIterator it( mScopeListView );
while( it.current() ) {
if ( it.current()->rtti() == ScopeItem::rttiId() ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
@@ -152,7 +152,7 @@ void SearchWidget::writeConfig( KConfig *cfg )
if ( mScopeCombo->currentItem() == ScopeCustom ) {
cfg->setGroup( "Custom Search Scope" );
- QListViewItemIterator it( mScopeListView );
+ TQListViewItemIterator it( mScopeListView );
while( it.current() ) {
if ( it.current()->rtti() == ScopeItem::rttiId() ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
@@ -165,7 +165,7 @@ void SearchWidget::writeConfig( KConfig *cfg )
void SearchWidget::slotSwitchBoxes()
{
- QListViewItemIterator it( mScopeListView );
+ TQListViewItemIterator it( mScopeListView );
while( it.current() ) {
if ( it.current()->rtti() == ScopeItem::rttiId() ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
@@ -179,7 +179,7 @@ void SearchWidget::slotSwitchBoxes()
void SearchWidget::scopeSelectionChanged( int id )
{
- QListViewItemIterator it( mScopeListView );
+ TQListViewItemIterator it( mScopeListView );
while( it.current() ) {
if ( it.current()->rtti() == ScopeItem::rttiId() ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
@@ -207,9 +207,9 @@ void SearchWidget::scopeSelectionChanged( int id )
checkScope();
}
-QString SearchWidget::method()
+TQString SearchWidget::method()
{
- QString m = "and";
+ TQString m = "and";
if ( mMethodCombo->currentItem() == 1)
m = "or";
@@ -223,11 +223,11 @@ int SearchWidget::pages()
return p;
}
-QString SearchWidget::scope()
+TQString SearchWidget::scope()
{
- QString scope;
+ TQString scope;
- QListViewItemIterator it( mScopeListView );
+ TQListViewItemIterator it( mScopeListView );
while( it.current() ) {
if ( it.current()->rtti() == ScopeItem::rttiId() ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
@@ -275,11 +275,11 @@ class ScopeTraverser : public DocEntryTraverser
return this;
} else {
ScopeTraverser *t = new ScopeTraverser( mWidget, mLevel + 1 );
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
if ( mParentItem ) {
- item = new QListViewItem( mParentItem, entry->name() );
+ item = new TQListViewItem( mParentItem, entry->name() );
} else {
- item = new QListViewItem( mWidget->listView(), entry->name() );
+ item = new TQListViewItem( mWidget->listView(), entry->name() );
}
item->setOpen( true );
t->mParentItem = item;
@@ -302,7 +302,7 @@ class ScopeTraverser : public DocEntryTraverser
private:
SearchWidget *mWidget;
int mLevel;
- QListViewItem *mParentItem;
+ TQListViewItem *mParentItem;
static int mNestingLevel;
};
@@ -326,26 +326,26 @@ void SearchWidget::updateScopeList()
checkScope();
}
-void SearchWidget::scopeDoubleClicked( QListViewItem *item )
+void SearchWidget::scopeDoubleClicked( TQListViewItem *item )
{
if ( !item || item->rtti() != ScopeItem::rttiId() ) return;
ScopeItem *scopeItem = static_cast<ScopeItem *>( item );
- QString searchUrl = scopeItem->entry()->search();
+ TQString searchUrl = scopeItem->entry()->search();
kdDebug() << "DoubleClick: " << searchUrl << endl;
emit searchResult( searchUrl );
}
-void SearchWidget::scopeClicked( QListViewItem * )
+void SearchWidget::scopeClicked( TQListViewItem * )
{
checkScope();
mScopeCombo->setCurrentItem( ScopeCustom );
}
-QString SearchWidget::scopeSelectionLabel( int id ) const
+TQString SearchWidget::scopeSelectionLabel( int id ) const
{
switch( id ) {
case ScopeCustom:
@@ -365,7 +365,7 @@ void SearchWidget::checkScope()
{
mScopeCount = 0;
- QListViewItemIterator it( mScopeListView );
+ TQListViewItemIterator it( mScopeListView );
while( it.current() ) {
if ( it.current()->rtti() == ScopeItem::rttiId() ) {
ScopeItem *item = static_cast<ScopeItem *>( it.current() );
diff --git a/khelpcenter/searchwidget.h b/khelpcenter/searchwidget.h
index 1200bcfab..158cfb3ad 100644
--- a/khelpcenter/searchwidget.h
+++ b/khelpcenter/searchwidget.h
@@ -21,7 +21,7 @@
#ifndef __searchwidget_h__
#define __searchwidget_h__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <dcopobject.h>
@@ -42,7 +42,7 @@ namespace KHC {
class ScopeItem;
class SearchEngine;
-class SearchWidget : public QWidget, public DCOPObject
+class SearchWidget : public TQWidget, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -51,18 +51,18 @@ class SearchWidget : public QWidget, public DCOPObject
ASYNC searchIndexUpdated(); // called from kcmhelpcenter
public:
- SearchWidget ( SearchEngine *, QWidget *parent = 0 );
+ SearchWidget ( SearchEngine *, TQWidget *parent = 0 );
~SearchWidget();
- QString method();
+ TQString method();
int pages();
- QString scope();
+ TQString scope();
- QListView *listView() { return mScopeListView; }
+ TQListView *listView() { return mScopeListView; }
enum { ScopeDefault, ScopeAll, ScopeNone, ScopeCustom, ScopeNum };
- QString scopeSelectionLabel( int ) const;
+ TQString scopeSelectionLabel( int ) const;
void readConfig( KConfig * );
void writeConfig( KConfig * );
@@ -72,7 +72,7 @@ class SearchWidget : public QWidget, public DCOPObject
SearchEngine *engine() const { return mEngine; }
signals:
- void searchResult( const QString &url );
+ void searchResult( const TQString &url );
void scopeCountChanged( int );
void showIndexDialog();
@@ -85,18 +85,18 @@ class SearchWidget : public QWidget, public DCOPObject
void checkScope();
protected slots:
- void scopeDoubleClicked( QListViewItem * );
- void scopeClicked( QListViewItem * );
+ void scopeDoubleClicked( TQListViewItem * );
+ void scopeClicked( TQListViewItem * );
private:
void loadLanguages();
SearchEngine *mEngine;
- QComboBox *mMethodCombo;
- QComboBox *mPagesCombo;
- QComboBox *mScopeCombo;
- QListView *mScopeListView;
+ TQComboBox *mMethodCombo;
+ TQComboBox *mPagesCombo;
+ TQComboBox *mScopeCombo;
+ TQListView *mScopeListView;
int mScopeCount;
};
diff --git a/khelpcenter/testmetainfo.cpp b/khelpcenter/testmetainfo.cpp
index 65ffd871c..5e0a4e208 100644
--- a/khelpcenter/testmetainfo.cpp
+++ b/khelpcenter/testmetainfo.cpp
@@ -1,4 +1,4 @@
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -14,7 +14,7 @@ using namespace KHC;
class MyTraverser : public DocEntryTraverser
{
public:
- MyTraverser( const QString &indent = "" ) : mIndent( indent ) {}
+ MyTraverser( const TQString &indent = "" ) : mIndent( indent ) {}
void process( DocEntry *entry )
{
@@ -34,7 +34,7 @@ class MyTraverser : public DocEntryTraverser
}
private:
- QString mIndent;
+ TQString mIndent;
};
class LinearTraverser : public DocEntryTraverser
@@ -61,7 +61,7 @@ class LinearTraverser : public DocEntryTraverser
class AsyncTraverser : public DocEntryTraverser
{
public:
- AsyncTraverser( const QString &indent = "" ) : mIndent( indent )
+ AsyncTraverser( const TQString &indent = "" ) : mIndent( indent )
{
// kdDebug() << "AsyncTraverser()" << endl;
}
@@ -83,7 +83,7 @@ class AsyncTraverser : public DocEntryTraverser
}
private:
- QString mIndent;
+ TQString mIndent;
};
int main(int argc,char **argv)
@@ -95,7 +95,7 @@ int main(int argc,char **argv)
kdDebug() << "Scanning Meta Info" << endl;
- QStringList langs;
+ TQStringList langs;
langs << "en";
// langs << "de";
diff --git a/khelpcenter/toc.cpp b/khelpcenter/toc.cpp
index 6b2beadc9..7bda95b8c 100644
--- a/khelpcenter/toc.cpp
+++ b/khelpcenter/toc.cpp
@@ -27,8 +27,8 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <sys/stat.h>
@@ -37,7 +37,7 @@ using namespace KHC;
class TOCItem : public NavigatorItem
{
public:
- TOCItem( TOC *parent, QListViewItem *parentItem, QListViewItem *after, const QString &text );
+ TOCItem( TOC *parent, TQListViewItem *parentItem, TQListViewItem *after, const TQString &text );
const TOC *toc() const { return m_toc; }
@@ -48,25 +48,25 @@ class TOCItem : public NavigatorItem
class TOCChapterItem : public TOCItem
{
public:
- TOCChapterItem( TOC *toc, NavigatorItem *parent, QListViewItem *after, const QString &title,
- const QString &name );
+ TOCChapterItem( TOC *toc, NavigatorItem *parent, TQListViewItem *after, const TQString &title,
+ const TQString &name );
- virtual QString url();
+ virtual TQString url();
private:
- QString m_name;
+ TQString m_name;
};
class TOCSectionItem : public TOCItem
{
public:
- TOCSectionItem( TOC *toc, TOCChapterItem *parent, QListViewItem *after, const QString &title,
- const QString &name );
+ TOCSectionItem( TOC *toc, TOCChapterItem *parent, TQListViewItem *after, const TQString &title,
+ const TQString &name );
- virtual QString url();
+ virtual TQString url();
private:
- QString m_name;
+ TQString m_name;
};
TOC::TOC( NavigatorItem *parentItem )
@@ -74,13 +74,13 @@ TOC::TOC( NavigatorItem *parentItem )
m_parentItem = parentItem;
}
-void TOC::build( const QString &file )
+void TOC::build( const TQString &file )
{
- QFileInfo fileInfo( file );
- QString fileName = fileInfo.absFilePath();
- const QStringList resourceDirs = KGlobal::dirs()->resourceDirs( "html" );
- QStringList::ConstIterator it = resourceDirs.begin();
- QStringList::ConstIterator end = resourceDirs.end();
+ TQFileInfo fileInfo( file );
+ TQString fileName = fileInfo.absFilePath();
+ const TQStringList resourceDirs = KGlobal::dirs()->resourceDirs( "html" );
+ TQStringList::ConstIterator it = resourceDirs.begin();
+ TQStringList::ConstIterator end = resourceDirs.end();
for ( ; it != end; ++it ) {
if ( fileName.startsWith( *it ) ) {
fileName.remove( 0, ( *it ).length() );
@@ -88,7 +88,7 @@ void TOC::build( const QString &file )
}
}
- QString cacheFile = fileName.replace( QDir::separator(), "__" );
+ TQString cacheFile = fileName.replace( TQDir::separator(), "__" );
m_cacheFile = locateLocal( "cache", "help/" + cacheFile );
m_sourceFile = file;
@@ -100,7 +100,7 @@ void TOC::build( const QString &file )
TOC::CacheStatus TOC::cacheStatus() const
{
- if ( !QFile::exists( m_cacheFile ) ||
+ if ( !TQFile::exists( m_cacheFile ) ||
sourceFileCTime() != cachedCTime() )
return NeedRebuild;
@@ -110,22 +110,22 @@ TOC::CacheStatus TOC::cacheStatus() const
int TOC::sourceFileCTime() const
{
struct stat stat_buf;
- stat( QFile::encodeName( m_sourceFile ).data(), &stat_buf );
+ stat( TQFile::encodeName( m_sourceFile ).data(), &stat_buf );
return stat_buf.st_ctime;
}
int TOC::cachedCTime() const
{
- QFile f( m_cacheFile );
+ TQFile f( m_cacheFile );
if ( !f.open( IO_ReadOnly ) )
return 0;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &f ) )
return 0;
- QDomComment timestamp = doc.documentElement().lastChild().toComment();
+ TQDomComment timestamp = doc.documentElement().lastChild().toComment();
return timestamp.data().stripWhiteSpace().toInt();
}
@@ -133,8 +133,8 @@ int TOC::cachedCTime() const
void TOC::buildCache()
{
KProcess *meinproc = new KProcess;
- connect( meinproc, SIGNAL( processExited( KProcess * ) ),
- this, SLOT( meinprocExited( KProcess * ) ) );
+ connect( meinproc, TQT_SIGNAL( processExited( KProcess * ) ),
+ this, TQT_SLOT( meinprocExited( KProcess * ) ) );
*meinproc << locate( "exe", "meinproc" );
*meinproc << "--stylesheet" << locate( "data", "khelpcenter/table-of-contents.xslt" );
@@ -153,20 +153,20 @@ void TOC::meinprocExited( KProcess *meinproc )
delete meinproc;
- QFile f( m_cacheFile );
+ TQFile f( m_cacheFile );
if ( !f.open( IO_ReadWrite ) )
return;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &f ) )
return;
- QDomComment timestamp = doc.createComment( QString::number( sourceFileCTime() ) );
+ TQDomComment timestamp = doc.createComment( TQString::number( sourceFileCTime() ) );
doc.documentElement().appendChild( timestamp );
f.at( 0 );
- QTextStream stream( &f );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( &f );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << doc.toString();
f.close();
@@ -176,33 +176,33 @@ void TOC::meinprocExited( KProcess *meinproc )
void TOC::fillTree()
{
- QFile f( m_cacheFile );
+ TQFile f( m_cacheFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &f ) )
return;
TOCChapterItem *chapItem = 0;
- QDomNodeList chapters = doc.documentElement().elementsByTagName( "chapter" );
+ TQDomNodeList chapters = doc.documentElement().elementsByTagName( "chapter" );
for ( unsigned int chapterCount = 0; chapterCount < chapters.count(); chapterCount++ ) {
- QDomElement chapElem = chapters.item( chapterCount ).toElement();
- QDomElement chapTitleElem = childElement( chapElem, QString::fromLatin1( "title" ) );
- QString chapTitle = chapTitleElem.text().simplifyWhiteSpace();
- QDomElement chapRefElem = childElement( chapElem, QString::fromLatin1( "anchor" ) );
- QString chapRef = chapRefElem.text().stripWhiteSpace();
+ TQDomElement chapElem = chapters.item( chapterCount ).toElement();
+ TQDomElement chapTitleElem = childElement( chapElem, TQString::fromLatin1( "title" ) );
+ TQString chapTitle = chapTitleElem.text().simplifyWhiteSpace();
+ TQDomElement chapRefElem = childElement( chapElem, TQString::fromLatin1( "anchor" ) );
+ TQString chapRef = chapRefElem.text().stripWhiteSpace();
chapItem = new TOCChapterItem( this, m_parentItem, chapItem, chapTitle, chapRef );
TOCSectionItem *sectItem = 0;
- QDomNodeList sections = chapElem.elementsByTagName( "section" );
+ TQDomNodeList sections = chapElem.elementsByTagName( "section" );
for ( unsigned int sectCount = 0; sectCount < sections.count(); sectCount++ ) {
- QDomElement sectElem = sections.item( sectCount ).toElement();
- QDomElement sectTitleElem = childElement( sectElem, QString::fromLatin1( "title" ) );
- QString sectTitle = sectTitleElem.text().simplifyWhiteSpace();
- QDomElement sectRefElem = childElement( sectElem, QString::fromLatin1( "anchor" ) );
- QString sectRef = sectRefElem.text().stripWhiteSpace();
+ TQDomElement sectElem = sections.item( sectCount ).toElement();
+ TQDomElement sectTitleElem = childElement( sectElem, TQString::fromLatin1( "title" ) );
+ TQString sectTitle = sectTitleElem.text().simplifyWhiteSpace();
+ TQDomElement sectRefElem = childElement( sectElem, TQString::fromLatin1( "anchor" ) );
+ TQString sectRef = sectRefElem.text().stripWhiteSpace();
sectItem = new TOCSectionItem( this, chapItem, sectItem, sectTitle, sectRef );
}
@@ -211,16 +211,16 @@ void TOC::fillTree()
m_parentItem->setOpen( true );
}
-QDomElement TOC::childElement( const QDomElement &element, const QString &name )
+TQDomElement TOC::childElement( const TQDomElement &element, const TQString &name )
{
- QDomElement e;
+ TQDomElement e;
for ( e = element.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement() )
if ( e.tagName() == name )
break;
return e;
}
-void TOC::slotItemSelected( QListViewItem *item )
+void TOC::slotItemSelected( TQListViewItem *item )
{
TOCItem *tocItem;
if ( ( tocItem = dynamic_cast<TOCItem *>( item ) ) )
@@ -229,15 +229,15 @@ void TOC::slotItemSelected( QListViewItem *item )
item->setOpen( !item->isOpen() );
}
-TOCItem::TOCItem( TOC *toc, QListViewItem *parentItem, QListViewItem *after, const QString &text )
+TOCItem::TOCItem( TOC *toc, TQListViewItem *parentItem, TQListViewItem *after, const TQString &text )
: NavigatorItem( new DocEntry( text ), parentItem, after )
{
setAutoDeleteDocEntry( true );
m_toc = toc;
}
-TOCChapterItem::TOCChapterItem( TOC *toc, NavigatorItem *parent, QListViewItem *after,
- const QString &title, const QString &name )
+TOCChapterItem::TOCChapterItem( TOC *toc, NavigatorItem *parent, TQListViewItem *after,
+ const TQString &title, const TQString &name )
: TOCItem( toc, parent, after, title ),
m_name( name )
{
@@ -245,13 +245,13 @@ TOCChapterItem::TOCChapterItem( TOC *toc, NavigatorItem *parent, QListViewItem *
entry()->setUrl(url());
}
-QString TOCChapterItem::url()
+TQString TOCChapterItem::url()
{
return "help:" + toc()->application() + "/" + m_name + ".html";
}
-TOCSectionItem::TOCSectionItem( TOC *toc, TOCChapterItem *parent, QListViewItem *after,
- const QString &title, const QString &name )
+TOCSectionItem::TOCSectionItem( TOC *toc, TOCChapterItem *parent, TQListViewItem *after,
+ const TQString &title, const TQString &name )
: TOCItem( toc, parent, after, title ),
m_name( name )
{
@@ -259,7 +259,7 @@ TOCSectionItem::TOCSectionItem( TOC *toc, TOCChapterItem *parent, QListViewItem
entry()->setUrl(url());
}
-QString TOCSectionItem::url()
+TQString TOCSectionItem::url()
{
if ( static_cast<TOCSectionItem *>( parent()->firstChild() ) == this )
return static_cast<TOCChapterItem *>( parent() )->url() + "#" + m_name;
diff --git a/khelpcenter/toc.h b/khelpcenter/toc.h
index 09971adbd..6d01fd2ba 100644
--- a/khelpcenter/toc.h
+++ b/khelpcenter/toc.h
@@ -22,9 +22,9 @@
#include "navigatoritem.h"
-#include <qdom.h>
-#include <qlistview.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqlistview.h>
+#include <tqobject.h>
class KProcess;
@@ -36,17 +36,17 @@ class TOC : public QObject
public:
TOC( NavigatorItem *parentItem );
- QString application() const { return m_application; }
- void setApplication( const QString &application ) { m_application = application; }
+ TQString application() const { return m_application; }
+ void setApplication( const TQString &application ) { m_application = application; }
public slots:
- void build( const QString &file );
+ void build( const TQString &file );
signals:
- void itemSelected( const QString &url );
+ void itemSelected( const TQString &url );
private slots:
- void slotItemSelected( QListViewItem *item );
+ void slotItemSelected( TQListViewItem *item );
void meinprocExited( KProcess *meinproc );
private:
@@ -55,13 +55,13 @@ class TOC : public QObject
CacheStatus cacheStatus() const;
int sourceFileCTime() const;
int cachedCTime() const;
- QDomElement childElement( const QDomElement &e, const QString &name );
+ TQDomElement childElement( const TQDomElement &e, const TQString &name );
void buildCache();
void fillTree();
- QString m_application;
- QString m_cacheFile;
- QString m_sourceFile;
+ TQString m_application;
+ TQString m_cacheFile;
+ TQString m_sourceFile;
NavigatorItem *m_parentItem;
};
diff --git a/khelpcenter/treebuilder.cpp b/khelpcenter/treebuilder.cpp
index e0320fadb..a9b4a0bb6 100644
--- a/khelpcenter/treebuilder.cpp
+++ b/khelpcenter/treebuilder.cpp
@@ -21,12 +21,12 @@
using namespace KHC;
-TreeBuilder::TreeBuilder( QObject *parent, const char *name )
- : QObject( parent, name )
+TreeBuilder::TreeBuilder( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
}
-void TreeBuilder::selectURL( const QString & )
+void TreeBuilder::selectURL( const TQString & )
{
}
diff --git a/khelpcenter/treebuilder.h b/khelpcenter/treebuilder.h
index 2ba2bd5c1..99516d1ec 100644
--- a/khelpcenter/treebuilder.h
+++ b/khelpcenter/treebuilder.h
@@ -20,7 +20,7 @@
#ifndef TREEBUILDER_H
#define TREEBUILDER_H
-#include "qobject.h"
+#include "tqobject.h"
#include <kurl.h>
@@ -32,12 +32,12 @@ class TreeBuilder : public QObject
{
Q_OBJECT
public:
- TreeBuilder( QObject *parent, const char *name = 0 );
+ TreeBuilder( TQObject *parent, const char *name = 0 );
virtual void build( NavigatorItem *item ) = 0;
public slots:
- virtual void selectURL( const QString &url );
+ virtual void selectURL( const TQString &url );
signals:
void urlSelected( const KURL &url );
diff --git a/khelpcenter/view.cpp b/khelpcenter/view.cpp
index 36a12c9ca..64e6238ed 100644
--- a/khelpcenter/view.cpp
+++ b/khelpcenter/view.cpp
@@ -15,13 +15,13 @@
#include <kpopupmenu.h>
#include <kstandarddirs.h>
-#include <qfileinfo.h>
-#include <qclipboard.h>
+#include <tqfileinfo.h>
+#include <tqclipboard.h>
using namespace KHC;
-View::View( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, KHTMLPart::GUIProfile prof, KActionCollection *col )
+View::View( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, KHTMLPart::GUIProfile prof, KActionCollection *col )
: KHTMLPart( parentWidget, widgetName, parent, name, prof ), mState( Docu ), mActionCollection(col)
{
setJScriptEnabled(false);
@@ -35,19 +35,19 @@ View::View( QWidget *parentWidget, const char *widgetName,
m_zoomStepping = 10;
- connect( this, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setTitle( const QString & ) ) );
- connect( this, SIGNAL( popupMenu( const QString &, const QPoint& ) ),
- this, SLOT( showMenu( const QString &, const QPoint& ) ) );
+ connect( this, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setTitle( const TQString & ) ) );
+ connect( this, TQT_SIGNAL( popupMenu( const TQString &, const TQPoint& ) ),
+ this, TQT_SLOT( showMenu( const TQString &, const TQPoint& ) ) );
- QString css = langLookup("common/kde-default.css");
+ TQString css = langLookup("common/kde-default.css");
if (!css.isEmpty())
{
- QFile css_file(css);
+ TQFile css_file(css);
if (css_file.open(IO_ReadOnly))
{
- QTextStream s(&css_file);
- QString stylesheet = s.read();
+ TQTextStream s(&css_file);
+ TQString stylesheet = s.read();
preloadStyleSheet("help:/common/kde-default.css", stylesheet);
}
}
@@ -76,14 +76,14 @@ bool View::openURL( const KURL &url )
return KHTMLPart::openURL( url );
}
-void View::saveState( QDataStream &stream )
+void View::saveState( TQDataStream &stream )
{
stream << mState;
if ( mState == Docu )
KHTMLPart::saveState( stream );
}
-void View::restoreState( QDataStream &stream )
+void View::restoreState( TQDataStream &stream )
{
stream >> mState;
if ( mState == Docu )
@@ -94,11 +94,11 @@ void View::restoreState( QDataStream &stream )
void View::showAboutPage()
{
- QString file = locate( "data", "khelpcenter/intro.html.in" );
+ TQString file = locate( "data", "khelpcenter/intro.html.in" );
if ( file.isEmpty() )
return;
- QFile f( file );
+ TQFile f( file );
if ( !f.open( IO_ReadOnly ) )
return;
@@ -107,9 +107,9 @@ void View::showAboutPage()
emit started( 0 );
- QTextStream t( &f );
+ TQTextStream t( &f );
- QString res = t.read();
+ TQString res = t.read();
res = res.arg( i18n("Conquer your Desktop!") )
.arg( langLookup( "khelpcenter/konq.css" ) )
@@ -143,29 +143,29 @@ void View::showAboutPage()
emit completed();
}
-QString View::langLookup( const QString &fname )
+TQString View::langLookup( const TQString &fname )
{
- QStringList search;
+ TQStringList search;
// assemble the local search paths
- const QStringList localDoc = KGlobal::dirs()->resourceDirs("html");
+ const TQStringList localDoc = KGlobal::dirs()->resourceDirs("html");
// look up the different languages
for (int id=localDoc.count()-1; id >= 0; --id)
{
- QStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = KGlobal::locale()->languageList();
langs.append( "en" );
langs.remove( "C" );
- QStringList::ConstIterator lang;
+ TQStringList::ConstIterator lang;
for (lang = langs.begin(); lang != langs.end(); ++lang)
- search.append(QString("%1%2/%3").arg(localDoc[id]).arg(*lang).arg(fname));
+ search.append(TQString("%1%2/%3").arg(localDoc[id]).arg(*lang).arg(fname));
}
// try to locate the file
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = search.begin(); it != search.end(); ++it)
{
- QFileInfo info(*it);
+ TQFileInfo info(*it);
if (info.exists() && info.isFile() && info.isReadable())
return *it;
@@ -174,7 +174,7 @@ QString View::langLookup( const QString &fname )
// css etc) then look in other languages first.
if ( ( *it ).endsWith( "docbook" ) )
{
- QString file = (*it).left((*it).findRev('/')) + "/index.docbook";
+ TQString file = (*it).left((*it).findRev('/')) + "/index.docbook";
info.setFile(file);
if (info.exists() && info.isFile() && info.isReadable())
{
@@ -183,10 +183,10 @@ QString View::langLookup( const QString &fname )
}
}
- return QString::null;
+ return TQString::null;
}
-void View::setTitle( const QString &title )
+void View::setTitle( const TQString &title )
{
mTitle = title;
}
@@ -199,7 +199,7 @@ void View::beginSearchResult()
mSearchResult = "";
}
-void View::writeSearchResult( const QString &str )
+void View::writeSearchResult( const TQString &str )
{
write( str );
mSearchResult += str;
@@ -243,7 +243,7 @@ void View::slotDecFontSizes()
setZoomFactor( zoomFactor() - m_zoomStepping );
}
-void View::showMenu( const QString& url, const QPoint& pos)
+void View::showMenu( const TQString& url, const TQPoint& pos)
{
KPopupMenu* pop = new KPopupMenu(view());
if (url.isEmpty())
@@ -266,7 +266,7 @@ void View::showMenu( const QString& url, const QPoint& pos)
}
else
{
- pop->insertItem(i18n("Copy Link Address"), this, SLOT(slotCopyLink()));
+ pop->insertItem(i18n("Copy Link Address"), this, TQT_SLOT(slotCopyLink()));
mCopyURL = completeURL(url).url();
}
@@ -276,7 +276,7 @@ void View::showMenu( const QString& url, const QPoint& pos)
void View::slotCopyLink()
{
- QApplication::clipboard()->setText(mCopyURL);
+ TQApplication::clipboard()->setText(mCopyURL);
}
bool View::prevPage(bool checkOnly)
@@ -322,25 +322,25 @@ bool View::nextPage(bool checkOnly)
return true;
}
-bool View::eventFilter( QObject *o, QEvent *e )
+bool View::eventFilter( TQObject *o, TQEvent *e )
{
- if ( e->type() != QEvent::KeyPress ||
+ if ( e->type() != TQEvent::KeyPress ||
htmlDocument().links().length() == 0 )
return KHTMLPart::eventFilter( o, e );
- QKeyEvent *ke = static_cast<QKeyEvent *>( e );
+ TQKeyEvent *ke = static_cast<TQKeyEvent *>( e );
if ( ke->state() & Qt::ShiftButton && ke->key() == Key_Space ) {
// If we're on the first page, it does not make sense to go back.
if ( baseURL().path().endsWith( "/index.html" ) )
return KHTMLPart::eventFilter( o, e );
- const QScrollBar * const scrollBar = view()->verticalScrollBar();
+ const TQScrollBar * const scrollBar = view()->verticalScrollBar();
if ( scrollBar->value() == scrollBar->minValue() ) {
if (prevPage())
return true;
}
} else if ( ke->key() == Key_Space ) {
- const QScrollBar * const scrollBar = view()->verticalScrollBar();
+ const TQScrollBar * const scrollBar = view()->verticalScrollBar();
if ( scrollBar->value() == scrollBar->maxValue() ) {
if (nextPage())
return true;
@@ -360,12 +360,12 @@ KURL View::urlFromLinkNode( const DOM::Node &n ) const
if ( !href.protocol().isNull() )
return href;
- QString path = baseURL().path();
+ TQString path = baseURL().path();
path.truncate( path.findRev( '/' ) + 1 );
path += href.url();
KURL url = baseURL();
- url.setRef( QString::null );
+ url.setRef( TQString::null );
url.setEncodedPathAndQuery( path );
return url;
diff --git a/khelpcenter/view.h b/khelpcenter/view.h
index 9eb1d86b7..3af2a15b8 100644
--- a/khelpcenter/view.h
+++ b/khelpcenter/view.h
@@ -20,26 +20,26 @@ class View : public KHTMLPart
{
Q_OBJECT
public:
- View( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, KHTMLPart::GUIProfile prof,
+ View( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, KHTMLPart::GUIProfile prof,
KActionCollection *col );
~View();
virtual bool openURL( const KURL &url );
- virtual void saveState( QDataStream &stream );
- virtual void restoreState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
enum State { Docu, About, Search };
int state() const { return mState; }
- QString title() const { return mTitle; }
+ TQString title() const { return mTitle; }
- static QString langLookup( const QString &fname );
+ static TQString langLookup( const TQString &fname );
void beginSearchResult();
- void writeSearchResult( const QString & );
+ void writeSearchResult( const TQString & );
void endSearchResult();
void beginInternal( const KURL & );
@@ -64,27 +64,27 @@ class View : public KHTMLPart
void searchResultCacheAvailable();
protected:
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
private slots:
- void setTitle( const QString &title );
- void showMenu( const QString& url, const QPoint& pos);
+ void setTitle( const TQString &title );
+ void showMenu( const TQString& url, const TQPoint& pos);
private:
void showAboutPage();
KURL urlFromLinkNode( const DOM::Node &n ) const;
int mState;
- QString mTitle;
+ TQString mTitle;
- QString mSearchResult;
+ TQString mSearchResult;
KURL mInternalUrl;
int m_zoomStepping;
Formatter *mFormatter;
KActionCollection *mActionCollection;
- QString mCopyURL;
+ TQString mCopyURL;
};
}