summaryrefslogtreecommitdiffstats
path: root/kget/kget_plug_in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kget/kget_plug_in
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kget/kget_plug_in')
-rw-r--r--kget/kget_plug_in/kget_linkview.cpp38
-rw-r--r--kget/kget_plug_in/kget_linkview.h14
-rw-r--r--kget/kget_plug_in/kget_plug_in.cpp22
-rw-r--r--kget/kget_plug_in/kget_plug_in.h10
-rw-r--r--kget/kget_plug_in/links.cpp4
-rw-r--r--kget/kget_plug_in/links.h6
6 files changed, 47 insertions, 47 deletions
diff --git a/kget/kget_plug_in/kget_linkview.cpp b/kget/kget_plug_in/kget_linkview.cpp
index 179cc81b..a9bab704 100644
--- a/kget/kget_plug_in/kget_linkview.cpp
+++ b/kget/kget_plug_in/kget_linkview.cpp
@@ -1,6 +1,6 @@
#include "kget_linkview.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <dcopclient.h>
#include <kaction.h>
@@ -18,11 +18,11 @@
#define COL_MIME 2
#define COL_URL 3
-LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk )
- : QListViewItem( parent ),
+LinkViewItem::LinkViewItem( TQListView *parent, const LinkItem *lnk )
+ : TQListViewItem( parent ),
link( lnk )
{
- QString file = link->url.fileName();
+ TQString file = link->url.fileName();
if ( file.isEmpty() )
file = link->url.host();
@@ -37,17 +37,17 @@ LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk )
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KGetLinkView::KGetLinkView( QWidget *parent, const char *name )
+KGetLinkView::KGetLinkView( TQWidget *parent, const char *name )
: KMainWindow( parent, name )
{
setPlainCaption( i18n( "KGet" ) );
KAction* actionDownload = new KAction( i18n("Download Selected Files"),
"kget", CTRL+Key_D,
- this, SLOT( slotStartLeech() ),
+ this, TQT_SLOT( slotStartLeech() ),
actionCollection(), "startDownload" );
- KAction* actionSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ),
+ KAction* actionSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ),
actionCollection() );
m_links.setAutoDelete( true );
@@ -55,12 +55,12 @@ KGetLinkView::KGetLinkView( QWidget *parent, const char *name )
toolBar()->insertLineSeparator();
actionSelectAll->plug( toolBar() );
- QWidget *mainWidget = new QWidget( this );
- QVBoxLayout *layout = new QVBoxLayout( mainWidget );
+ TQWidget *mainWidget = new TQWidget( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( mainWidget );
setCentralWidget( mainWidget );
m_view = new KListView( mainWidget, "listview" );
- m_view->setSelectionMode( QListView::Extended );
+ m_view->setSelectionMode( TQListView::Extended );
m_view->addColumn( i18n("File Name") );
m_view->addColumn( i18n("Description") );
m_view->addColumn( i18n("File Type") );
@@ -81,17 +81,17 @@ KGetLinkView::~KGetLinkView()
{
}
-void KGetLinkView::setLinks( QPtrList<LinkItem>& links )
+void KGetLinkView::setLinks( TQPtrList<LinkItem>& links )
{
m_links = links; // now we 0wn them
showLinks( m_links );
}
-void KGetLinkView::showLinks( const QPtrList<LinkItem>& links )
+void KGetLinkView::showLinks( const TQPtrList<LinkItem>& links )
{
m_view->clear();
- QPtrListIterator<LinkItem> it( links );
+ TQPtrListIterator<LinkItem> it( links );
for ( ; it.current(); ++it )
(void) new LinkViewItem( m_view, *it );
@@ -101,7 +101,7 @@ void KGetLinkView::showLinks( const QPtrList<LinkItem>& links )
void KGetLinkView::slotStartLeech()
{
KURL::List urls;
- QListViewItemIterator it( m_view->firstChild() );
+ TQListViewItemIterator it( m_view->firstChild() );
for ( ; it.current(); ++it )
{
if ( it.current()->isSelected() )
@@ -123,11 +123,11 @@ void KGetLinkView::slotStartLeech()
}
kapp->updateRemoteUserTimestamp( "kget" );
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
- stream << urls << QString::null;
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
+ stream << urls << TQString::null;
bool ok = DCOPClient::mainClient()->send( "kget", "KGet-Interface",
- "addTransfers(KURL::List, QString)",
+ "addTransfers(KURL::List, TQString)",
data );
kdDebug() << "*** startDownload: " << ok << endl;
@@ -137,7 +137,7 @@ void KGetLinkView::slotStartLeech()
}
}
-void KGetLinkView::setPageURL( const QString& url )
+void KGetLinkView::setPageURL( const TQString& url )
{
setPlainCaption( i18n( "Links in: %1 - KGet" ).arg( url ) );
}
diff --git a/kget/kget_plug_in/kget_linkview.h b/kget/kget_plug_in/kget_linkview.h
index a6d7961c..26ce28fc 100644
--- a/kget/kget_plug_in/kget_linkview.h
+++ b/kget/kget_plug_in/kget_linkview.h
@@ -8,7 +8,7 @@
#ifndef KGET_LINKVIEW_H
#define KGET_LINKVIEW_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klistview.h>
#include <kmainwindow.h>
@@ -19,7 +19,7 @@
class LinkViewItem : public QListViewItem
{
public:
- LinkViewItem( QListView *parent, const LinkItem * lnk );
+ LinkViewItem( TQListView *parent, const LinkItem * lnk );
const LinkItem *link;
};
@@ -29,11 +29,11 @@ class KGetLinkView : public KMainWindow
Q_OBJECT
public:
- KGetLinkView( QWidget *parent = 0L, const char *name = 0L );
+ KGetLinkView( TQWidget *parent = 0L, const char *name = 0L );
~KGetLinkView();
- void setLinks( QPtrList<LinkItem>& links );
- void setPageURL( const QString& url );
+ void setLinks( TQPtrList<LinkItem>& links );
+ void setPageURL( const TQString& url );
signals:
void leechURLs( const KURL::List& urls );
@@ -43,9 +43,9 @@ private slots:
void slotSelectAll();
private:
- void showLinks( const QPtrList<LinkItem>& links );
+ void showLinks( const TQPtrList<LinkItem>& links );
- QPtrList<LinkItem> m_links;
+ TQPtrList<LinkItem> m_links;
KListView *m_view;
diff --git a/kget/kget_plug_in/kget_plug_in.cpp b/kget/kget_plug_in/kget_plug_in.cpp
index dc5f5b9f..c73406a2 100644
--- a/kget/kget_plug_in/kget_plug_in.cpp
+++ b/kget/kget_plug_in/kget_plug_in.cpp
@@ -44,25 +44,25 @@
#include "links.h"
#include "kget_linkview.h"
-KGet_plug_in::KGet_plug_in( QObject* parent, const char* name )
+KGet_plug_in::KGet_plug_in( TQObject* parent, const char* name )
: Plugin( parent, name )
{
- QPixmap pix = KGlobal::iconLoader()->loadIcon("kget",
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon("kget",
KIcon::MainToolbar);
KActionMenu *menu = new KActionMenu( i18n("Download Manager"), pix,
actionCollection(), "kget_menu" );
menu->setDelayed( false );
- connect( menu->popupMenu(), SIGNAL( aboutToShow() ), SLOT( showPopup() ));
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( showPopup() ));
m_paToggleDropTarget=new KToggleAction(i18n("Show Drop Target"),
KShortcut(),
- this, SLOT(slotShowDrop()),
+ this, TQT_SLOT(slotShowDrop()),
actionCollection(), "show_drop" );
menu->insert( m_paToggleDropTarget );
KAction *action = new KAction(i18n("List All Links"), KShortcut(),
- this, SLOT( slotShowLinks() ),
+ this, TQT_SLOT( slotShowLinks() ),
actionCollection(), "show_links");
menu->insert( action );
@@ -122,8 +122,8 @@ void KGet_plug_in::slotShowLinks()
DOM::HTMLCollection links = doc.links();
- QPtrList<LinkItem> linkList;
- std::set<QString> dupeCheck;
+ TQPtrList<LinkItem> linkList;
+ std::set<TQString> dupeCheck;
for ( uint i = 0; i < links.length(); i++ )
{
DOM::Node link = links.item( i );
@@ -150,22 +150,22 @@ void KGet_plug_in::slotShowLinks()
}
KGetLinkView *view = new KGetLinkView();
- QString url = doc.URL().string();
+ TQString url = doc.URL().string();
view->setPageURL( url );
view->setLinks( linkList );
view->show();
}
-KPluginFactory::KPluginFactory( QObject* parent, const char* name )
+KPluginFactory::KPluginFactory( TQObject* parent, const char* name )
: KLibFactory( parent, name )
{
s_instance = new KInstance("KPluginFactory");
}
-QObject* KPluginFactory::createObject( QObject* parent, const char* name, const char*, const QStringList & )
+TQObject* KPluginFactory::createObject( TQObject* parent, const char* name, const char*, const TQStringList & )
{
- QObject *obj = new KGet_plug_in( parent, name );
+ TQObject *obj = new KGet_plug_in( parent, name );
return obj;
}
diff --git a/kget/kget_plug_in/kget_plug_in.h b/kget/kget_plug_in/kget_plug_in.h
index 75888b10..b5cfea29 100644
--- a/kget/kget_plug_in/kget_plug_in.h
+++ b/kget/kget_plug_in/kget_plug_in.h
@@ -28,7 +28,7 @@ class KGet_plug_in : public KParts::Plugin
{
Q_OBJECT
public:
- KGet_plug_in( QObject* parent = 0, const char* name = 0 );
+ KGet_plug_in( TQObject* parent = 0, const char* name = 0 );
KToggleAction *m_paToggleDropTarget ;
DCOPClient* p_dcopServer;
virtual ~KGet_plug_in();
@@ -44,12 +44,12 @@ class KPluginFactory : public KLibFactory
{
Q_OBJECT
public:
- KPluginFactory( QObject *parent = 0, const char *name = 0 );
+ KPluginFactory( TQObject *parent = 0, const char *name = 0 );
~KPluginFactory() ;
- virtual QObject* createObject( QObject* parent = 0, const char* pname = 0,
- const char* name = "QObject",
- const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0,
+ const char* name = "TQObject",
+ const TQStringList &args = TQStringList() );
private:
static KInstance* s_instance;
diff --git a/kget/kget_plug_in/links.cpp b/kget/kget_plug_in/links.cpp
index a597257d..12600353 100644
--- a/kget/kget_plug_in/links.cpp
+++ b/kget/kget_plug_in/links.cpp
@@ -14,7 +14,7 @@ LinkItem::LinkItem( DOM::Element link )
// qDebug("*** href: %s", href.nodeValue().string().latin1() );
- QString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string();
+ TQString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string();
if ( urlString.isEmpty() )
return;
@@ -34,7 +34,7 @@ LinkItem::LinkItem( DOM::Element link )
// force "local file" mimetype determination
KMimeType::Ptr mt = KMimeType::findByURL( url, 0, true, true);
- icon = mt->icon( QString::null, false ); // dummy parameters
+ icon = mt->icon( TQString::null, false ); // dummy parameters
mimeType = mt->comment();
m_valid = true;
diff --git a/kget/kget_plug_in/links.h b/kget/kget_plug_in/links.h
index 89ba9ab5..9430dcc0 100644
--- a/kget/kget_plug_in/links.h
+++ b/kget/kget_plug_in/links.h
@@ -18,9 +18,9 @@ public:
LinkItem( DOM::Element link );
KURL url;
- QString icon;
- QString text;
- QString mimeType;
+ TQString icon;
+ TQString text;
+ TQString mimeType;
bool isValid() const { return m_valid; }