summaryrefslogtreecommitdiffstats
path: root/ksirc/dccManager.cpp
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 /ksirc/dccManager.cpp
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 'ksirc/dccManager.cpp')
-rw-r--r--ksirc/dccManager.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/ksirc/dccManager.cpp b/ksirc/dccManager.cpp
index 44d85dee..386644b9 100644
--- a/ksirc/dccManager.cpp
+++ b/ksirc/dccManager.cpp
@@ -8,8 +8,8 @@
#include "dccManager.h"
#include "dccNew.h"
-#include <qobject.h>
-#include <qsignal.h>
+#include <tqobject.h>
+#include <tqsignal.h>
#include <kdebug.h>
#include <klocale.h>
@@ -22,8 +22,8 @@
#define COL_CPS 4
#define COL_PER 5
-dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size )
- : QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
+dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size )
+ : TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
{
m_percent = 0;
m_status = status;
@@ -38,13 +38,13 @@ dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, con
if(m_type == dccChat)
setText(COL_SIZE, "");
else
- setText(COL_SIZE, QString("%1").arg(size));
+ setText(COL_SIZE, TQString("%1").arg(size));
setText(COL_PER, "");
}
-dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size )
-: QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
+dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size )
+: TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type)
{
m_percent = 0;
m_status = status;
@@ -56,7 +56,7 @@ dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type,
setText(COL_WHO, who);
setText(COL_STAT, enumToStatus(status));
if(type != dccChat)
- setText(COL_SIZE, QString("%1").arg(size));
+ setText(COL_SIZE, TQString("%1").arg(size));
setText(COL_PER, "");
}
@@ -65,9 +65,9 @@ dccItem::~dccItem()
{
}
-QString dccItem::enumToStatus(enum dccStatus status)
+TQString dccItem::enumToStatus(enum dccStatus status)
{
- QString str;
+ TQString str;
switch(status){
case dccRecving:
str = i18n("Receiving");
@@ -106,17 +106,17 @@ QString dccItem::enumToStatus(enum dccStatus status)
return str;
}
-void dccItem::setWhoPostfix(const QString &post) {
+void dccItem::setWhoPostfix(const TQString &post) {
m_post = post;
- setText(COL_WHO, QString("%1 %2").arg(m_who).arg(post));
+ setText(COL_WHO, TQString("%1 %2").arg(m_who).arg(post));
}
-void dccItem::changeFilename(const QString &file) {
+void dccItem::changeFilename(const TQString &file) {
setText(COL_FILE, file);
m_file = file;
}
-void dccItem::changeWho(const QString &who) {
+void dccItem::changeWho(const TQString &who) {
setText(COL_WHO, who);
m_who = who;
}
@@ -146,13 +146,13 @@ void dccItem::setReceivedBytes(int bytes)
(ctime >= (m_lasttime + 2))
){
m_lasttime = ctime;
- setText(COL_SIZE, QString("%1/%2").arg(bytes).arg(m_size));
- setText(COL_PER, QString("%1%").arg(per));
+ setText(COL_SIZE, TQString("%1/%2").arg(bytes).arg(m_size));
+ setText(COL_PER, TQString("%1%").arg(per));
m_percent = per;
if(m_status == dccResumed)
m_stime = 0; /* if we are got a resume request don't update CPS, reset it */
else
- setText(COL_CPS, QString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2));
+ setText(COL_CPS, TQString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2));
}
@@ -177,13 +177,13 @@ void dccItem::okRename(int col)
{
KListViewItem::okRename(col);
if(type() == dccGet){
- QString oldfile = m_file;
+ TQString oldfile = m_file;
changeFilename(text(COL_FILE));
emit itemRenamed(this, m_who, oldfile);
setRenameEnabled(COL_FILE, false);
}
else if(type() == dccChat){
- QString oldwho = m_who;
+ TQString oldwho = m_who;
changeWho(text(COL_WHO));
emit itemRenamed(this, oldwho, m_file);
setRenameEnabled(COL_WHO, false);
@@ -199,7 +199,7 @@ void dccItem::cancelRename(int col)
}
}
-dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( parent, name)
+dccManager::dccManager( TQWidget *parent, const char *name ) : dccManagerbase( parent, name)
{
dccNewDialog = 0x0;
@@ -215,10 +215,10 @@ dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( pa
m_sendit->setSelectable(false);
m_chatit->setSelectable(false);
-// connect(klvBox, SIGNAL(clicked(QListViewItem *)),
-// this, SLOT(getSelChange(QListViewItem *)));
- connect(klvBox, SIGNAL(currentChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+// connect(klvBox, TQT_SIGNAL(clicked(TQListViewItem *)),
+// this, TQT_SLOT(getSelChange(TQListViewItem *)));
+ connect(klvBox, TQT_SIGNAL(currentChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
klvBox->setCurrentItem(m_chatit);
getSelChange(klvBox->currentItem());
@@ -228,31 +228,31 @@ dccManager::~dccManager()
{
}
-dccItem *dccManager::newSendItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size)
+dccItem *dccManager::newSendItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size)
{
emit changed(false, i18n("dcc activity"));
dccItem *it = new dccItem(m_sendit, this, dccItem::dccSend, file, who, status, size);
- connect(it, SIGNAL(statusChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+ connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
return it;
}
-dccItem *dccManager::newGetItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size)
+dccItem *dccManager::newGetItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size)
{
emit changed(false, i18n("dcc activity"));
dccItem *it = new dccItem(m_getit, this, dccItem::dccGet, file, who, status, size);
- connect(it, SIGNAL(statusChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+ connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
return it;
}
-dccItem *dccManager::newChatItem(QString who, enum dccItem::dccStatus status)
+dccItem *dccManager::newChatItem(TQString who, enum dccItem::dccStatus status)
{
emit changed(false, i18n("dcc activity"));
dccItem *it = new dccItem(m_chatit, this, dccItem::dccChat, "", who, status, 0);
- connect(it, SIGNAL(statusChanged(QListViewItem *)),
- this, SLOT(getSelChange(QListViewItem *)));
+ connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)),
+ this, TQT_SLOT(getSelChange(TQListViewItem *)));
return it;
}
@@ -268,20 +268,20 @@ void dccManager::kpbNew_clicked()
dccNewDialog = new dccNew();
dccNewDialog->show();
- connect(dccNewDialog, SIGNAL(accepted(int, QString, QString)),
- this, SLOT(dccNewAccepted(int, QString, QString)));
+ connect(dccNewDialog, TQT_SIGNAL(accepted(int, TQString, TQString)),
+ this, TQT_SLOT(dccNewAccepted(int, TQString, TQString)));
}
-void dccManager::dccNewAccepted(int type, QString nick, QString file){
+void dccManager::dccNewAccepted(int type, TQString nick, TQString file){
kdDebug(5008) << "Type: " << type << " nick: " << nick << " file: " << file << endl;
if(type == dccNew::Chat){
- QCString cstr = QCString("/dcc chat ") + nick.latin1() + "\n";
+ TQCString cstr = TQCString("/dcc chat ") + nick.latin1() + "\n";
kdDebug(5008) << "Output: " << cstr << endl;
emit outputLine(cstr);
}
else if(type == dccNew::Send){
- QCString cstr = QCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n";
+ TQCString cstr = TQCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n";
emit outputLine(cstr);
}
delete dccNewDialog;
@@ -318,7 +318,7 @@ void dccManager::kpbAbort_clicked()
}
}
-void dccManager::getSelChange(QListViewItem *_i) {
+void dccManager::getSelChange(TQListViewItem *_i) {
kpbAbort->setEnabled(false);
kpbResume->setEnabled(false);
kpbRename->setEnabled(false);
@@ -374,7 +374,7 @@ void dccManager::getSelChange(QListViewItem *_i) {
}
-void dccManager::sendSelChange(QListViewItem *) {
+void dccManager::sendSelChange(TQListViewItem *) {
/*
if(_i == 0)
return;