From 5f5ee2367157176ed223b86343eb0a9e4022e020 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:52:55 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kregexpeditor/verifybuttons.cpp | 114 ++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'kregexpeditor/verifybuttons.cpp') diff --git a/kregexpeditor/verifybuttons.cpp b/kregexpeditor/verifybuttons.cpp index cd1b1ef..d7ed66a 100644 --- a/kregexpeditor/verifybuttons.cpp +++ b/kregexpeditor/verifybuttons.cpp @@ -17,7 +17,7 @@ **/ #ifdef QT_ONLY #include "compat.h" -#include +#include #include "images.h" #else #include @@ -29,72 +29,72 @@ #endif #include "verifybuttons.h" -#include -#include -#include +#include +#include +#include #include "qtregexpconverter.h" #include "emacsregexpconverter.h" -#include +#include #include "util.h" -#include -#include +#include +#include -VerifyButtons::VerifyButtons( QWidget* parent, const char* name ) - :QDockWindow( QDockWindow::InDock, parent, name ), _configMenu( 0 ) +VerifyButtons::VerifyButtons( TQWidget* parent, const char* name ) + :TQDockWindow( TQDockWindow::InDock, parent, name ), _configMenu( 0 ) { - QBoxLayout* layout = boxLayout(); + TQBoxLayout* layout = boxLayout(); - _verify = new QToolButton(this); - QIconSet icon = Util::getSystemIconSet( QString::fromLatin1("spellcheck")); + _verify = new TQToolButton(this); + TQIconSet icon = Util::getSystemIconSet( TQString::fromLatin1("spellcheck")); _verify->setIconSet( icon ); - QToolTip::add( _verify, i18n( "Verify regular expression" ) ); - QWhatsThis::add( _verify, i18n("Shows what part of the regular expression is being matched in the verifier window." + TQToolTip::add( _verify, i18n( "Verify regular expression" ) ); + TQWhatsThis::add( _verify, i18n("Shows what part of the regular expression is being matched in the verifier window." "(The window below the graphical editor window).")); layout->addWidget( _verify ); - connect( _verify, SIGNAL( clicked() ), this, SIGNAL( verify() ) ); + connect( _verify, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( verify() ) ); - QToolButton* button = new QToolButton(this); - button->setPixmap( Util::getSystemIcon( QString::fromLatin1("fileopen")) ); + TQToolButton* button = new TQToolButton(this); + button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("fileopen")) ); layout->addWidget( button ); - connect(button, SIGNAL(clicked()), this, SLOT(loadText())); - QToolTip::add( button, i18n("Load text in the verifier window") ); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(loadText())); + TQToolTip::add( button, i18n("Load text in the verifier window") ); - button = new QToolButton(this); - button->setPixmap( Util::getSystemIcon( QString::fromLatin1("package_settings")) ); + button = new TQToolButton(this); + button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("package_settings")) ); layout->addWidget( button ); - connect(button, SIGNAL(clicked()), this, SLOT(configure())); - QToolTip::add( button, i18n("Settings") ); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(configure())); + TQToolTip::add( button, i18n("Settings") ); // It is currently not possible to ask for the paragraph being highlighted, thefore scrolling to next/prev match // do not work. Enable this when they work. - // _first = new QToolButton( QString::fromLatin1("<<"), this); + // _first = new TQToolButton( TQString::fromLatin1("<<"), this); // layout->addWidget( _first ); - // connect(_first, SIGNAL(clicked()), this, SIGNAL( gotoFirst())); + // connect(_first, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoFirst())); // _first->setFixedWidth( 25 ); // - // _prev = new QToolButton(QString::fromLatin1("<"), this); + // _prev = new TQToolButton(TQString::fromLatin1("<"), this); // layout->addWidget( _prev ); - // connect(_prev, SIGNAL(clicked()), this, SIGNAL( gotoPrev())); + // connect(_prev, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoPrev())); // _prev->setFixedWidth( 20 ); // - // _next = new QToolButton(QString::fromLatin1(">"), this); + // _next = new TQToolButton(TQString::fromLatin1(">"), this); // layout->addWidget( _next ); - // connect(_next, SIGNAL(clicked()), this, SIGNAL( gotoNext())); + // connect(_next, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoNext())); // _next->setFixedWidth( 20 ); // - // _last = new QToolButton(QString::fromLatin1(">>"), this); + // _last = new TQToolButton(TQString::fromLatin1(">>"), this); // layout->addWidget( _last ); - // connect(_last, SIGNAL(clicked()), this, SIGNAL( gotoLast())); + // connect(_last, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoLast())); // _last->setFixedWidth( 25 ); // Same as above -// QLabel* label = new QLabel( i18n("Matches: "), this ); +// TQLabel* label = new TQLabel( i18n("Matches: "), this ); // layout->addWidget( label ); -// _matches = new QLabel(i18n("-"), this ); +// _matches = new TQLabel(i18n("-"), this ); // layout->addWidget( _matches ); -// QString txt = i18n( "Shows number of times regular expression matches the text in the verifier window"); -// QToolTip::add( label, txt ); -// QToolTip::add( _matches, txt ); +// TQString txt = i18n( "Shows number of times regular expression matches the text in the verifier window"); +// TQToolTip::add( label, txt ); +// TQToolTip::add( _matches, txt ); _verify->setEnabled( false ); @@ -102,23 +102,23 @@ VerifyButtons::VerifyButtons( QWidget* parent, const char* name ) // Qt RegExpConverter* converter = new QtRegExpConverter(); - _converters.append( qMakePair( converter, static_cast( 0 ) ) ); - QString qtConverterName = converter->name(); + _converters.append( qMakePair( converter, static_cast( 0 ) ) ); + TQString qtConverterName = converter->name(); // Emacs converter = new EmacsRegExpConverter(); - _converters.append( qMakePair( converter, static_cast( 0 ) ) ); + _converters.append( qMakePair( converter, static_cast( 0 ) ) ); // -------------------------------------------------- Initialize the config menu - _configMenu = new QPopupMenu( this, "config menu" ); + _configMenu = new TQPopupMenu( this, "config menu" ); // Auto Verify - QAction* autoVerify = new QAction( i18n("Verify on the Fly"), 0, this ); + TQAction* autoVerify = new TQAction( i18n("Verify on the Fly"), 0, this ); autoVerify->setToggleAction( true ); autoVerify->setOn( true ); - connect( autoVerify, SIGNAL( toggled( bool ) ), this, SLOT( updateVerifyButton( bool ) ) ); - connect( autoVerify, SIGNAL( toggled( bool ) ), this, SIGNAL( autoVerify( bool ) ) ); + connect( autoVerify, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( updateVerifyButton( bool ) ) ); + connect( autoVerify, TQT_SIGNAL( toggled( bool ) ), this, TQT_SIGNAL( autoVerify( bool ) ) ); autoVerify->addTo( _configMenu ); autoVerify->setToolTip( i18n( "Toggle on-the-fly verification of regular expression" ) ); autoVerify->setWhatsThis( i18n( "Enabling this option will make the verifier update for each edit. " @@ -126,19 +126,19 @@ VerifyButtons::VerifyButtons( QWidget* parent, const char* name ) "complex or matches a lot of time, this may be very slow.")); // RegExp Languages - QPopupMenu* languages = new QPopupMenu( _configMenu ); + TQPopupMenu* languages = new TQPopupMenu( _configMenu ); _languageId = _configMenu->insertItem( i18n("RegExp Language"), languages ); - QActionGroup* grp = new QActionGroup( this ); - for( QValueList< QPair >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { - QString name = (*it).first->name(); - QAction* action = new QAction( name, 0, this ); + TQActionGroup* grp = new TQActionGroup( this ); + for( TQValueList< QPair >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { + TQString name = (*it).first->name(); + TQAction* action = new TQAction( name, 0, this ); action->setToggleAction( true ); grp->add( action ); (*it).second = action; } grp->addTo( languages ); - connect( grp, SIGNAL( selected( QAction* ) ), this, SLOT( slotChangeSyntax( QAction* ) ) ); + connect( grp, TQT_SIGNAL( selected( TQAction* ) ), this, TQT_SLOT( slotChangeSyntax( TQAction* ) ) ); _configMenu->setItemEnabled( _languageId, false ); // Select the Qt converter by default @@ -154,7 +154,7 @@ void VerifyButtons::updateVerifyButton( bool b ) void VerifyButtons::loadText() { - QString fileName = KFileDialog::getOpenFileName(QString::null, QString::null, this); + TQString fileName = KFileDialog::getOpenFileName(TQString::null, TQString::null, this); if ( !fileName.isNull() ) { emit loadVerifyText( fileName ); } @@ -179,21 +179,21 @@ void VerifyButtons::setMatchCount( int /*count*/ ) // currently this is not possible due to limitation in QSyntaxHighlighter /* if ( count == -1 ) - _matches->setText( QString::fromLatin1("-") ); + _matches->setText( TQString::fromLatin1("-") ); else - _matches->setText( QString::number( count ) ); + _matches->setText( TQString::number( count ) ); */ } -void VerifyButtons::slotChangeSyntax( QAction* action ) +void VerifyButtons::slotChangeSyntax( TQAction* action ) { emit changeSyntax( action->menuText() ); } -RegExpConverter* VerifyButtons::setSyntax( const QString& which) +RegExpConverter* VerifyButtons::setSyntax( const TQString& which) { - for( QValueList< QPair >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { - QString name = (*it).first->name(); + for( TQValueList< QPair >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) { + TQString name = (*it).first->name(); if ( name == which ) { (*it).second->setOn( true ); return (*it).first; @@ -205,7 +205,7 @@ RegExpConverter* VerifyButtons::setSyntax( const QString& which) void VerifyButtons::configure() { - _configMenu->exec( QCursor::pos() ); + _configMenu->exec( TQCursor::pos() ); } void VerifyButtons::setAllowNonQtSyntax( bool b ) -- cgit v1.2.1