From 5f5e7c5455d52826b0bd50f64fcffb7695ce970d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 29 Jun 2013 12:56:53 +0200 Subject: Initial TQt conversion --- src/webquerymathscinet.cpp | 66 +++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'src/webquerymathscinet.cpp') diff --git a/src/webquerymathscinet.cpp b/src/webquerymathscinet.cpp index ef6349a..33d78f1 100644 --- a/src/webquerymathscinet.cpp +++ b/src/webquerymathscinet.cpp @@ -19,10 +19,10 @@ ***************************************************************************/ #include "webquerymathscinet.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -36,58 +36,58 @@ namespace KBibTeX { - WebQueryMathSciNetWidget::WebQueryMathSciNetWidget( QWidget *parent, const char *name ) + WebQueryMathSciNetWidget::WebQueryMathSciNetWidget( TQWidget *parent, const char *name ) : WebQueryWidget( parent, name ) { init(); Settings *settings = Settings::self(); - QString value = settings->getWebQueryDefault( "MathSciNet" ); - value = value == QString::null ? "" : value; + TQString value = settings->getWebQueryDefault( "MathSciNet" ); + value = value == TQString::null ? "" : value; lineEditQuery->setText( value ); slotTextChanged( value, true ); } void WebQueryMathSciNetWidget::init() { - QVBoxLayout *vLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *vLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - QHBoxLayout *hLayout = new QHBoxLayout( ); + TQHBoxLayout *hLayout = new TQHBoxLayout( ); vLayout->addLayout( hLayout ); KPushButton *clearSearchText = new KPushButton( this ); - clearSearchText->setIconSet( QIconSet( SmallIcon( "locationbar_erase" ) ) ); + clearSearchText->setIconSet( TQIconSet( SmallIcon( "locationbar_erase" ) ) ); hLayout->addWidget( clearSearchText ); - QLabel *label = new QLabel( i18n( "Search &term:" ), this ); + TQLabel *label = new TQLabel( i18n( "Search &term:" ), this ); hLayout->addWidget( label ); lineEditQuery = new KLineEdit( this ); hLayout->addWidget( lineEditQuery ); label->setBuddy( lineEditQuery ); hLayout->addSpacing( KDialog::spacingHint() * 2 ); connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) ); - connect( lineEditQuery, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) ); + connect( lineEditQuery, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotTextChanged( const TQString& ) ) ); hLayout->setStretchFactor( lineEditQuery, 4 ); KCompletion *completionQuery = lineEditQuery->completionObject(); /* - label = new QLabel( i18n( "&Number of results:" ), this ); + label = new TQLabel( i18n( "&Number of results:" ), this ); hLayout->addWidget( label ); - spinBoxMaxHits = new QSpinBox( 1, 250, 1, this ); + spinBoxMaxHits = new TQSpinBox( 1, 250, 1, this ); spinBoxMaxHits->setValue( 10 ); hLayout->addWidget( spinBoxMaxHits ); label->setBuddy( spinBoxMaxHits ); */ - label = new QLabel( i18n( "Use the same synatx as for BIBGET. For spaces within a search element, use \"+\".
Example: a=gilkey t=invariance book 1984
" ), this ); + label = new TQLabel( i18n( "Use the same synatx as for BIBGET. For spaces within a search element, use \"+\".
Example: a=gilkey t=invariance book 1984
" ), this ); vLayout->addWidget( label ); vLayout->addStretch( 0 ); connect( lineEditQuery, SIGNAL( returnPressed() ), this, SIGNAL( startSearch() ) ); - connect( lineEditQuery, SIGNAL( returnPressed( const QString& ) ), completionQuery, SLOT( addItem( const QString& ) ) ); + connect( lineEditQuery, SIGNAL( returnPressed( const TQString& ) ), completionQuery, SLOT( addItem( const TQString& ) ) ); } - WebQueryMathSciNet::WebQueryMathSciNet( QWidget* parent ): WebQuery( parent ) + WebQueryMathSciNet::WebQueryMathSciNet( TQWidget* parent ): WebQuery( parent ) { m_widget = new WebQueryMathSciNetWidget( parent ); } @@ -97,17 +97,17 @@ namespace KBibTeX delete m_widget; } - QString WebQueryMathSciNet::title() + TQString WebQueryMathSciNet::title() { return i18n( "MathSciNet" ); } - QString WebQueryMathSciNet::disclaimer() + TQString WebQueryMathSciNet::disclaimer() { return i18n( "American Mathematical Society" ); } - QString WebQueryMathSciNet::disclaimerURL() + TQString WebQueryMathSciNet::disclaimerURL() { return "http://www.ams.org/ams/copyright.html"; } @@ -125,34 +125,34 @@ namespace KBibTeX setNumStages( 1 ); - QStringList searchTerms = QStringList::split( QRegExp( "\\s+" ), m_widget->lineEditQuery->text().stripWhiteSpace() ); + TQStringList searchTerms = TQStringList::split( TQRegExp( "\\s+" ), m_widget->lineEditQuery->text().stripWhiteSpace() ); if ( searchTerms.isEmpty() ) { setEndSearch( WebQuery::statusInvalidQuery ); return; } - QStringList queryTerms; + TQStringList queryTerms; int count = 1; - for ( QStringList::ConstIterator it = searchTerms.constBegin(); it != searchTerms.constEnd(); ++it ) + for ( TQStringList::ConstIterator it = searchTerms.constBegin(); it != searchTerms.constEnd(); ++it ) { - const QString term=*it; + const TQString term=*it; if ( term.startsWith( "a=" ) ) - queryTerms << QString( "pg%1=AUCN" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); + queryTerms << TQString( "pg%1=AUCN" ).arg( count ) << TQString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); else if ( term.startsWith( "t=" ) ) - queryTerms << QString( "pg%1=TI" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); + queryTerms << TQString( "pg%1=TI" ).arg( count ) << TQString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); else if ( term.startsWith( "k=" ) ) - queryTerms << QString( "pg%1=ALLF" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); + queryTerms << TQString( "pg%1=ALLF" ).arg( count ) << TQString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); else if ( term.startsWith( "r=" ) ) - queryTerms << QString( "pg%1=MR" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); + queryTerms << TQString( "pg%1=MR" ).arg( count ) << TQString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); else if ( term.startsWith( "j=" ) ) - queryTerms << QString( "pg%1=JOUR" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); + queryTerms << TQString( "pg%1=JOUR" ).arg( count ) << TQString( "s%1=%2" ).arg( count ).arg( term.mid( 2 ) ); else - queryTerms << QString( "pg%1=ALLF" ).arg( count ) << QString( "s%1=%2" ).arg( count ).arg( term ); + queryTerms << TQString( "pg%1=ALLF" ).arg( count ) << TQString( "s%1=%2" ).arg( count ).arg( term ); ++count; } - KURL url( QString( "http://www.ams.org/msnmain?fn=130&fmt=bibtex&l=100&extend=1&" ).append( queryTerms.join( "&" ) ) ); + KURL url( TQString( "http://www.ams.org/msnmain?fn=130&fmt=bibtex&l=100&extend=1&" ).append( queryTerms.join( "&" ) ) ); kdDebug()<<"url="<