summaryrefslogtreecommitdiffstats
path: root/src/webquerymathscinet.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-06-29 12:56:53 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-07-04 03:11:35 +0200
commit5f5e7c5455d52826b0bd50f64fcffb7695ce970d (patch)
treec8ee8792d3fb139365abbf70c2255f1e69d2aa34 /src/webquerymathscinet.cpp
parent251c9a439759c830d34c70683d0fc9454d703010 (diff)
downloadkbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz
kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip
Initial TQt conversion
Diffstat (limited to 'src/webquerymathscinet.cpp')
-rw-r--r--src/webquerymathscinet.cpp66
1 files changed, 33 insertions, 33 deletions
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 <qlayout.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qspinbox.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqregexp.h>
+#include <ntqspinbox.h>
#include <kpushbutton.h>
#include <klocale.h>
@@ -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( "<qt>Use the same synatx as for <a href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For spaces within a search element, use \"<tt>+</tt>\".<br/>Example: <tt>a=gilkey t=invariance book 1984</tt></qt>" ), this );
+ label = new TQLabel( i18n( "<qt>Use the same synatx as for <a href=\"http://www.math.tamu.edu/~comech/tools/bibget/\">BIBGET</a>. For spaces within a search element, use \"<tt>+</tt>\".<br/>Example: <tt>a=gilkey t=invariance book 1984</tt></qt>" ), 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="<<url.prettyURL()<<endl;
BibTeX::File *bibFile = downloadBibTeXFile( url );
@@ -170,10 +170,10 @@ namespace KBibTeX
}
else if ( !m_aborted )
{
- QString message = KIO::NetAccess::lastErrorString();
+ TQString message = KIO::NetAccess::lastErrorString();
if ( message.isEmpty() )
message.prepend( '\n' );
- message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
+ message.prepend( TQString( i18n( "Querying database '%1' failed." ) ).arg( title() ) );
KMessageBox::error( m_parent, message );
setEndSearch( WebQuery::statusError );
}