summaryrefslogtreecommitdiffstats
path: root/src/webqueryzmath.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/webqueryzmath.cpp
parent251c9a439759c830d34c70683d0fc9454d703010 (diff)
downloadkbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz
kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip
Initial TQt conversion
Diffstat (limited to 'src/webqueryzmath.cpp')
-rw-r--r--src/webqueryzmath.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/webqueryzmath.cpp b/src/webqueryzmath.cpp
index 9e8a78e..b805829 100644
--- a/src/webqueryzmath.cpp
+++ b/src/webqueryzmath.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qapplication.h>
-#include <qspinbox.h>
+#include <ntqfile.h>
+#include <ntqapplication.h>
+#include <ntqspinbox.h>
#include <klocale.h>
#include <klineedit.h>
@@ -34,19 +34,19 @@
namespace KBibTeX
{
- WebQueryZMATHWidget::WebQueryZMATHWidget( QWidget *parent, const char *name )
+ WebQueryZMATHWidget::WebQueryZMATHWidget( TQWidget *parent, const char *name )
: WebQueryWidget( parent, name )
{
init();
Settings *settings = Settings::self();
- QString value = settings->getWebQueryDefault( "ZMATH" );
- value = value == QString::null ? "" : value;
+ TQString value = settings->getWebQueryDefault( "ZMATH" );
+ value = value == TQString::null ? "" : value;
lineEditQuery->setText( value );
slotTextChanged( value, true );
}
- WebQueryZMATH::WebQueryZMATH( QWidget* parent ): WebQuery( parent )
+ WebQueryZMATH::WebQueryZMATH( TQWidget* parent ): WebQuery( parent )
{
m_widget = new WebQueryZMATHWidget( parent );
}
@@ -56,17 +56,17 @@ namespace KBibTeX
delete m_widget;
}
- QString WebQueryZMATH::title()
+ TQString WebQueryZMATH::title()
{
return i18n( "Zentralblatt MATH" );
}
- QString WebQueryZMATH::disclaimer()
+ TQString WebQueryZMATH::disclaimer()
{
return i18n( "About Zentralblatt MATH" );
}
- QString WebQueryZMATH::disclaimerURL()
+ TQString WebQueryZMATH::disclaimerURL()
{
return "http://www.zentralblatt-math.org/zmath/en/";
}
@@ -85,14 +85,14 @@ namespace KBibTeX
int numberOfResults = m_widget->spinBoxMaxHits->value();
setNumStages( 1 );
- QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
+ TQString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" );
if ( searchTerm.isEmpty() )
{
setEndSearch( WebQuery::statusInvalidQuery );
return;
}
- KURL url = KURL( QString( "http://www.zentralblatt-math.org/zmath/en/search/?q=%2&count=%1&type=bibtex&format=short&display=all" ).arg( numberOfResults ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+ KURL url = KURL( TQString( "http://www.zentralblatt-math.org/zmath/en/search/?q=%2&count=%1&type=bibtex&format=short&display=all" ).arg( numberOfResults ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
BibTeX::File *bibtexFile = downloadBibTeXFile( url );
if ( bibtexFile != NULL && !m_aborted )
{
@@ -107,10 +107,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 );
}