summaryrefslogtreecommitdiffstats
path: root/src/webquery.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-06-29 16:33:55 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-07-04 03:57:45 +0200
commitf2d4b48ad7f6ce4f23c6cbba3e85c67486f922db (patch)
tree0414ba9f0823b98d2a159c11513ddcda84b932cc /src/webquery.cpp
parent5f5e7c5455d52826b0bd50f64fcffb7695ce970d (diff)
downloadkbibtex-f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db.tar.gz
kbibtex-f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db.zip
Initial TDE conversion
Diffstat (limited to 'src/webquery.cpp')
-rw-r--r--src/webquery.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/webquery.cpp b/src/webquery.cpp
index dd15343..5d3caaa 100644
--- a/src/webquery.cpp
+++ b/src/webquery.cpp
@@ -31,19 +31,19 @@
#include <ntqeventloop.h>
#include <ntqbuffer.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kcombobox.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <kurllabel.h>
#include <klineedit.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kpushbutton.h>
#include <kprogress.h>
#include <kcompletion.h>
-#include <kmessagebox.h>
-#include <kconfig.h>
-#include <kwin.h>
+#include <tdemessagebox.h>
+#include <tdeconfig.h>
+#include <twin.h>
#include <settings.h>
#include <idsuggestions.h>
@@ -100,7 +100,7 @@ namespace KBibTeX
connect( clearSearchText, SIGNAL( clicked() ), lineEditQuery, SLOT( clear() ) );
connect( lineEditQuery, SIGNAL( textChanged( const TQString& ) ), this, SLOT( slotTextChanged( const TQString& ) ) );
hLayout->setStretchFactor( lineEditQuery, 4 );
- KCompletion *completionQuery = lineEditQuery->completionObject();
+ TDECompletion *completionQuery = lineEditQuery->completionObject();
label = new TQLabel( i18n( "&Number of results:" ), this );
hLayout->addWidget( label );
@@ -215,11 +215,11 @@ namespace KBibTeX
m_incomingData = "";
m_currentJobTotalSize = -1;
- m_currentJob = KIO::get( url, false, false );
- connect( m_currentJob, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), this, SLOT( slotSetJobTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( m_currentJob, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), this, SLOT( slotSetJobProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( m_currentJob, SIGNAL( data( KIO::Job*, const TQByteArray & ) ), this, SLOT( slotJobData( KIO::Job*, const TQByteArray & ) ) );
- connect( m_currentJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotJobFinished( KIO::Job* ) ) );
+ m_currentJob = TDEIO::get( url, false, false );
+ connect( m_currentJob, SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ), this, SLOT( slotSetJobTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) );
+ connect( m_currentJob, SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ), this, SLOT( slotSetJobProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) );
+ connect( m_currentJob, SIGNAL( data( TDEIO::Job*, const TQByteArray & ) ), this, SLOT( slotJobData( TDEIO::Job*, const TQByteArray & ) ) );
+ connect( m_currentJob, SIGNAL( result( TDEIO::Job* ) ), this, SLOT( slotJobFinished( TDEIO::Job* ) ) );
tqApp->eventLoop()->enterLoop();
@@ -249,20 +249,20 @@ namespace KBibTeX
return result;
}
- void WebQuery::slotSetJobTotalSize( KIO::Job *job, KIO::filesize_t size )
+ void WebQuery::slotSetJobTotalSize( TDEIO::Job *job, TDEIO::filesize_t size )
{
if ( job != m_currentJob ) return;
m_currentJobTotalSize = size;
}
- void WebQuery::slotSetJobProcessedSize( KIO::Job *job, KIO::filesize_t size )
+ void WebQuery::slotSetJobProcessedSize( TDEIO::Job *job, TDEIO::filesize_t size )
{
if ( job != m_currentJob ) return;
if ( m_currentJobTotalSize <= 0 ) m_currentJobTotalSize = size;
m_progressDialog->progressBar()->setProgress( m_currentStage * 100 + min( 100, size * 100 / m_currentJobTotalSize ) );
}
- void WebQuery::slotJobData( KIO::Job *job, const TQByteArray &data )
+ void WebQuery::slotJobData( TDEIO::Job *job, const TQByteArray &data )
{
if ( job != m_currentJob ) return;
TQCString dataStr = TQCString( data, data.size() + 1 );
@@ -270,7 +270,7 @@ namespace KBibTeX
m_incomingData.append( dataStr );
}
- void WebQuery::slotJobFinished( KIO::Job *job )
+ void WebQuery::slotJobFinished( TDEIO::Job *job )
{
if ( job != m_currentJob ) return;
m_currentJob = NULL;
@@ -296,14 +296,14 @@ namespace KBibTeX
WebQueryWizard::~WebQueryWizard()
{
- KConfig * config = kapp->config();
+ TDEConfig * config = kapp->config();
config->setGroup( "WebQueryWizard" );
saveWindowSize( config );
}
void WebQueryWizard::showEvent( TQShowEvent * )
{
- KConfig * config = kapp->config();
+ TDEConfig * config = kapp->config();
config->setGroup( "WebQueryWizard" );
restoreWindowSize( config );
}
@@ -444,15 +444,15 @@ namespace KBibTeX
m_pushButtonSearch->setIconSet( TQIconSet( SmallIcon( "find" ) ) );
m_pushButtonSearch->setEnabled( FALSE );
- m_listViewResults = new KListView( this );
+ m_listViewResults = new TDEListView( this );
m_listViewResults->addColumn( i18n( "Year" ), 64 );
m_listViewResults->addColumn( i18n( "Author" ), 128 );
m_listViewResults->addColumn( i18n( "Title" ), 512 );
if ( settings->editing_UseSpecialFont )
m_listViewResults->setFont( settings->editing_SpecialFont );
else
- m_listViewResults->setFont( KGlobalSettings::generalFont() );
- m_listViewResults->header() ->setFont( KGlobalSettings::generalFont() );
+ m_listViewResults->setFont( TDEGlobalSettings::generalFont() );
+ m_listViewResults->header() ->setFont( TDEGlobalSettings::generalFont() );
m_listViewResults->setAllColumnsShowFocus( TRUE );
m_listViewResults->setFullWidth( true );
m_listViewResults->setSelectionMode( TQListView::Extended );
@@ -520,8 +520,8 @@ namespace KBibTeX
}
}
- /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
- void WebQueryWizard::saveWindowSize( KConfig *config ) const
+ /* This function was taken form TDEMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void WebQueryWizard::saveWindowSize( TDEConfig *config ) const
{
int scnum = TQApplication::desktop()->screenNumber( parentWidget() );
TQRect desk = TQApplication::desktop()->screenGeometry( scnum );
@@ -554,8 +554,8 @@ namespace KBibTeX
config->writeEntry( heightString, h );
}
- /* This function was taken form KMainWindow of KDE 3.5 and modified to fit KBibTeX */
- void WebQueryWizard::restoreWindowSize( KConfig *config )
+ /* This function was taken form TDEMainWindow of KDE 3.5 and modified to fit KBibTeX */
+ void WebQueryWizard::restoreWindowSize( TDEConfig *config )
{
// restore the size
int scnum = TQApplication::desktop()->screenNumber( parentWidget() );