diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kregexpeditor/qt-only | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/qt-only')
-rw-r--r-- | kregexpeditor/qt-only/compat.cpp | 60 | ||||
-rw-r--r-- | kregexpeditor/qt-only/compat.h | 44 |
2 files changed, 52 insertions, 52 deletions
diff --git a/kregexpeditor/qt-only/compat.cpp b/kregexpeditor/qt-only/compat.cpp index 7dbc7b4..a7a5d12 100644 --- a/kregexpeditor/qt-only/compat.cpp +++ b/kregexpeditor/qt-only/compat.cpp @@ -18,62 +18,62 @@ #include "compat.h" -QString i18n( const QString& a) { - return QObject::tr(a); +TQString i18n( const TQString& a) { + return TQObject::tr(a); } -QString i18n( const QString& a, const QString& b) { - return QObject::tr(b,a); +TQString i18n( const TQString& a, const TQString& b) { + return TQObject::tr(b,a); } -KDialogBase::KDialogBase( int /*dialogFace*/, const QString &caption, int buttonMask, - ButtonCode defaultButton, QWidget *parent, const char *name, +KDialogBase::KDialogBase( int /*dialogFace*/, const TQString &caption, int buttonMask, + ButtonCode defaultButton, TQWidget *parent, const char *name, bool modal ) - :QDialog( parent, name, modal ) + :TQDialog( parent, name, modal ) { init( buttonMask, defaultButton, caption ); } -KDialogBase::KDialogBase( QWidget* parent, const char* name, bool modal, - const QString& caption, int buttonMask ) - : QDialog( parent, name, modal ) +KDialogBase::KDialogBase( TQWidget* parent, const char* name, bool modal, + const TQString& caption, int buttonMask ) + : TQDialog( parent, name, modal ) { init( buttonMask, Ok, caption ); } -void KDialogBase::init( int buttonMask, ButtonCode /*defaultButton*/, const QString& caption ) +void KDialogBase::init( int buttonMask, ButtonCode /*defaultButton*/, const TQString& caption ) { setCaption( caption ); - _layout = new QVBoxLayout( this, 6 ); - QHBoxLayout* buts = new QHBoxLayout( _layout, 6 ); - QPushButton* but; + _layout = new TQVBoxLayout( this, 6 ); + TQHBoxLayout* buts = new TQHBoxLayout( _layout, 6 ); + TQPushButton* but; if ( buttonMask & Help ) { - but = new QPushButton( tr("Help"), this ); + but = new TQPushButton( tr("Help"), this ); buts->addWidget( but ); - connect( but, SIGNAL( clicked() ), this, SIGNAL( helpClicked() ) ); + connect( but, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( helpClicked() ) ); } buts->addStretch(1); if ( buttonMask & Ok ) { - but = new QPushButton( tr("OK"), this ); + but = new TQPushButton( tr("OK"), this ); buts->addWidget( but ); - connect( but, SIGNAL( clicked() ), this, SLOT( slotOk() ) ); + connect( but, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) ); } if ( buttonMask & Cancel ) { - but = new QPushButton( tr("Cancel"), this ); + but = new TQPushButton( tr("Cancel"), this ); buts->addWidget( but ); - connect( but, SIGNAL( clicked() ), this, SLOT( slotCancel() ) ); + connect( but, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancel() ) ); } } -void KDialogBase::setMainWidget( QWidget* top ) +void KDialogBase::setMainWidget( TQWidget* top ) { - top->reparent( this, 0, QPoint(0,0) ); + top->reparent( this, 0, TQPoint(0,0) ); _layout->insertWidget( 0, top ); } -QFrame* KDialogBase::plainPage() +TQFrame* KDialogBase::plainPage() { - QFrame* frame = new QFrame( this ); + TQFrame* frame = new TQFrame( this ); setMainWidget( frame ); return frame; } @@ -92,7 +92,7 @@ void KDialogBase::slotCancel() emit finished(); } -int KMessageBox::warningYesNo(QWidget *parent, const QString &text, const QString &caption ) +int KMessageBox::warningYesNo(TQWidget *parent, const TQString &text, const TQString &caption ) { int code = warning( parent, caption, text, tr("No"), tr("Yes") ); if ( code == 0 ) @@ -101,15 +101,15 @@ int KMessageBox::warningYesNo(QWidget *parent, const QString &text, const QStrin return No; } -int KMessageBox::information( QWidget* parent, const QString& text, const QString& caption, - const QString& /*dontShowAgainName*/ ) +int KMessageBox::information( TQWidget* parent, const TQString& text, const TQString& caption, + const TQString& /*dontShowAgainName*/ ) { - return QMessageBox::information( parent, caption, text ); + return TQMessageBox::information( parent, caption, text ); } -int KMessageBox::sorry( QWidget* parent, const QString& text, const QString& caption ) +int KMessageBox::sorry( TQWidget* parent, const TQString& text, const TQString& caption ) { - return QMessageBox::information( parent, caption, text ); + return TQMessageBox::information( parent, caption, text ); } diff --git a/kregexpeditor/qt-only/compat.h b/kregexpeditor/qt-only/compat.h index edf9ced..5afa317 100644 --- a/kregexpeditor/qt-only/compat.h +++ b/kregexpeditor/qt-only/compat.h @@ -18,15 +18,15 @@ #ifndef COMPAT_H #define COMPAT_H -#include <qobject.h> -#include <qmessagebox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qinputdialog.h> -#include <qframe.h> +#include <tqobject.h> +#include <tqmessagebox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqinputdialog.h> +#include <tqframe.h> -QString i18n( const QString& a); -QString i18n( const QString& a, const QString& b); +TQString i18n( const TQString& a); +TQString i18n( const TQString& a, const TQString& b); #define isatty(x) 0 #define KTextBrowser QTextBrowser @@ -42,18 +42,18 @@ public: enum ButtonCode {Ok = 1, Cancel, Help}; enum DialogType { Plain }; - KDialogBase ( int dialogFace, const QString &caption, int buttonMask, + KDialogBase ( int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, - QWidget *parent=0, const char *name=0, bool modal=true ); + TQWidget *parent=0, const char *name=0, bool modal=true ); - KDialogBase( QWidget* parent, const char* name = 0, bool modal = true, - const QString& caption = QString::null, + KDialogBase( TQWidget* parent, const char* name = 0, bool modal = true, + const TQString& caption = TQString::null, int buttonMask = 0 ); - void init( int buttonMask, ButtonCode /*defaultButton*/, const QString& caption ); - void setMainWidget( QWidget* top ); - QFrame* plainPage(); - void setHelp( const QString&, const QString& ) {} + void init( int buttonMask, ButtonCode /*defaultButton*/, const TQString& caption ); + void setMainWidget( TQWidget* top ); + TQFrame* plainPage(); + void setHelp( const TQString&, const TQString& ) {} public slots: void slotOk(); @@ -66,7 +66,7 @@ signals: void helpClicked(); private: - QVBoxLayout* _layout; + TQVBoxLayout* _layout; }; class KMessageBox :public QMessageBox @@ -74,11 +74,11 @@ class KMessageBox :public QMessageBox Q_OBJECT public: enum ButtonCode { Ok = 1, Cancel = 2, Yes = 3, No = 4, Continue = 5 }; - static int warningYesNo (QWidget *parent, const QString &text, - const QString &caption = QString::null ); - static int information( QWidget* parent, const QString& text, const QString& caption = QString::null, - const QString& /*dontShowAgainName*/ = QString::null ); - static int sorry( QWidget* parent, const QString& text, const QString& caption = QString::null ); + static int warningYesNo (TQWidget *parent, const TQString &text, + const TQString &caption = TQString::null ); + static int information( TQWidget* parent, const TQString& text, const TQString& caption = TQString::null, + const TQString& /*dontShowAgainName*/ = TQString::null ); + static int sorry( TQWidget* parent, const TQString& text, const TQString& caption = TQString::null ); }; #endif /* COMPAT_H */ |