summaryrefslogtreecommitdiffstats
path: root/src/webqueryamatex.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/webqueryamatex.cpp
parent251c9a439759c830d34c70683d0fc9454d703010 (diff)
downloadkbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz
kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip
Initial TQt conversion
Diffstat (limited to 'src/webqueryamatex.cpp')
-rw-r--r--src/webqueryamatex.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/webqueryamatex.cpp b/src/webqueryamatex.cpp
index 8fcbb31..47b3bad 100644
--- a/src/webqueryamatex.cpp
+++ b/src/webqueryamatex.cpp
@@ -17,11 +17,11 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qbuffer.h>
-#include <qspinbox.h>
+#include <ntqfile.h>
+#include <ntqapplication.h>
+#include <ntqregexp.h>
+#include <ntqbuffer.h>
+#include <ntqspinbox.h>
#include <klineedit.h>
#include <klocale.h>
@@ -34,13 +34,13 @@
namespace KBibTeX
{
- WebQueryAmatexWidget::WebQueryAmatexWidget( QWidget *parent, const char *name )
+ WebQueryAmatexWidget::WebQueryAmatexWidget( TQWidget *parent, const char *name )
: WebQueryWidget( parent, name )
{
init();
}
- WebQueryAmatex::WebQueryAmatex( QWidget* parent ): WebQuery( parent )
+ WebQueryAmatex::WebQueryAmatex( TQWidget* parent ): WebQuery( parent )
{
m_widget = new WebQueryAmatexWidget( parent );
}
@@ -50,19 +50,19 @@ namespace KBibTeX
delete m_widget;
}
- QString WebQueryAmatex::title()
+ TQString WebQueryAmatex::title()
{
return i18n( "Amatex" );
}
- QString WebQueryAmatex::disclaimer()
+ TQString WebQueryAmatex::disclaimer()
{
return i18n( "About Amatex" );
}
- QString WebQueryAmatex::disclaimerURL()
+ TQString WebQueryAmatex::disclaimerURL()
{
- return QString( "http://www.2ndminute.org:8080/amatex/pages/about.jsp" );
+ return TQString( "http://www.2ndminute.org:8080/amatex/pages/about.jsp" );
}
WebQueryWidget *WebQueryAmatex::widget()
@@ -76,16 +76,16 @@ namespace KBibTeX
int numberOfResults = m_widget->spinBoxMaxHits->value();
setNumStages( 1 );
- QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" ).replace( '$', "" );
+ TQString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" ).replace( '$', "" );
if ( searchTerm.isEmpty() )
{
setEndSearch( WebQuery::statusInvalidQuery );
return;
}
- KURL url = KURL( QString( "http://www.2ndminute.org:8080/amatex/search.do?lang=US&querry=%1&suchart=kwd" ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
+ KURL url = KURL( TQString( "http://www.2ndminute.org:8080/amatex/search.do?lang=US&querry=%1&suchart=kwd" ).arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) );
- QString key = searchTerm.replace( QRegExp( "[^-_+A-Za-z0-9]" ), "" );
+ TQString key = searchTerm.replace( TQRegExp( "[^-_+A-Za-z0-9]" ), "" );
int count = 0;
BibTeX::File *tmpBibFile = downloadBibTeXFile( url );
if ( tmpBibFile != NULL && !m_aborted )
@@ -95,7 +95,7 @@ namespace KBibTeX
BibTeX::Entry *entry = dynamic_cast<BibTeX::Entry*>( *it );
if ( entry != NULL )
{
- entry->setId( QString( "Amatex_%1_%2" ).arg( key ).arg( ++count ) );
+ entry->setId( TQString( "Amatex_%1_%2" ).arg( key ).arg( ++count ) );
emit foundEntry( entry, false );
}
}
@@ -105,10 +105,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 );
}