From a9cfcd75daef74e494a2632af260f1f92b834b4a Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Oct 2011 19:05:08 +0000 Subject: TQt port tqt3integration git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1259732 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- tqt3integration/libqtkde/qtkde.cpp | 36 ++-- tqt3integration/libqtkde/qtkde.h | 9 +- tqt3integration/module/module.cpp | 128 ++++++------ tqt3integration/module/module.h | 34 ++-- tqt3integration/utils/gen.cpp | 220 ++++++++++----------- tqt3integration/utils/gen.txt | 200 +++++++++---------- .../utils/qt/in/qtkdeintegration_x11_0.cpp.cmake | 2 +- .../utils/qt/in/qtkdeintegration_x11_1.cpp | 46 ++--- .../utils/qt/in/qtkdeintegration_x11_2.cpp | 48 ++--- .../utils/qt/in/qtkdeintegration_x11_p_1.h | 16 +- 10 files changed, 373 insertions(+), 366 deletions(-) diff --git a/tqt3integration/libqtkde/qtkde.cpp b/tqt3integration/libqtkde/qtkde.cpp index 4e737a9a2..79cfbdd98 100644 --- a/tqt3integration/libqtkde/qtkde.cpp +++ b/tqt3integration/libqtkde/qtkde.cpp @@ -23,26 +23,26 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include extern Time qt_x_time; -static QString convertFileFilter( const QString& filter ) +static TQString convertFileFilter( const TQString& filter ) { if( filter.isEmpty()) return filter; - QString f2 = filter; - f2.replace( '\n', ";;" ); // Qt says separator is ";;", but it also silently accepts newline + TQString f2 = filter; + f2.replace( '\n', ";;" ); // TQt says separator is ";;", but it also silently accepts newline f2.replace( '/', "\\/" ); // escape /'s for KFileDialog - QStringList items = QStringList::split( ";;", f2 ); - QRegExp reg( "\\((.*)\\)" ); - for( QStringList::Iterator it = items.begin(); + TQStringList items = TQStringList::split( ";;", f2 ); + TQRegExp reg( "\\((.*)\\)" ); + for( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) { @@ -52,12 +52,12 @@ static QString convertFileFilter( const QString& filter ) return items.join( "\n" ); } -static QString convertBackFileFilter( const QString& filter ) +static TQString convertBackFileFilter( const TQString& filter ) { if( filter.isEmpty()) return filter; - QStringList items = QStringList::split( "\n", filter ); - for( QStringList::Iterator it = items.begin(); + TQStringList items = TQStringList::split( "\n", filter ); + for( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) { @@ -84,13 +84,13 @@ static DCOPClient* dcopClient() static bool prepared = false; if( !prepared ) { - assert( qApp != NULL ); // TODO + assert( tqApp != NULL ); // TODO prepared = true; dcop->bindToApp(); - if( !qApp->inherits( "KApplication" )) // KApp takes care of input blocking + if( !tqApp->inherits( "KApplication" )) // KApp takes care of input blocking { static qtkde_EventLoop* loop = new qtkde_EventLoop; - QObject::connect( dcop, SIGNAL( blockUserInput( bool )), loop, SLOT( block( bool ))); + TQObject::connect( dcop, TQT_SIGNAL( blockUserInput( bool )), loop, TQT_SLOT( block( bool ))); } } return dcop; @@ -131,7 +131,7 @@ void qtkde_EventLoop::block( bool b ) } // duped in kded module -static QString getHostname() +static TQString getHostname() { char hostname[ 256 ]; if( gethostname( hostname, 255 ) == 0 ) @@ -142,6 +142,6 @@ static QString getHostname() return ""; } -#include "qtkde_functions.cpp" +#include "tqtkde_functions.cpp" #include "qtkde.moc" diff --git a/tqt3integration/libqtkde/qtkde.h b/tqt3integration/libqtkde/qtkde.h index c485537d8..1916cdc6c 100644 --- a/tqt3integration/libqtkde/qtkde.h +++ b/tqt3integration/libqtkde/qtkde.h @@ -18,15 +18,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _QTKDE_H -#define _QTKDE_H +#ifndef _TQTKDE_H +#define _TQTKDE_H -#include +#include class qtkde_EventLoop - : public QObject + : public TQObject { Q_OBJECT + TQ_OBJECT public slots: void block( bool ); }; diff --git a/tqt3integration/module/module.cpp b/tqt3integration/module/module.cpp index f76f2003c..ff079c736 100644 --- a/tqt3integration/module/module.cpp +++ b/tqt3integration/module/module.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -38,7 +38,7 @@ extern "C" { - KDE_EXPORT KDEDModule *create_kdeintegration( const QCString& obj ) + KDE_EXPORT KDEDModule *create_kdeintegration( const TQCString& obj ) { return new KDEIntegration::Module( obj ); } @@ -47,7 +47,7 @@ extern "C" namespace KDEIntegration { -static void prepareDialog( QWidget* w, long parent, const QCString& wmclass1, const QCString& wmclass2 ) +static void prepareDialog( TQWidget* w, long parent, const TQCString& wmclass1, const TQCString& wmclass2 ) { XClassHint hints; hints.res_name = ( char* ) ( const char* ) wmclass1; @@ -57,12 +57,12 @@ static void prepareDialog( QWidget* w, long parent, const QCString& wmclass1, co KWin::setState( w->winId(), NET::Modal ); KWin::WindowInfo info = KWin::windowInfo( parent, (unsigned long)NET::WMGeometry ); if( info.valid()) - w->move( info.geometry().x() + ( info.geometry().width() - w->width())/2, - info.geometry().y() + ( info.geometry().height()- w->height())/2 ); + w->move( info.tqgeometry().x() + ( info.tqgeometry().width() - w->width())/2, + info.tqgeometry().y() + ( info.tqgeometry().height()- w->height())/2 ); } // duped in qtkde -static QString getHostname() +static TQString getHostname() { char hostname[ 256 ]; if( gethostname( hostname, 255 ) == 0 ) @@ -73,7 +73,7 @@ static QString getHostname() return ""; } -bool Module::initializeIntegration( const QString& hostname ) +bool Module::initializeIntegration( const TQString& hostname ) { if( hostname != getHostname()) return false; @@ -83,9 +83,9 @@ bool Module::initializeIntegration( const QString& hostname ) return true; } -void* Module::getOpenFileNames( const QString& filter, QString workingDirectory, long parent, - const QCString& name, const QString& caption, QString /*selectedFilter*/, bool multiple, - const QCString& wmclass1, const QCString& wmclass2 ) +void* Module::getOpenFileNames( const TQString& filter, TQString workingDirectory, long parent, + const TQCString& name, const TQString& caption, TQString /*selectedFilter*/, bool multiple, + const TQCString& wmclass1, const TQCString& wmclass2 ) { KFileDialog* dlg = new KFileDialog( workingDirectory, filter, 0, name.isEmpty() ? "filedialog" : name, false); prepareDialog( dlg, parent, wmclass1, wmclass2 ); @@ -93,50 +93,50 @@ void* Module::getOpenFileNames( const QString& filter, QString workingDirectory, dlg->setMode(( multiple ? KFile::Files : KFile::File ) | KFile::LocalOnly ); dlg->setPlainCaption( caption.isNull() ? i18n("Open") : caption ); // TODO dlg->ops->clearHistory(); - connect( dlg, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); + connect( dlg, TQT_SIGNAL( dialogDone( int )), TQT_SLOT( dialogDone( int ))); dlg->show(); return dlg; } -void* Module::getSaveFileName( const QString& initialSelection, const QString& filter, - QString workingDirectory, long parent, const QCString& name, const QString& caption, QString /*selectedFilter*/, - const QCString& wmclass1, const QCString& wmclass2 ) +void* Module::getSaveFileName( const TQString& initialSelection, const TQString& filter, + TQString workingDirectory, long parent, const TQCString& name, const TQString& caption, TQString /*selectedFilter*/, + const TQCString& wmclass1, const TQCString& wmclass2 ) { - QString initial = workingDirectory; + TQString initial = workingDirectory; if( !initialSelection.isEmpty()) { - if( initial.right( 1 ) != QChar( '/' )) + if( initial.right( 1 ) != TQChar( '/' )) initial += '/'; initial += initialSelection; } bool specialDir = initial.at(0) == ':'; - KFileDialog* dlg = new KFileDialog( specialDir ? initial : QString::null, filter, 0, + KFileDialog* dlg = new KFileDialog( specialDir ? initial : TQString(), filter, 0, name.isEmpty() ? "filedialog" : name, false); if ( !specialDir ) dlg->setSelection( initial ); // may also be a filename prepareDialog( dlg, parent, wmclass1, wmclass2 ); dlg->setOperationMode( KFileDialog::Saving ); dlg->setPlainCaption( caption.isNull() ? i18n("Save As") : caption ); - connect( dlg, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); + connect( dlg, TQT_SIGNAL( dialogDone( int )), TQT_SLOT( dialogDone( int ))); dlg->show(); return dlg; } -void* Module::getExistingDirectory( const QString& initialDirectory, long parent, - const QCString& name, const QString& caption, const QCString& wmclass1, const QCString& wmclass2 ) +void* Module::getExistingDirectory( const TQString& initialDirectory, long parent, + const TQCString& name, const TQString& caption, const TQCString& wmclass1, const TQCString& wmclass2 ) { KDirSelectDialog* dlg = new KDirSelectDialog( initialDirectory, true, 0, name.isEmpty() ? name : "kdirselect dialog", false ); prepareDialog( dlg, parent, wmclass1, wmclass2 ); dlg->setPlainCaption( caption.isNull() ? i18n( "Select Folder" ) : caption ); - connect( dlg, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); + connect( dlg, TQT_SIGNAL( dialogDone( int )), TQT_SLOT( dialogDone( int ))); dlg->show(); return dlg; } -void* Module::getColor( const QColor& color, long parent, const QCString& name, - const QCString& wmclass1, const QCString& wmclass2 ) +void* Module::getColor( const TQColor& color, long parent, const TQCString& name, + const TQCString& wmclass1, const TQCString& wmclass2 ) { KColorDialog* dlg = new KColorDialog( NULL, name.isEmpty() ? name : "colordialog", true ); dlg->setModal( false ); // KColorDialog creates its buttons depending on modality :( @@ -144,19 +144,19 @@ void* Module::getColor( const QColor& color, long parent, const QCString& name, dlg->setColor( color ); prepareDialog( dlg, parent, wmclass1, wmclass2 ); dlg->setPlainCaption( i18n( "Select Color" )); - connect( dlg, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); + connect( dlg, TQT_SIGNAL( dialogDone( int )), TQT_SLOT( dialogDone( int ))); dlg->show(); return dlg; } -void* Module::getFont( bool /*ok*/, const QFont& def, long parent, const QCString& name, - const QCString& wmclass1, const QCString& wmclass2 ) +void* Module::getFont( bool /*ok*/, const TQFont& def, long parent, const TQCString& name, + const TQCString& wmclass1, const TQCString& wmclass2 ) { KFontDialog* dlg = new KFontDialog( NULL, name.isEmpty() ? name : "Font Selector", false, false ); dlg->setFont( def, false ); prepareDialog( dlg, parent, wmclass1, wmclass2 ); dlg->setPlainCaption( i18n( "Select Font" )); - connect( dlg, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); + connect( dlg, TQT_SIGNAL( dialogDone( int )), TQT_SLOT( dialogDone( int ))); dlg->show(); return dlg; } @@ -168,47 +168,47 @@ struct btns int buttons[ 3 ]; }; } -static QMap< KDialogBase*, btns > msgbox1_buttons; +static TQMap< KDialogBase*, btns > msgbox1_buttons; -void* Module::messageBox1( int type, long parent, const QString& caption, const QString& text, - int button0, int button1, int button2, const QCString& wmclass1, const QCString& wmclass2 ) +void* Module::messageBox1( int type, long parent, const TQString& caption, const TQString& text, + int button0, int button1, int button2, const TQCString& wmclass1, const TQCString& wmclass2 ) { static const char* const caps[ 4 ] = { I18N_NOOP( "Information" ), I18N_NOOP( "Question" ), I18N_NOOP( "Warning" ), I18N_NOOP( "Error" )}; - int buttons[ 3 ] = { button0 & QMessageBox::ButtonMask, - button1 & QMessageBox::ButtonMask, button2 & QMessageBox::ButtonMask }; + int buttons[ 3 ] = { button0 & TQMessageBox::ButtonMask, + button1 & TQMessageBox::ButtonMask, button2 & TQMessageBox::ButtonMask }; KGuiItem buttonItems[ 3 ]; for( int i = 0; i < 3; ++i ) switch( buttons[ i ] ) { - case QMessageBox::Ok: + case TQMessageBox::Ok: buttonItems[ i ] = KStdGuiItem::ok(); break; - case QMessageBox::Cancel: + case TQMessageBox::Cancel: buttonItems[ i ] = KStdGuiItem::cancel(); break; - case QMessageBox::Yes: + case TQMessageBox::Yes: buttonItems[ i ] = KStdGuiItem::yes(); break; - case QMessageBox::No: + case TQMessageBox::No: buttonItems[ i ] = KStdGuiItem::no(); break; - case QMessageBox::Abort: + case TQMessageBox::Abort: buttonItems[ i ] = KGuiItem( i18n( "&Abort" )); break; - case QMessageBox::Retry: + case TQMessageBox::Retry: buttonItems[ i ] = KGuiItem( "&Retry" ); break; - case QMessageBox::Ignore: + case TQMessageBox::Ignore: buttonItems[ i ] = KGuiItem( "&Ignore" ); break; - case QMessageBox::YesAll: + case TQMessageBox::YesAll: buttonItems[ i ] = KStdGuiItem::yes(); buttonItems[ i ].setText( i18n( "Yes to &All" )); break; - case QMessageBox::NoAll: + case TQMessageBox::NoAll: buttonItems[ i ] = KStdGuiItem::no(); buttonItems[ i ].setText( i18n( "N&o to All" )); break; @@ -216,36 +216,36 @@ void* Module::messageBox1( int type, long parent, const QString& caption, const break; }; KDialogBase::ButtonCode defaultButton = KDialogBase::NoDefault; - if( button0 & QMessageBox::Default ) + if( button0 & TQMessageBox::Default ) defaultButton = KDialogBase::Yes; - else if( button1 & QMessageBox::Default ) + else if( button1 & TQMessageBox::Default ) defaultButton = KDialogBase::No; - else if( button2 & QMessageBox::Default ) + else if( button2 & TQMessageBox::Default ) defaultButton = KDialogBase::Cancel; else // TODO KDialogBase's handling of NoDefault has strange focus effects defaultButton = KDialogBase::Yes; KDialogBase::ButtonCode escapeButton = KDialogBase::Cancel; - if( button0 & QMessageBox::Escape ) + if( button0 & TQMessageBox::Escape ) escapeButton = KDialogBase::Yes; - else if( button1 & QMessageBox::Escape ) + else if( button1 & TQMessageBox::Escape ) escapeButton = KDialogBase::No; - else if( button2 & QMessageBox::Escape ) + else if( button2 & TQMessageBox::Escape ) escapeButton = KDialogBase::Cancel; KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n( caps[ type ] ) : caption, KDialogBase::Yes - | ( buttons[ 1 ] == QMessageBox::NoButton ? 0 : int( KDialogBase::No )) - | ( buttons[ 2 ] == QMessageBox::NoButton ? 0 : int( KDialogBase::Cancel )), + | ( buttons[ 1 ] == TQMessageBox::NoButton ? 0 : int( KDialogBase::No )) + | ( buttons[ 2 ] == TQMessageBox::NoButton ? 0 : int( KDialogBase::Cancel )), defaultButton, escapeButton, NULL, "messageBox2", true, true, buttonItems[ 0 ], buttonItems[ 1 ],buttonItems[ 2 ] ); bool checkboxResult = false; - KMessageBox::createKMessageBox(dialog, static_cast< QMessageBox::Icon >( type ), text, QStringList(), - QString::null, + KMessageBox::createKMessageBox(dialog, static_cast< TQMessageBox::Icon >( type ), text, TQStringList(), + TQString(), &checkboxResult, KMessageBox::Notify | KMessageBox::NoExec); prepareDialog( dialog, parent, wmclass1, wmclass2 ); dialog->setPlainCaption( caption ); - connect( dialog, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); + connect( dialog, TQT_SIGNAL( dialogDone( int )), TQT_SLOT( dialogDone( int ))); btns b; b.buttons[ 0 ] = buttons[ 0 ]; b.buttons[ 1 ] = buttons[ 1 ]; @@ -255,9 +255,9 @@ void* Module::messageBox1( int type, long parent, const QString& caption, const return dialog; } -void* Module::messageBox2( int type, long parent, const QString& caption, const QString& text, const QString& button0Text, - const QString& button1Text, const QString& button2Text, int defaultButton, int escapeButton, - const QCString& wmclass1, const QCString& wmclass2 ) +void* Module::messageBox2( int type, long parent, const TQString& caption, const TQString& text, const TQString& button0Text, + const TQString& button1Text, const TQString& button2Text, int defaultButton, int escapeButton, + const TQCString& wmclass1, const TQCString& wmclass2 ) { static KDialogBase::ButtonCode map[ 4 ] = { KDialogBase::NoDefault, KDialogBase::Yes, KDialogBase::No, KDialogBase::Cancel }; @@ -272,12 +272,12 @@ void* Module::messageBox2( int type, long parent, const QString& caption, const NULL, "messageBox2", true, true, button0Text.isEmpty() ? KStdGuiItem::ok() : KGuiItem( button0Text ), button1Text,button2Text); bool checkboxResult = false; - KMessageBox::createKMessageBox(dialog, static_cast< QMessageBox::Icon >( type ), text, QStringList(), - QString::null, + KMessageBox::createKMessageBox(dialog, static_cast< TQMessageBox::Icon >( type ), text, TQStringList(), + TQString(), &checkboxResult, KMessageBox::Notify | KMessageBox::NoExec); prepareDialog( dialog, parent, wmclass1, wmclass2 ); dialog->setPlainCaption( caption ); - connect( dialog, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); + connect( dialog, TQT_SIGNAL( dialogDone( int )), TQT_SLOT( dialogDone( int ))); dialog->show(); return dialog; } @@ -291,7 +291,7 @@ void Module::dialogDone( int result ) case JobData::GetOpenFileNames: { KFileDialog* dlg = static_cast< KFileDialog* >( handle ); - post_getOpenFileNames( dlg, result == QDialog::Accepted ? dlg->selectedFiles() : QStringList(), + post_getOpenFileNames( dlg, result == TQDialog::Accepted ? dlg->selectedFiles() : TQStringList(), dlg->baseURL().path(), dlg->currentFilter()); dlg->deleteLater(); break; @@ -299,7 +299,7 @@ void Module::dialogDone( int result ) case JobData::GetSaveFileName: { KFileDialog* dlg = static_cast< KFileDialog* >( handle ); - QString filename = result == QDialog::Accepted ? dlg->selectedFile() : QString(); + TQString filename = result == TQDialog::Accepted ? dlg->selectedFile() : TQString(); if (!filename.isEmpty()) KRecentDocument::add(filename); post_getSaveFileName( dlg, filename, dlg->baseURL().path(), dlg->currentFilter()); @@ -309,21 +309,21 @@ void Module::dialogDone( int result ) case JobData::GetExistingDirectory: { KDirSelectDialog* dlg = static_cast< KDirSelectDialog* >( handle ); - post_getExistingDirectory( dlg, result == QDialog::Accepted ? dlg->url().path() : QString()); + post_getExistingDirectory( dlg, result == TQDialog::Accepted ? dlg->url().path() : TQString()); dlg->deleteLater(); break; } case JobData::GetColor: { KColorDialog* dlg = static_cast< KColorDialog* >( handle ); - post_getColor( dlg, result == QDialog::Accepted ? dlg->color() : QColor()); + post_getColor( dlg, result == TQDialog::Accepted ? dlg->color() : TQColor()); dlg->deleteLater(); break; } case JobData::GetFont: { KFontDialog* dlg = static_cast< KFontDialog* >( handle ); - post_getFont( dlg, result == QDialog::Accepted ? dlg->font() : QFont(), result == QDialog::Accepted ); + post_getFont( dlg, result == TQDialog::Accepted ? dlg->font() : TQFont(), result == TQDialog::Accepted ); dlg->deleteLater(); break; } @@ -366,7 +366,7 @@ void Module::dialogDone( int result ) } } -Module::Module( const QCString& obj ) +Module::Module( const TQCString& obj ) : KDEDModule( obj ) { } diff --git a/tqt3integration/module/module.h b/tqt3integration/module/module.h index 80bc4a346..1156abd34 100644 --- a/tqt3integration/module/module.h +++ b/tqt3integration/module/module.h @@ -37,11 +37,12 @@ class Module : public KDEDModule { Q_OBJECT + TQ_OBJECT public: - Module( const QCString& obj ); + Module( const TQCString& obj ); // DCOP - virtual bool process(const QCString &fun, const QByteArray &data, - QCString &replyType, QByteArray &replyData); + virtual bool process(const TQCString &fun, const TQByteArray &data, + TQCString &replyType, TQByteArray &replyData); virtual QCStringList functions(); virtual QCStringList interfaces(); private slots: @@ -61,7 +62,7 @@ class Module MessageBox2 } type; }; - QMap< void*, JobData > jobs; + TQMap< void*, JobData > jobs; #include "module_functions.h" }; @@ -69,9 +70,10 @@ class KFileDialog : public ::KFileDialog { Q_OBJECT + TQ_OBJECT public: - KFileDialog(const QString& startDir, const QString& filter, - QWidget *parent, const char *name, bool modal) + KFileDialog(const TQString& startDir, const TQString& filter, + TQWidget *parent, const char *name, bool modal) : ::KFileDialog( startDir, filter, parent, name, modal ) {} signals: @@ -85,9 +87,10 @@ class KDirSelectDialog : public ::KDirSelectDialog { Q_OBJECT + TQ_OBJECT public: - KDirSelectDialog(const QString& startDir, bool localOnly, - QWidget *parent, const char *name, bool modal) + KDirSelectDialog(const TQString& startDir, bool localOnly, + TQWidget *parent, const char *name, bool modal) : ::KDirSelectDialog( startDir, localOnly, parent, name, modal ) {} signals: @@ -101,8 +104,9 @@ class KColorDialog : public ::KColorDialog { Q_OBJECT + TQ_OBJECT public: - KColorDialog( QWidget *parent, const char *name, bool modal ) + KColorDialog( TQWidget *parent, const char *name, bool modal ) : ::KColorDialog( parent, name, modal ) {} signals: @@ -115,10 +119,11 @@ class KFontDialog : public ::KFontDialog { Q_OBJECT + TQ_OBJECT public: - KFontDialog( QWidget *parent, const char *name, bool onlyFixed, bool modal, - const QStringList &fontlist = QStringList(), bool makeFrame = true, - bool diff = false, QButton::ToggleState *sizeIsRelativeState = 0L ) + KFontDialog( TQWidget *parent, const char *name, bool onlyFixed, bool modal, + const TQStringList &fontlist = TQStringList(), bool makeFrame = true, + bool diff = false, TQButton::ToggleState *sizeIsRelativeState = 0L ) : ::KFontDialog( parent, name, onlyFixed, modal, fontlist, makeFrame, diff, sizeIsRelativeState ) {} signals: @@ -131,10 +136,11 @@ class KDialogBase : public ::KDialogBase { Q_OBJECT + TQ_OBJECT public: - KDialogBase( const QString &caption, int buttonMask=Yes|No|Cancel, + KDialogBase( const TQString &caption, int buttonMask=Yes|No|Cancel, ButtonCode defaultButton=Yes, ButtonCode escapeButton=Cancel, - QWidget *parent=0, const char *name=0, + TQWidget *parent=0, const char *name=0, bool modal=true, bool separator=false, const KGuiItem &yes = KStdGuiItem::yes(), // i18n("&Yes") const KGuiItem &no = KStdGuiItem::no(), // i18n("&No"), diff --git a/tqt3integration/utils/gen.cpp b/tqt3integration/utils/gen.cpp index 178d67a3b..b5605f8ba 100644 --- a/tqt3integration/utils/gen.cpp +++ b/tqt3integration/utils/gen.cpp @@ -18,9 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include // TODO includes, forwards @@ -36,7 +36,7 @@ FUNCTION ADD_APPINFO - generate wmclass arguments ARG TYPE - ORIG_TYPE - for example when the function accepts QWidget*, but WId is really used + ORIG_TYPE - for example when the function accepts TQWidget*, but WId is really used ORIG_CONVERSION IGNORE NEEDS_DEREF @@ -44,7 +44,7 @@ FUNCTION OUT_ARGUMENT CONVERSION BACK_CONVERSION - for out arguments - CREATE - doesn't exist in Qt, create in qtkde using function + CREATE - doesn't exist in TQt, create in qtkde using function PARENT - the argument is a parent window to be used for windows ENDARG ENDFUNCTION @@ -54,38 +54,38 @@ ENDFUNCTION struct Arg { Arg() : ignore( false ), needs_deref( false ), const_ref( false ), out_argument( false ), parent( false ) {} - QString name; - QString type; - QString orig_type; - QString orig_conversion; + TQString name; + TQString type; + TQString orig_type; + TQString orig_conversion; bool ignore; bool needs_deref; bool const_ref; bool out_argument; - QString conversion; - QString back_conversion; - QString create; + TQString conversion; + TQString back_conversion; + TQString create; bool parent; }; struct Function { Function() : delayed_return( false ), skip_qt( false ), only_qt( false ), add_appinfo( false ) {} - QString name; - QString return_type; + TQString name; + TQString return_type; bool delayed_return; bool skip_qt; bool only_qt; bool add_appinfo; - QValueList< Arg > args; + TQValueList< Arg > args; void stripNonOutArguments(); void stripCreatedArguments(); }; void Function::stripNonOutArguments() { - QValueList< Arg > new_args; - for( QValueList< Arg >::ConstIterator it = args.begin(); + TQValueList< Arg > new_args; + for( TQValueList< Arg >::ConstIterator it = args.begin(); it != args.end(); ++it ) { @@ -98,8 +98,8 @@ void Function::stripNonOutArguments() void Function::stripCreatedArguments() { - QValueList< Arg > new_args; - for( QValueList< Arg >::ConstIterator it = args.begin(); + TQValueList< Arg > new_args; + for( TQValueList< Arg >::ConstIterator it = args.begin(); it != args.end(); ++it ) { @@ -110,11 +110,11 @@ void Function::stripCreatedArguments() args = new_args; } -QValueList< Function > functions; +TQValueList< Function > functions; -QFile* input_file = NULL; -QTextStream* input_stream = NULL; -static QString last_line; +TQFile* input_file = NULL; +TQTextStream* input_stream = NULL; +static TQString last_line; int last_lineno = 0; #define check( arg ) my_check( __FILE__, __LINE__, arg ) @@ -133,29 +133,29 @@ void my_check( const char* file, int line, bool arg ) my_error( file, line ); } -void openInputFile( const QString& filename ) +void openInputFile( const TQString& filename ) { check( input_file == NULL ); - input_file = new QFile( filename ); + input_file = new TQFile( filename ); printf("[INFO] Reading bindings definitions from file %s\n\r", filename.ascii()); if( !input_file->open( IO_ReadOnly )) error(); - input_stream = new QTextStream( input_file ); + input_stream = new TQTextStream( input_file ); last_lineno = 0; } -QString getInputLine() +TQString getInputLine() { while( !input_stream->atEnd()) { - QString line = input_stream->readLine().stripWhiteSpace(); + TQString line = input_stream->readLine().stripWhiteSpace(); ++last_lineno; last_line = line; if( line.isEmpty() || line[ 0 ] == '#' ) continue; return line; } - return QString::null; + return TQString(); } void closeInputFile() @@ -166,11 +166,11 @@ void closeInputFile() input_file = NULL; } -void parseArg( Function& function, const QString& details ) +void parseArg( Function& function, const TQString& details ) { Arg arg; arg.name = details; - QString line = getInputLine(); + TQString line = getInputLine(); while( !line.isNull() ) { if( line.startsWith( "ENDARG" )) @@ -242,11 +242,11 @@ void parseArg( Function& function, const QString& details ) error(); } -void parseFunction( const QString& details ) +void parseFunction( const TQString& details ) { Function function; function.name = details; - QString line = getInputLine(); + TQString line = getInputLine(); while( !line.isNull() ) { if( line.startsWith( "ENDFUNCTION" )) @@ -255,7 +255,7 @@ void parseFunction( const QString& details ) { Arg arg; arg.name = "wmclass1"; - arg.type = "QCString"; + arg.type = "TQCString"; arg.const_ref = true; arg.create = "qAppName"; function.args.append( arg ); @@ -294,7 +294,7 @@ void parseFunction( const QString& details ) void parse(TQString filename) { openInputFile( filename ); - QString line = getInputLine(); + TQString line = getInputLine(); while( !line.isNull() ) { if( line.startsWith( "FUNCTION" )) @@ -308,21 +308,21 @@ void parse(TQString filename) closeInputFile(); } -QString makeIndent( int indent ) +TQString makeIndent( int indent ) { - return indent > 0 ? QString().fill( ' ', indent ) : ""; + return indent > 0 ? TQString().fill( ' ', indent ) : ""; } -void generateFunction( QTextStream& stream, const Function& function, const QString name, +void generateFunction( TQTextStream& stream, const Function& function, const TQString name, int indent, bool staticf, bool orig_type, bool ignore_deref, int ignore_level ) { - QString line; + TQString line; line += makeIndent( indent ); if( staticf ) line += "static "; line += function.return_type + " " + name + "("; bool need_comma = false; - for( QValueList< Arg >::ConstIterator it = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it = function.args.begin(); it != function.args.end(); ++it ) { @@ -364,13 +364,13 @@ void generateFunction( QTextStream& stream, const Function& function, const QStr stream << line; } -void generateQtH() +void generateTQtH() { - QFile file( "qtkdeintegration_x11_p.h.gen" ); + TQFile file( "qtkdeintegration_x11_p.h.gen" ); if( !file.open( IO_WriteOnly )) error(); - QTextStream stream( &file ); - for( QValueList< Function >::ConstIterator it = functions.begin(); + TQTextStream stream( &file ); + for( TQValueList< Function >::ConstIterator it = functions.begin(); it != functions.end(); ++it ) { @@ -384,13 +384,13 @@ void generateQtH() } } -void generateQtCpp() +void generateTQtCpp() { - QFile file( "qtkdeintegration_x11.cpp.gen" ); + TQFile file( "qtkdeintegration_x11.cpp.gen" ); if( !file.open( IO_WriteOnly )) error(); - QTextStream stream( &file ); - for( QValueList< Function >::ConstIterator it = functions.begin(); + TQTextStream stream( &file ); + for( TQValueList< Function >::ConstIterator it = functions.begin(); it != functions.end(); ++it ) { @@ -404,20 +404,20 @@ void generateQtCpp() } stream << "\n" -"void QKDEIntegration::initLibrary()\n" +"void TQKDEIntegration::initLibrary()\n" " {\n" " if( !inited )\n" " {\n" " enable = false;\n" " inited = true;\n" -" QString libpath = findLibrary();\n" +" TQString libpath = findLibrary();\n" " if( libpath.isEmpty())\n" " return;\n" -" QLibrary lib( libpath );\n" -" if( !QFile::exists( lib.library())) // avoid stupid Qt warning\n" +" TQLibrary lib( libpath );\n" +" if( !TQFile::exists( lib.library())) // avoid stupid TQt warning\n" " return;\n" " lib.setAutoUnload( false );\n"; - for( QValueList< Function >::ConstIterator it = functions.begin(); + for( TQValueList< Function >::ConstIterator it = functions.begin(); it != functions.end(); ++it ) { @@ -438,7 +438,7 @@ void generateQtCpp() " }\n" " }\n" "\n"; - for( QValueList< Function >::ConstIterator it1 = functions.begin(); + for( TQValueList< Function >::ConstIterator it1 = functions.begin(); it1 != functions.end(); ++it1 ) { @@ -453,7 +453,7 @@ void generateQtCpp() stream << makeIndent( 4 ) + "return qtkde_" + function.name + "(\n"; stream << makeIndent( 8 ); bool need_comma = false; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -473,19 +473,19 @@ void generateQtCpp() } } -void generateQt() +void generateTQt() { - generateQtH(); - generateQtCpp(); + generateTQtH(); + generateTQtCpp(); } -void generateQtKde() +void generateTQtKde() { - QFile file( "qtkde_functions.cpp" ); + TQFile file( "tqtkde_functions.cpp" ); if( !file.open( IO_WriteOnly )) error(); - QTextStream stream( &file ); - for( QValueList< Function >::ConstIterator it1 = functions.begin(); + TQTextStream stream( &file ); + for( TQValueList< Function >::ConstIterator it1 = functions.begin(); it1 != functions.end(); ++it1 ) { @@ -502,8 +502,8 @@ void generateQtKde() " {\n" " if( qt_xdisplay() != NULL )\n" " XSync( qt_xdisplay(), False );\n"; - QString parent_arg; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + TQString parent_arg; + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -522,13 +522,13 @@ void generateQtKde() stream << " DCOPRef( \"kded\", \"MainApplication-Interface\" ).call( \"updateUserTimestamp\", qt_x_time );\n"; } stream << -" QByteArray data, replyData;\n" -" QCString replyType;\n"; +" TQByteArray data, replyData;\n" +" TQCString replyType;\n"; if( !function.args.isEmpty()) { - stream << " QDataStream datastream( data, IO_WriteOnly );\n"; + stream << " TQDataStream datastream( data, IO_WriteOnly );\n"; stream << " datastream"; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -554,7 +554,7 @@ void generateQtKde() } stream << " if( !dcopClient()->call( \"kded\", \"kdeintegration\",\"" + function.name + "("; bool need_comma = false; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -578,7 +578,7 @@ void generateQtKde() stream << " return;\n"; stream << " }\n"; bool return_data = false; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); !return_data && it2 != function.args.end(); ++it2 ) { @@ -586,7 +586,7 @@ void generateQtKde() return_data = true; } if( return_data || function.return_type != "void" ) - stream << " QDataStream replystream( replyData, IO_ReadOnly );\n"; + stream << " TQDataStream replystream( replyData, IO_ReadOnly );\n"; if( function.return_type != "void" ) { stream << " " + function.return_type << " ret;\n"; @@ -594,7 +594,7 @@ void generateQtKde() } if( return_data ) { - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -603,7 +603,7 @@ void generateQtKde() stream << " " << arg.type << " " << arg.name + "_dummy;\n"; } stream << " replystream"; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -623,7 +623,7 @@ void generateQtKde() } } stream << ";\n"; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -640,13 +640,13 @@ void generateQtKde() } } -void generateKdeDcop( QTextStream& stream ) +void generateKdeDcop( TQTextStream& stream ) { stream << -"bool Module::process(const QCString &fun, const QByteArray &data,\n" -" QCString &replyType, QByteArray &replyData)\n" +"bool Module::process(const TQCString &fun, const TQByteArray &data,\n" +" TQCString &replyType, TQByteArray &replyData)\n" " {\n"; - for( QValueList< Function >::ConstIterator it1 = functions.begin(); + for( TQValueList< Function >::ConstIterator it1 = functions.begin(); it1 != functions.end(); ++it1 ) { @@ -655,7 +655,7 @@ void generateKdeDcop( QTextStream& stream ) continue; stream << " if( fun == \"" + function.name + "("; bool need_comma = false; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -687,7 +687,7 @@ void generateKdeDcop( QTextStream& stream ) "QCStringList Module::functions()\n" " {\n" " QCStringList funcs = KDEDModule::functions();\n"; - for( QValueList< Function >::ConstIterator it1 = functions.begin(); + for( TQValueList< Function >::ConstIterator it1 = functions.begin(); it1 != functions.end(); ++it1 ) { @@ -696,7 +696,7 @@ void generateKdeDcop( QTextStream& stream ) continue; stream << " funcs << \"" + function.name + "("; bool need_comma = false; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -723,27 +723,27 @@ void generateKdeDcop( QTextStream& stream ) "\n"; } -void generateKdePreStub( QTextStream& stream ) +void generateKdePreStub( TQTextStream& stream ) { - for( QValueList< Function >::ConstIterator it1 = functions.begin(); + for( TQValueList< Function >::ConstIterator it1 = functions.begin(); it1 != functions.end(); ++it1 ) { const Function& function = *it1; if( function.only_qt ) continue; - stream << "void Module::pre_" + function.name + "( const QByteArray& " + stream << "void Module::pre_" + function.name + "( const TQByteArray& " + ( function.args.isEmpty() ? "" : "data" ) - + ( function.delayed_return ? "" : ", QByteArray& replyData" ) + + ( function.delayed_return ? "" : ", TQByteArray& replyData" ) + " )\n"; stream << " {\n"; if( function.delayed_return ) { stream << " JobData job;\n"; stream << " job.transaction = kapp->dcopClient()->beginTransaction();\n"; - stream << " job.type = JobData::" + QString( function.name[ 0 ].upper()) + function.name.mid( 1 ) + ";\n"; + stream << " job.type = JobData::" + TQString( function.name[ 0 ].upper()) + function.name.mid( 1 ) + ";\n"; } - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -754,9 +754,9 @@ void generateKdePreStub( QTextStream& stream ) } if( !function.args.isEmpty()) { - stream << " QDataStream datastream( data, IO_ReadOnly );\n"; + stream << " TQDataStream datastream( data, IO_ReadOnly );\n"; stream << " datastream"; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -772,7 +772,7 @@ void generateKdePreStub( QTextStream& stream ) else stream << " post_" + function.name + "( " + function.name + "( "; bool need_comma = false; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -796,9 +796,9 @@ void generateKdePreStub( QTextStream& stream ) } } -void generateKdePostStub( QTextStream& stream ) +void generateKdePostStub( TQTextStream& stream ) { - for( QValueList< Function >::ConstIterator it1 = functions.begin(); + for( TQValueList< Function >::ConstIterator it1 = functions.begin(); it1 != functions.end(); ++it1 ) { @@ -819,7 +819,7 @@ void generateKdePostStub( QTextStream& stream ) needs_comma = true; stream << function.return_type + " ret"; } - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -833,7 +833,7 @@ void generateKdePostStub( QTextStream& stream ) } } if( !function.delayed_return ) - stream << ( needs_comma ? "," : "" ) << " QByteArray& replyData"; + stream << ( needs_comma ? "," : "" ) << " TQByteArray& replyData"; stream << " )\n"; stream << " {\n"; if( function.delayed_return ) @@ -841,11 +841,11 @@ void generateKdePostStub( QTextStream& stream ) stream << " assert( jobs.contains( handle ));\n"; stream << " JobData job = jobs[ handle ];\n"; stream << " jobs.remove( handle );\n"; - stream << " QByteArray replyData;\n"; - stream << " QCString replyType = \"qtkde\";\n"; + stream << " TQByteArray replyData;\n"; + stream << " TQCString replyType = \"qtkde\";\n"; } bool return_data = false; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); !return_data && it2 != function.args.end(); ++it2 ) { @@ -853,13 +853,13 @@ void generateKdePostStub( QTextStream& stream ) return_data = true; } if( function.return_type != "void" || return_data ) - stream << " QDataStream replystream( replyData, IO_WriteOnly );\n"; + stream << " TQDataStream replystream( replyData, IO_WriteOnly );\n"; if( function.return_type != "void" ) stream << " replystream << ret;\n"; if( return_data ) { stream << " replystream"; - for( QValueList< Arg >::ConstIterator it2 = function.args.begin(); + for( TQValueList< Arg >::ConstIterator it2 = function.args.begin(); it2 != function.args.end(); ++it2 ) { @@ -876,7 +876,7 @@ void generateKdePostStub( QTextStream& stream ) } } -void generateKdeStubs( QTextStream& stream ) +void generateKdeStubs( TQTextStream& stream ) { generateKdePreStub( stream ); generateKdePostStub( stream ); @@ -885,21 +885,21 @@ void generateKdeStubs( QTextStream& stream ) void generateKdeCpp() { - QFile file( "module_functions.cpp" ); + TQFile file( "module_functions.cpp" ); if( !file.open( IO_WriteOnly )) error(); - QTextStream stream( &file ); + TQTextStream stream( &file ); generateKdeDcop( stream ); generateKdeStubs( stream ); } void generateKdeH() { - QFile file( "module_functions.h" ); + TQFile file( "module_functions.h" ); if( !file.open( IO_WriteOnly )) error(); - QTextStream stream( &file ); - for( QValueList< Function >::ConstIterator it1 = functions.begin(); + TQTextStream stream( &file ); + for( TQValueList< Function >::ConstIterator it1 = functions.begin(); it1 != functions.end(); ++it1 ) { @@ -912,8 +912,8 @@ void generateKdeH() generateFunction( stream, real_function, real_function.name, 8, false /*static*/, false /*orig type*/, true /*ignore deref*/, 2 /*ignore level*/ ); stream << ";\n"; - stream << makeIndent( 8 ) + "void pre_" + function.name + "( const QByteArray& data" - + ( function.delayed_return ? "" : ", QByteArray& replyData" ) + " );\n"; + stream << makeIndent( 8 ) + "void pre_" + function.name + "( const TQByteArray& data" + + ( function.delayed_return ? "" : ", TQByteArray& replyData" ) + " );\n"; Function post_function = function; post_function.stripNonOutArguments(); if( function.return_type != "void" ) @@ -934,7 +934,7 @@ void generateKdeH() { Arg handle_arg; handle_arg.name = "replyData"; - handle_arg.type = "QByteArray&"; + handle_arg.type = "TQByteArray&"; post_function.args.append( handle_arg ); } post_function.return_type = "void"; @@ -952,8 +952,8 @@ void generateKde() void generate() { - generateQt(); - generateQtKde(); + generateTQt(); + generateTQtKde(); generateKde(); } diff --git a/tqt3integration/utils/gen.txt b/tqt3integration/utils/gen.txt index 2bd4b1b3b..4befc9645 100644 --- a/tqt3integration/utils/gen.txt +++ b/tqt3integration/utils/gen.txt @@ -3,46 +3,46 @@ FUNCTION initializeIntegration RETURN_TYPE bool ARG hostname - TYPE QString + TYPE TQString CONST_REF CREATE getHostname ENDARG ENDFUNCTION -# QStringList getOpenFileNames( const QString &filter, -# QString* workingDirectory, QWidget *parent, const char* name, -# const QString& caption, QString* selectedFilter, bool multiple ); +# TQStringList getOpenFileNames( const TQString &filter, +# TQString* workingDirectory, TQWidget *parent, const char* name, +# const TQString& caption, TQString* selectedFilter, bool multiple ); # FUNCTION getOpenFileNames - RETURN_TYPE QStringList + RETURN_TYPE TQStringList DELAYED_RETURN ADD_APPINFO ARG filter - TYPE QString + TYPE TQString CONST_REF CONVERSION convertFileFilter ENDARG ARG workingDirectory - TYPE QString + TYPE TQString NEEDS_DEREF OUT_ARGUMENT ENDARG ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG name - TYPE QCString + TYPE TQCString CONST_REF ORIG_TYPE const char* ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG selectedFilter - TYPE QString + TYPE TQString NEEDS_DEREF OUT_ARGUMENT CONVERSION convertFileFilter @@ -53,45 +53,45 @@ FUNCTION getOpenFileNames ENDARG ENDFUNCTION -# QString getSaveFileName( const QString &initialSelection, -# const QString &filter, QString* workingDirectory, QWidget *parent, -# const char* name, const QString& caption, QString* selectedFilter ); +# TQString getSaveFileName( const TQString &initialSelection, +# const TQString &filter, TQString* workingDirectory, TQWidget *parent, +# const char* name, const TQString& caption, TQString* selectedFilter ); # FUNCTION getSaveFileName - RETURN_TYPE QString + RETURN_TYPE TQString DELAYED_RETURN ADD_APPINFO ARG initialSelection - TYPE QString + TYPE TQString CONST_REF ENDARG ARG filter - TYPE QString + TYPE TQString CONST_REF CONVERSION convertFileFilter ENDARG ARG workingDirectory - TYPE QString + TYPE TQString NEEDS_DEREF OUT_ARGUMENT ENDARG ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG name - TYPE QCString + TYPE TQCString CONST_REF ORIG_TYPE const char* ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG selectedFilter - TYPE QString + TYPE TQString NEEDS_DEREF OUT_ARGUMENT CONVERSION convertFileFilter @@ -99,60 +99,60 @@ FUNCTION getSaveFileName ENDARG ENDFUNCTION -# QString getExistingDirectory( const QString &initialDirectory, -# QWidget* parent, const char* name, const QString& caption ); +# TQString getExistingDirectory( const TQString &initialDirectory, +# TQWidget* parent, const char* name, const TQString& caption ); # FUNCTION getExistingDirectory - RETURN_TYPE QString + RETURN_TYPE TQString DELAYED_RETURN ADD_APPINFO ARG initialDirectory - TYPE QString + TYPE TQString CONST_REF ENDARG ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG name - TYPE QCString + TYPE TQCString CONST_REF ORIG_TYPE const char* ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ENDFUNCTION -# QColor getColor( const QColor& color, QWidget* parent, const char* name ); +# TQColor getColor( const TQColor& color, TQWidget* parent, const char* name ); # FUNCTION getColor - RETURN_TYPE QColor + RETURN_TYPE TQColor DELAYED_RETURN ADD_APPINFO ARG color - TYPE QColor + TYPE TQColor CONST_REF ENDARG ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG name - TYPE QCString + TYPE TQCString CONST_REF ORIG_TYPE const char* ENDARG ENDFUNCTION -# QFont getFont( bool* ok, const QFont* def, QWidget *parent, const char* name); +# TQFont getFont( bool* ok, const TQFont* def, TQWidget *parent, const char* name); FUNCTION getFont - RETURN_TYPE QFont + RETURN_TYPE TQFont DELAYED_RETURN ADD_APPINFO ARG ok @@ -161,25 +161,25 @@ FUNCTION getFont OUT_ARGUMENT ENDARG ARG def - TYPE QFont - ORIG_TYPE const QFont* + TYPE TQFont + ORIG_TYPE const TQFont* ORIG_CONVERSION fontPtrToFontRef CONST_REF ENDARG ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG name - TYPE QCString + TYPE TQCString CONST_REF ORIG_TYPE const char* ENDARG ENDFUNCTION -# int messageBox1( int type, QWidget *parent, const QString& caption, const QString& text, +# int messageBox1( int type, TQWidget *parent, const TQString& caption, const TQString& text, # int button0, int button1, int button2 ); FUNCTION messageBox1 RETURN_TYPE int @@ -190,16 +190,16 @@ FUNCTION messageBox1 ENDARG ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0 @@ -213,7 +213,7 @@ FUNCTION messageBox1 ENDARG ENDFUNCTION -# int information( QWidget *parent, const QString& caption, const QString& text, +# int information( TQWidget *parent, const TQString& caption, const TQString& text, # int button0, int button1, int button2 ); FUNCTION information RETURN_TYPE int @@ -221,16 +221,16 @@ FUNCTION information ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0 @@ -244,7 +244,7 @@ FUNCTION information ENDARG ENDFUNCTION -# int question( QWidget *parent, const QString& caption, const QString& text, +# int question( TQWidget *parent, const TQString& caption, const TQString& text, # int button0, int button1, int button2 ); FUNCTION question RETURN_TYPE int @@ -252,16 +252,16 @@ FUNCTION question ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0 @@ -275,7 +275,7 @@ FUNCTION question ENDARG ENDFUNCTION -# int warning( QWidget *parent, const QString& caption, const QString& text, +# int warning( TQWidget *parent, const TQString& caption, const TQString& text, # int button0, int button1, int button2 ); FUNCTION warning RETURN_TYPE int @@ -283,16 +283,16 @@ FUNCTION warning ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0 @@ -306,7 +306,7 @@ FUNCTION warning ENDARG ENDFUNCTION -# int critical( QWidget *parent, const QString& caption, const QString& text, +# int critical( TQWidget *parent, const TQString& caption, const TQString& text, # int button0, int button1, int button2 ); FUNCTION critical RETURN_TYPE int @@ -314,16 +314,16 @@ FUNCTION critical ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0 @@ -337,8 +337,8 @@ FUNCTION critical ENDARG ENDFUNCTION -# int messageBox2( int type, QWidget* parent, const QString& caption, const QString& text, -# const QString& button0Text, const QString& button1Text, const QString& button2Text, +# int messageBox2( int type, TQWidget* parent, const TQString& caption, const TQString& text, +# const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, # int defaultButton, int escapeButton ); FUNCTION messageBox2 RETURN_TYPE int @@ -349,28 +349,28 @@ FUNCTION messageBox2 ENDARG ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button1Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button2Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG defaultButton @@ -381,8 +381,8 @@ FUNCTION messageBox2 ENDARG ENDFUNCTION -# int information( QWidget* parent, const QString& caption, const QString& text, -# const QString& button0Text, const QString& button1Text, const QString& button2Text, +# int information( TQWidget* parent, const TQString& caption, const TQString& text, +# const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, # int defaultButton, int escapeButton ); FUNCTION information RETURN_TYPE int @@ -390,28 +390,28 @@ FUNCTION information ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button1Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button2Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG defaultButton @@ -422,8 +422,8 @@ FUNCTION information ENDARG ENDFUNCTION -# int question( QWidget* parent, const QString& caption, const QString& text, -# const QString& button0Text, const QString& button1Text, const QString& button2Text, +# int question( TQWidget* parent, const TQString& caption, const TQString& text, +# const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, # int defaultButton, int escapeButton ); FUNCTION question RETURN_TYPE int @@ -431,28 +431,28 @@ FUNCTION question ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button1Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button2Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG defaultButton @@ -463,8 +463,8 @@ FUNCTION question ENDARG ENDFUNCTION -# int warning( QWidget* parent, const QString& caption, const QString& text, -# const QString& button0Text, const QString& button1Text, const QString& button2Text, +# int warning( TQWidget* parent, const TQString& caption, const TQString& text, +# const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, # int defaultButton, int escapeButton ); FUNCTION warning RETURN_TYPE int @@ -472,28 +472,28 @@ FUNCTION warning ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button1Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button2Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG defaultButton @@ -504,8 +504,8 @@ FUNCTION warning ENDARG ENDFUNCTION -# int critical( QWidget* parent, const QString& caption, const QString& text, -# const QString& button0Text, const QString& button1Text, const QString& button2Text, +# int critical( TQWidget* parent, const TQString& caption, const TQString& text, +# const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, # int defaultButton, int escapeButton ); FUNCTION critical RETURN_TYPE int @@ -513,28 +513,28 @@ FUNCTION critical ONLY_QT ARG parent TYPE long - ORIG_TYPE QWidget* + ORIG_TYPE TQWidget* ORIG_CONVERSION parentToWinId PARENT ENDARG ARG caption - TYPE QString + TYPE TQString CONST_REF ENDARG ARG text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button0Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button1Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG button2Text - TYPE QString + TYPE TQString CONST_REF ENDARG ARG defaultButton diff --git a/tqt3integration/utils/qt/in/qtkdeintegration_x11_0.cpp.cmake b/tqt3integration/utils/qt/in/qtkdeintegration_x11_0.cpp.cmake index 37b84a776..b0d5fd517 100644 --- a/tqt3integration/utils/qt/in/qtkdeintegration_x11_0.cpp.cmake +++ b/tqt3integration/utils/qt/in/qtkdeintegration_x11_0.cpp.cmake @@ -1 +1 @@ -#define QTKDELIBDIR @PLUGIN_INSTALL_DIR@/plugins/integration +#define TQTKDELIBDIR @PLUGIN_INSTALL_DIR@/plugins/integration diff --git a/tqt3integration/utils/qt/in/qtkdeintegration_x11_1.cpp b/tqt3integration/utils/qt/in/qtkdeintegration_x11_1.cpp index 0fe1b3baf..ec9c976d8 100644 --- a/tqt3integration/utils/qt/in/qtkdeintegration_x11_1.cpp +++ b/tqt3integration/utils/qt/in/qtkdeintegration_x11_1.cpp @@ -18,56 +18,56 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qtkdeintegration_x11_p.h" +#include "tqtkdeintegration_x11_p.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include -bool QKDEIntegration::inited = false; -bool QKDEIntegration::enable = false; +bool TQKDEIntegration::inited = false; +bool TQKDEIntegration::enable = false; -bool QKDEIntegration::enabled() +bool TQKDEIntegration::enabled() { if( !inited ) initLibrary(); return enable; } -static QCString findLibrary() +static TQCString findLibrary() { if( getenv( "KDE_FULL_SESSION" ) == NULL ) return ""; if( getenv( "KDE_FULL_SESSION" )[ 0 ] != 't' && getenv( "KDE_FULL_SESSION" )[ 0 ] != '1' ) return ""; - if( getenv( "QT_NO_KDE_INTEGRATION" ) == NULL - || getenv( "QT_NO_KDE_INTEGRATION" )[ 0 ] == '0' ) + if( getenv( "TQT_NO_KDE_INTEGRATION" ) == NULL + || getenv( "TQT_NO_KDE_INTEGRATION" )[ 0 ] == '0' ) { - return QCString( QTKDELIBDIR ) + "/libqtkde"; + return TQCString( TQTKDELIBDIR ) + "/libqtkde"; } return ""; } -static long parentToWinId( const QWidget* w ) +static long parentToWinId( const TQWidget* w ) { if( w != NULL ) - return w->topLevelWidget()->winId(); + return w->tqtopLevelWidget()->winId(); // try to find some usable parent - if( qApp->activeWindow() && w != qApp->activeWindow()) - return qApp->activeWindow()->winId(); - if( qApp->mainWidget() && w != qApp->mainWidget()) - return qApp->mainWidget()->winId(); + if( tqApp->activeWindow() && w != tqApp->activeWindow()) + return tqApp->activeWindow()->winId(); + if( tqApp->mainWidget() && w != tqApp->mainWidget()) + return tqApp->mainWidget()->winId(); return 0; } -inline static QFont fontPtrToFontRef( const QFont* f ) +inline static TQFont fontPtrToFontRef( const TQFont* f ) { - return f != NULL ? *f : QFont(); + return f != NULL ? *f : TQFont(); } // --- diff --git a/tqt3integration/utils/qt/in/qtkdeintegration_x11_2.cpp b/tqt3integration/utils/qt/in/qtkdeintegration_x11_2.cpp index d22f5e9af..ebeac1ab7 100644 --- a/tqt3integration/utils/qt/in/qtkdeintegration_x11_2.cpp +++ b/tqt3integration/utils/qt/in/qtkdeintegration_x11_2.cpp @@ -20,62 +20,62 @@ // --- -int QKDEIntegration::information( QWidget* parent, const QString& caption, - const QString& text, int button0, int button1, int button2 ) +int TQKDEIntegration::information( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) { return qtkde_messageBox1( - QMessageBox::Information, parentToWinId( parent ), caption, text, button0, button1, button2 ); + TQMessageBox::Information, parentToWinId( parent ), caption, text, button0, button1, button2 ); } -int QKDEIntegration::question( QWidget* parent, const QString& caption, - const QString& text, int button0, int button1, int button2 ) +int TQKDEIntegration::question( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) { return qtkde_messageBox1( - QMessageBox::Question, parentToWinId( parent ), caption, text, button0, button1, button2 ); + TQMessageBox::Question, parentToWinId( parent ), caption, text, button0, button1, button2 ); } -int QKDEIntegration::warning( QWidget* parent, const QString& caption, - const QString& text, int button0, int button1, int button2 ) +int TQKDEIntegration::warning( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) { return qtkde_messageBox1( - QMessageBox::Warning, parentToWinId( parent ), caption, text, button0, button1, button2 ); + TQMessageBox::Warning, parentToWinId( parent ), caption, text, button0, button1, button2 ); } -int QKDEIntegration::critical( QWidget* parent, const QString& caption, - const QString& text, int button0, int button1, int button2 ) +int TQKDEIntegration::critical( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) { return qtkde_messageBox1( - QMessageBox::Critical, parentToWinId( parent ), caption, text, button0, button1, button2 ); + TQMessageBox::Critical, parentToWinId( parent ), caption, text, button0, button1, button2 ); } -int QKDEIntegration::information( QWidget* parent, const QString& caption, - const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text, +int TQKDEIntegration::information( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, int defaultButton, int escapeButton ) { return qtkde_messageBox2( - QMessageBox::Information, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + TQMessageBox::Information, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); } -int QKDEIntegration::question( QWidget* parent, const QString& caption, - const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text, +int TQKDEIntegration::question( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, int defaultButton, int escapeButton ) { return qtkde_messageBox2( - QMessageBox::Question, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + TQMessageBox::Question, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); } -int QKDEIntegration::warning( QWidget* parent, const QString& caption, - const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text, +int TQKDEIntegration::warning( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, int defaultButton, int escapeButton ) { return qtkde_messageBox2( - QMessageBox::Warning, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + TQMessageBox::Warning, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); } -int QKDEIntegration::critical( QWidget* parent, const QString& caption, - const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text, +int TQKDEIntegration::critical( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, int defaultButton, int escapeButton ) { return qtkde_messageBox2( - QMessageBox::Critical, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + TQMessageBox::Critical, parentToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); } diff --git a/tqt3integration/utils/qt/in/qtkdeintegration_x11_p_1.h b/tqt3integration/utils/qt/in/qtkdeintegration_x11_p_1.h index 118e861e7..5cd0d803c 100644 --- a/tqt3integration/utils/qt/in/qtkdeintegration_x11_p_1.h +++ b/tqt3integration/utils/qt/in/qtkdeintegration_x11_p_1.h @@ -18,17 +18,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef QKDEINTEGRATION_H -#define QKDEINTEGRATION_H +#ifndef TQKDEINTEGRATION_H +#define TQKDEINTEGRATION_H -#include +#include -class QLibrary; -class QWidget; -class QColor; -class QFont; +class TQLibrary; +class TQWidget; +class TQColor; +class TQFont; -class QKDEIntegration +class TQKDEIntegration { public: static bool enabled(); -- cgit v1.2.3