summaryrefslogtreecommitdiffstats
path: root/kdesktop/kwebdesktop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kdesktop/kwebdesktop
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/kwebdesktop')
-rw-r--r--kdesktop/kwebdesktop/kwebdesktop.cpp44
-rw-r--r--kdesktop/kwebdesktop/kwebdesktop.h14
2 files changed, 29 insertions, 29 deletions
diff --git a/kdesktop/kwebdesktop/kwebdesktop.cpp b/kdesktop/kwebdesktop/kwebdesktop.cpp
index e7010f06d..7d5897ac7 100644
--- a/kdesktop/kwebdesktop/kwebdesktop.cpp
+++ b/kdesktop/kwebdesktop/kwebdesktop.cpp
@@ -30,7 +30,7 @@
#include <kurifilter.h>
#include <kio/job.h>
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include "kwebdesktop.h"
#include <kmimetype.h>
#include <kparts/componentfactory.h>
@@ -52,18 +52,18 @@ KWebDesktopRun::KWebDesktopRun( KWebDesktop* webDesktop, const KURL & url )
{
kdDebug() << "KWebDesktopRun::KWebDesktopRun starting get" << endl;
KIO::Job * job = KIO::get(m_url, false, false);
- connect( job, SIGNAL( result( KIO::Job *)),
- this, SLOT( slotFinished(KIO::Job *)));
- connect( job, SIGNAL( mimetype( KIO::Job *, const QString &)),
- this, SLOT( slotMimetype(KIO::Job *, const QString &)));
+ connect( job, TQT_SIGNAL( result( KIO::Job *)),
+ this, TQT_SLOT( slotFinished(KIO::Job *)));
+ connect( job, TQT_SIGNAL( mimetype( KIO::Job *, const TQString &)),
+ this, TQT_SLOT( slotMimetype(KIO::Job *, const TQString &)));
}
-void KWebDesktopRun::slotMimetype( KIO::Job *job, const QString &_type )
+void KWebDesktopRun::slotMimetype( KIO::Job *job, const TQString &_type )
{
KIO::SimpleJob *sjob = static_cast<KIO::SimpleJob *>(job);
// Update our URL in case of a redirection
m_url = sjob->url();
- QString type = _type; // necessary copy if we plan to use it
+ TQString type = _type; // necessary copy if we plan to use it
sjob->putOnHold();
kdDebug() << "slotMimetype : " << type << endl;
@@ -105,12 +105,12 @@ int main( int argc, char **argv )
args->usage();
return 1;
}
- const int width = QCString(args->arg(0)).toInt();
- const int height = QCString(args->arg(1)).toInt();
- QCString imageFile = args->arg(2);
- QString url;
+ const int width = TQCString(args->arg(0)).toInt();
+ const int height = TQCString(args->arg(1)).toInt();
+ TQCString imageFile = args->arg(2);
+ TQString url;
if (args->count() == 4)
- url = QString::fromLocal8Bit(args->arg(3));
+ url = TQString::fromLocal8Bit(args->arg(3));
KWebDesktop *webDesktop = new KWebDesktop( 0, imageFile, width, height );
@@ -138,13 +138,13 @@ void KWebDesktop::slotCompleted()
{
kdDebug() << "KWebDesktop::slotCompleted" << endl;
// Dump image to m_imageFile
- QPixmap snapshot = QPixmap::grabWidget( m_part->widget() );
+ TQPixmap snapshot = TQPixmap::grabWidget( m_part->widget() );
snapshot.save( m_imageFile, "PNG" );
// And terminate the app.
kapp->quit();
}
-KParts::ReadOnlyPart* KWebDesktop::createPart( const QString& mimeType )
+KParts::ReadOnlyPart* KWebDesktop::createPart( const TQString& mimeType )
{
delete m_part;
m_part = 0;
@@ -161,26 +161,26 @@ KParts::ReadOnlyPart* KWebDesktop::createPart( const QString& mimeType )
htmlPart->setJScriptEnabled(false);
htmlPart->setJavaEnabled(false);
- ((QScrollView *)htmlPart->widget())->setHScrollBarMode( QScrollView::AlwaysOff );
- ((QScrollView *)htmlPart->widget())->setVScrollBarMode( QScrollView::AlwaysOff );
+ ((TQScrollView *)htmlPart->widget())->setHScrollBarMode( TQScrollView::AlwaysOff );
+ ((TQScrollView *)htmlPart->widget())->setVScrollBarMode( TQScrollView::AlwaysOff );
- connect( htmlPart, SIGNAL( completed() ), this, SLOT( slotCompleted() ) );
+ connect( htmlPart, TQT_SIGNAL( completed() ), this, TQT_SLOT( slotCompleted() ) );
m_part = htmlPart;
} else {
// Try to find an appropriate viewer component
m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>
- ( mimeType, QString::null, 0, 0, this, 0 );
+ ( mimeType, TQString::null, 0, 0, this, 0 );
if ( !m_part )
kdWarning() << "No handler found for " << mimeType << endl;
else {
kdDebug() << "Loaded " << m_part->className() << endl;
- connect( m_part, SIGNAL( completed() ),
- this, SLOT( slotCompleted() ) );
+ connect( m_part, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotCompleted() ) );
}
}
if ( m_part ) {
- connect( m_part, SIGNAL( canceled(const QString &) ),
- this, SLOT( slotCompleted() ) );
+ connect( m_part, TQT_SIGNAL( canceled(const TQString &) ),
+ this, TQT_SLOT( slotCompleted() ) );
}
return m_part;
}
diff --git a/kdesktop/kwebdesktop/kwebdesktop.h b/kdesktop/kwebdesktop/kwebdesktop.h
index d364f8022..7ec81338e 100644
--- a/kdesktop/kwebdesktop/kwebdesktop.h
+++ b/kdesktop/kwebdesktop/kwebdesktop.h
@@ -19,8 +19,8 @@
#ifndef KWEBDESKTOP_H
#define KWEBDESKTOP_H
-#include <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
#include <kparts/browserextension.h>
#include <khtml_part.h>
@@ -30,22 +30,22 @@ class KWebDesktop : public QObject
{
Q_OBJECT
public:
- KWebDesktop( QObject* parent, const QCString & imageFile, int width, int height )
- : QObject( parent ),
+ KWebDesktop( TQObject* parent, const TQCString & imageFile, int width, int height )
+ : TQObject( parent ),
m_part( 0 ),
m_imageFile( imageFile ),
m_width( width ),
m_height( height ) {}
~KWebDesktop();
- KParts::ReadOnlyPart* createPart( const QString& mimeType );
+ KParts::ReadOnlyPart* createPart( const TQString& mimeType );
private slots:
void slotCompleted();
private:
KParts::ReadOnlyPart* m_part;
- QCString m_imageFile;
+ TQCString m_imageFile;
int m_width;
int m_height;
};
@@ -59,7 +59,7 @@ public:
~KWebDesktopRun() {}
protected slots:
- void slotMimetype( KIO::Job *job, const QString &_type );
+ void slotMimetype( KIO::Job *job, const TQString &_type );
void slotFinished( KIO::Job * job );
private: