summaryrefslogtreecommitdiffstats
path: root/kmrml
diff options
context:
space:
mode:
Diffstat (limited to 'kmrml')
-rw-r--r--kmrml/kmrml/algorithmcombo.cpp8
-rw-r--r--kmrml/kmrml/algorithmcombo.h4
-rw-r--r--kmrml/kmrml/algorithmdialog.cpp56
-rw-r--r--kmrml/kmrml/algorithmdialog.h4
-rw-r--r--kmrml/kmrml/browser.cpp10
-rw-r--r--kmrml/kmrml/browser.h4
-rw-r--r--kmrml/kmrml/collectioncombo.cpp14
-rw-r--r--kmrml/kmrml/collectioncombo.h8
-rw-r--r--kmrml/kmrml/kcontrol/indexcleaner.cpp16
-rw-r--r--kmrml/kmrml/kcontrol/indexcleaner.h10
-rw-r--r--kmrml/kmrml/kcontrol/indexer.cpp46
-rw-r--r--kmrml/kmrml/kcontrol/indexer.h12
-rw-r--r--kmrml/kmrml/kcontrol/indextest.cpp8
-rw-r--r--kmrml/kmrml/kcontrol/indextest.h2
-rw-r--r--kmrml/kmrml/kcontrol/kcmkmrml.cpp36
-rw-r--r--kmrml/kmrml/kcontrol/kcmkmrml.h4
-rw-r--r--kmrml/kmrml/kcontrol/mainpage.cpp138
-rw-r--r--kmrml/kmrml/kcontrol/mainpage.h20
-rw-r--r--kmrml/kmrml/lib/kmrml_config.cpp62
-rw-r--r--kmrml/kmrml/lib/kmrml_config.h46
-rw-r--r--kmrml/kmrml/lib/mrml_shared.cpp220
-rw-r--r--kmrml/kmrml/lib/mrml_shared.h220
-rw-r--r--kmrml/kmrml/lib/mrml_utils.h2
-rw-r--r--kmrml/kmrml/lib/watcher_stub.cpp38
-rw-r--r--kmrml/kmrml/lib/watcher_stub.h22
-rw-r--r--kmrml/kmrml/loader.cpp18
-rw-r--r--kmrml/kmrml/loader.h18
-rw-r--r--kmrml/kmrml/mrml.cpp34
-rw-r--r--kmrml/kmrml/mrml.h28
-rw-r--r--kmrml/kmrml/mrml_creator.cpp36
-rw-r--r--kmrml/kmrml/mrml_creator.h20
-rw-r--r--kmrml/kmrml/mrml_elements.cpp98
-rw-r--r--kmrml/kmrml/mrml_elements.h148
-rw-r--r--kmrml/kmrml/mrml_part.cpp204
-rw-r--r--kmrml/kmrml/mrml_part.h60
-rw-r--r--kmrml/kmrml/mrml_view.cpp120
-rw-r--r--kmrml/kmrml/mrml_view.h68
-rw-r--r--kmrml/kmrml/mrmlsearch.cpp10
-rw-r--r--kmrml/kmrml/propertysheet.cpp26
-rw-r--r--kmrml/kmrml/propertysheet.h34
-rw-r--r--kmrml/kmrml/propertywidgets.cpp26
-rw-r--r--kmrml/kmrml/propertywidgets.h18
-rw-r--r--kmrml/kmrml/server/watcher.cpp50
-rw-r--r--kmrml/kmrml/server/watcher.h46
44 files changed, 1036 insertions, 1036 deletions
diff --git a/kmrml/kmrml/algorithmcombo.cpp b/kmrml/kmrml/algorithmcombo.cpp
index b22556df..a2db81d4 100644
--- a/kmrml/kmrml/algorithmcombo.cpp
+++ b/kmrml/kmrml/algorithmcombo.cpp
@@ -25,12 +25,12 @@ using namespace KMrml;
// ### copycat of CollectionCombo... moc can't handle templates unfortunately..
// could use base-class MrmlElement....
-AlgorithmCombo::AlgorithmCombo( QWidget *parent, const char *name )
+AlgorithmCombo::AlgorithmCombo( TQWidget *parent, const char *name )
: KComboBox( false, parent, name ),
m_algorithms( 0L )
{
- connect( this, SIGNAL( activated( const QString& ) ),
- SLOT( slotActivated( const QString& ) ));
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotActivated( const TQString& ) ));
}
AlgorithmCombo::~AlgorithmCombo()
@@ -57,7 +57,7 @@ Algorithm AlgorithmCombo::current() const
return m_algorithms->findByName( currentText() );
}
-void AlgorithmCombo::slotActivated( const QString& name )
+void AlgorithmCombo::slotActivated( const TQString& name )
{
Algorithm coll = m_algorithms->findByName( name );
emit selected( coll );
diff --git a/kmrml/kmrml/algorithmcombo.h b/kmrml/kmrml/algorithmcombo.h
index 3e151933..8138b47a 100644
--- a/kmrml/kmrml/algorithmcombo.h
+++ b/kmrml/kmrml/algorithmcombo.h
@@ -31,7 +31,7 @@ namespace KMrml
Q_OBJECT
public:
- AlgorithmCombo( QWidget *parent, const char *name = 0 );
+ AlgorithmCombo( TQWidget *parent, const char *name = 0 );
~AlgorithmCombo();
void setAlgorithms( const AlgorithmList * algorithms );
@@ -43,7 +43,7 @@ namespace KMrml
void selected( const Algorithm& );
private slots:
- void slotActivated( const QString& );
+ void slotActivated( const TQString& );
private:
const AlgorithmList *m_algorithms;
diff --git a/kmrml/kmrml/algorithmdialog.cpp b/kmrml/kmrml/algorithmdialog.cpp
index cb62fd84..bf3ed895 100644
--- a/kmrml/kmrml/algorithmdialog.cpp
+++ b/kmrml/kmrml/algorithmdialog.cpp
@@ -20,12 +20,12 @@
#include "algorithmcombo.h"
#include "collectioncombo.h"
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
#include <klocale.h>
@@ -34,45 +34,45 @@ using namespace KMrml;
class ScrollView : public QScrollView
{
public:
- ScrollView(QWidget* parent = 0, const char* name = 0)
- : QScrollView(parent, name)
+ ScrollView(TQWidget* parent = 0, const char* name = 0)
+ : TQScrollView(parent, name)
{
- setFrameStyle(QFrame::NoFrame);
- m_frame = new QFrame(viewport(), "ScrollView::m_frame");
- m_frame->setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
+ m_frame = new TQFrame(viewport(), "ScrollView::m_frame");
+ m_frame->setFrameStyle(TQFrame::NoFrame);
addChild(m_frame, 0, 0);
};
- QFrame* frame() {return m_frame;};
+ TQFrame* frame() {return m_frame;};
protected:
- virtual void viewportResizeEvent(QResizeEvent* ev)
+ virtual void viewportResizeEvent(TQResizeEvent* ev)
{
- QScrollView::viewportResizeEvent(ev);
+ TQScrollView::viewportResizeEvent(ev);
m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()),
kMax(m_frame->sizeHint().height(), ev->size().height()));
};
private:
- QFrame* m_frame;
+ TQFrame* m_frame;
};
AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms,
const CollectionList& collections,
const Collection& currentColl,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, false, i18n("Configure Query Algorithms"),
Ok | Cancel, Ok, false ),
m_allAlgorithms( algorithms ),
m_collections( collections )
{
- QWidget *box = makeMainWidget();
+ TQWidget *box = makeMainWidget();
- QVBoxLayout *mainLayout = new QVBoxLayout( box, 0, KDialog::spacingHint(),
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( box, 0, KDialog::spacingHint(),
"mainLayout");
- QHBoxLayout *collectionLayout = new QHBoxLayout( 0L, 0, 0, "coll layout");
- collectionLayout->addWidget( new QLabel( i18n("Collection: "), box ));
+ TQHBoxLayout *collectionLayout = new TQHBoxLayout( 0L, 0, 0, "coll layout");
+ collectionLayout->addWidget( new TQLabel( i18n("Collection: "), box ));
m_collectionCombo = new CollectionCombo( box, "collection combo" );
m_collectionCombo->setCollections( &m_collections );
@@ -81,26 +81,26 @@ AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms,
mainLayout->addLayout( collectionLayout );
mainLayout->addSpacing( 14 );
- QHBox *algoHLayout = new QHBox( box );
- (void) new QLabel( i18n("Algorithm: "), algoHLayout);
+ TQHBox *algoHLayout = new TQHBox( box );
+ (void) new TQLabel( i18n("Algorithm: "), algoHLayout);
m_algoCombo = new AlgorithmCombo( algoHLayout, "algo combo" );
- QVGroupBox *groupBox = new QVGroupBox( box, "groupBox" );
+ TQVGroupBox *groupBox = new TQVGroupBox( box, "groupBox" );
mainLayout->addWidget( groupBox );
algoHLayout->raise();
ScrollView *scrollView = new ScrollView( groupBox, "scroll view" );
m_view = scrollView->frame();
- QVBoxLayout *viewLayout = new QVBoxLayout( scrollView );
+ TQVBoxLayout *viewLayout = new TQVBoxLayout( scrollView );
viewLayout->setSpacing( KDialog::spacingHint() );
collectionChanged( currentColl );
- connect( m_algoCombo, SIGNAL( selected( const Algorithm& ) ),
- SLOT( initGUI( const Algorithm& ) ));
- connect( m_collectionCombo, SIGNAL( selected( const Collection& ) ),
- SLOT( collectionChanged( const Collection& ) ));
+ connect( m_algoCombo, TQT_SIGNAL( selected( const Algorithm& ) ),
+ TQT_SLOT( initGUI( const Algorithm& ) ));
+ connect( m_collectionCombo, TQT_SIGNAL( selected( const Collection& ) ),
+ TQT_SLOT( collectionChanged( const Collection& ) ));
algoHLayout->adjustSize();
mainLayout->activate();
diff --git a/kmrml/kmrml/algorithmdialog.h b/kmrml/kmrml/algorithmdialog.h
index 740a95bf..be119dbd 100644
--- a/kmrml/kmrml/algorithmdialog.h
+++ b/kmrml/kmrml/algorithmdialog.h
@@ -36,7 +36,7 @@ namespace KMrml
public:
AlgorithmDialog( const AlgorithmList&, const CollectionList&,
const Collection& currentColl,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
~AlgorithmDialog();
private slots:
@@ -52,7 +52,7 @@ namespace KMrml
CollectionCombo *m_collectionCombo;
AlgorithmCombo *m_algoCombo;
- QFrame *m_view;
+ TQFrame *m_view;
};
}
diff --git a/kmrml/kmrml/browser.cpp b/kmrml/kmrml/browser.cpp
index f2453243..57ac0085 100644
--- a/kmrml/kmrml/browser.cpp
+++ b/kmrml/kmrml/browser.cpp
@@ -19,7 +19,7 @@
#include "browser.h"
#include "mrml_part.h"
-#include <qscrollview.h>
+#include <tqscrollview.h>
using namespace KMrml;
@@ -35,14 +35,14 @@ Browser::~Browser()
}
-void Browser::saveState( QDataStream& stream )
+void Browser::saveState( TQDataStream& stream )
{
// BrowserExtension::saveState( stream );
m_part->saveState( stream );
}
-void Browser::restoreState( QDataStream& stream )
+void Browser::restoreState( TQDataStream& stream )
{
// BrowserExtension::restoreState( stream );
// ### BrowserExtension::restoreState() calls openURL() at the end (arghh).
@@ -52,12 +52,12 @@ void Browser::restoreState( QDataStream& stream )
int Browser::xOffset()
{
- return static_cast<QScrollView*>( m_part->widget())->contentsX();
+ return static_cast<TQScrollView*>( m_part->widget())->contentsX();
}
int Browser::yOffset()
{
- return static_cast<QScrollView*>( m_part->widget())->contentsY();
+ return static_cast<TQScrollView*>( m_part->widget())->contentsY();
}
#include "browser.moc"
diff --git a/kmrml/kmrml/browser.h b/kmrml/kmrml/browser.h
index 11661ed5..71466160 100644
--- a/kmrml/kmrml/browser.h
+++ b/kmrml/kmrml/browser.h
@@ -33,8 +33,8 @@ namespace KMrml
Browser( MrmlPart *parent, const char *name );
~Browser();
- virtual void saveState( QDataStream& stream );
- virtual void restoreState( QDataStream& stream );
+ virtual void saveState( TQDataStream& stream );
+ virtual void restoreState( TQDataStream& stream );
virtual int xOffset();
virtual int yOffset();
diff --git a/kmrml/kmrml/collectioncombo.cpp b/kmrml/kmrml/collectioncombo.cpp
index b45d7ebf..7238305e 100644
--- a/kmrml/kmrml/collectioncombo.cpp
+++ b/kmrml/kmrml/collectioncombo.cpp
@@ -22,12 +22,12 @@
using namespace KMrml;
-CollectionCombo::CollectionCombo( QWidget *parent, const char *name )
+CollectionCombo::CollectionCombo( TQWidget *parent, const char *name )
: KComboBox( false, parent, name ),
m_collections( 0L )
{
- connect( this, SIGNAL( activated( const QString& ) ),
- SLOT( slotActivated( const QString& ) ));
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotActivated( const TQString& ) ));
}
CollectionCombo::~CollectionCombo()
@@ -54,13 +54,13 @@ Collection CollectionCombo::current() const
return m_collections->findByName( currentText() );
}
-void CollectionCombo::slotActivated( const QString& name )
+void CollectionCombo::slotActivated( const TQString& name )
{
Collection coll = m_collections->findByName( name );
emit selected( coll );
}
-QDataStream& KMrml::operator<<( QDataStream& stream,
+TQDataStream& KMrml::operator<<( TQDataStream& stream,
const CollectionCombo& combo )
{
int count = combo.count();
@@ -72,13 +72,13 @@ QDataStream& KMrml::operator<<( QDataStream& stream,
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, CollectionCombo& combo )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, CollectionCombo& combo )
{
combo.clear();
int count;
stream >> count;
- QString text;
+ TQString text;
for ( int i = 0; i < count; i++ )
{
stream >> text;
diff --git a/kmrml/kmrml/collectioncombo.h b/kmrml/kmrml/collectioncombo.h
index 3ca67a64..c39686a4 100644
--- a/kmrml/kmrml/collectioncombo.h
+++ b/kmrml/kmrml/collectioncombo.h
@@ -31,7 +31,7 @@ namespace KMrml
Q_OBJECT
public:
- CollectionCombo( QWidget *parent, const char *name = 0 );
+ CollectionCombo( TQWidget *parent, const char *name = 0 );
~CollectionCombo();
void setCollections( const CollectionList * collections );
@@ -43,14 +43,14 @@ namespace KMrml
void selected( const Collection& );
private slots:
- void slotActivated( const QString& );
+ void slotActivated( const TQString& );
private:
const CollectionList *m_collections;
};
- QDataStream& operator<<( QDataStream& stream, const CollectionCombo& );
- QDataStream& operator>>( QDataStream& stream, CollectionCombo& );
+ TQDataStream& operator<<( TQDataStream& stream, const CollectionCombo& );
+ TQDataStream& operator>>( TQDataStream& stream, CollectionCombo& );
}
diff --git a/kmrml/kmrml/kcontrol/indexcleaner.cpp b/kmrml/kmrml/kcontrol/indexcleaner.cpp
index 5f5eea93..56e606aa 100644
--- a/kmrml/kmrml/kcontrol/indexcleaner.cpp
+++ b/kmrml/kmrml/kcontrol/indexcleaner.cpp
@@ -13,10 +13,10 @@
using namespace KMrmlConfig;
-IndexCleaner::IndexCleaner( const QStringList& dirs,
+IndexCleaner::IndexCleaner( const TQStringList& dirs,
const KMrml::Config *config,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_dirs( dirs ),
m_config( config ),
m_process( 0L )
@@ -66,19 +66,19 @@ void IndexCleaner::startNext()
m_process = new KProcess();
m_process->setUseShell( true );
#endif
- connect( m_process, SIGNAL( processExited( KProcess * )),
- SLOT( slotExited( KProcess * ) ));
+ connect( m_process, TQT_SIGNAL( processExited( KProcess * )),
+ TQT_SLOT( slotExited( KProcess * ) ));
- QString cmd = m_config->removeCollectionCommandLine();
+ TQString cmd = m_config->removeCollectionCommandLine();
- QString dir = m_dirs.first();
+ TQString dir = m_dirs.first();
m_dirs.pop_front();
int index = cmd.find( "%d" );
if ( index != -1 )
cmd.replace( index, 2, QUOTE( dir ) );
else // no %d? What else can we do?
- cmd.append( QString::fromLatin1(" ") + QUOTE( dir ) );
+ cmd.append( TQString::fromLatin1(" ") + QUOTE( dir ) );
*m_process << cmd;
diff --git a/kmrml/kmrml/kcontrol/indexcleaner.h b/kmrml/kmrml/kcontrol/indexcleaner.h
index 0ddcaac4..92dcdc22 100644
--- a/kmrml/kmrml/kcontrol/indexcleaner.h
+++ b/kmrml/kmrml/kcontrol/indexcleaner.h
@@ -8,8 +8,8 @@
#ifndef INDEXCLEANER_H
#define INDEXCLEANER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KProcess;
@@ -25,8 +25,8 @@ namespace KMrmlConfig
Q_OBJECT
public:
- IndexCleaner( const QStringList& dirs, const KMrml::Config *config,
- QObject *parent = 0, const char *name = 0 );
+ IndexCleaner( const TQStringList& dirs, const KMrml::Config *config,
+ TQObject *parent = 0, const char *name = 0 );
~IndexCleaner();
void start();
@@ -42,7 +42,7 @@ namespace KMrmlConfig
int m_stepSize;
void startNext();
- QStringList m_dirs;
+ TQStringList m_dirs;
const KMrml::Config *m_config;
KProcess *m_process;
};
diff --git a/kmrml/kmrml/kcontrol/indexer.cpp b/kmrml/kmrml/kcontrol/indexer.cpp
index a3bb6b7d..f4c4b108 100644
--- a/kmrml/kmrml/kcontrol/indexer.cpp
+++ b/kmrml/kmrml/kcontrol/indexer.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
using namespace KMrmlConfig;
Indexer::Indexer( const KMrml::Config* config,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_config( config ),
m_dirCount( 0 )
{
@@ -46,10 +46,10 @@ Indexer::Indexer( const KMrml::Config* config,
m_process->setUseShell( true );
#endif
m_process->setEnvironment( "LC_ALL", "C" );
- connect( m_process, SIGNAL( processExited( KProcess * )),
- SLOT( processFinished( KProcess * )));
- connect( m_process, SIGNAL( readReady( KProcIO * )),
- SLOT( slotCanRead( KProcIO * )) );
+ connect( m_process, TQT_SIGNAL( processExited( KProcess * )),
+ TQT_SLOT( processFinished( KProcess * )));
+ connect( m_process, TQT_SIGNAL( readReady( KProcIO * )),
+ TQT_SLOT( slotCanRead( KProcIO * )) );
}
Indexer::~Indexer()
@@ -57,7 +57,7 @@ Indexer::~Indexer()
delete m_process;
}
-void Indexer::startIndexing( const QStringList& dirs )
+void Indexer::startIndexing( const TQStringList& dirs )
{
if ( m_process->isRunning() )
return;
@@ -91,11 +91,11 @@ void Indexer::processNext()
m_process->resetAll();
- QString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace();
+ TQString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace();
// in the commandline, replace %d with the directory to process and
// %t with the thumbnail dir
- int index = cmd.find( "%d" ); // ### QFile::encodeName()?
+ int index = cmd.find( "%d" ); // ### TQFile::encodeName()?
if ( index != -1 )
cmd.replace( index, 2, QUOTE( m_currentDir ) );
index = cmd.find( "%t" );
@@ -106,8 +106,8 @@ void Indexer::processNext()
#if KDE_VERSION >= 306
*m_process << cmd;
#else
- QStringList params = QStringList::split( ' ', cmd );
- QStringList::Iterator it = params.begin();
+ TQStringList params = TQStringList::split( ' ', cmd );
+ TQStringList::Iterator it = params.begin();
for ( ; it != params.end(); ++it )
*m_process << *it;
#endif
@@ -118,11 +118,11 @@ void Indexer::processNext()
void Indexer::slotCanRead( KProcIO *proc )
{
- static const QString& sprogress = KGlobal::staticQString("PROGRESS: ");
- static const QString& r1 = /* PROGRESS: 1 of 6 done (15%) */
+ static const TQString& sprogress = KGlobal::staticQString("PROGRESS: ");
+ static const TQString& r1 = /* PROGRESS: 1 of 6 done (15%) */
KGlobal::staticQString( "(\\d+) of (\\d+) done \\((\\d+)%\\)" );
- QString line;
+ TQString line;
int bytes = -1;
while ( (bytes = proc->readln( line )) != -1 )
{
@@ -146,13 +146,13 @@ void Indexer::slotCanRead( KProcIO *proc )
// case 1: image processing, below 99%
if ( line.at( line.length() -1 ) == ')' )
{
- QRegExp regxp( r1 );
+ TQRegExp regxp( r1 );
int pos = regxp.search( line );
if ( pos > -1 )
{
- QString currentFile = regxp.cap( 1 );
- QString numFiles = regxp.cap( 2 );
- QString percent = regxp.cap( 3 );
+ TQString currentFile = regxp.cap( 1 );
+ TQString numFiles = regxp.cap( 2 );
+ TQString percent = regxp.cap( 3 );
// qDebug( "current: %s, number: %s, percent: %s", currentFile.latin1(), numFiles.latin1(), percent.latin1());
bool ok = false;
@@ -160,7 +160,7 @@ void Indexer::slotCanRead( KProcIO *proc )
if ( ok )
{
uint dirsLeft = m_dirs.count();
- QString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles );
+ TQString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles );
emit progress( perc, message );
}
}
@@ -170,13 +170,13 @@ void Indexer::slotCanRead( KProcIO *proc )
// case 2: file writing, 99% or done, 100%
else
{
- QString percent = line.left( line.length() - 1 );
+ TQString percent = line.left( line.length() - 1 );
bool ok = false;
int number = percent.toInt( &ok );
if ( ok )
{
- QString message = (number == 100) ?
+ TQString message = (number == 100) ?
i18n("Finished.") : i18n("Writing data...");
emit progress( number, message );
}
diff --git a/kmrml/kmrml/kcontrol/indexer.h b/kmrml/kmrml/kcontrol/indexer.h
index 97335a70..290c9937 100644
--- a/kmrml/kmrml/kcontrol/indexer.h
+++ b/kmrml/kmrml/kcontrol/indexer.h
@@ -19,7 +19,7 @@
#ifndef INDEXER_H
#define INDEXER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kmrml_config.h>
@@ -34,14 +34,14 @@ namespace KMrmlConfig
public:
Indexer( const KMrml::Config *config,
- QObject *parent = 0L, const char *name = 0 );
+ TQObject *parent = 0L, const char *name = 0 );
~Indexer();
- void startIndexing( const QStringList& dirs );
+ void startIndexing( const TQStringList& dirs );
void stop();
signals:
- void progress( int percent, const QString& text );
+ void progress( int percent, const TQString& text );
void finished( int returnCode );
@@ -56,8 +56,8 @@ namespace KMrmlConfig
const KMrml::Config *m_config;
uint m_dirCount;
- QStringList m_dirs;
- QString m_currentDir;
+ TQStringList m_dirs;
+ TQString m_currentDir;
};
diff --git a/kmrml/kmrml/kcontrol/indextest.cpp b/kmrml/kmrml/kcontrol/indextest.cpp
index 161ca798..fdaffcde 100644
--- a/kmrml/kmrml/kcontrol/indextest.cpp
+++ b/kmrml/kmrml/kcontrol/indextest.cpp
@@ -12,9 +12,9 @@ IndexTest::IndexTest()
{
KMrml::Config *config = new KMrml::Config( KGlobal::config() );
Indexer *indexer = new Indexer( *config, this );
- connect( indexer, SIGNAL( finished( bool )), SLOT( slotFinished( bool )));
- connect( indexer, SIGNAL( progress( int, const QString& )),
- SLOT( slotProgress( int, const QString& )));
+ connect( indexer, TQT_SIGNAL( finished( bool )), TQT_SLOT( slotFinished( bool )));
+ connect( indexer, TQT_SIGNAL( progress( int, const TQString& )),
+ TQT_SLOT( slotProgress( int, const TQString& )));
indexer->startIndexing( "/home/gis/testcoll" );
}
@@ -29,7 +29,7 @@ void IndexTest::slotFinished( bool success )
qDebug("##### FINISHED: %i", success );
}
-void IndexTest::slotProgress( int percent, const QString& message )
+void IndexTest::slotProgress( int percent, const TQString& message )
{
qDebug("--- progress: %i: %s", percent, message.latin1());
}
diff --git a/kmrml/kmrml/kcontrol/indextest.h b/kmrml/kmrml/kcontrol/indextest.h
index 5f85f5f1..15cda2ce 100644
--- a/kmrml/kmrml/kcontrol/indextest.h
+++ b/kmrml/kmrml/kcontrol/indextest.h
@@ -18,7 +18,7 @@ public:
private slots:
void slotFinished( bool success );
- void slotProgress( int percent, const QString& message );
+ void slotProgress( int percent, const TQString& message );
};
diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.cpp b/kmrml/kmrml/kcontrol/kcmkmrml.cpp
index 43e46b03..d2b60fc0 100644
--- a/kmrml/kmrml/kcontrol/kcmkmrml.cpp
+++ b/kmrml/kmrml/kcontrol/kcmkmrml.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -40,10 +40,10 @@ using namespace KMrmlConfig;
static const int COL_FILENAME = 1;
-typedef KGenericFactory<KCMKMrml, QWidget> MrmlFactory;
+typedef KGenericFactory<KCMKMrml, TQWidget> MrmlFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kmrml, MrmlFactory("kmrml") )
-KCMKMrml::KCMKMrml(QWidget *parent, const char *name, const QStringList & ):
+KCMKMrml::KCMKMrml(TQWidget *parent, const char *name, const TQStringList & ):
KCModule(MrmlFactory::instance(), parent, name)
{
KAboutData* ab = new KAboutData(
@@ -58,13 +58,13 @@ KCMKMrml::KCMKMrml(QWidget *parent, const char *name, const QStringList & ):
ab->addAuthor( "Carsten Pfeiffer", 0, "pfeiffer@kde.org" );
setAboutData( ab );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() );
m_mainPage = new MainPage( this, "main page" );
layout->addWidget( m_mainPage );
- connect( m_mainPage, SIGNAL( changed( bool ) ), SIGNAL( changed( bool )));
+ connect( m_mainPage, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool )));
checkGiftInstallation();
}
@@ -75,26 +75,26 @@ KCMKMrml::~KCMKMrml()
void KCMKMrml::checkGiftInstallation()
{
- QString giftExe = KGlobal::dirs()->findExe( "gift" );
- QString giftAddCollectionExe = KGlobal::dirs()->findExe( "gift-add-collection.pl" );
+ TQString giftExe = KGlobal::dirs()->findExe( "gift" );
+ TQString giftAddCollectionExe = KGlobal::dirs()->findExe( "gift-add-collection.pl" );
if ( giftExe.isEmpty() || giftAddCollectionExe.isEmpty() )
{
- QString errorMessage =
+ TQString errorMessage =
i18n("Cannot find executables \"gift\" and/or \"gift-add-collection.pl\" in the PATH.\n"
"Please install the \"GNU Image Finding Tool\".");
KMessageBox::error( this, errorMessage );
m_mainPage->hide();
- QLabel *errorLabel = new QLabel( errorMessage, this );
- errorLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
- KURLLabel *urlLabel = new KURLLabel( "http://www.gnu.org/software/gift", QString::null, this );
- urlLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& )), kapp, SLOT( invokeBrowser( const QString& )) );
- QLayout *l = layout();
- l->addItem( new QSpacerItem( 0, 10, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ TQLabel *errorLabel = new TQLabel( errorMessage, this );
+ errorLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
+ KURLLabel *urlLabel = new KURLLabel( "http://www.gnu.org/software/gift", TQString::null, this );
+ urlLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& )), kapp, TQT_SLOT( invokeBrowser( const TQString& )) );
+ TQLayout *l = layout();
+ l->addItem( new TQSpacerItem( 0, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
l->add( errorLabel );
l->add( urlLabel );
- l->addItem( new QSpacerItem( 0, 10, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ l->addItem( new TQSpacerItem( 0, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
errorLabel->show();
}
else
@@ -128,7 +128,7 @@ void KCMKMrml::save()
emit changed( false );
}
-QString KCMKMrml::quickHelp() const
+TQString KCMKMrml::quickHelp() const
{
return i18n("<h1>Image Index</h1>"
"KDE can make use of the GNU Image Finding Tool (GIFT) to "
diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.h b/kmrml/kmrml/kcontrol/kcmkmrml.h
index b0bb2443..306e55f0 100644
--- a/kmrml/kmrml/kcontrol/kcmkmrml.h
+++ b/kmrml/kmrml/kcontrol/kcmkmrml.h
@@ -33,13 +33,13 @@ namespace KMrmlConfig
Q_OBJECT
public:
- KCMKMrml(QWidget *parent, const char *name, const QStringList &);
+ KCMKMrml(TQWidget *parent, const char *name, const TQStringList &);
virtual ~KCMKMrml();
virtual void defaults();
virtual void load();
virtual void save();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private:
void checkGiftInstallation();
diff --git a/kmrml/kmrml/kcontrol/mainpage.cpp b/kmrml/kmrml/kcontrol/mainpage.cpp
index 514b9cf6..c4e65ac3 100644
--- a/kmrml/kmrml/kcontrol/mainpage.cpp
+++ b/kmrml/kmrml/kcontrol/mainpage.cpp
@@ -16,12 +16,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qsizepolicy.h>
-#include <qtooltip.h>
-#include <qwidget.h>
-#include <qvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqsizepolicy.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
+#include <tqvgroupbox.h>
#include <kcombobox.h>
#include <kdialog.h>
@@ -50,8 +50,8 @@
using namespace KMrmlConfig;
-MainPage::MainPage( QWidget *parent, const char *name )
- : QVBox( parent, name ),
+MainPage::MainPage( TQWidget *parent, const char *name )
+ : TQVBox( parent, name ),
m_indexer( 0L ),
m_indexCleaner( 0L ),
m_progressDialog( 0L ),
@@ -61,12 +61,12 @@ MainPage::MainPage( QWidget *parent, const char *name )
m_config = new KMrml::Config();
setSpacing( KDialog::spacingHint() );
- QVGroupBox *gBox = new QVGroupBox( i18n("Indexing Server Configuration"),
+ TQVGroupBox *gBox = new TQVGroupBox( i18n("Indexing Server Configuration"),
this );
m_serverWidget = new ServerConfigWidget( gBox, "server config widget" );
- QString tip = i18n("Hostname of the Indexing Server");
- QToolTip::add( m_serverWidget->m_hostLabel, tip );
- QToolTip::add( m_serverWidget->m_hostCombo, tip );
+ TQString tip = i18n("Hostname of the Indexing Server");
+ TQToolTip::add( m_serverWidget->m_hostLabel, tip );
+ TQToolTip::add( m_serverWidget->m_hostCombo, tip );
m_serverWidget->m_portInput->setRange( 0, MAX_PORT_VALUE );
@@ -74,8 +74,8 @@ MainPage::MainPage( QWidget *parent, const char *name )
KURLRequester *requester = new KURLRequester( this, "dir requester" );
requester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
requester->setURL( KGlobalSettings::documentPath() );
- connect( requester, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( slotRequesterClicked( KURLRequester * )));
+ connect( requester, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( slotRequesterClicked( KURLRequester * )));
m_listBox = new KEditListBox( i18n("Folders to Be Indexed" ),
requester->customEditor(), this, "listbox",
@@ -87,30 +87,30 @@ MainPage::MainPage( QWidget *parent, const char *name )
KEditListBox::Add | KEditListBox::Remove );
#endif
- connect( m_listBox, SIGNAL( changed() ), SLOT( slotDirectoriesChanged() ));
- connect( m_serverWidget->m_hostCombo, SIGNAL( textChanged(const QString&)),
- SLOT( slotHostChanged() ));
- connect( m_serverWidget->m_portInput, SIGNAL( valueChanged( int )),
- SLOT( slotPortChanged( int ) ));
- connect ( m_serverWidget->m_useAuth, SIGNAL( toggled(bool) ),
- SLOT( slotUseAuthChanged( bool ) ));
- connect( m_serverWidget->m_userEdit, SIGNAL( textChanged( const QString&)),
- SLOT( slotUserChanged( const QString& ) ));
- connect( m_serverWidget->m_passEdit, SIGNAL( textChanged( const QString&)),
- SLOT( slotPassChanged( const QString& ) ));
-
- connect( m_serverWidget->m_addButton, SIGNAL( clicked() ),
- SLOT( slotAddClicked() ));
- connect( m_serverWidget->m_removeButton, SIGNAL( clicked() ),
- SLOT( slotRemoveClicked() ));
-
- connect( m_serverWidget->m_hostCombo, SIGNAL( activated( const QString& )),
- SLOT( slotHostActivated( const QString& )));
- connect( m_serverWidget->m_hostCombo, SIGNAL( returnPressed() ),
- SLOT( slotAddClicked() ));
-
- connect( m_serverWidget->m_autoPort, SIGNAL( toggled( bool ) ),
- SLOT( slotAutoPortChanged( bool ) ));
+ connect( m_listBox, TQT_SIGNAL( changed() ), TQT_SLOT( slotDirectoriesChanged() ));
+ connect( m_serverWidget->m_hostCombo, TQT_SIGNAL( textChanged(const TQString&)),
+ TQT_SLOT( slotHostChanged() ));
+ connect( m_serverWidget->m_portInput, TQT_SIGNAL( valueChanged( int )),
+ TQT_SLOT( slotPortChanged( int ) ));
+ connect ( m_serverWidget->m_useAuth, TQT_SIGNAL( toggled(bool) ),
+ TQT_SLOT( slotUseAuthChanged( bool ) ));
+ connect( m_serverWidget->m_userEdit, TQT_SIGNAL( textChanged( const TQString&)),
+ TQT_SLOT( slotUserChanged( const TQString& ) ));
+ connect( m_serverWidget->m_passEdit, TQT_SIGNAL( textChanged( const TQString&)),
+ TQT_SLOT( slotPassChanged( const TQString& ) ));
+
+ connect( m_serverWidget->m_addButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotAddClicked() ));
+ connect( m_serverWidget->m_removeButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotRemoveClicked() ));
+
+ connect( m_serverWidget->m_hostCombo, TQT_SIGNAL( activated( const TQString& )),
+ TQT_SLOT( slotHostActivated( const TQString& )));
+ connect( m_serverWidget->m_hostCombo, TQT_SIGNAL( returnPressed() ),
+ TQT_SLOT( slotAddClicked() ));
+
+ connect( m_serverWidget->m_autoPort, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotAutoPortChanged( bool ) ));
m_serverWidget->m_hostCombo->setTrapReturnKey( true );
m_serverWidget->m_hostCombo->setFocus();
@@ -162,9 +162,9 @@ void MainPage::save()
m_config->addSettings( m_settings );
m_config->setDefaultHost( m_settings.host );
- QStringList indexDirs = m_listBox->items();
- QStringList oldIndexDirs = m_config->indexableDirectories();
- QStringList removedDirs = difference( oldIndexDirs, indexDirs );
+ TQStringList indexDirs = m_listBox->items();
+ TQStringList oldIndexDirs = m_config->indexableDirectories();
+ TQStringList removedDirs = difference( oldIndexDirs, indexDirs );
m_config->setIndexableDirectories( indexDirs );
if ( indexDirs.isEmpty() )
@@ -181,14 +181,14 @@ void MainPage::save()
processIndexDirs( removedDirs );
}
-QStringList MainPage::difference( const QStringList& oldIndexDirs,
- const QStringList& newIndexDirs ) const
+TQStringList MainPage::difference( const TQStringList& oldIndexDirs,
+ const TQStringList& newIndexDirs ) const
{
- QStringList result;
+ TQStringList result;
- QString slash = QString::fromLatin1("/");
- QStringList::ConstIterator oldIt = oldIndexDirs.begin();
- QString oldDir, newDir;
+ TQString slash = TQString::fromLatin1("/");
+ TQStringList::ConstIterator oldIt = oldIndexDirs.begin();
+ TQString oldDir, newDir;
for ( ; oldIt != oldIndexDirs.end(); oldIt++ )
{
@@ -198,7 +198,7 @@ QStringList MainPage::difference( const QStringList& oldIndexDirs,
while ( oldDir.endsWith( slash ) ) // remove slashes
oldDir.remove( oldDir.length() - 1, 1 );
- QStringList::ConstIterator newIt = newIndexDirs.begin();
+ TQStringList::ConstIterator newIt = newIndexDirs.begin();
for ( ; newIt != newIndexDirs.end(); newIt++ )
{
newDir = *newIt;
@@ -234,7 +234,7 @@ void MainPage::initFromSettings( const KMrml::ServerSettings& settings )
m_locked = false;
}
-void MainPage::slotHostActivated( const QString& host )
+void MainPage::slotHostActivated( const TQString& host )
{
// implicitly save the current settings when another host was chosen
m_config->addSettings( m_settings );
@@ -244,7 +244,7 @@ void MainPage::slotHostActivated( const QString& host )
void MainPage::slotHostChanged()
{
- QString host = m_serverWidget->m_hostCombo->currentText();
+ TQString host = m_serverWidget->m_hostCombo->currentText();
m_listBox->setEnabled( (host == "localhost") );
KMrml::ServerSettings settings = m_config->settingsForHost( host );
@@ -264,7 +264,7 @@ void MainPage::slotUseAuthChanged( bool enable )
changed();
}
-void MainPage::slotUserChanged( const QString& user )
+void MainPage::slotUserChanged( const TQString& user )
{
if ( m_locked )
return;
@@ -273,7 +273,7 @@ void MainPage::slotUserChanged( const QString& user )
changed();
}
-void MainPage::slotPassChanged( const QString& pass )
+void MainPage::slotPassChanged( const TQString& pass )
{
if ( m_locked )
return;
@@ -314,7 +314,7 @@ void MainPage::slotRequesterClicked( KURLRequester *requester )
void MainPage::slotAddClicked()
{
- QString host = m_serverWidget->m_hostCombo->currentText();
+ TQString host = m_serverWidget->m_hostCombo->currentText();
m_settings.host = host;
m_config->addSettings( m_settings );
@@ -326,7 +326,7 @@ void MainPage::slotAddClicked()
void MainPage::slotRemoveClicked()
{
- QString host = m_serverWidget->m_hostCombo->currentText();
+ TQString host = m_serverWidget->m_hostCombo->currentText();
if ( host.isEmpty() ) // should never happen
return;
@@ -340,7 +340,7 @@ void MainPage::slotRemoveClicked()
void MainPage::enableWidgetsFor( const KMrml::ServerSettings& settings )
{
- QString host = settings.host;
+ TQString host = settings.host;
bool enableWidgets = (m_config->hosts().findIndex( host ) > -1);
m_serverWidget->m_addButton->setEnabled(!enableWidgets && !host.isEmpty());
m_serverWidget->m_removeButton->setEnabled( enableWidgets &&
@@ -370,7 +370,7 @@ void MainPage::slotDirectoriesChanged()
changed();
}
-void MainPage::processIndexDirs( const QStringList& removeDirs )
+void MainPage::processIndexDirs( const TQStringList& removeDirs )
{
// ### how to remove indexed directories?
if ( !m_performIndexing ||
@@ -389,8 +389,8 @@ void MainPage::processIndexDirs( const QStringList& removeDirs )
true );
m_progressDialog->setAutoClose( false );
m_progressDialog->setMinimumWidth( 300 );
- connect( m_progressDialog, SIGNAL( cancelClicked() ),
- SLOT( slotCancelIndexing() ));
+ connect( m_progressDialog, TQT_SIGNAL( cancelClicked() ),
+ TQT_SLOT( slotCancelIndexing() ));
// argh -- don't automatically show the dialog
m_progressDialog->setMinimumDuration( INT_MAX );
@@ -398,10 +398,10 @@ void MainPage::processIndexDirs( const QStringList& removeDirs )
if ( !removeDirs.isEmpty() )
{
m_indexCleaner = new IndexCleaner( removeDirs, m_config, this );
- connect( m_indexCleaner, SIGNAL( advance( int ) ),
- m_progressDialog->progressBar(), SLOT( advance( int ) ));
- connect( m_indexCleaner, SIGNAL( finished() ),
- SLOT( slotMaybeIndex() ) );
+ connect( m_indexCleaner, TQT_SIGNAL( advance( int ) ),
+ m_progressDialog->progressBar(), TQT_SLOT( advance( int ) ));
+ connect( m_indexCleaner, TQT_SIGNAL( finished() ),
+ TQT_SLOT( slotMaybeIndex() ) );
m_indexCleaner->start();
}
else
@@ -438,15 +438,15 @@ void MainPage::slotMaybeIndex()
// do the indexing
m_indexer = new Indexer( m_config, this, "Indexer" );
- connect( m_indexer, SIGNAL( progress( int, const QString& )),
- SLOT( slotIndexingProgress( int, const QString& ) ));
- connect( m_indexer, SIGNAL( finished( int )),
- SLOT( slotIndexingFinished( int ) ));
+ connect( m_indexer, TQT_SIGNAL( progress( int, const TQString& )),
+ TQT_SLOT( slotIndexingProgress( int, const TQString& ) ));
+ connect( m_indexer, TQT_SIGNAL( finished( int )),
+ TQT_SLOT( slotIndexingFinished( int ) ));
m_indexer->startIndexing( m_config->indexableDirectories() );
}
-void MainPage::slotIndexingProgress( int percent, const QString& message )
+void MainPage::slotIndexingProgress( int percent, const TQString& message )
{
m_progressDialog->progressBar()->setValue( percent );
m_progressDialog->setLabel( message );
@@ -456,14 +456,14 @@ void MainPage::slotIndexingFinished( int returnCode )
{
if ( returnCode != 0 )
{
- QString syserr;
+ TQString syserr;
if ( returnCode == 127 )
syserr = i18n("Is the \"GNU Image Finding Tool\" properly installed?");
else
{
char *err = strerror( returnCode );
if ( err )
- syserr = QString::fromLocal8Bit( err );
+ syserr = TQString::fromLocal8Bit( err );
else
syserr = i18n("Unknown error: %1").arg( returnCode );
}
diff --git a/kmrml/kmrml/kcontrol/mainpage.h b/kmrml/kmrml/kcontrol/mainpage.h
index e91b4168..8000aea9 100644
--- a/kmrml/kmrml/kcontrol/mainpage.h
+++ b/kmrml/kmrml/kcontrol/mainpage.h
@@ -19,11 +19,11 @@
#ifndef MAINPAGE_H
#define MAINPAGE_H
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kmrml_config.h>
-class QCheckBox;
+class TQCheckBox;
class KComboBox;
class KEditListBox;
class KIntNumInput;
@@ -48,7 +48,7 @@ namespace KMrmlConfig
Q_OBJECT
public:
- MainPage( QWidget *parent, const char *name );
+ MainPage( TQWidget *parent, const char *name );
~MainPage();
void resetDefaults();
@@ -63,20 +63,20 @@ namespace KMrmlConfig
void slotRequesterClicked( KURLRequester * );
void slotHostChanged();
void slotUseAuthChanged( bool );
- void slotUserChanged( const QString& );
- void slotPassChanged( const QString& );
+ void slotUserChanged( const TQString& );
+ void slotPassChanged( const TQString& );
void slotPortChanged( int );
void slotAutoPortChanged( bool );
void slotAddClicked();
void slotRemoveClicked();
- void slotHostActivated( const QString& );
+ void slotHostActivated( const TQString& );
void slotDirectoriesChanged();
void slotMaybeIndex();
- void slotIndexingProgress( int percent, const QString& message );
+ void slotIndexingProgress( int percent, const TQString& message );
void slotIndexingFinished( int returnCode );
void slotCancelIndexing();
@@ -85,10 +85,10 @@ namespace KMrmlConfig
void enableWidgetsFor( const KMrml::ServerSettings& settings );
void initFromSettings( const KMrml::ServerSettings& settings );
- void processIndexDirs( const QStringList& removedDirs );
+ void processIndexDirs( const TQStringList& removedDirs );
- QStringList difference( const QStringList& oldIndexDirs,
- const QStringList& newIndexDirs ) const;
+ TQStringList difference( const TQStringList& oldIndexDirs,
+ const TQStringList& newIndexDirs ) const;
ServerConfigWidget *m_serverWidget;
KEditListBox *m_listBox;
diff --git a/kmrml/kmrml/lib/kmrml_config.cpp b/kmrml/kmrml/lib/kmrml_config.cpp
index a88e8404..6358971d 100644
--- a/kmrml/kmrml/lib/kmrml_config.cpp
+++ b/kmrml/kmrml/lib/kmrml_config.cpp
@@ -16,9 +16,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -101,10 +101,10 @@ bool Config::sync()
// KIO::SlaveConfig::self()->reset();
}
-void Config::setDefaultHost( const QString& host )
+void Config::setDefaultHost( const TQString& host )
{
m_defaultHost = host.isEmpty() ?
- QString::fromLatin1(DEFAULT_HOST) : host;
+ TQString::fromLatin1(DEFAULT_HOST) : host;
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "Default Host", m_defaultHost );
@@ -115,7 +115,7 @@ ServerSettings Config::settingsForLocalHost() const
return settingsForHost( "localhost" );
}
-ServerSettings Config::settingsForHost( const QString& host ) const
+ServerSettings Config::settingsForHost( const TQString& host ) const
{
KConfigGroup config( m_config, settingsGroup( host ) );
ServerSettings settings;
@@ -136,7 +136,7 @@ ServerSettings Config::settingsForHost( const QString& host ) const
void Config::addSettings( const ServerSettings& settings )
{
- QString host = settings.host;
+ TQString host = settings.host;
if ( m_hostList.find( host ) == m_hostList.end() )
m_hostList.append( host );
@@ -152,7 +152,7 @@ void Config::addSettings( const ServerSettings& settings )
m_config->writeEntry( "Perform Authentication", settings.useAuth );
}
-bool Config::removeSettings( const QString& host )
+bool Config::removeSettings( const TQString& host )
{
bool success = m_config->deleteGroup( settingsGroup( host ) );
if ( success )
@@ -164,22 +164,22 @@ bool Config::removeSettings( const QString& host )
return success;
}
-QStringList Config::indexableDirectories() const
+TQStringList Config::indexableDirectories() const
{
m_config->setGroup( CONFIG_GROUP );
return m_config->readListEntry( "Indexable Directories" );
}
-void Config::setIndexableDirectories( const QStringList& dirs )
+void Config::setIndexableDirectories( const TQStringList& dirs )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "Indexable Directories", dirs );
}
-QString Config::addCollectionCommandLine() const
+TQString Config::addCollectionCommandLine() const
{
m_config->setGroup( CONFIG_GROUP );
- QString cmd = m_config->readEntry( "AddCollection Commandline",
+ TQString cmd = m_config->readEntry( "AddCollection Commandline",
DEFAULT_ADDCOLLECTION_CMD );
int index = cmd.find( "%h" );
if ( index != -1 )
@@ -187,21 +187,21 @@ QString Config::addCollectionCommandLine() const
index = cmd.find( "%e" );
if ( index != -1 )
- cmd.replace( index, 2, QTextCodec::codecForLocale()->mimeName() );
+ cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() );
return cmd;
}
-void Config::setAddCollectionCommandLine( const QString& cmd )
+void Config::setAddCollectionCommandLine( const TQString& cmd )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "AddCollection Commandline", cmd );
}
-QString Config::removeCollectionCommandLine() const
+TQString Config::removeCollectionCommandLine() const
{
m_config->setGroup( CONFIG_GROUP );
- QString cmd = m_config->readEntry( "RemoveCollection Commandline",
+ TQString cmd = m_config->readEntry( "RemoveCollection Commandline",
DEFAULT_REMOVECOLLECTION_CMD );
int index = cmd.find( "%h" );
if ( index != -1 )
@@ -209,23 +209,23 @@ QString Config::removeCollectionCommandLine() const
index = cmd.find( "%e" );
if ( index != -1 )
- cmd.replace( index, 2, QTextCodec::codecForLocale()->mimeName() );
+ cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() );
return cmd;
}
-void Config::setRemoveCollectionCommandLine( const QString& cmd )
+void Config::setRemoveCollectionCommandLine( const TQString& cmd )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "RemoveCollection Commandline", cmd );
}
-QString Config::mrmldCommandline() const
+TQString Config::mrmldCommandline() const
{
ServerSettings settings = settingsForLocalHost();
m_config->setGroup( CONFIG_GROUP );
- QString cmd = m_config->readEntry( "MrmmlDaemon Commandline",
+ TQString cmd = m_config->readEntry( "MrmmlDaemon Commandline",
settings.autoPort ?
DEFAULT_MRMLD_CMD_AUTOPORT :
DEFAULT_MRMLD_CMD );
@@ -234,8 +234,8 @@ QString Config::mrmldCommandline() const
int index = cmd.find( "%p" );
if ( index != -1 )
{
- QString port = settings.autoPort ?
- QString::null : QString::number( settings.configuredPort );
+ TQString port = settings.autoPort ?
+ TQString::null : TQString::number( settings.configuredPort );
cmd.replace( index, 2, port );
}
index = cmd.find( "%d" );
@@ -249,17 +249,17 @@ QString Config::mrmldCommandline() const
return cmd;
}
-QString Config::mrmldDataDir()
+TQString Config::mrmldDataDir()
{
- QString dir = KGlobal::dirs()->saveLocation( "data",
+ TQString dir = KGlobal::dirs()->saveLocation( "data",
"kmrml/mrmld-data/" );
if ( dir.isEmpty() ) // fallback
- dir = QDir::homeDirPath() + "/";
+ dir = TQDir::homeDirPath() + "/";
return dir;
}
-void Config::setMrmldCommandLine( const QString& cmd )
+void Config::setMrmldCommandLine( const TQString& cmd )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "MrmmlDaemon Commandline", cmd );
@@ -275,9 +275,9 @@ ServerSettings::ServerSettings()
{
}
-ServerSettings::ServerSettings( const QString& host, unsigned short int port,
+ServerSettings::ServerSettings( const TQString& host, unsigned short int port,
bool autoPort, bool useAuth,
- const QString& user, const QString& pass )
+ const TQString& user, const TQString& pass )
{
this->host = host;
this->configuredPort = port;
@@ -316,11 +316,11 @@ unsigned short int ServerSettings::port() const
{
if ( autoPort )
{
- QString portsFile = Config::mrmldDataDir() + "gift-port.txt";
- QFile file( portsFile );
+ TQString portsFile = Config::mrmldDataDir() + "gift-port.txt";
+ TQFile file( portsFile );
if ( file.open( IO_ReadOnly ) )
{
- QString line;
+ TQString line;
(void) file.readLine( line, 6 );
// qDebug("**** read: %s", line.latin1());
diff --git a/kmrml/kmrml/lib/kmrml_config.h b/kmrml/kmrml/lib/kmrml_config.h
index 3b6baa40..2208030a 100644
--- a/kmrml/kmrml/lib/kmrml_config.h
+++ b/kmrml/kmrml/lib/kmrml_config.h
@@ -21,7 +21,7 @@
class KConfig;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
namespace KMrml
@@ -30,18 +30,18 @@ namespace KMrml
{
public:
ServerSettings();
- ServerSettings(const QString& host, unsigned short int port,
+ ServerSettings(const TQString& host, unsigned short int port,
bool autoPort, bool useAuth, const
- QString& user, const QString& pass);
+ TQString& user, const TQString& pass);
// does NOT set the port in the KURL object, if autoPort is selected
// kio_mrml is going to determine itself (via ServerSettings::port()).
// This deuglifies the mrml:/ url a bit (no port is shown)
KURL getUrl() const;
- QString host;
- QString user;
- QString pass;
+ TQString host;
+ TQString user;
+ TQString pass;
unsigned short int configuredPort;
bool autoPort :1; // only possible with host == localhost
bool useAuth :1;
@@ -68,52 +68,52 @@ namespace KMrml
}
ServerSettings settingsForLocalHost() const;
- ServerSettings settingsForHost( const QString& host ) const;
+ ServerSettings settingsForHost( const TQString& host ) const;
- void setDefaultHost( const QString& host );
+ void setDefaultHost( const TQString& host );
/**
* Indexed by the hostname -- ensures there are no dupes
*/
void addSettings( const ServerSettings& settings );
- bool removeSettings( const QString& host );
+ bool removeSettings( const TQString& host );
- QStringList hosts() const { return m_hostList; }
+ TQStringList hosts() const { return m_hostList; }
/**
* The list of indexable directories -- only applicable to "localhost"
*/
- QStringList indexableDirectories() const;
- void setIndexableDirectories( const QStringList& dirs );
+ TQStringList indexableDirectories() const;
+ void setIndexableDirectories( const TQStringList& dirs );
- QString addCollectionCommandLine() const;
- void setAddCollectionCommandLine( const QString& cmd );
+ TQString addCollectionCommandLine() const;
+ void setAddCollectionCommandLine( const TQString& cmd );
- QString removeCollectionCommandLine() const;
- void setRemoveCollectionCommandLine( const QString& cmd );
+ TQString removeCollectionCommandLine() const;
+ void setRemoveCollectionCommandLine( const TQString& cmd );
- void setMrmldCommandLine( const QString& cmd );
- QString mrmldCommandline() const;
+ void setMrmldCommandLine( const TQString& cmd );
+ TQString mrmldCommandline() const;
// e.g. Wolfgang needs this :)
bool serverStartedIndividually() const {
return m_serverStartedIndividually;
}
- static QString mrmldDataDir();
+ static TQString mrmldDataDir();
private:
void init();
- QString settingsGroup( const QString& host ) const
+ TQString settingsGroup( const TQString& host ) const
{
- return QString::fromLatin1( "SettingsFor: " ).append( host );
+ return TQString::fromLatin1( "SettingsFor: " ).append( host );
}
bool m_serverStartedIndividually;
- QString m_defaultHost;
- QStringList m_hostList;
+ TQString m_defaultHost;
+ TQStringList m_hostList;
KConfig *m_config;
KConfig *m_ownConfig;
diff --git a/kmrml/kmrml/lib/mrml_shared.cpp b/kmrml/kmrml/lib/mrml_shared.cpp
index 0c5b692b..3e7d6d95 100644
--- a/kmrml/kmrml/lib/mrml_shared.cpp
+++ b/kmrml/kmrml/lib/mrml_shared.cpp
@@ -20,65 +20,65 @@
#include "mrml_shared.h"
// mrml stuff
-const QString * MrmlShared::m_sessionId = 0L;
-const QString * MrmlShared::m_transactionId = 0L;
-const QString * MrmlShared::m_algorithm = 0L;
-const QString * MrmlShared::m_algorithmId = 0L;
-const QString * MrmlShared::m_algorithmName = 0L;
-const QString * MrmlShared::m_algorithmList = 0L;
-const QString * MrmlShared::m_algorithmType = 0L;
-const QString * MrmlShared::m_collectionId = 0L;
-const QString * MrmlShared::m_collectionList = 0L;
-const QString * MrmlShared::m_collection = 0L;
-const QString * MrmlShared::m_collectionName = 0L;
-const QString * MrmlShared::m_queryParadigm = 0L;
-const QString * MrmlShared::m_queryParadigmList = 0L;
-const QString * MrmlShared::m_configureSession = 0L;
-
-const QString * MrmlShared::m_propertySheet = 0L;
-const QString * MrmlShared::m_propertySheetId = 0L;
-const QString * MrmlShared::m_propertySheetType = 0L;
-const QString * MrmlShared::m_sendName = 0L;
-const QString * MrmlShared::m_sendType = 0L;
-const QString * MrmlShared::m_sendValue = 0L;
-const QString * MrmlShared::m_maxSubsetSize = 0L;
-const QString * MrmlShared::m_minSubsetSize = 0L;
-const QString * MrmlShared::m_caption = 0L;
-const QString * MrmlShared::m_from = 0L;
-const QString * MrmlShared::m_to = 0L;
-const QString * MrmlShared::m_step = 0L;
-const QString * MrmlShared::m_sendBooleanInverted = 0L;
-
-const QString * MrmlShared::m_element = 0L;
-const QString * MrmlShared::m_attribute = 0L;
-const QString * MrmlShared::m_attributeName = 0L;
-const QString * MrmlShared::m_attributeValue = 0L;
-const QString * MrmlShared::m_children = 0L;
-const QString * MrmlShared::m_none = 0L;
-
-const QString * MrmlShared::m_multiSet = 0L;
-const QString * MrmlShared::m_subset = 0L;
-const QString * MrmlShared::m_setElement = 0L;
-const QString * MrmlShared::m_boolean = 0L;
-const QString * MrmlShared::m_numeric = 0L;
-const QString * MrmlShared::m_textual = 0L;
-const QString * MrmlShared::m_panel = 0L;
-const QString * MrmlShared::m_clone = 0L;
-const QString * MrmlShared::m_reference = 0L;
-
-const QString * MrmlShared::m_visibility = 0L;
-const QString * MrmlShared::m_visible = 0L;
-const QString * MrmlShared::m_invisible = 0L;
-const QString * MrmlShared::m_popup = 0L;
-// const QString * MrmlShared::m_ = 0L;
+const TQString * MrmlShared::m_sessionId = 0L;
+const TQString * MrmlShared::m_transactionId = 0L;
+const TQString * MrmlShared::m_algorithm = 0L;
+const TQString * MrmlShared::m_algorithmId = 0L;
+const TQString * MrmlShared::m_algorithmName = 0L;
+const TQString * MrmlShared::m_algorithmList = 0L;
+const TQString * MrmlShared::m_algorithmType = 0L;
+const TQString * MrmlShared::m_collectionId = 0L;
+const TQString * MrmlShared::m_collectionList = 0L;
+const TQString * MrmlShared::m_collection = 0L;
+const TQString * MrmlShared::m_collectionName = 0L;
+const TQString * MrmlShared::m_queryParadigm = 0L;
+const TQString * MrmlShared::m_queryParadigmList = 0L;
+const TQString * MrmlShared::m_configureSession = 0L;
+
+const TQString * MrmlShared::m_propertySheet = 0L;
+const TQString * MrmlShared::m_propertySheetId = 0L;
+const TQString * MrmlShared::m_propertySheetType = 0L;
+const TQString * MrmlShared::m_sendName = 0L;
+const TQString * MrmlShared::m_sendType = 0L;
+const TQString * MrmlShared::m_sendValue = 0L;
+const TQString * MrmlShared::m_maxSubsetSize = 0L;
+const TQString * MrmlShared::m_minSubsetSize = 0L;
+const TQString * MrmlShared::m_caption = 0L;
+const TQString * MrmlShared::m_from = 0L;
+const TQString * MrmlShared::m_to = 0L;
+const TQString * MrmlShared::m_step = 0L;
+const TQString * MrmlShared::m_sendBooleanInverted = 0L;
+
+const TQString * MrmlShared::m_element = 0L;
+const TQString * MrmlShared::m_attribute = 0L;
+const TQString * MrmlShared::m_attributeName = 0L;
+const TQString * MrmlShared::m_attributeValue = 0L;
+const TQString * MrmlShared::m_children = 0L;
+const TQString * MrmlShared::m_none = 0L;
+
+const TQString * MrmlShared::m_multiSet = 0L;
+const TQString * MrmlShared::m_subset = 0L;
+const TQString * MrmlShared::m_setElement = 0L;
+const TQString * MrmlShared::m_boolean = 0L;
+const TQString * MrmlShared::m_numeric = 0L;
+const TQString * MrmlShared::m_textual = 0L;
+const TQString * MrmlShared::m_panel = 0L;
+const TQString * MrmlShared::m_clone = 0L;
+const TQString * MrmlShared::m_reference = 0L;
+
+const TQString * MrmlShared::m_visibility = 0L;
+const TQString * MrmlShared::m_visible = 0L;
+const TQString * MrmlShared::m_invisible = 0L;
+const TQString * MrmlShared::m_popup = 0L;
+// const TQString * MrmlShared::m_ = 0L;
// meta-data
-const QString * MrmlShared::m_mrml_data = 0L;
+const TQString * MrmlShared::m_mrml_data = 0L;
// kio_mrml tasks
-const QString * MrmlShared::m_kio_task = 0L;
-const QString * MrmlShared::m_kio_initialize = 0L;
-const QString * MrmlShared::m_kio_startQuery = 0L;
+const TQString * MrmlShared::m_kio_task = 0L;
+const TQString * MrmlShared::m_kio_initialize = 0L;
+const TQString * MrmlShared::m_kio_startQuery = 0L;
int MrmlShared::s_references = 0;
@@ -108,65 +108,65 @@ bool MrmlShared::deref()
void MrmlShared::init()
{
- m_sessionId = new QString ( "session-id" ) ;
- m_transactionId = new QString ( "transaction-id" ) ;
- m_algorithm = new QString ( "algorithm" ) ;
- m_algorithmId = new QString ( "algorithm-id" ) ;
- m_algorithmName = new QString ( "algorithm-name" ) ;
- m_algorithmList = new QString ( "algorithm-list" ) ;
- m_algorithmType = new QString ( "algorithm-type" ) ;
- m_collectionId = new QString ( "collection-id" ) ;
- m_collectionList = new QString ( "collection-list" ) ;
- m_collection = new QString ( "collection" ) ;
- m_collectionName = new QString ( "collection-name" ) ;
- m_queryParadigm = new QString ( "query-paradigm" ) ;
- m_queryParadigmList = new QString ( "query-paradigm-list" ) ;
- m_configureSession = new QString ( "configure-session" ) ;
-
- m_propertySheet = new QString ( "property-sheet" ) ;
- m_propertySheetId = new QString ( "property-sheet-id" ) ;
- m_propertySheetType = new QString ( "property-sheet-type" ) ;
- m_sendName = new QString ( "send-name" ) ;
- m_sendType = new QString ( "send-type" ) ;
- m_sendValue = new QString ( "send-value" ) ;
- m_maxSubsetSize = new QString ( "maxsubsetsize" ) ;
- m_minSubsetSize = new QString ( "minsubsetsize" ) ;
- m_caption = new QString ( "caption" ) ;
- m_from = new QString ( "from" ) ;
- m_to = new QString ( "to" ) ;
- m_step = new QString ( "step" ) ;
- m_sendBooleanInverted = new QString ( "send-boolean-inverted" ) ;
-
- m_element = new QString ( "element" ) ;
- m_attribute = new QString ( "attribute" ) ;
- m_attributeName = new QString ( "attribute-name" ) ;
- m_attributeValue = new QString ( "attribute-value" ) ;
- m_children = new QString ( "children" ) ;
- m_none = new QString ( "none" ) ;
-
- m_multiSet = new QString ( "multi-set" ) ;
- m_subset = new QString ( "subset" ) ;
- m_setElement = new QString ( "set-element" ) ;
- m_boolean = new QString ( "boolean" ) ;
- m_numeric = new QString ( "numeric" ) ;
- m_textual = new QString ( "textual" ) ;
- m_panel = new QString ( "panel" ) ;
- m_clone = new QString ( "clone" ) ;
- m_reference = new QString ( "reference" ) ;
-
- m_visibility = new QString ( "visibility" ) ;
- m_visible = new QString ( "visible" ) ;
- m_invisible = new QString ( "invisible" ) ;
- m_popup = new QString ( "popup" ) ;
-// m_ = new QString ( "" ) ;
+ m_sessionId = new TQString ( "session-id" ) ;
+ m_transactionId = new TQString ( "transaction-id" ) ;
+ m_algorithm = new TQString ( "algorithm" ) ;
+ m_algorithmId = new TQString ( "algorithm-id" ) ;
+ m_algorithmName = new TQString ( "algorithm-name" ) ;
+ m_algorithmList = new TQString ( "algorithm-list" ) ;
+ m_algorithmType = new TQString ( "algorithm-type" ) ;
+ m_collectionId = new TQString ( "collection-id" ) ;
+ m_collectionList = new TQString ( "collection-list" ) ;
+ m_collection = new TQString ( "collection" ) ;
+ m_collectionName = new TQString ( "collection-name" ) ;
+ m_queryParadigm = new TQString ( "query-paradigm" ) ;
+ m_queryParadigmList = new TQString ( "query-paradigm-list" ) ;
+ m_configureSession = new TQString ( "configure-session" ) ;
+
+ m_propertySheet = new TQString ( "property-sheet" ) ;
+ m_propertySheetId = new TQString ( "property-sheet-id" ) ;
+ m_propertySheetType = new TQString ( "property-sheet-type" ) ;
+ m_sendName = new TQString ( "send-name" ) ;
+ m_sendType = new TQString ( "send-type" ) ;
+ m_sendValue = new TQString ( "send-value" ) ;
+ m_maxSubsetSize = new TQString ( "maxsubsetsize" ) ;
+ m_minSubsetSize = new TQString ( "minsubsetsize" ) ;
+ m_caption = new TQString ( "caption" ) ;
+ m_from = new TQString ( "from" ) ;
+ m_to = new TQString ( "to" ) ;
+ m_step = new TQString ( "step" ) ;
+ m_sendBooleanInverted = new TQString ( "send-boolean-inverted" ) ;
+
+ m_element = new TQString ( "element" ) ;
+ m_attribute = new TQString ( "attribute" ) ;
+ m_attributeName = new TQString ( "attribute-name" ) ;
+ m_attributeValue = new TQString ( "attribute-value" ) ;
+ m_children = new TQString ( "children" ) ;
+ m_none = new TQString ( "none" ) ;
+
+ m_multiSet = new TQString ( "multi-set" ) ;
+ m_subset = new TQString ( "subset" ) ;
+ m_setElement = new TQString ( "set-element" ) ;
+ m_boolean = new TQString ( "boolean" ) ;
+ m_numeric = new TQString ( "numeric" ) ;
+ m_textual = new TQString ( "textual" ) ;
+ m_panel = new TQString ( "panel" ) ;
+ m_clone = new TQString ( "clone" ) ;
+ m_reference = new TQString ( "reference" ) ;
+
+ m_visibility = new TQString ( "visibility" ) ;
+ m_visible = new TQString ( "visible" ) ;
+ m_invisible = new TQString ( "invisible" ) ;
+ m_popup = new TQString ( "popup" ) ;
+// m_ = new TQString ( "" ) ;
// meta-data
- m_mrml_data = new QString ( "mrml_data" ) ;
+ m_mrml_data = new TQString ( "mrml_data" ) ;
// kio_mrml tasks
- m_kio_task = new QString ( "kio_task" ) ;
- m_kio_initialize = new QString ( "kio_initialize" ) ;
- m_kio_startQuery = new QString ( "kio_startQuery" ) ;
+ m_kio_task = new TQString ( "kio_task" ) ;
+ m_kio_initialize = new TQString ( "kio_initialize" ) ;
+ m_kio_startQuery = new TQString ( "kio_startQuery" ) ;
}
void MrmlShared::cleanup()
diff --git a/kmrml/kmrml/lib/mrml_shared.h b/kmrml/kmrml/lib/mrml_shared.h
index aff2a98d..6ed2177a 100644
--- a/kmrml/kmrml/lib/mrml_shared.h
+++ b/kmrml/kmrml/lib/mrml_shared.h
@@ -22,8 +22,8 @@
// maybe use mrml_const.h from libMRML, unfortunately not installed
// by gift 0.1.6pre2
-#include <qshared.h>
-#include <qstring.h>
+#include <tqshared.h>
+#include <tqstring.h>
class MrmlShared
{
@@ -32,129 +32,129 @@ public:
static void ref();
static bool deref();
- static const QString& sessionId() { return *m_sessionId; }
- static const QString& transactionId() { return *m_transactionId; }
- static const QString& algorithm() { return *m_algorithm; }
- static const QString& algorithmId() { return *m_algorithmId; }
- static const QString& algorithmName() { return *m_algorithmName; }
- static const QString& algorithmList() { return *m_algorithmList; }
- static const QString& algorithmType() { return *m_algorithmType; }
- static const QString& collectionId() { return *m_collectionId; }
- static const QString& collectionList() { return *m_collectionList; }
- static const QString& collection() { return *m_collection; }
- static const QString& collectionName() { return *m_collectionName; }
- static const QString& queryParadigm() { return *m_queryParadigm; }
- static const QString& queryParadigmList() { return *m_queryParadigmList; }
- static const QString& configureSession() { return *m_configureSession; }
+ static const TQString& sessionId() { return *m_sessionId; }
+ static const TQString& transactionId() { return *m_transactionId; }
+ static const TQString& algorithm() { return *m_algorithm; }
+ static const TQString& algorithmId() { return *m_algorithmId; }
+ static const TQString& algorithmName() { return *m_algorithmName; }
+ static const TQString& algorithmList() { return *m_algorithmList; }
+ static const TQString& algorithmType() { return *m_algorithmType; }
+ static const TQString& collectionId() { return *m_collectionId; }
+ static const TQString& collectionList() { return *m_collectionList; }
+ static const TQString& collection() { return *m_collection; }
+ static const TQString& collectionName() { return *m_collectionName; }
+ static const TQString& queryParadigm() { return *m_queryParadigm; }
+ static const TQString& queryParadigmList() { return *m_queryParadigmList; }
+ static const TQString& configureSession() { return *m_configureSession; }
// property sheet stuff
- static const QString& propertySheet() { return *m_propertySheet; }
- static const QString& propertySheetId() { return *m_propertySheetId; }
- static const QString& propertySheetType() { return *m_propertySheetType; }
- static const QString& sendName() { return *m_sendName; }
- static const QString& sendType() { return *m_sendType; }
- static const QString& sendValue() { return *m_sendValue; }
- static const QString& maxSubsetSize() { return *m_maxSubsetSize; }
- static const QString& minSubsetSize() { return *m_minSubsetSize; }
- static const QString& caption() { return *m_caption; }
- static const QString& from() { return *m_from; }
- static const QString& to() { return *m_to; }
- static const QString& step() { return *m_step; }
- static const QString& sendBooleanInverted() { return *m_sendBooleanInverted; }
-
- static const QString& multiSet() { return *m_multiSet; }
- static const QString& subset() { return *m_subset; }
- static const QString& setElement() { return *m_setElement; }
- static const QString& boolean() { return *m_boolean; }
- static const QString& numeric() { return *m_numeric; }
- static const QString& textual() { return *m_textual; }
- static const QString& panel() { return *m_panel; }
- static const QString& clone() { return *m_clone; }
- static const QString& reference() { return *m_reference; }
-
- static const QString& element() { return *m_element; }
- static const QString& attribute() { return *m_attribute; }
- static const QString& attributeName() { return *m_attributeName; }
- static const QString& attributeValue() { return *m_attributeValue; }
- static const QString& children() { return *m_children; }
- static const QString& none() { return *m_none; }
-
- static const QString& visibility() { return *m_visibility; }
- static const QString& visible() { return *m_visible; }
- static const QString& invisible() { return *m_invisible; }
- static const QString& popup() { return *m_popup; }
-// static const QString& () { return *m_; }
+ static const TQString& propertySheet() { return *m_propertySheet; }
+ static const TQString& propertySheetId() { return *m_propertySheetId; }
+ static const TQString& propertySheetType() { return *m_propertySheetType; }
+ static const TQString& sendName() { return *m_sendName; }
+ static const TQString& sendType() { return *m_sendType; }
+ static const TQString& sendValue() { return *m_sendValue; }
+ static const TQString& maxSubsetSize() { return *m_maxSubsetSize; }
+ static const TQString& minSubsetSize() { return *m_minSubsetSize; }
+ static const TQString& caption() { return *m_caption; }
+ static const TQString& from() { return *m_from; }
+ static const TQString& to() { return *m_to; }
+ static const TQString& step() { return *m_step; }
+ static const TQString& sendBooleanInverted() { return *m_sendBooleanInverted; }
+
+ static const TQString& multiSet() { return *m_multiSet; }
+ static const TQString& subset() { return *m_subset; }
+ static const TQString& setElement() { return *m_setElement; }
+ static const TQString& boolean() { return *m_boolean; }
+ static const TQString& numeric() { return *m_numeric; }
+ static const TQString& textual() { return *m_textual; }
+ static const TQString& panel() { return *m_panel; }
+ static const TQString& clone() { return *m_clone; }
+ static const TQString& reference() { return *m_reference; }
+
+ static const TQString& element() { return *m_element; }
+ static const TQString& attribute() { return *m_attribute; }
+ static const TQString& attributeName() { return *m_attributeName; }
+ static const TQString& attributeValue() { return *m_attributeValue; }
+ static const TQString& children() { return *m_children; }
+ static const TQString& none() { return *m_none; }
+
+ static const TQString& visibility() { return *m_visibility; }
+ static const TQString& visible() { return *m_visible; }
+ static const TQString& invisible() { return *m_invisible; }
+ static const TQString& popup() { return *m_popup; }
+// static const TQString& () { return *m_; }
// meta-data
- static const QString& mrml_data() { return *m_mrml_data; }
+ static const TQString& mrml_data() { return *m_mrml_data; }
// kio_mrml tasks
- static const QString& kio_task() { return *m_kio_task; }
- static const QString& kio_initialize() { return *m_kio_initialize; }
- static const QString& kio_startQuery() { return *m_kio_startQuery; }
+ static const TQString& kio_task() { return *m_kio_task; }
+ static const TQString& kio_initialize() { return *m_kio_initialize; }
+ static const TQString& kio_startQuery() { return *m_kio_startQuery; }
private:
- static const QString * m_sessionId;
- static const QString * m_transactionId;
- static const QString * m_algorithm;
- static const QString * m_algorithmId;
- static const QString * m_algorithmName;
- static const QString * m_algorithmList;
- static const QString * m_algorithmType;
- static const QString * m_collectionId;
- static const QString * m_collectionList;
- static const QString * m_collection;
- static const QString * m_collectionName;
- static const QString * m_queryParadigm;
- static const QString * m_queryParadigmList;
- static const QString * m_configureSession;
+ static const TQString * m_sessionId;
+ static const TQString * m_transactionId;
+ static const TQString * m_algorithm;
+ static const TQString * m_algorithmId;
+ static const TQString * m_algorithmName;
+ static const TQString * m_algorithmList;
+ static const TQString * m_algorithmType;
+ static const TQString * m_collectionId;
+ static const TQString * m_collectionList;
+ static const TQString * m_collection;
+ static const TQString * m_collectionName;
+ static const TQString * m_queryParadigm;
+ static const TQString * m_queryParadigmList;
+ static const TQString * m_configureSession;
// property sheet stuff
- static const QString * m_propertySheet;
- static const QString * m_propertySheetId;
- static const QString * m_propertySheetType;
- static const QString * m_sendName;
- static const QString * m_sendType;
- static const QString * m_sendValue;
- static const QString * m_maxSubsetSize;
- static const QString * m_minSubsetSize;
- static const QString * m_caption;
- static const QString * m_from;
- static const QString * m_to;
- static const QString * m_step;
- static const QString * m_sendBooleanInverted;
-
- static const QString * m_multiSet;
- static const QString * m_subset;
- static const QString * m_setElement;
- static const QString * m_boolean;
- static const QString * m_numeric;
- static const QString * m_textual;
- static const QString * m_panel;
- static const QString * m_clone;
- static const QString * m_reference;
-
- static const QString * m_element;
- static const QString * m_attribute;
- static const QString * m_attributeName;
- static const QString * m_attributeValue;
- static const QString * m_children;
- static const QString * m_none;
-
- static const QString * m_visibility;
- static const QString * m_visible;
- static const QString * m_invisible;
- static const QString * m_popup;
-// static const QString * m_;
+ static const TQString * m_propertySheet;
+ static const TQString * m_propertySheetId;
+ static const TQString * m_propertySheetType;
+ static const TQString * m_sendName;
+ static const TQString * m_sendType;
+ static const TQString * m_sendValue;
+ static const TQString * m_maxSubsetSize;
+ static const TQString * m_minSubsetSize;
+ static const TQString * m_caption;
+ static const TQString * m_from;
+ static const TQString * m_to;
+ static const TQString * m_step;
+ static const TQString * m_sendBooleanInverted;
+
+ static const TQString * m_multiSet;
+ static const TQString * m_subset;
+ static const TQString * m_setElement;
+ static const TQString * m_boolean;
+ static const TQString * m_numeric;
+ static const TQString * m_textual;
+ static const TQString * m_panel;
+ static const TQString * m_clone;
+ static const TQString * m_reference;
+
+ static const TQString * m_element;
+ static const TQString * m_attribute;
+ static const TQString * m_attributeName;
+ static const TQString * m_attributeValue;
+ static const TQString * m_children;
+ static const TQString * m_none;
+
+ static const TQString * m_visibility;
+ static const TQString * m_visible;
+ static const TQString * m_invisible;
+ static const TQString * m_popup;
+// static const TQString * m_;
// meta-data
- static const QString * m_mrml_data;
+ static const TQString * m_mrml_data;
// kio_mrml tasks
- static const QString * m_kio_task;
- static const QString * m_kio_initialize;
- static const QString * m_kio_startQuery;
+ static const TQString * m_kio_task;
+ static const TQString * m_kio_initialize;
+ static const TQString * m_kio_startQuery;
private:
static void cleanup();
diff --git a/kmrml/kmrml/lib/mrml_utils.h b/kmrml/kmrml/lib/mrml_utils.h
index 25f39d98..ee2fdb30 100644
--- a/kmrml/kmrml/lib/mrml_utils.h
+++ b/kmrml/kmrml/lib/mrml_utils.h
@@ -20,7 +20,7 @@
#ifndef MRML_UTILS_H
#define MRML_UTILS_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
diff --git a/kmrml/kmrml/lib/watcher_stub.cpp b/kmrml/kmrml/lib/watcher_stub.cpp
index cf84818b..ca9ca7b2 100644
--- a/kmrml/kmrml/lib/watcher_stub.cpp
+++ b/kmrml/kmrml/lib/watcher_stub.cpp
@@ -11,34 +11,34 @@
namespace KMrml {
-Watcher_stub::Watcher_stub( const QCString& app, const QCString& obj )
+Watcher_stub::Watcher_stub( const TQCString& app, const TQCString& obj )
: DCOPStub( app, obj )
{
}
-Watcher_stub::Watcher_stub( DCOPClient* client, const QCString& app, const QCString& obj )
+Watcher_stub::Watcher_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
: DCOPStub( client, app, obj )
{
}
-bool Watcher_stub::requireDaemon( const QCString& arg0, const QString& arg1, const QString& arg2, uint arg3, int arg4 )
+bool Watcher_stub::requireDaemon( const TQCString& arg0, const TQString& arg1, const TQString& arg2, uint arg3, int arg4 )
{
bool result;
if ( !dcopClient() ) {
setStatus( CallFailed );
return false;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
arg << arg2;
arg << arg3;
arg << arg4;
- if ( dcopClient()->call( app(), obj(), "requireDaemon(QCString,QString,QString,uint,int)", data, replyType, replyData ) ) {
+ if ( dcopClient()->call( app(), obj(), "requireDaemon(TQCString,TQString,TQString,uint,int)", data, replyType, replyData ) ) {
if ( replyType == "bool" ) {
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
setStatus( CallSucceeded );
} else {
@@ -50,36 +50,36 @@ bool Watcher_stub::requireDaemon( const QCString& arg0, const QString& arg1, con
return result;
}
-void Watcher_stub::unrequireDaemon( const QCString& arg0, const QString& arg1 )
+void Watcher_stub::unrequireDaemon( const TQCString& arg0, const TQString& arg1 )
{
if ( !dcopClient() ) {
setStatus( CallFailed );
return;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
- if ( dcopClient()->call( app(), obj(), "unrequireDaemon(QCString,QString)", data, replyType, replyData ) ) {
+ if ( dcopClient()->call( app(), obj(), "unrequireDaemon(TQCString,TQString)", data, replyType, replyData ) ) {
setStatus( CallSucceeded );
} else {
callFailed();
}
}
-QStringList Watcher_stub::runningDaemons()
+TQStringList Watcher_stub::runningDaemons()
{
- QStringList result;
+ TQStringList result;
if ( !dcopClient() ) {
setStatus( CallFailed );
return result;
}
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if ( dcopClient()->call( app(), obj(), "runningDaemons()", data, replyType, replyData ) ) {
- if ( replyType == "QStringList" ) {
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ if ( replyType == "TQStringList" ) {
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
setStatus( CallSucceeded );
} else {
diff --git a/kmrml/kmrml/lib/watcher_stub.h b/kmrml/kmrml/lib/watcher_stub.h
index 04b1292e..ce570908 100644
--- a/kmrml/kmrml/lib/watcher_stub.h
+++ b/kmrml/kmrml/lib/watcher_stub.h
@@ -8,12 +8,12 @@
#define __WATCHER_STUB__
#include <dcopstub.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdedmodule.h>
#include <kprocess.h>
@@ -22,11 +22,11 @@ namespace KMrml {
class Watcher_stub : public DCOPStub
{
public:
- Watcher_stub( const QCString& app, const QCString& id );
- Watcher_stub( DCOPClient* client, const QCString& app, const QCString& id );
- virtual bool requireDaemon( const QCString& clientAppId, const QString& daemonKey, const QString& commandline, uint timeout, int numRestarts );
- virtual void unrequireDaemon( const QCString& clientAppId, const QString& daemonKey );
- virtual QStringList runningDaemons();
+ Watcher_stub( const TQCString& app, const TQCString& id );
+ Watcher_stub( DCOPClient* client, const TQCString& app, const TQCString& id );
+ virtual bool requireDaemon( const TQCString& clientAppId, const TQString& daemonKey, const TQString& commandline, uint timeout, int numRestarts );
+ virtual void unrequireDaemon( const TQCString& clientAppId, const TQString& daemonKey );
+ virtual TQStringList runningDaemons();
protected:
Watcher_stub() : DCOPStub( never_use ) {};
};
diff --git a/kmrml/kmrml/loader.cpp b/kmrml/kmrml/loader.cpp
index cc59c172..ea8803e2 100644
--- a/kmrml/kmrml/loader.cpp
+++ b/kmrml/kmrml/loader.cpp
@@ -33,13 +33,13 @@ Loader * Loader::self()
return s_self;
}
-Loader::Loader() : QObject()
+Loader::Loader() : TQObject()
{
}
Loader::~Loader()
{
- disconnect( this, SIGNAL( finished( const KURL&, const QByteArray& )));
+ disconnect( this, TQT_SIGNAL( finished( const KURL&, const TQByteArray& )));
DownloadIterator it = m_downloads.begin();
for ( ; it != m_downloads.end(); ++it ) {
@@ -61,20 +61,20 @@ void Loader::requestDownload( const KURL& url )
KIO::TransferJob *job = KIO::get( url, false, false );
KIO::Scheduler::scheduleJob(job);
- connect( job , SIGNAL( data( KIO::Job *, const QByteArray& )),
- SLOT( slotData( KIO::Job *, const QByteArray& )));
- connect( job , SIGNAL( result( KIO::Job * )),
- SLOT( slotResult( KIO::Job * )));
+ connect( job , TQT_SIGNAL( data( KIO::Job *, const TQByteArray& )),
+ TQT_SLOT( slotData( KIO::Job *, const TQByteArray& )));
+ connect( job , TQT_SIGNAL( result( KIO::Job * )),
+ TQT_SLOT( slotResult( KIO::Job * )));
Download *d = new Download();
m_downloads.insert( job, d );
}
-void Loader::slotData( KIO::Job *job, const QByteArray& data )
+void Loader::slotData( KIO::Job *job, const TQByteArray& data )
{
DownloadIterator it = m_downloads.find( static_cast<KIO::TransferJob*>(job) );
if ( it != m_downloads.end() ) {
- QBuffer& buffer = it.data()->m_buffer;
+ TQBuffer& buffer = it.data()->m_buffer;
if ( !buffer.isOpen() )
buffer.open( IO_ReadWrite );
if ( !buffer.isOpen() ) {
@@ -95,7 +95,7 @@ void Loader::slotResult( KIO::Job *job )
Download *d = it.data();
if ( job->error() != 0 )
- emit finished( tjob->url(), QByteArray() );
+ emit finished( tjob->url(), TQByteArray() );
else
emit finished( tjob->url(), d->m_buffer.buffer() );
diff --git a/kmrml/kmrml/loader.h b/kmrml/kmrml/loader.h
index 5e81a2e4..8e1090cf 100644
--- a/kmrml/kmrml/loader.h
+++ b/kmrml/kmrml/loader.h
@@ -19,10 +19,10 @@
#ifndef LOADER_H
#define LOADER_H
-#include <qbuffer.h>
-#include <qcstring.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kio/job.h>
#include <kurl.h>
@@ -34,7 +34,7 @@ public:
if ( m_buffer.isOpen() )
m_buffer.close();
}
- QBuffer m_buffer;
+ TQBuffer m_buffer;
// add context of MrmlPart for progress?
};
@@ -53,17 +53,17 @@ public:
void removeDownload( const KURL& url );
signals:
- void finished( const KURL& url, const QByteArray& );
+ void finished( const KURL& url, const TQByteArray& );
private slots:
- void slotData( KIO::Job *, const QByteArray& );
+ void slotData( KIO::Job *, const TQByteArray& );
void slotResult( KIO::Job * );
private:
Loader();
- QMap<KIO::TransferJob*,Download*> m_downloads;
- typedef QMapIterator<KIO::TransferJob*,Download*> DownloadIterator;
+ TQMap<KIO::TransferJob*,Download*> m_downloads;
+ typedef TQMapIterator<KIO::TransferJob*,Download*> DownloadIterator;
static Loader *s_self;
diff --git a/kmrml/kmrml/mrml.cpp b/kmrml/kmrml/mrml.cpp
index 082d037b..1d998476 100644
--- a/kmrml/kmrml/mrml.cpp
+++ b/kmrml/kmrml/mrml.cpp
@@ -60,7 +60,7 @@ extern "C" {
const int Mrml::bufsize = 8192;
-Mrml::Mrml( const QCString& pool_socket, const QCString& app_socket )
+Mrml::Mrml( const TQCString& pool_socket, const TQCString& app_socket )
: TCPSlaveBase( 12789, "mrml", pool_socket, app_socket ),
m_config( KGlobal::config() )
{
@@ -100,21 +100,21 @@ void Mrml::get( const KURL& url )
int retriesLeft = 5;
tryConnect:
- QCString utf8;
+ TQCString utf8;
bool sendError = (retriesLeft <= 0);
if ( connectToHost( url.host(), port(url), sendError ) )
{
// qDebug(" connected!");
- QString task = metaData( MrmlShared::kio_task() );
+ TQString task = metaData( MrmlShared::kio_task() );
if ( task == MrmlShared::kio_initialize() ) {
startSession( url );
}
else if ( task == MrmlShared::kio_startQuery() ) {
- QString meta = metaData( MrmlShared::mrml_data() );
+ TQString meta = metaData( MrmlShared::mrml_data() );
if ( meta.isEmpty() ) {
closeDescriptor();
error( KIO::ERR_SLAVE_DEFINED, i18n("No MRML data is available.") );
@@ -154,14 +154,14 @@ tryConnect:
}
closeDescriptor();
- //data( QByteArray() ); // send an empty QByteArray to signal end of data.
+ //data( TQByteArray() ); // send an empty TQByteArray to signal end of data.
finished();
}
// make sure we're connected when you call this!
-QCString Mrml::readAll()
+TQCString Mrml::readAll()
{
- QCString data;
+ TQCString data;
char buf[bufsize];
ssize_t bytes = 0;
@@ -175,21 +175,21 @@ QCString Mrml::readAll()
return data;
}
-QCString Mrml::loginString()
+TQCString Mrml::loginString()
{
return "<mrml><get-server-properties/></mrml>";
}
-QCString Mrml::getConfigurationString()
+TQCString Mrml::getConfigurationString()
{
return "<mrml><get-configuration/></mrml>";
}
// ### needed?
-QCString Mrml::getSessionsString( const QString& username,
- const QString& password )
+TQCString Mrml::getSessionsString( const TQString& username,
+ const TQString& password )
{
- QCString data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><mrml><get-sessions ";
+ TQCString data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><mrml><get-sessions ";
if ( !username.isEmpty() ) { // ### pop up auth-dialog???
data.append( "user-name=\"");
data.append( username.utf8() );
@@ -216,13 +216,13 @@ bool Mrml::startSession( const KURL& url )
// Wolfgang says, we shouldn't create an own session-id here, as gcc 2.95
// apparently makes problems in exception handling somehow. So we simply
// accept the server's session-id.
- QString msg = mrmlString( QString::null ).arg(
+ TQString msg = mrmlString( TQString::null ).arg(
"<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \
<get-algorithms /> \
<get-collections /> \
</mrml>" ).arg( user( url ));
- QCString utf8 = msg.utf8();
+ TQCString utf8 = msg.utf8();
// qDebug(":::Writing: %s", utf8.data());
write( utf8, utf8.length() );
@@ -231,9 +231,9 @@ bool Mrml::startSession( const KURL& url )
return true;
}
-QString Mrml::mrmlString( const QString& sessionId, const QString& transactionId )
+TQString Mrml::mrmlString( const TQString& sessionId, const TQString& transactionId )
{
- QString msg =
+ TQString msg =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \
<!DOCTYPE mrml SYSTEM \"http://isrpc85.epfl.ch/Charmer/code/mrml.dtd\"> \
%1 \
@@ -249,7 +249,7 @@ QString Mrml::mrmlString( const QString& sessionId, const QString& transactionId
.arg( sessionId ).arg( transactionId );
}
-void Mrml::emitData( const QCString& msg )
+void Mrml::emitData( const TQCString& msg )
{
mimeType( "text/mrml" );
data( msg );
diff --git a/kmrml/kmrml/mrml.h b/kmrml/kmrml/mrml.h
index f8088ef6..c6ee01b2 100644
--- a/kmrml/kmrml/mrml.h
+++ b/kmrml/kmrml/mrml.h
@@ -29,7 +29,7 @@
class Mrml : public KIO::TCPSlaveBase
{
public:
- Mrml( const QCString&, const QCString& );
+ Mrml( const TQCString&, const TQCString& );
~Mrml();
virtual void get( const KURL& url );
@@ -37,13 +37,13 @@ public:
virtual void mimetype( const KURL& url );
private:
- QCString readAll();
- void emitData( const QCString& );
+ TQCString readAll();
+ void emitData( const TQCString& );
bool startSession( const KURL& url );
// helpers
- inline QString sessionId() {
+ inline TQString sessionId() {
return metaData( MrmlShared::sessionId() );
}
@@ -55,18 +55,18 @@ private:
m_config.settingsForHost( url.host() ).port();
}
- static QString mrmlString( const QString& sessionId,
- const QString& transactionId = QString::null );
+ static TQString mrmlString( const TQString& sessionId,
+ const TQString& transactionId = TQString::null );
- static QCString loginString();
- static QCString getConfigurationString();
- static QCString getSessionsString( const QString& username,
- const QString& password );
- QString user( const KURL& url ) {
+ static TQCString loginString();
+ static TQCString getConfigurationString();
+ static TQCString getSessionsString( const TQString& username,
+ const TQString& password );
+ TQString user( const KURL& url ) {
return url.hasUser() ?
url.user() : m_config.defaultSettings().user;
}
- QString pass( const KURL& url ) {
+ TQString pass( const KURL& url ) {
return url.hasPass() ?
url.pass() : m_config.defaultSettings().pass;
}
@@ -74,8 +74,8 @@ private:
bool checkLocalServer( const KURL& url );
static const int bufsize;
- QString defaultUser;
- QString defaultPass;
+ TQString defaultUser;
+ TQString defaultPass;
KMrml::Config m_config;
diff --git a/kmrml/kmrml/mrml_creator.cpp b/kmrml/kmrml/mrml_creator.cpp
index fce84e36..fe4a14c6 100644
--- a/kmrml/kmrml/mrml_creator.cpp
+++ b/kmrml/kmrml/mrml_creator.cpp
@@ -18,11 +18,11 @@
#include "mrml_creator.h"
-QDomElement MrmlCreator::createMrml( QDomDocument& doc,
- const QString& sessionId,
- const QString& transactionId )
+TQDomElement MrmlCreator::createMrml( TQDomDocument& doc,
+ const TQString& sessionId,
+ const TQString& transactionId )
{
- QDomElement mrml = doc.createElement( "mrml" );
+ TQDomElement mrml = doc.createElement( "mrml" );
doc.appendChild( mrml );
mrml.setAttribute( MrmlShared::sessionId(), sessionId );
if ( !transactionId.isNull() )
@@ -31,12 +31,12 @@ QDomElement MrmlCreator::createMrml( QDomDocument& doc,
return mrml;
}
-QDomElement MrmlCreator::configureSession( QDomElement& mrml,
+TQDomElement MrmlCreator::configureSession( TQDomElement& mrml,
const KMrml::Algorithm& algo,
- const QString& sessionId )
+ const TQString& sessionId )
{
- QDomDocument doc = mrml.ownerDocument();
- QDomElement config = doc.createElement( MrmlShared::configureSession() );
+ TQDomDocument doc = mrml.ownerDocument();
+ TQDomElement config = doc.createElement( MrmlShared::configureSession() );
mrml.appendChild( config );
config.setAttribute( MrmlShared::sessionId(), sessionId );
algo.toElement( config );
@@ -44,18 +44,18 @@ QDomElement MrmlCreator::configureSession( QDomElement& mrml,
return config;
}
-QDomElement MrmlCreator::addQuery( QDomElement& mrml, int resultSize )
+TQDomElement MrmlCreator::addQuery( TQDomElement& mrml, int resultSize )
{
- QDomElement query = mrml.ownerDocument().createElement("query-step");
+ TQDomElement query = mrml.ownerDocument().createElement("query-step");
mrml.appendChild( query );
// query.setAttribute( "query-step-id", "5" ); // ###
- query.setAttribute( "result-size", QString::number( resultSize ));
+ query.setAttribute( "result-size", TQString::number( resultSize ));
return query;
}
-QDomElement MrmlCreator::addRelevanceList( QDomElement& query )
+TQDomElement MrmlCreator::addRelevanceList( TQDomElement& query )
{
- QDomElement elem =
+ TQDomElement elem =
query.ownerDocument().createElement("user-relevance-element-list");
query.appendChild( elem );
return elem;
@@ -64,13 +64,13 @@ QDomElement MrmlCreator::addRelevanceList( QDomElement& query )
/**
* Creates a <user-relevance-element> with the given attributes set.
*/
-void MrmlCreator::createRelevanceElement( QDomDocument& doc,
- QDomElement& parent,
- const QString& url,
+void MrmlCreator::createRelevanceElement( TQDomDocument& doc,
+ TQDomElement& parent,
+ const TQString& url,
Relevance relevance )
{
- QDomElement element = doc.createElement( "user-relevance-element" );
+ TQDomElement element = doc.createElement( "user-relevance-element" );
element.setAttribute( "image-location", url );
- element.setAttribute( "user-relevance", QString::number( relevance ) );
+ element.setAttribute( "user-relevance", TQString::number( relevance ) );
parent.appendChild( element );
}
diff --git a/kmrml/kmrml/mrml_creator.h b/kmrml/kmrml/mrml_creator.h
index 2cc59e7a..18e49551 100644
--- a/kmrml/kmrml/mrml_creator.h
+++ b/kmrml/kmrml/mrml_creator.h
@@ -19,7 +19,7 @@
#ifndef MRML_CREATOR_H
#define MRML_CREATOR_H
-#include <qdom.h>
+#include <tqdom.h>
#include <kurl.h>
@@ -30,19 +30,19 @@ namespace MrmlCreator
{
enum Relevance { Relevant = 1, Irrelevant = -1 };
- QDomElement createMrml( QDomDocument& doc,
- const QString& sessionId,
- const QString& transactionId = QString::null );
- QDomElement configureSession( QDomElement& mrml,
+ TQDomElement createMrml( TQDomDocument& doc,
+ const TQString& sessionId,
+ const TQString& transactionId = TQString::null );
+ TQDomElement configureSession( TQDomElement& mrml,
const KMrml::Algorithm& algo,
- const QString& sessionId );
- QDomElement addQuery( QDomElement& mrml, int resultSize );
- QDomElement addRelevanceList( QDomElement& query );
+ const TQString& sessionId );
+ TQDomElement addQuery( TQDomElement& mrml, int resultSize );
+ TQDomElement addRelevanceList( TQDomElement& query );
/**
* Creates a <user-relevance-element> with the given attributes set.
*/
- void createRelevanceElement( QDomDocument& doc, QDomElement& parent,
- const QString& url, Relevance relevance );
+ void createRelevanceElement( TQDomDocument& doc, TQDomElement& parent,
+ const TQString& url, Relevance relevance );
}
diff --git a/kmrml/kmrml/mrml_elements.cpp b/kmrml/kmrml/mrml_elements.cpp
index 20f3d04e..3fadcaba 100644
--- a/kmrml/kmrml/mrml_elements.cpp
+++ b/kmrml/kmrml/mrml_elements.cpp
@@ -21,7 +21,7 @@
#include <kdatastream.h>
-#include <qdom.h>
+#include <tqdom.h>
using namespace KMrml;
@@ -31,9 +31,9 @@ using namespace KMrml;
// <query-paradigm> elements as children.
//
-MrmlElement::MrmlElement( const QDomElement& elem )
+MrmlElement::MrmlElement( const TQDomElement& elem )
{
- QValueList<QDomElement> list =
+ TQValueList<TQDomElement> list =
KMrml::directChildElements( elem, MrmlShared::queryParadigmList() );
Q_ASSERT( list.count() < 2 ); // There can be only one.
@@ -43,9 +43,9 @@ MrmlElement::MrmlElement( const QDomElement& elem )
}
-void MrmlElement::setOtherAttributes( QDomElement& elem ) const
+void MrmlElement::setOtherAttributes( TQDomElement& elem ) const
{
- QMapConstIterator<QString,QString> it = m_attributes.begin();
+ TQMapConstIterator<TQString,TQString> it = m_attributes.begin();
for ( ; it != m_attributes.end(); ++it )
{
elem.setAttribute( it.key(), it.data() );
@@ -79,14 +79,14 @@ AlgorithmList AlgorithmList::algorithmsForCollection( const Collection& coll ) c
///////////////////////////////////////////////////////////////////
-Collection::Collection( const QDomElement& elem )
+Collection::Collection( const TQDomElement& elem )
: MrmlElement( elem )
{
- QDomNamedNodeMap attrs = elem.attributes();
+ TQDomNamedNodeMap attrs = elem.attributes();
for ( uint i = 0; i < attrs.length(); i++ )
{
- QDomAttr attribute = attrs.item( i ).toAttr();
- QString name = attribute.name();
+ TQDomAttr attribute = attrs.item( i ).toAttr();
+ TQString name = attribute.name();
if ( name == MrmlShared::collectionName() )
m_name = attribute.value();
@@ -103,15 +103,15 @@ Collection::Collection( const QDomElement& elem )
///////////////////////////////////////////////////////////////////
-Algorithm::Algorithm( const QDomElement& elem )
+Algorithm::Algorithm( const TQDomElement& elem )
: MrmlElement( elem )
{
- QDomNamedNodeMap attrs = elem.attributes();
+ TQDomNamedNodeMap attrs = elem.attributes();
for ( uint i = 0; i < attrs.length(); i++ )
{
- QDomAttr attribute = attrs.item( i ).toAttr();
- QString name = attribute.name();
+ TQDomAttr attribute = attrs.item( i ).toAttr();
+ TQString name = attribute.name();
if ( name == MrmlShared::algorithmName() )
m_name = attribute.value();
@@ -128,7 +128,7 @@ Algorithm::Algorithm( const QDomElement& elem )
m_attributes.insert( name, attribute.value() );
}
- QDomElement propsElem = firstChildElement(elem, MrmlShared::propertySheet());
+ TQDomElement propsElem = firstChildElement(elem, MrmlShared::propertySheet());
m_propertySheet.initFromDOM( propsElem );
qDebug("############# new algorithm: name: %s, id: %s, type: %s", m_name.latin1(), m_id.latin1(), m_type.latin1());
@@ -144,10 +144,10 @@ Algorithm Algorithm::defaultAlgorithm()
return algo;
}
-QDomElement Algorithm::toElement( QDomElement& parent ) const
+TQDomElement Algorithm::toElement( TQDomElement& parent ) const
{
- QDomDocument doc = parent.ownerDocument();
- QDomElement algorithm = doc.createElement( MrmlShared::algorithm() );
+ TQDomDocument doc = parent.ownerDocument();
+ TQDomElement algorithm = doc.createElement( MrmlShared::algorithm() );
parent.appendChild( algorithm );
setOtherAttributes( algorithm );
@@ -167,12 +167,12 @@ QDomElement Algorithm::toElement( QDomElement& parent ) const
///////////////////////////////////////////////////////////////////
-QueryParadigm::QueryParadigm( const QDomElement& elem )
+QueryParadigm::QueryParadigm( const TQDomElement& elem )
{
- QDomNamedNodeMap attrs = elem.attributes();
+ TQDomNamedNodeMap attrs = elem.attributes();
for ( uint i = 0; i < attrs.count(); i++ )
{
- QDomAttr attr = attrs.item( i ).toAttr();
+ TQDomAttr attr = attrs.item( i ).toAttr();
m_attributes.insert( attr.name(), attr.value() );
if ( attr.name() == "type" )
m_type = attr.value();
@@ -185,16 +185,16 @@ bool QueryParadigm::matches( const QueryParadigm& other ) const
equalMaps( m_attributes, other.m_attributes );
}
-bool QueryParadigm::equalMaps( const QMap<QString,QString> m1,
- const QMap<QString,QString> m2 )
+bool QueryParadigm::equalMaps( const TQMap<TQString,TQString> m1,
+ const TQMap<TQString,TQString> m2 )
{
if ( m1.count() != m2.count() )
return false;
- QMapConstIterator<QString,QString> it = m1.begin();
+ TQMapConstIterator<TQString,TQString> it = m1.begin();
for ( ; it != m1.end(); ++it )
{
- QMapConstIterator<QString,QString> it2 = m2.find( it.key() );
+ TQMapConstIterator<TQString,TQString> it2 = m2.find( it.key() );
if ( it2 == m2.end() || it.data() != it2.data() )
return false;
}
@@ -206,14 +206,14 @@ bool QueryParadigm::equalMaps( const QMap<QString,QString> m1,
///////////////////////////////////////////////////////////////////
-void QueryParadigmList::initFromDOM( const QDomElement& elem )
+void QueryParadigmList::initFromDOM( const TQDomElement& elem )
{
clear();
- QValueList<QDomElement> list =
+ TQValueList<TQDomElement> list =
KMrml::directChildElements( elem, MrmlShared::queryParadigm() );
- QValueListConstIterator<QDomElement> it = list.begin();
+ TQValueListConstIterator<TQDomElement> it = list.begin();
for ( ; it != list.end(); ++it )
{
append( QueryParadigm( *it ));
@@ -242,12 +242,12 @@ bool QueryParadigmList::matches( const QueryParadigmList& other ) const
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-QValueList<QDomElement> KMrml::directChildElements( const QDomElement& parent,
- const QString& tagName )
+TQValueList<TQDomElement> KMrml::directChildElements( const TQDomElement& parent,
+ const TQString& tagName )
{
- QValueList<QDomElement> list;
+ TQValueList<TQDomElement> list;
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() )
{
if ( node.isElement() && node.nodeName() == tagName )
@@ -259,10 +259,10 @@ QValueList<QDomElement> KMrml::directChildElements( const QDomElement& parent,
return list;
}
-QDomElement KMrml::firstChildElement( const QDomElement& parent,
- const QString& tagName )
+TQDomElement KMrml::firstChildElement( const TQDomElement& parent,
+ const TQString& tagName )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() )
{
if ( node.isElement() && node.nodeName() == tagName )
@@ -271,86 +271,86 @@ QDomElement KMrml::firstChildElement( const QDomElement& parent,
node = node.nextSibling();
}
- return QDomElement();
+ return TQDomElement();
}
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-QDataStream& KMrml::operator<<( QDataStream& stream, const QueryParadigm& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const QueryParadigm& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, QueryParadigm& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, QueryParadigm& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const QueryParadigmList& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const QueryParadigmList& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, QueryParadigmList& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, QueryParadigmList& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const MrmlElement& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const MrmlElement& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, MrmlElement& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, MrmlElement& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const Algorithm& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const Algorithm& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, Algorithm& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, Algorithm& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const Collection& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const Collection& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, Collection& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, Collection& )
{
return stream;
}
-template <class t> QDataStream& KMrml::operator<<( QDataStream& stream,
+template <class t> TQDataStream& KMrml::operator<<( TQDataStream& stream,
const MrmlElementList<t>& )
{
return stream;
}
-template <class t> QDataStream& KMrml::operator>>( QDataStream& stream,
+template <class t> TQDataStream& KMrml::operator>>( TQDataStream& stream,
MrmlElementList<t>& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const AlgorithmList& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const AlgorithmList& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, AlgorithmList& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, AlgorithmList& )
{
return stream;
diff --git a/kmrml/kmrml/mrml_elements.h b/kmrml/kmrml/mrml_elements.h
index 09d2a4a8..6fe6767d 100644
--- a/kmrml/kmrml/mrml_elements.h
+++ b/kmrml/kmrml/mrml_elements.h
@@ -19,10 +19,10 @@
#ifndef MRML_ELEMENTS_H
#define MRML_ELEMENTS_H
-#include <qdom.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "mrml_shared.h"
#include "propertysheet.h"
@@ -37,27 +37,27 @@ namespace KMrml
{
public:
QueryParadigm() {}
- QueryParadigm( const QDomElement& elem );
+ QueryParadigm( const TQDomElement& elem );
bool matches( const QueryParadigm& other ) const;
- QString type() const { return m_type; }
+ TQString type() const { return m_type; }
// bool operator== ( const QueryParadigm& p1, const QueryParadigm& p2 )
private:
- QString m_type;
- QMap<QString,QString> m_attributes;
+ TQString m_type;
+ TQMap<TQString,TQString> m_attributes;
- static bool equalMaps( const QMap<QString,QString>,
- const QMap<QString,QString> );
+ static bool equalMaps( const TQMap<TQString,TQString>,
+ const TQMap<TQString,TQString> );
};
- class QueryParadigmList : protected QValueList<QueryParadigm>
+ class QueryParadigmList : protected TQValueList<QueryParadigm>
{
public:
- typedef QValueListIterator<QueryParadigm> Iterator;
- typedef QValueListConstIterator<QueryParadigm> ConstIterator;
+ typedef TQValueListIterator<QueryParadigm> Iterator;
+ typedef TQValueListConstIterator<QueryParadigm> ConstIterator;
- void initFromDOM( const QDomElement& elem );
+ void initFromDOM( const TQDomElement& elem );
bool matches( const QueryParadigmList& other ) const;
};
@@ -65,106 +65,106 @@ namespace KMrml
{
public:
MrmlElement() {}
- MrmlElement( const QDomElement& elem );
+ MrmlElement( const TQDomElement& elem );
virtual ~MrmlElement() {}
- QString id() const { return m_id; }
- QString name() const { return m_name; }
- QString attribute( const QString& name ) const { return m_attributes[ name ]; }
+ TQString id() const { return m_id; }
+ TQString name() const { return m_name; }
+ TQString attribute( const TQString& name ) const { return m_attributes[ name ]; }
QueryParadigmList paradigms() const { return m_paradigms; }
- QMapConstIterator<QString,QString> attributeIterator() const {
+ TQMapConstIterator<TQString,TQString> attributeIterator() const {
return m_attributes.begin();
}
- QMapConstIterator<QString,QString> end() const { return m_attributes.end(); }
+ TQMapConstIterator<TQString,TQString> end() const { return m_attributes.end(); }
bool isValid() const { return !m_name.isNull() && !m_id.isNull(); }
protected:
- QString m_id;
- QString m_name;
+ TQString m_id;
+ TQString m_name;
QueryParadigmList m_paradigms;
- QMap<QString,QString> m_attributes;
+ TQMap<TQString,TQString> m_attributes;
- void setOtherAttributes( QDomElement& elem ) const;
+ void setOtherAttributes( TQDomElement& elem ) const;
};
class Algorithm : public MrmlElement
{
public:
Algorithm() { m_collectionId = "adefault"; }
- Algorithm( const QDomElement& elem );
- QString type() const { return m_type; }
+ Algorithm( const TQDomElement& elem );
+ TQString type() const { return m_type; }
- QString collectionId() const
+ TQString collectionId() const
{
return m_collectionId;
}
- void setCollectionId( const QString& id )
+ void setCollectionId( const TQString& id )
{
m_collectionId = id;
}
- QDomElement toElement( QDomElement& parent ) const;
+ TQDomElement toElement( TQDomElement& parent ) const;
const PropertySheet& propertySheet() const;
static Algorithm defaultAlgorithm();
private:
- QString m_type;
+ TQString m_type;
PropertySheet m_propertySheet;
- QString m_collectionId;
+ TQString m_collectionId;
};
class Collection : public MrmlElement
{
public:
Collection() {}
- Collection( const QDomElement& elem );
+ Collection( const TQDomElement& elem );
};
- template <class t> class MrmlElementList : public QValueList<t>
+ template <class t> class MrmlElementList : public TQValueList<t>
{
public:
- typedef QValueListIterator<t> Iterator;
- typedef QValueListConstIterator<t> ConstIterator;
+ typedef TQValueListIterator<t> Iterator;
+ typedef TQValueListConstIterator<t> ConstIterator;
/**
* Creates an invalid element.
*/
- MrmlElementList( const QString& tagName ) :
- QValueList<t>(),
+ MrmlElementList( const TQString& tagName ) :
+ TQValueList<t>(),
m_tagName( tagName ) {}
- MrmlElementList( const QDomElement& elem, const QString& tagName ) :
- QValueList<t>(),
+ MrmlElementList( const TQDomElement& elem, const TQString& tagName ) :
+ TQValueList<t>(),
m_tagName( tagName )
{
initFromDOM( elem );
}
virtual ~MrmlElementList() {};
- void initFromDOM( const QDomElement& elem )
+ void initFromDOM( const TQDomElement& elem )
{
assert( !m_tagName.isEmpty() );
- QValueList<t>::clear();
+ TQValueList<t>::clear();
- QDomNodeList list = elem.elementsByTagName( m_tagName );
+ TQDomNodeList list = elem.elementsByTagName( m_tagName );
for ( uint i = 0; i < list.length(); i++ )
{
- QDomElement elem = list.item( i ).toElement();
+ TQDomElement elem = list.item( i ).toElement();
t item( elem );
if ( item.isValid() )
append( item );
}
}
- t findByName( const QString& name ) const
+ t findByName( const TQString& name ) const
{
- QValueListConstIterator<t> it = QValueList<t>::begin();
- for ( ; it != QValueList<t>::end(); ++it )
+ TQValueListConstIterator<t> it = TQValueList<t>::begin();
+ for ( ; it != TQValueList<t>::end(); ++it )
{
if ( (*it).name() == name )
return *it;
@@ -173,10 +173,10 @@ namespace KMrml
return t();
}
- t findById( const QString& id ) const
+ t findById( const TQString& id ) const
{
- QValueListConstIterator<t> it = QValueList<t>::begin();
- for ( ; it != QValueList<t>::end(); ++it )
+ TQValueListConstIterator<t> it = TQValueList<t>::begin();
+ for ( ; it != TQValueList<t>::end(); ++it )
{
if ( (*it).id() == id )
return *it;
@@ -185,20 +185,20 @@ namespace KMrml
return MrmlElement();
}
- QStringList itemNames() const {
- QStringList list;
- QValueListConstIterator<t> it = QValueList<t>::begin();
- for ( ; it != QValueList<t>::end(); ++it )
+ TQStringList itemNames() const {
+ TQStringList list;
+ TQValueListConstIterator<t> it = TQValueList<t>::begin();
+ for ( ; it != TQValueList<t>::end(); ++it )
list.append( (*it).name() );
return list;
}
- void setItemName( const QString& tagName ) { m_tagName = tagName; }
- QString tagName() const { return m_tagName; }
+ void setItemName( const TQString& tagName ) { m_tagName = tagName; }
+ TQString tagName() const { return m_tagName; }
private:
- QString m_tagName;
+ TQString m_tagName;
MrmlElementList();
};
@@ -221,34 +221,34 @@ namespace KMrml
};
- QValueList<QDomElement> directChildElements( const QDomElement& parent,
- const QString& tagName);
- QDomElement firstChildElement( const QDomElement& parent,
- const QString& tagName );
+ TQValueList<TQDomElement> directChildElements( const TQDomElement& parent,
+ const TQString& tagName);
+ TQDomElement firstChildElement( const TQDomElement& parent,
+ const TQString& tagName );
- QDataStream& operator<<( QDataStream& stream, const QueryParadigm& );
- QDataStream& operator>>( QDataStream& stream, QueryParadigm& );
+ TQDataStream& operator<<( TQDataStream& stream, const QueryParadigm& );
+ TQDataStream& operator>>( TQDataStream& stream, QueryParadigm& );
- QDataStream& operator<<( QDataStream& stream, const QueryParadigmList& );
- QDataStream& operator>>( QDataStream& stream, QueryParadigmList& );
+ TQDataStream& operator<<( TQDataStream& stream, const QueryParadigmList& );
+ TQDataStream& operator>>( TQDataStream& stream, QueryParadigmList& );
- QDataStream& operator<<( QDataStream& stream, const MrmlElement& );
- QDataStream& operator>>( QDataStream& stream, MrmlElement& );
+ TQDataStream& operator<<( TQDataStream& stream, const MrmlElement& );
+ TQDataStream& operator>>( TQDataStream& stream, MrmlElement& );
- QDataStream& operator<<( QDataStream& stream, const Algorithm& );
- QDataStream& operator>>( QDataStream& stream, Algorithm& );
+ TQDataStream& operator<<( TQDataStream& stream, const Algorithm& );
+ TQDataStream& operator>>( TQDataStream& stream, Algorithm& );
- QDataStream& operator<<( QDataStream& stream, const Collection& );
- QDataStream& operator>>( QDataStream& stream, Collection& );
+ TQDataStream& operator<<( TQDataStream& stream, const Collection& );
+ TQDataStream& operator>>( TQDataStream& stream, Collection& );
- template <class t> QDataStream& operator<<( QDataStream&,
+ template <class t> TQDataStream& operator<<( TQDataStream&,
const MrmlElementList<t>& );
- template <class t> QDataStream& operator>>( QDataStream&,
+ template <class t> TQDataStream& operator>>( TQDataStream&,
MrmlElementList<t>& );
- QDataStream& operator<<( QDataStream&, const AlgorithmList& );
- QDataStream& operator>>( QDataStream&, AlgorithmList& );
+ TQDataStream& operator<<( TQDataStream&, const AlgorithmList& );
+ TQDataStream& operator>>( TQDataStream&, AlgorithmList& );
}
diff --git a/kmrml/kmrml/mrml_part.cpp b/kmrml/kmrml/mrml_part.cpp
index 4d3f65e6..ba0cad5e 100644
--- a/kmrml/kmrml/mrml_part.cpp
+++ b/kmrml/kmrml/mrml_part.cpp
@@ -16,16 +16,16 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qgrid.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqgrid.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -90,12 +90,12 @@ KInstance * PartFactory::instance()
return s_instance;
}
-KParts::Part * PartFactory::createPartObject( QWidget *parentWidget,
+KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget,
const char *widgetName,
- QObject *parent,
+ TQObject *parent,
const char *name,
const char *,
- const QStringList& args )
+ const TQStringList& args )
{
return new MrmlPart( parentWidget, widgetName, parent, name, args );
}
@@ -111,14 +111,14 @@ KParts::Part * PartFactory::createPartObject( QWidget *parentWidget,
uint MrmlPart::s_sessionId = 0;
-MrmlPart::MrmlPart( QWidget *parentWidget, const char * /* widgetName */,
- QObject *parent, const char *name,
- const QStringList& /* args */ )
+MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */,
+ TQObject *parent, const char *name,
+ const TQStringList& /* args */ )
: KParts::ReadOnlyPart( parent, name ),
m_job( 0L ),
m_status( NeedCollection )
{
- m_sessionId = QString::number( s_sessionId++ ).prepend("kmrml_");
+ m_sessionId = TQString::number( s_sessionId++ ).prepend("kmrml_");
setName( "MRML Part" );
m_browser = new Browser( this, "mrml browserextension");
@@ -126,59 +126,59 @@ MrmlPart::MrmlPart( QWidget *parentWidget, const char * /* widgetName */,
KConfig *config = PartFactory::instance()->config();
config->setGroup("MRML Settings");
- QVBox *box = new QVBox( parentWidget, "main mrml box" );
+ TQVBox *box = new TQVBox( parentWidget, "main mrml box" );
m_view = new MrmlView( box, "MrmlView" );
- connect( m_view, SIGNAL( activated( const KURL&, ButtonState )),
- this, SLOT( slotActivated( const KURL&, ButtonState )));
- connect( m_view, SIGNAL( onItem( const KURL& )),
- this, SLOT( slotSetStatusBar( const KURL& )));
+ connect( m_view, TQT_SIGNAL( activated( const KURL&, ButtonState )),
+ this, TQT_SLOT( slotActivated( const KURL&, ButtonState )));
+ connect( m_view, TQT_SIGNAL( onItem( const KURL& )),
+ this, TQT_SLOT( slotSetStatusBar( const KURL& )));
- m_panel = new QHGroupBox( box, "buttons box" );
+ m_panel = new TQHGroupBox( box, "buttons box" );
- QGrid *comboGrid = new QGrid( 2, m_panel, "combo grid" );
+ TQGrid *comboGrid = new TQGrid( 2, m_panel, "combo grid" );
comboGrid->setSpacing( KDialog::spacingHint() );
- (void) new QLabel( i18n("Server to query:"), comboGrid );
+ (void) new TQLabel( i18n("Server to query:"), comboGrid );
m_hostCombo = new KComboBox( false, comboGrid, "host combo" );
initHostCombo();
- connect( m_hostCombo, SIGNAL( activated( const QString& ) ),
- SLOT( slotHostComboActivated( const QString& )));
+ connect( m_hostCombo, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotHostComboActivated( const TQString& )));
- (void) new QLabel( i18n("Search in collection:"), comboGrid );
+ (void) new TQLabel( i18n("Search in collection:"), comboGrid );
m_collectionCombo = new CollectionCombo( comboGrid, "collection-combo" );
// will be re-set in initCollections(), but we need to set it here to
// prevent crashes when the connection to the server fails
m_collectionCombo->setCollections( &m_collections );
- m_algoButton = new QPushButton( QString::null, m_panel );
+ m_algoButton = new TQPushButton( TQString::null, m_panel );
m_algoButton->setPixmap( SmallIcon("configure") );
m_algoButton->setFixedSize( m_algoButton->sizeHint() );
- connect( m_algoButton, SIGNAL( clicked() ),
- SLOT( slotConfigureAlgorithm() ));
- QToolTip::add( m_algoButton, i18n("Configure algorithm") );
+ connect( m_algoButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotConfigureAlgorithm() ));
+ TQToolTip::add( m_algoButton, i18n("Configure algorithm") );
- QWidget *spacer = new QWidget( m_panel );
- spacer->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Minimum ) );
+ TQWidget *spacer = new TQWidget( m_panel );
+ spacer->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Minimum ) );
int resultSize = config->readNumEntry( "Result-size", 20 );
m_resultSizeInput = new KIntNumInput( resultSize, m_panel );
m_resultSizeInput->setRange( 1, 100 );
m_resultSizeInput->setLabel( i18n("Maximum result images:") );
- QVBox *tmp = new QVBox( m_panel );
- m_random = new QCheckBox( i18n("Random search"), tmp );
+ TQVBox *tmp = new TQVBox( m_panel );
+ m_random = new TQCheckBox( i18n("Random search"), tmp );
- m_startButton = new QPushButton( QString::null, tmp );
- connect( m_startButton, SIGNAL( clicked() ), SLOT( slotStartClicked() ));
+ m_startButton = new TQPushButton( TQString::null, tmp );
+ connect( m_startButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStartClicked() ));
setStatus( NeedCollection );
setWidget( box );
// setXMLFile( "mrml_part.rc" );
- slotSetStatusBar( QString::null );
+ slotSetStatusBar( TQString::null );
enableServerDependentWidgets( false );
}
@@ -194,7 +194,7 @@ void MrmlPart::enableServerDependentWidgets( bool enable )
m_algoButton->setEnabled( enable && false ); // ### re-enable!!!
}
-void MrmlPart::initCollections( const QDomElement& elem )
+void MrmlPart::initCollections( const TQDomElement& elem )
{
m_collections.initFromDOM( elem );
@@ -212,7 +212,7 @@ void MrmlPart::initCollections( const QDomElement& elem )
m_collectionCombo->updateGeometry(); // adjust the entire grid
}
-void MrmlPart::initAlgorithms( const QDomElement& elem )
+void MrmlPart::initAlgorithms( const TQDomElement& elem )
{
m_algorithms.initFromDOM( elem );
}
@@ -228,8 +228,8 @@ bool MrmlPart::openURL( const KURL& url )
}
m_url = url;
- QString host = url.host().isEmpty() ?
- QString::fromLatin1("localhost") : url.host();
+ TQString host = url.host().isEmpty() ?
+ TQString::fromLatin1("localhost") : url.host();
m_hostCombo->setCurrentItem( host );
@@ -237,8 +237,8 @@ bool MrmlPart::openURL( const KURL& url )
KURL::List downloadList;
m_queryList.clear();
- QString param = url.queryItem( "relevant" );
- QStringList list = QStringList::split( ';', param );
+ TQString param = url.queryItem( "relevant" );
+ TQStringList list = TQStringList::split( ';', param );
// we can only search by example on localhost
if ( host != "localhost" )
@@ -252,7 +252,7 @@ bool MrmlPart::openURL( const KURL& url )
else // localhost query
{
- for( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
KURL u;
if ( (*it).at(0) == '/' )
@@ -272,7 +272,7 @@ bool MrmlPart::openURL( const KURL& url )
// ### we need a real solution for this!
// gift refuses to start when no config file is available.
- if ( !QFile::exists( m_config.mrmldDataDir() + "/gift-config.mrml" ) )
+ if ( !TQFile::exists( m_config.mrmldDataDir() + "/gift-config.mrml" ) )
{
if ( KMessageBox::questionYesNo(0L,
i18n("There are no indexable folders "
@@ -285,7 +285,7 @@ bool MrmlPart::openURL( const KURL& url )
== KMessageBox::Yes )
{
KApplication::kdeinitExec( "kcmshell",
- QString::fromLatin1("kcmkmrml"));
+ TQString::fromLatin1("kcmkmrml"));
setStatus( NeedCollection );
return false;
}
@@ -307,8 +307,8 @@ void MrmlPart::contactServer( const KURL& url )
m_job->addMetaData( MrmlShared::kio_task(), MrmlShared::kio_initialize() );
- QString host = url.host().isEmpty() ?
- QString::fromLatin1("localhost") : url.host();
+ TQString host = url.host().isEmpty() ?
+ TQString::fromLatin1("localhost") : url.host();
slotSetStatusBar( i18n("Connecting to indexing server at %1...").arg( host ));
}
@@ -324,12 +324,12 @@ void MrmlPart::downloadReferenceFiles( const KURL::List& downloadList )
KURL::List::ConstIterator it = downloadList.begin();
for ( ; it != downloadList.end(); it++ )
{
- QString extension;
+ TQString extension;
int index = (*it).fileName().findRev( '.' );
if ( index != -1 )
extension = (*it).fileName().mid( index );
- KTempFile tmpFile( QString::null, extension );
+ KTempFile tmpFile( TQString::null, extension );
if ( tmpFile.status() != 0 )
{
kdWarning() << "Can't create temporary file, skipping: " << *it << endl;
@@ -343,8 +343,8 @@ void MrmlPart::downloadReferenceFiles( const KURL::List& downloadList )
KIO::FileCopyJob *job = KIO::file_copy( *it, destURL, -1,
true /* overwrite tmpfile */ );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDownloadResult( KIO::Job * ) ));
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDownloadResult( KIO::Job * ) ));
m_downloadJobs.append( job );
// ### should this be only called for one job?
emit started( job );
@@ -361,14 +361,14 @@ bool MrmlPart::closeURL()
m_view->stopDownloads();
m_view->clear();
- QPtrListIterator<KIO::FileCopyJob> it( m_downloadJobs );
+ TQPtrListIterator<KIO::FileCopyJob> it( m_downloadJobs );
for ( ; it.current(); ++it )
it.current()->kill();
m_downloadJobs.clear();
- QStringList::Iterator tit = m_tempFiles.begin();
+ TQStringList::Iterator tit = m_tempFiles.begin();
for ( ; tit != m_tempFiles.end(); ++tit )
- QFile::remove( *tit );
+ TQFile::remove( *tit );
m_tempFiles.clear();
if ( m_job ) {
@@ -385,14 +385,14 @@ KIO::TransferJob * MrmlPart::transferJob( const KURL& url )
{
KIO::TransferJob *job = KIO::get( url, true, false ); // reload, no gui
job->setAutoErrorHandlingEnabled( true, m_view );
- connect( job, SIGNAL( result( KIO::Job * )),
- SLOT( slotResult( KIO::Job * )));
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray& )),
- SLOT( slotData( KIO::Job *, const QByteArray& )));
+ connect( job, TQT_SIGNAL( result( KIO::Job * )),
+ TQT_SLOT( slotResult( KIO::Job * )));
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray& )),
+ TQT_SLOT( slotData( KIO::Job *, const TQByteArray& )));
// ###
-// connect( job, SIGNAL( infoMessage( KIO::Job *, const QString& )),
-// SLOT( slotResult( KIO::Job *, const QString& )));
+// connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString& )),
+// TQT_SLOT( slotResult( KIO::Job *, const TQString& )));
job->setWindow( widget() );
if ( !m_sessionId.isEmpty() )
@@ -410,7 +410,7 @@ void MrmlPart::slotResult( KIO::Job *job )
if ( job == m_job )
m_job = 0L;
- slotSetStatusBar( QString::null );
+ slotSetStatusBar( TQString::null );
if ( !job->error() )
emit completed();
@@ -457,29 +457,29 @@ void MrmlPart::slotDownloadResult( KIO::Job *job )
}
// mrml-document in the bytearray
-void MrmlPart::slotData( KIO::Job *, const QByteArray& data )
+void MrmlPart::slotData( KIO::Job *, const TQByteArray& data )
{
if ( data.isEmpty() )
return;
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( data );
if ( !doc.isNull() )
parseMrml( doc );
}
-void MrmlPart::parseMrml( QDomDocument& doc )
+void MrmlPart::parseMrml( TQDomDocument& doc )
{
- QDomNode mrml = doc.documentElement(); // root element
+ TQDomNode mrml = doc.documentElement(); // root element
if ( !mrml.isNull() ) {
- QDomNode child = mrml.firstChild();
+ TQDomNode child = mrml.firstChild();
for ( ; !child.isNull(); child = child.nextSibling() ) {
// qDebug("**** HERE %s", child.nodeName().latin1());
if ( child.isElement() ) {
- QDomElement elem = child.toElement();
+ TQDomElement elem = child.toElement();
- QString tagName = elem.tagName();
+ TQString tagName = elem.tagName();
if ( tagName == "acknowledge-session-op" )
m_sessionId = elem.attribute( MrmlShared::sessionId() );
@@ -510,22 +510,22 @@ void MrmlPart::parseMrml( QDomDocument& doc )
} // !mrml.isNull()
}
-void MrmlPart::parseQueryResult( QDomElement& queryResult )
+void MrmlPart::parseQueryResult( TQDomElement& queryResult )
{
- QDomNode child = queryResult.firstChild();
+ TQDomNode child = queryResult.firstChild();
for ( ; !child.isNull(); child = child.nextSibling() ) {
if ( child.isElement() ) {
- QDomElement elem = child.toElement();
- QString tagName = elem.tagName();
+ TQDomElement elem = child.toElement();
+ TQString tagName = elem.tagName();
if ( tagName == "query-result-element-list" ) {
- QValueList<QDomElement> list =
+ TQValueList<TQDomElement> list =
KMrml::directChildElements( elem, "query-result-element" );
- QValueListConstIterator<QDomElement> it = list.begin();
+ TQValueListConstIterator<TQDomElement> it = list.begin();
for ( ; it != list.end(); ++it )
{
- QDomNamedNodeMap a = (*it).attributes();
+ TQDomNamedNodeMap a = (*it).attributes();
m_view->addItem( KURL( (*it).attribute("image-location" ) ),
KURL( (*it).attribute("thumbnail-location" ) ),
(*it).attribute("calculated-similarity"));
@@ -560,8 +560,8 @@ void MrmlPart::slotStartClicked()
// cut off an eventual query and reference from the url, when the user
// performs a real query (otherwise restoreState() would restore and
// re-do the query from the URL
- m_url.setRef( QString::null );
- m_url.setQuery( QString::null );
+ m_url.setRef( TQString::null );
+ m_url.setQuery( TQString::null );
createQuery();
m_browser->openURLNotify();
@@ -576,8 +576,8 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
if ( relevantItems && relevantItems->isEmpty() )
return;
- QDomDocument doc( "mrml" );
- QDomElement mrml = MrmlCreator::createMrml( doc,
+ TQDomDocument doc( "mrml" );
+ TQDomElement mrml = MrmlCreator::createMrml( doc,
sessionId(),
transactionId() );
@@ -591,7 +591,7 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
MrmlCreator::configureSession( mrml, algo, sessionId() );
}
- QDomElement query = MrmlCreator::addQuery( mrml,
+ TQDomElement query = MrmlCreator::addQuery( mrml,
m_resultSizeInput->value() );
if ( algo.isValid() )
query.setAttribute( MrmlShared::algorithmId(), algo.id() );
@@ -601,7 +601,7 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
// start-up with/without urls on the commandline via mrmlsearch
if ( relevantItems )
{
- QDomElement elem = MrmlCreator::addRelevanceList( query );
+ TQDomElement elem = MrmlCreator::addRelevanceList( query );
KURL::List::ConstIterator it = relevantItems->begin();
for ( ; it != relevantItems->end(); ++it )
MrmlCreator::createRelevanceElement( doc, elem, (*it).url(),
@@ -611,7 +611,7 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
// get relevant items from the view? Only do this when relevantItems is 0L
else if ( !m_random->isChecked() )
{
- QDomElement relevants = MrmlCreator::addRelevanceList( query );
+ TQDomElement relevants = MrmlCreator::addRelevanceList( query );
m_view->addRelevanceToQuery( doc, relevants );
}
@@ -645,26 +645,26 @@ Algorithm MrmlPart::firstAlgorithmForCollection( const Collection& coll ) const
return algo;
}
-// emits the given QDomDocument for eventual plugins, checks after that
+// emits the given TQDomDocument for eventual plugins, checks after that
// if there are any relevance elements. If there are none, random search is
// implied and performed.
// finally, the search is actually started
-void MrmlPart::performQuery( QDomDocument& doc )
+void MrmlPart::performQuery( TQDomDocument& doc )
{
- QDomElement mrml = doc.documentElement();
+ TQDomElement mrml = doc.documentElement();
emit aboutToStartQuery( doc ); // let plugins play with it :)
// no items available? All "neutral"? -> random search
- QDomElement queryStep = KMrml::firstChildElement( mrml, "query-step" );
+ TQDomElement queryStep = KMrml::firstChildElement( mrml, "query-step" );
bool randomSearch = false;
if ( !queryStep.isNull() )
{
- QDomElement relevanceList =
+ TQDomElement relevanceList =
KMrml::firstChildElement(queryStep, "user-relevance-element-list");
- QValueList<QDomElement> relevanceElements =
+ TQValueList<TQDomElement> relevanceElements =
KMrml::directChildElements( relevanceList,
"user-relevance-element" );
@@ -695,7 +695,7 @@ void MrmlPart::performQuery( QDomDocument& doc )
m_job->addMetaData( MrmlShared::mrml_data(), doc.toString() );
}
-void MrmlPart::slotSetStatusBar( const QString& text )
+void MrmlPart::slotSetStatusBar( const TQString& text )
{
if ( text.isEmpty() )
emit setStatusBarText( i18n("Ready.") );
@@ -711,7 +711,7 @@ void MrmlPart::slotActivated( const KURL& url, ButtonState button )
emit m_browser->createNewWindow( url );
else if ( button == RightButton ) {
// enableExtensionActions( url, true ); // for now
- emit m_browser->popupMenu( QCursor::pos(), url, QString::null );
+ emit m_browser->popupMenu( TQCursor::pos(), url, TQString::null );
// enableExtensionActions( url, false );
}
}
@@ -741,10 +741,10 @@ void MrmlPart::slotConfigureAlgorithm()
m_algoConfig = new AlgorithmDialog( m_algorithms, m_collections,
currentCollection(),
m_view, "algorithm configuration" );
- connect( m_algoConfig, SIGNAL( applyClicked() ),
- SLOT( slotApplyAlgoConfig() ));
- connect( m_algoConfig, SIGNAL( finished() ),
- SLOT( slotAlgoConfigFinished() ));
+ connect( m_algoConfig, TQT_SIGNAL( applyClicked() ),
+ TQT_SLOT( slotApplyAlgoConfig() ));
+ connect( m_algoConfig, TQT_SIGNAL( finished() ),
+ TQT_SLOT( slotAlgoConfigFinished() ));
m_algoConfig->show();
}
@@ -756,7 +756,7 @@ void MrmlPart::slotApplyAlgoConfig()
void MrmlPart::slotAlgoConfigFinished()
{
- if ( m_algoConfig->result() == QDialog::Accepted )
+ if ( m_algoConfig->result() == TQDialog::Accepted )
slotApplyAlgoConfig();
m_algoButton->setEnabled( true );
@@ -770,7 +770,7 @@ void MrmlPart::initHostCombo()
m_hostCombo->insertStringList( m_config.hosts() );
}
-void MrmlPart::slotHostComboActivated( const QString& host )
+void MrmlPart::slotHostComboActivated( const TQString& host )
{
ServerSettings settings = m_config.settingsForHost( host );
openURL( settings.getUrl() );
@@ -795,7 +795,7 @@ void MrmlPart::setStatus( Status status )
}
-void MrmlPart::saveState( QDataStream& stream )
+void MrmlPart::saveState( TQDataStream& stream )
{
stream << url();
stream << m_sessionId;
@@ -809,7 +809,7 @@ void MrmlPart::saveState( QDataStream& stream )
m_view->saveState( stream );
}
-void MrmlPart::restoreState( QDataStream& stream )
+void MrmlPart::restoreState( TQDataStream& stream )
{
KURL url;
stream >> url;
diff --git a/kmrml/kmrml/mrml_part.h b/kmrml/kmrml/mrml_part.h
index 110d290a..84ce0529 100644
--- a/kmrml/kmrml/mrml_part.h
+++ b/kmrml/kmrml/mrml_part.h
@@ -19,8 +19,8 @@
#ifndef MRMLPART_H
#define MRMLPART_H
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kparts/factory.h>
@@ -30,9 +30,9 @@
#include "mrml_elements.h"
-class QCheckBox;
-class QHGroupBox;
-class QPushButton;
+class TQCheckBox;
+class TQHGroupBox;
+class TQPushButton;
class KAboutData;
class KComboBox;
@@ -58,15 +58,15 @@ class MrmlPart : public KParts::ReadOnlyPart
public:
enum Status { NeedCollection, CanSearch, InProgress };
- MrmlPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList& args );
+ MrmlPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList& args );
~MrmlPart();
- QString sessionId() const { return m_sessionId; }
- QString transactionId() const { return QString::null; } // ###
+ TQString sessionId() const { return m_sessionId; }
+ TQString transactionId() const { return TQString::null; } // ###
- void saveState( QDataStream& stream );
- void restoreState( QDataStream& stream );
+ void saveState( TQDataStream& stream );
+ void restoreState( TQDataStream& stream );
static KAboutData *createAboutData();
@@ -85,16 +85,16 @@ signals:
/**
* allow plugins to extend the query
*/
- void aboutToStartQuery( QDomDocument& );
+ void aboutToStartQuery( TQDomDocument& );
private slots:
void slotStartClicked();
- void slotSetStatusBar( const QString& );
+ void slotSetStatusBar( const TQString& );
void slotSetStatusBar( const KURL& url ) { slotSetStatusBar( url.prettyURL() ); }
- void slotHostComboActivated( const QString& );
+ void slotHostComboActivated( const TQString& );
void slotResult( KIO::Job * );
- void slotData( KIO::Job *, const QByteArray& );
+ void slotData( KIO::Job *, const TQByteArray& );
void slotDownloadResult( KIO::Job * );
@@ -104,11 +104,11 @@ private slots:
private:
void createQuery( const KURL::List * relevantItems = 0L );
- void initCollections( const QDomElement& );
- void initAlgorithms( const QDomElement& );
- void performQuery( QDomDocument& doc );
- void parseMrml( QDomDocument& doc );
- void parseQueryResult( QDomElement& );
+ void initCollections( const TQDomElement& );
+ void initAlgorithms( const TQDomElement& );
+ void performQuery( TQDomDocument& doc );
+ void parseMrml( TQDomDocument& doc );
+ void parseQueryResult( TQDomElement& );
void enableExtensionActions( const KURL& url, bool enable );
KIO::TransferJob * transferJob( const KURL& url );
@@ -125,18 +125,18 @@ private:
Config m_config;
KIntNumInput * m_resultSizeInput;
CollectionCombo * m_collectionCombo;
- QPushButton *m_algoButton;
- QHGroupBox *m_panel;
- QPushButton *m_startButton;
- QCheckBox *m_random;
+ TQPushButton *m_algoButton;
+ TQHGroupBox *m_panel;
+ TQPushButton *m_startButton;
+ TQCheckBox *m_random;
Browser *m_browser;
AlgorithmDialog *m_algoConfig;
KComboBox *m_hostCombo;
- QPtrList<KIO::FileCopyJob> m_downloadJobs;
- QStringList m_tempFiles;
+ TQPtrList<KIO::FileCopyJob> m_downloadJobs;
+ TQStringList m_tempFiles;
- QString m_sessionId;
+ TQString m_sessionId;
KURL::List m_queryList; // a list of valid LOCAL (!) urls to query for
CollectionList m_collections;
@@ -158,12 +158,12 @@ public:
static KInstance * instance();
protected:
- virtual KParts::Part * createPartObject( QWidget *parentWidget = 0,
+ virtual KParts::Part * createPartObject( TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
const char *classname = "KParts::Part",
- const QStringList& args = QStringList() );
+ const TQStringList& args = TQStringList() );
private:
static KInstance * s_instance;
diff --git a/kmrml/kmrml/mrml_view.cpp b/kmrml/kmrml/mrml_view.cpp
index 71f3c741..89c15061 100644
--- a/kmrml/kmrml/mrml_view.cpp
+++ b/kmrml/kmrml/mrml_view.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kcursor.h>
#include <kdatastream.h>
@@ -37,8 +37,8 @@
using namespace KMrml;
-MrmlView::MrmlView( QWidget *parent, const char *name )
- : QScrollView( parent, name )
+MrmlView::MrmlView( TQWidget *parent, const char *name )
+ : TQScrollView( parent, name )
{
setStaticBackground( true );
setResizePolicy( Manual );
@@ -47,22 +47,22 @@ MrmlView::MrmlView( QWidget *parent, const char *name )
m_items.setAutoDelete( true );
- connect( Loader::self(), SIGNAL( finished(const KURL&, const QByteArray&)),
- SLOT( slotDownloadFinished( const KURL&, const QByteArray& )));
+ connect( Loader::self(), TQT_SIGNAL( finished(const KURL&, const TQByteArray&)),
+ TQT_SLOT( slotDownloadFinished( const KURL&, const TQByteArray& )));
- m_timer = new QTimer( this );
- connect( m_timer, SIGNAL( timeout() ), SLOT( slotLayout() ));
+ m_timer = new TQTimer( this );
+ connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayout() ));
// we need a pixmap to be shown when no thumbnail is available for a
// query result image
- QLabel l( i18n( "No thumbnail available" ), 0L );
+ TQLabel l( i18n( "No thumbnail available" ), 0L );
l.setFixedSize( 80, 80 );
l.setAlignment( WordBreak | AlignCenter );
-// l.setFrameStyle( QLabel::Box | QLabel::Plain );
+// l.setFrameStyle( TQLabel::Box | TQLabel::Plain );
// l.setLineWidth( 1 );
l.setPaletteBackgroundColor( Qt::white );
l.setPaletteForegroundColor( Qt::black );
- m_unavailablePixmap = QPixmap::grabWidget( &l );
+ m_unavailablePixmap = TQPixmap::grabWidget( &l );
}
MrmlView::~MrmlView()
@@ -70,7 +70,7 @@ MrmlView::~MrmlView()
}
MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL,
- const QString& similarity )
+ const TQString& similarity )
{
bool ok;
double value = similarity.toDouble( &ok );
@@ -92,7 +92,7 @@ MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL,
// qDebug("** url: %s", thumbURL.url().latin1());
MrmlViewItem *item = new MrmlViewItem( url, thumbURL, similarity, this );
- QPixmap *pixmap = getPixmap( thumbURL );
+ TQPixmap *pixmap = getPixmap( thumbURL );
if ( pixmap )
item->setPixmap( *pixmap );
@@ -102,10 +102,10 @@ MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL,
return item;
}
-void MrmlView::addRelevanceToQuery( QDomDocument& document,
- QDomElement& parent )
+void MrmlView::addRelevanceToQuery( TQDomDocument& document,
+ TQDomElement& parent )
{
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
it.current()->createRelevanceElement( document, parent );
}
@@ -117,15 +117,15 @@ void MrmlView::clear()
setContentsPos( 0, 0 );
}
-QPixmap * MrmlView::getPixmap( const KURL& url )
+TQPixmap * MrmlView::getPixmap( const KURL& url )
{
- QString u = url.url();
- QPixmap *pix = m_pixmapCache.find( u );
+ TQString u = url.url();
+ TQPixmap *pix = m_pixmapCache.find( u );
if ( pix )
return pix;
if ( url.isLocalFile() ) {
- QPixmap p;
+ TQPixmap p;
if ( !p.load( url.path() ) )
p = m_unavailablePixmap;
@@ -139,14 +139,14 @@ QPixmap * MrmlView::getPixmap( const KURL& url )
return 0L;
}
-void MrmlView::slotDownloadFinished( const KURL& url, const QByteArray& data )
+void MrmlView::slotDownloadFinished( const KURL& url, const TQByteArray& data )
{
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
MrmlViewItem *item = it.current();
if ( item->thumbURL() == url )
{
- QPixmap p;
+ TQPixmap p;
if ( data.isEmpty() || !p.loadFromData( data ) )
p = m_unavailablePixmap;
@@ -162,7 +162,7 @@ void MrmlView::slotDownloadFinished( const KURL& url, const QByteArray& data )
void MrmlView::stopDownloads()
{
Loader *loader = Loader::self();
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
MrmlViewItem *item = it.current();
if ( !item->hasRemotePixmap() )
@@ -173,7 +173,7 @@ void MrmlView::stopDownloads()
void MrmlView::slotLayout()
{
int itemWidth = 0;
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for ( ; it.current(); ++it ) {
itemWidth = QMAX( itemWidth, it.current()->sizeHint().width() );
@@ -190,7 +190,7 @@ void MrmlView::slotLayout()
uint y = 5;
// pointing to the first item of a row
- QPtrListIterator<MrmlViewItem> rowIt( m_items );
+ TQPtrListIterator<MrmlViewItem> rowIt( m_items );
for ( it.toFirst(); it.current(); ++it ) {
if ( item >= itemsPerRow ) {
@@ -222,26 +222,26 @@ void MrmlView::slotLayout()
resizeContents( visibleWidth(), y + rowHeight );
}
-void MrmlView::resizeEvent( QResizeEvent *e )
+void MrmlView::resizeEvent( TQResizeEvent *e )
{
int oldW = visibleWidth();
- QScrollView::resizeEvent( e );
+ TQScrollView::resizeEvent( e );
if ( visibleWidth() != oldW )
slotLayout();
}
-void MrmlView::saveState( QDataStream& stream )
+void MrmlView::saveState( TQDataStream& stream )
{
stream << m_items.count();
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
stream << *it.current();
}
}
-void MrmlView::restoreState( QDataStream& stream )
+void MrmlView::restoreState( TQDataStream& stream )
{
stopDownloads();
clear();
@@ -268,7 +268,7 @@ void MrmlView::restoreState( QDataStream& stream )
}
}
-QDataStream& KMrml::operator<<( QDataStream& stream,
+TQDataStream& KMrml::operator<<( TQDataStream& stream,
const KMrml::MrmlViewItem& item )
{
return stream << item.url()
@@ -284,7 +284,7 @@ QDataStream& KMrml::operator<<( QDataStream& stream,
MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL,
double similarity, MrmlView *view,
const char *name )
- : QFrame( view->viewport() , name ),
+ : TQFrame( view->viewport() , name ),
m_view( view ),
m_url( url ),
m_thumbURL( thumbURL ),
@@ -297,7 +297,7 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL,
setMouseTracking( true );
m_combo = new KComboBox( this );
- QToolTip::add( m_combo, i18n("You can refine queries by giving feedback about the current result and pressing the Search button again.") );
+ TQToolTip::add( m_combo, i18n("You can refine queries by giving feedback about the current result and pressing the Search button again.") );
m_combo->insertItem( i18n("Relevant"), Relevant );
m_combo->insertItem( i18n("Neutral"), Neutral );
m_combo->insertItem( i18n("Irrelevant"), Irrelevant );
@@ -306,11 +306,11 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL,
/*
if ( similarity > -1 )
- QToolTip::add( this, QString::fromLatin1("<qt>%1<br>%1</qt>")
+ TQToolTip::add( this, TQString::fromLatin1("<qt>%1<br>%1</qt>")
.arg( url )
- .arg(i18n("Similarity: %1").arg( QString::number(similarity))));
+ .arg(i18n("Similarity: %1").arg( TQString::number(similarity))));
else
- QToolTip::add( this, QString::fromLatin1("<qt>%1</qt>").arg( url ) );
+ TQToolTip::add( this, TQString::fromLatin1("<qt>%1</qt>").arg( url ) );
*/
setMinimumSize( 130, 130 ); // ###
@@ -320,7 +320,7 @@ MrmlViewItem::~MrmlViewItem()
{
}
-void MrmlViewItem::setPixmap( const QPixmap& pix )
+void MrmlViewItem::setPixmap( const TQPixmap& pix )
{
if ( !m_url.isLocalFile() )
m_hasRemotePixmap = true;
@@ -330,9 +330,9 @@ void MrmlViewItem::setPixmap( const QPixmap& pix )
update();
}
-void MrmlViewItem::paintEvent( QPaintEvent *e )
+void MrmlViewItem::paintEvent( TQPaintEvent *e )
{
- QFrame::paintEvent( e );
+ TQFrame::paintEvent( e );
if ( !m_pixmap.isNull() ) {
bitBlt( this, pixmapX(), pixmapY(),
@@ -341,8 +341,8 @@ void MrmlViewItem::paintEvent( QPaintEvent *e )
}
if ( m_similarity >= 0 ) {
- QPainter p( this );
- QPen pen( colorGroup().highlight(), 1, QPen::SolidLine );
+ TQPainter p( this );
+ TQPen pen( colorGroup().highlight(), 1, TQPen::SolidLine );
p.setPen( pen );
int x = margin;
int y = m_combo->y() - similarityHeight - 2;
@@ -353,15 +353,15 @@ void MrmlViewItem::paintEvent( QPaintEvent *e )
}
}
-void MrmlViewItem::resizeEvent( QResizeEvent *e )
+void MrmlViewItem::resizeEvent( TQResizeEvent *e )
{
- QFrame::resizeEvent( e );
+ TQFrame::resizeEvent( e );
int y = height() - m_combo->height() - margin;
m_combo->move( width()/2 - m_combo->width()/2, y );
}
-QSize MrmlViewItem::sizeHint() const
+TQSize MrmlViewItem::sizeHint() const
{
int w = QMAX( QMAX(minimumHeight(), m_combo->width()), m_pixmap.width() );
w += 2 * margin;
@@ -370,12 +370,12 @@ QSize MrmlViewItem::sizeHint() const
h += (m_similarity > -1) ? similarityHeight + spacing : 0;
h += m_combo->height() + margin;
- return QSize( w, h );
+ return TQSize( w, h );
}
-void MrmlViewItem::mousePressEvent( QMouseEvent *e )
+void MrmlViewItem::mousePressEvent( TQMouseEvent *e )
{
- QFrame::mousePressEvent( e );
+ TQFrame::mousePressEvent( e );
pressedPos.setX( 0 );
pressedPos.setY( 0 );
@@ -388,7 +388,7 @@ void MrmlViewItem::mousePressEvent( QMouseEvent *e )
emit view()->activated( m_url, e->button() );
}
-void MrmlViewItem::mouseMoveEvent( QMouseEvent *e )
+void MrmlViewItem::mouseMoveEvent( TQMouseEvent *e )
{
if ( hitsPixmap( e->pos() ) ) {
if ( !ownCursor() ) { // nice hacklet :)
@@ -404,7 +404,7 @@ void MrmlViewItem::mouseMoveEvent( QMouseEvent *e )
}
if ( (e->state() & LeftButton) && !pressedPos.isNull() ) {
- QPoint dist = e->pos() - pressedPos;
+ TQPoint dist = e->pos() - pressedPos;
if ( dist.manhattanLength() > KGlobalSettings::dndEventDelay() ) {
// start drag here
KURL::List urls;
@@ -417,17 +417,17 @@ void MrmlViewItem::mouseMoveEvent( QMouseEvent *e )
}
}
-void MrmlViewItem::mouseReleaseEvent( QMouseEvent *e )
+void MrmlViewItem::mouseReleaseEvent( TQMouseEvent *e )
{
if ( hitsPixmap( e->pos() )) {
- QPoint dist = e->pos() - pressedPos;
+ TQPoint dist = e->pos() - pressedPos;
if ( dist.manhattanLength() < KGlobalSettings::dndEventDelay() ) {
emit view()->activated( m_url, e->button() );
}
}
}
-bool MrmlViewItem::hitsPixmap( const QPoint& pos ) const
+bool MrmlViewItem::hitsPixmap( const TQPoint& pos ) const
{
if ( m_pixmap.isNull() )
return false;
@@ -438,8 +438,8 @@ bool MrmlViewItem::hitsPixmap( const QPoint& pos ) const
return false;
}
-void MrmlViewItem::createRelevanceElement( QDomDocument& document,
- QDomElement& parent )
+void MrmlViewItem::createRelevanceElement( TQDomDocument& document,
+ TQDomElement& parent )
{
int rel = m_combo->currentItem();
if ( rel == Neutral )
@@ -463,8 +463,8 @@ void MrmlViewItem::setRelevance( Relevance relevance )
///////////////////////////////////////////////////////////////////
-int MrmlViewItemList::compareItems( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+int MrmlViewItemList::compareItems( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
double s1 = (static_cast<MrmlViewItem*>( item1 ))->similarity();
double s2 = (static_cast<MrmlViewItem*>( item2 ))->similarity();
diff --git a/kmrml/kmrml/mrml_view.h b/kmrml/kmrml/mrml_view.h
index f6c9f58c..f48c80be 100644
--- a/kmrml/kmrml/mrml_view.h
+++ b/kmrml/kmrml/mrml_view.h
@@ -19,16 +19,16 @@
#ifndef MRML_VIEW_H
#define MRML_VIEW_H
-#include <qevent.h>
-#include <qframe.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qscrollview.h>
+#include <tqevent.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqscrollview.h>
-class QDomDocument;
-class QDomElement;
-class QTimer;
+class TQDomDocument;
+class TQDomElement;
+class TQTimer;
class KComboBox;
@@ -38,11 +38,11 @@ namespace KMrml
class MrmlViewItem;
-class MrmlViewItemList : public QPtrList<MrmlViewItem>
+class MrmlViewItemList : public TQPtrList<MrmlViewItem>
{
protected:
// sort by similarity
- virtual int compareItems( QPtrCollection::Item, QPtrCollection::Item );
+ virtual int compareItems( TQPtrCollection::Item, TQPtrCollection::Item );
};
@@ -54,16 +54,16 @@ class MrmlView : public QScrollView
Q_OBJECT
public:
- MrmlView( QWidget *parent = 0L, const char *name = 0L );
+ MrmlView( TQWidget *parent = 0L, const char *name = 0L );
~MrmlView();
MrmlViewItem * addItem( const KURL& url, const KURL& thumbURL,
- const QString& similarity );
+ const TQString& similarity );
MrmlViewItem * addItem( const KURL& url, const KURL& thumbURL,
double similarity );
- void addRelevanceToQuery( QDomDocument&, QDomElement& parent );
+ void addRelevanceToQuery( TQDomDocument&, TQDomElement& parent );
void clear();
@@ -71,30 +71,30 @@ public:
void stopDownloads();
- void saveState( QDataStream& stream );
- void restoreState( QDataStream& stream );
+ void saveState( TQDataStream& stream );
+ void restoreState( TQDataStream& stream );
signals:
void activated( const KURL& url, ButtonState button );
void onItem( const KURL& url );
protected:
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
private slots:
void slotLayout();
- void slotDownloadFinished( const KURL&, const QByteArray& );
+ void slotDownloadFinished( const KURL&, const TQByteArray& );
private:
/**
* @returns a _temporary_ pointer to a pixmap. Copy it!
*/
- QPixmap * getPixmap( const KURL& url );
+ TQPixmap * getPixmap( const KURL& url );
MrmlViewItemList m_items;
- QTimer *m_timer;
- QPixmapCache m_pixmapCache;
- QPixmap m_unavailablePixmap;
+ TQTimer *m_timer;
+ TQPixmapCache m_pixmapCache;
+ TQPixmap m_unavailablePixmap;
};
@@ -116,15 +116,15 @@ public:
MrmlView *view, const char *name=0L );
virtual ~MrmlViewItem();
- void setPixmap( const QPixmap& pixmap );
+ void setPixmap( const TQPixmap& pixmap );
- void createRelevanceElement( QDomDocument& document, QDomElement& parent );
+ void createRelevanceElement( TQDomDocument& document, TQDomElement& parent );
double similarity() const { return m_similarity; }
void setSimilarity( double value );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
const KURL& url() const { return m_url; }
const KURL& thumbURL() const { return m_thumbURL; }
@@ -135,15 +135,15 @@ public:
void setRelevance( Relevance relevance );
protected:
- virtual void paintEvent( QPaintEvent * );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
private:
- bool hitsPixmap( const QPoint& ) const;
+ bool hitsPixmap( const TQPoint& ) const;
MrmlView * view() const { return m_view; }
inline int pixmapX() const {
@@ -159,13 +159,13 @@ private:
KURL m_url;
KURL m_thumbURL;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
double m_similarity;
const int similarityFullWidth;
bool m_hasRemotePixmap;
- QPoint pressedPos;
+ TQPoint pressedPos;
static const int spacing = 3;
static const int margin = 5;
@@ -173,7 +173,7 @@ private:
};
-QDataStream& operator <<( QDataStream& stream, const KMrml::MrmlViewItem& );
+TQDataStream& operator <<( TQDataStream& stream, const KMrml::MrmlViewItem& );
}
diff --git a/kmrml/kmrml/mrmlsearch.cpp b/kmrml/kmrml/mrmlsearch.cpp
index 6f411313..a2774fb9 100644
--- a/kmrml/kmrml/mrmlsearch.cpp
+++ b/kmrml/kmrml/mrmlsearch.cpp
@@ -30,8 +30,8 @@
#include <unistd.h>
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <kglobal.h>
#include <kinstance.h>
@@ -41,12 +41,12 @@
extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
{
- QString query;
+ TQString query;
for ( int i = 1; i < argc; i++ ) {
if ( i > 1 )
query += ';';
- QString path = QFile::decodeName( argv[i] );
+ TQString path = TQFile::decodeName( argv[i] );
if ( path.at( 0 ) == '/' ) {
KURL u;
u.setPath( path );
@@ -69,6 +69,6 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
qDebug("***** Query: %s ** URL: %s", query.latin1(), url.url().latin1());
return execlp( "kfmclient",
- "kfmclient", "openURL", QFile::encodeName(url.url()).data(),
+ "kfmclient", "openURL", TQFile::encodeName(url.url()).data(),
"text/mrml", (void *)0 );
}
diff --git a/kmrml/kmrml/propertysheet.cpp b/kmrml/kmrml/propertysheet.cpp
index ec46aac0..af913558 100644
--- a/kmrml/kmrml/propertysheet.cpp
+++ b/kmrml/kmrml/propertysheet.cpp
@@ -22,18 +22,18 @@
#include "mrml_shared.h"
#include <knuminput.h>
-#include <qwidget.h>
+#include <tqwidget.h>
using namespace KMrml;
-template class QValueList<QDomElement>;
+template class TQValueList<TQDomElement>;
PropertySheet::PropertySheet()
{
init();
}
-PropertySheet::PropertySheet( const QDomElement& elem )
+PropertySheet::PropertySheet( const TQDomElement& elem )
{
init();
@@ -67,7 +67,7 @@ PropertySheet& PropertySheet::operator= ( const PropertySheet& ps )
m_maxSubsetSize = ps.m_maxSubsetSize;
// deep copy of m_subSheets
- QPtrListIterator<PropertySheet> it( ps.m_subSheets );
+ TQPtrListIterator<PropertySheet> it( ps.m_subSheets );
for ( ; it.current(); ++it )
m_subSheets.append( new PropertySheet( *it.current() ) );
@@ -80,7 +80,7 @@ void PropertySheet::init()
m_visibility = Visible;
}
-void PropertySheet::initFromDOM( const QDomElement& elem )
+void PropertySheet::initFromDOM( const TQDomElement& elem )
{
m_subSheets.clear();
@@ -98,16 +98,16 @@ void PropertySheet::initFromDOM( const QDomElement& elem )
m_minSubsetSize = toInt( elem.attribute( MrmlShared::minSubsetSize() ));
m_maxSubsetSize = toInt( elem.attribute( MrmlShared::maxSubsetSize() ));
- QValueList<QDomElement> children =
+ TQValueList<TQDomElement> children =
KMrml::directChildElements( elem, MrmlShared::propertySheet() );
- QValueListConstIterator<QDomElement> it = children.begin();
+ TQValueListConstIterator<TQDomElement> it = children.begin();
for ( ; it != children.end(); ++it )
m_subSheets.append( new PropertySheet( *it ) );
}
-QWidget * PropertySheet::createWidget( QWidget */*parent*/, const char */*name*/ )
+TQWidget * PropertySheet::createWidget( TQWidget */*parent*/, const char */*name*/ )
{
- QWidget *w = 0L;
+ TQWidget *w = 0L;
switch ( m_type )
{
@@ -138,7 +138,7 @@ QWidget * PropertySheet::createWidget( QWidget */*parent*/, const char */*name*/
//
// static methods
//
-PropertySheet::Visibility PropertySheet::getVisibility( const QString& value )
+PropertySheet::Visibility PropertySheet::getVisibility( const TQString& value )
{
Visibility vis;
@@ -152,7 +152,7 @@ PropertySheet::Visibility PropertySheet::getVisibility( const QString& value )
return vis;
}
-PropertySheet::Type PropertySheet::getType( const QString& value )
+PropertySheet::Type PropertySheet::getType( const TQString& value )
{
Type type = (Type) 0;
@@ -178,7 +178,7 @@ PropertySheet::Type PropertySheet::getType( const QString& value )
return type;
}
-PropertySheet::SendType PropertySheet::getSendType( const QString& value )
+PropertySheet::SendType PropertySheet::getSendType( const TQString& value )
{
SendType type = (SendType) 0;
@@ -198,7 +198,7 @@ PropertySheet::SendType PropertySheet::getSendType( const QString& value )
return type;
}
-int PropertySheet::toInt( const QString& value, int defaultValue )
+int PropertySheet::toInt( const TQString& value, int defaultValue )
{
bool ok = false;
int res = value.toInt( &ok );
diff --git a/kmrml/kmrml/propertysheet.h b/kmrml/kmrml/propertysheet.h
index 029d0242..e4759282 100644
--- a/kmrml/kmrml/propertysheet.h
+++ b/kmrml/kmrml/propertysheet.h
@@ -19,11 +19,11 @@
#ifndef PROPERTYSHEET_H
#define PROPERTYSHEET_H
-#include <qdom.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
-class QWidget;
+class TQWidget;
namespace KMrml
{
@@ -59,7 +59,7 @@ namespace KMrml
};
PropertySheet();
- PropertySheet( const QDomElement& elem );
+ PropertySheet( const TQDomElement& elem );
PropertySheet( const PropertySheet& ps );
~PropertySheet() {};
@@ -69,32 +69,32 @@ namespace KMrml
// required mrml attributes
return !m_id.isNull() && m_type != 0 && m_sendType != 0;
}
- void initFromDOM( const QDomElement& elem );
+ void initFromDOM( const TQDomElement& elem );
- void toElement( QDomElement& parent );
+ void toElement( TQDomElement& parent );
- QWidget * createWidget( QWidget *parent, const char *name = 0 );
+ TQWidget * createWidget( TQWidget *parent, const char *name = 0 );
private:
- static Visibility getVisibility( const QString& value );
- static Type getType( const QString& value );
- static SendType getSendType( const QString& value );
- static int toInt( const QString& value, int defaultValue = 0 );
+ static Visibility getVisibility( const TQString& value );
+ static Type getType( const TQString& value );
+ static SendType getSendType( const TQString& value );
+ static int toInt( const TQString& value, int defaultValue = 0 );
void init();
// update operator=() when adding data members!
- QPtrList<PropertySheet> m_subSheets;
+ TQPtrList<PropertySheet> m_subSheets;
Visibility m_visibility;
Type m_type;
- QString m_caption;
- QString m_id;
+ TQString m_caption;
+ TQString m_id;
SendType m_sendType;
- QString m_sendName;
- QString m_sendValue;
+ TQString m_sendName;
+ TQString m_sendValue;
int m_minRange;
int m_maxRange;
diff --git a/kmrml/kmrml/propertywidgets.cpp b/kmrml/kmrml/propertywidgets.cpp
index ef00b18f..18508f3a 100644
--- a/kmrml/kmrml/propertywidgets.cpp
+++ b/kmrml/kmrml/propertywidgets.cpp
@@ -19,8 +19,8 @@
#include "propertywidgets.h"
IntegerWidget::IntegerWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -39,8 +39,8 @@ int IntegerWidget::value() const
///////////////////////////////////////////////////////////////////
ComboWidget::ComboWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -50,7 +50,7 @@ ComboWidget::~ComboWidget()
}
-QString ComboWidget::value() const
+TQString ComboWidget::value() const
{
}
@@ -60,8 +60,8 @@ QString ComboWidget::value() const
///////////////////////////////////////////////////////////////////
CheckBoxWidget::CheckBoxWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -81,8 +81,8 @@ bool CheckBoxWidget::value() const
///////////////////////////////////////////////////////////////////
LineEditWidget::LineEditWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -92,7 +92,7 @@ LineEditWidget::~LineEditWidget()
}
-QString LineEditWidget::value() const
+TQString LineEditWidget::value() const
{
}
@@ -102,8 +102,8 @@ QString LineEditWidget::value() const
///////////////////////////////////////////////////////////////////
ListBoxWidget::ListBoxWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -113,7 +113,7 @@ ListBoxWidget::~ListBoxWidget()
}
-QStringList ListBoxWidget::value() const
+TQStringList ListBoxWidget::value() const
{
}
diff --git a/kmrml/kmrml/propertywidgets.h b/kmrml/kmrml/propertywidgets.h
index c738d03d..def1d2ca 100644
--- a/kmrml/kmrml/propertywidgets.h
+++ b/kmrml/kmrml/propertywidgets.h
@@ -19,7 +19,7 @@
#ifndef PROPERTYWIDGETS_H
#define PROPERTYWIDGETS_H
-#include <qhbox.h>
+#include <tqhbox.h>
#include "propertysheet.h"
@@ -31,7 +31,7 @@ namespace KMrml
public:
IntegerWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~IntegerWidget();
int value() const;
@@ -46,10 +46,10 @@ namespace KMrml
public:
ComboWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~ComboWidget();
- QString value() const;
+ TQString value() const;
private:
@@ -61,7 +61,7 @@ namespace KMrml
public:
CheckBoxWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~CheckBoxWidget();
bool value();
@@ -78,10 +78,10 @@ namespace KMrml
public:
LineEditWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~LineEditWidget();
- QString value();
+ TQString value();
private:
@@ -93,10 +93,10 @@ namespace KMrml
public:
ListBoxWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~ListBoxWidget();
- QStringList values();
+ TQStringList values();
private:
diff --git a/kmrml/kmrml/server/watcher.cpp b/kmrml/kmrml/server/watcher.cpp
index e6137cc5..96314257 100644
--- a/kmrml/kmrml/server/watcher.cpp
+++ b/kmrml/kmrml/server/watcher.cpp
@@ -28,7 +28,7 @@
using namespace KMrml;
-Watcher::Watcher( const QCString& name )
+Watcher::Watcher( const TQCString& name )
: KDEDModule( name )
{
m_daemons.setAutoDelete( true );
@@ -36,8 +36,8 @@ Watcher::Watcher( const QCString& name )
// safety, for clients that die without unregistering
KApplication::dcopClient()->setNotifications( true );
connect( KApplication::dcopClient(),
- SIGNAL( applicationRemoved( const QCString& )),
- SLOT( slotAppUnregistered( const QCString& )));
+ TQT_SIGNAL( applicationRemoved( const TQCString& )),
+ TQT_SLOT( slotAppUnregistered( const TQCString& )));
}
Watcher::~Watcher()
@@ -45,9 +45,9 @@ Watcher::~Watcher()
KApplication::dcopClient()->setNotifications( false );
}
-bool Watcher::requireDaemon( const QCString& clientAppId,
- const QString& daemonKey,
- const QString& commandline,
+bool Watcher::requireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey,
+ const TQString& commandline,
uint timeout /* seconds */,
int restartOnFailure )
{
@@ -84,20 +84,20 @@ bool Watcher::requireDaemon( const QCString& clientAppId,
daemon->process->setEnvironment( "LANG", "C" );
daemon->process->setEnvironment( "LANGUAGE", "C" );
*daemon->process << commandline;
- connect( daemon->process, SIGNAL( processExited( KProcess * ) ),
- SLOT( slotProcExited( KProcess * )));
+ connect( daemon->process, TQT_SIGNAL( processExited( KProcess * ) ),
+ TQT_SLOT( slotProcExited( KProcess * )));
return startDaemon( daemon );
}
}
-void Watcher::unrequireDaemon( const QCString& clientAppId,
- const QString& daemonKey )
+void Watcher::unrequireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey )
{
unrequireDaemon( m_daemons.find( daemonKey ), clientAppId );
}
void Watcher::unrequireDaemon( DaemonData *daemon,
- const QCString& clientAppId )
+ const TQCString& clientAppId )
{
if ( daemon )
{
@@ -106,9 +106,9 @@ void Watcher::unrequireDaemon( DaemonData *daemon,
{
if ( !daemon->timer )
{
- daemon->timer = new QTimer();
- connect( daemon->timer, SIGNAL( timeout() ),
- SLOT( slotTimeout() ));
+ daemon->timer = new TQTimer();
+ connect( daemon->timer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotTimeout() ));
}
daemon->timer->start( daemon->timeout * 1000, true );
}
@@ -118,10 +118,10 @@ void Watcher::unrequireDaemon( DaemonData *daemon,
<< clientAppId << endl;
}
-QStringList Watcher::runningDaemons() const
+TQStringList Watcher::runningDaemons() const
{
- QStringList result;
- QDictIterator<DaemonData> it( m_daemons );
+ TQStringList result;
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; it.current(); ++it )
result.append( it.current()->commandline );
@@ -188,7 +188,7 @@ bool Watcher::startDaemon( DaemonData *daemon )
void Watcher::slotTimeout()
{
- QTimer *timer = static_cast<QTimer*>( const_cast<QObject *>( sender() ) );
+ TQTimer *timer = static_cast<TQTimer*>( const_cast<TQObject *>( sender() ) );
DaemonData *daemon = findDaemonFromTimer( timer );
if ( daemon )
{
@@ -197,7 +197,7 @@ void Watcher::slotTimeout()
// the daemon and KProcess might get deleted by killing the
// KProcess (through slotProcExited()), so don't dereference
// daemon after proc->kill()
- QString key = daemon->daemonKey;
+ TQString key = daemon->daemonKey;
// noone registered during the timeout, so kill the daemon
if ( !daemon->process->kill() )
@@ -211,7 +211,7 @@ void Watcher::slotTimeout()
DaemonData * Watcher::findDaemonFromProcess( KProcess *proc )
{
DaemonData *daemon;
- QDictIterator<DaemonData> it( m_daemons );
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; (daemon = it.current()); ++it )
{
if ( daemon->process == proc )
@@ -221,10 +221,10 @@ DaemonData * Watcher::findDaemonFromProcess( KProcess *proc )
return 0L;
}
-DaemonData * Watcher::findDaemonFromTimer( QTimer *timer )
+DaemonData * Watcher::findDaemonFromTimer( TQTimer *timer )
{
DaemonData *daemon;
- QDictIterator<DaemonData> it( m_daemons );
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; (daemon = it.current()); ++it )
{
if ( daemon->timer == timer )
@@ -234,13 +234,13 @@ DaemonData * Watcher::findDaemonFromTimer( QTimer *timer )
return 0L;
}
-void Watcher::slotAppUnregistered( const QCString& appId )
+void Watcher::slotAppUnregistered( const TQCString& appId )
{
if ( m_daemons.isEmpty() )
return;
DaemonData *daemon;
- QDictIterator<DaemonData> it( m_daemons );
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; (daemon = it.current()); ++it )
{
if ( daemon->apps.find( appId ) != -1 )
@@ -270,7 +270,7 @@ void Watcher::emitFailure( DaemonData *daemon )
}
extern "C" {
- KDE_EXPORT KDEDModule *create_daemonwatcher(const QCString & obj )
+ KDE_EXPORT KDEDModule *create_daemonwatcher(const TQCString & obj )
{
return new Watcher( obj );
}
diff --git a/kmrml/kmrml/server/watcher.h b/kmrml/kmrml/server/watcher.h
index 67d9b5e1..ef7ae9eb 100644
--- a/kmrml/kmrml/server/watcher.h
+++ b/kmrml/kmrml/server/watcher.h
@@ -19,11 +19,11 @@
#ifndef LAUNCHER_H
#define LAUNCHER_H
-#include <qdict.h>
-#include <qmap.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdedmodule.h>
#include <kprocess.h>
@@ -33,7 +33,7 @@ namespace KMrml
class DaemonData
{
public:
- DaemonData( const QString& key, const QString& cmd,
+ DaemonData( const TQString& key, const TQString& cmd,
uint time, int numRestarts )
: daemonKey( key ),
commandline( cmd ),
@@ -49,13 +49,13 @@ namespace KMrml
delete process;
delete timer;
}
- QString daemonKey;
- QString commandline;
+ TQString daemonKey;
+ TQString commandline;
uint timeout;
- QStrList apps;
+ TQStrList apps;
int restartOnFailure;
KProcess *process;
- QTimer *timer;
+ TQTimer *timer;
};
class Watcher : public KDEDModule
@@ -64,22 +64,22 @@ namespace KMrml
K_DCOP
public:
- Watcher( const QCString& name = "daemonwatcher" );
+ Watcher( const TQCString& name = "daemonwatcher" );
~Watcher();
k_dcop:
- virtual bool requireDaemon( const QCString& clientAppId,
- const QString& daemonKey,
- const QString& commandline,
+ virtual bool requireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey,
+ const TQString& commandline,
uint timeout = 60 /* seconds */,
int numRestarts = 5 );
- virtual void unrequireDaemon( const QCString& clientAppId,
- const QString& daemonKey );
- virtual QStringList runningDaemons() const;
+ virtual void unrequireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey );
+ virtual TQStringList runningDaemons() const;
k_dcop_signals:
- void daemonExited(const QString& daemonKey, pid_t pid, int exitStatus);
- void daemonDied( const QString& daemonKey, pid_t pid );
+ void daemonExited(const TQString& daemonKey, pid_t pid, int exitStatus);
+ void daemonDied( const TQString& daemonKey, pid_t pid );
protected:
bool startDaemon( DaemonData *daemon );
@@ -88,18 +88,18 @@ namespace KMrml
virtual void slotTimeout();
private:
- void unrequireDaemon( DaemonData *daemon, const QCString& clientAppId);
+ void unrequireDaemon( DaemonData *daemon, const TQCString& clientAppId);
DaemonData *findDaemonFromProcess( KProcess *proc );
- DaemonData *findDaemonFromTimer( QTimer *timer );
+ DaemonData *findDaemonFromTimer( TQTimer *timer );
void emitExited( DaemonData *daemon );
void emitFailure( DaemonData *daemon );
private slots:
void slotProcExited( KProcess *proc );
- void slotAppUnregistered( const QCString& appId );
+ void slotAppUnregistered( const TQCString& appId );
- QDict<DaemonData> m_daemons;
+ TQDict<DaemonData> m_daemons;
};
}