summaryrefslogtreecommitdiffstats
path: root/kget/logwindow.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 /kget/logwindow.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 'kget/logwindow.cpp')
-rw-r--r--kget/logwindow.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kget/logwindow.cpp b/kget/logwindow.cpp
index 5d6f77ad..09490134 100644
--- a/kget/logwindow.cpp
+++ b/kget/logwindow.cpp
@@ -25,8 +25,8 @@
***************************************************************************/
-#include <qlayout.h>
-#include <qlistview.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
#include <klocale.h>
#include <kdialog.h>
@@ -37,25 +37,25 @@
#include "logwindow.h"
#include <kapplication.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
// // Replace regular space with nbsp
-// QString replaceSpaces(const QString &str) {
-// QString res = str;
+// TQString replaceSpaces(const TQString &str) {
+// TQString res = str;
// res.simplifyWhiteSpace();
// int pos;
// while ( (pos = res.find(' ')) != -1) {
-// res.replace(pos, 1, new QChar( 0x00a0 ), 1);
+// res.replace(pos, 1, new TQChar( 0x00a0 ), 1);
// }
// return res;
// }
-static QString removeHTML(const QString & str)
+static TQString removeHTML(const TQString & str)
{
- QString res = str;
+ TQString res = str;
int pos;
// replace <br/> with a newline
@@ -77,18 +77,18 @@ static QString removeHTML(const QString & str)
}
-SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent)
+SeparatedLog::SeparatedLog(TQWidget * parent):TQWidget(parent)
{
idSelected = 0;
- QGridLayout *topGridLayout = new QGridLayout(this, 1, 2, 0, KDialog::spacingHint());
+ TQGridLayout *topGridLayout = new TQGridLayout(this, 1, 2, 0, KDialog::spacingHint());
topGridLayout->setRowStretch(0, 5);
topGridLayout->setColStretch(0, 3);
topGridLayout->setColStretch(1, 10);
- lv_log = new QListView(this);
+ lv_log = new TQListView(this);
lv_log->setMultiSelection(false);
lv_log->setAllColumnsShowFocus(true);
lv_log->setSorting(-1);
@@ -98,26 +98,26 @@ SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent)
topGridLayout->addWidget(lv_log, 0, 0);
- connect(lv_log, SIGNAL(selectionChanged(QListViewItem *)), SLOT(transferSelected(QListViewItem *)));
+ connect(lv_log, TQT_SIGNAL(selectionChanged(TQListViewItem *)), TQT_SLOT(transferSelected(TQListViewItem *)));
- ml_log = new QTextEdit(this);
+ ml_log = new TQTextEdit(this);
ml_log->setTextFormat(LogText);
ml_log->setMinimumSize(300, 200);
- ml_log->setVScrollBarMode(QScrollView::Auto);
- ml_log->setWordWrap(QTextEdit::NoWrap);
+ ml_log->setVScrollBarMode(TQScrollView::Auto);
+ ml_log->setWordWrap(TQTextEdit::NoWrap);
topGridLayout->addWidget(ml_log, 0, 1);
}
-void SeparatedLog::addLog(uint id, const QString & filename, const QString & message)
+void SeparatedLog::addLog(uint id, const TQString & filename, const TQString & message)
{
if (!trMap.contains(id)) {
trMap.insert(id, message);
- QListViewItem *last=lv_log->lastItem();
- new QListViewItem(lv_log, last);
+ TQListViewItem *last=lv_log->lastItem();
+ new TQListViewItem(lv_log, last);
last=lv_log->lastItem();
- last->setText(0, QString::number(id));
+ last->setText(0, TQString::number(id));
last->setText(1, filename);
// if I don't do this, ID#10 gets sorted between ID#1 and ID#2, ugly.
} else {
@@ -130,7 +130,7 @@ void SeparatedLog::addLog(uint id, const QString & filename, const QString & mes
}
-void SeparatedLog::transferSelected(QListViewItem * item)
+void SeparatedLog::transferSelected(TQListViewItem * item)
{
if (item) {
idSelected = item->text(0).toUInt();
@@ -160,27 +160,27 @@ LogWindow::LogWindow():KDialogBase(Tabbed, i18n("Log Window"), Close, Close, 0,
{
// add pages
- QFrame *page = addPage(i18n("Mixed"));
- QVBoxLayout *topLayout = new QVBoxLayout(page, 0, spacingHint());
+ TQFrame *page = addPage(i18n("Mixed"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout(page, 0, spacingHint());
- mixed_log = new QTextEdit(page);
+ mixed_log = new TQTextEdit(page);
mixed_log->setTextFormat(LogText);
- mixed_log->setVScrollBarMode(QScrollView::Auto);
- mixed_log->setWordWrap(QTextEdit::NoWrap);
+ mixed_log->setVScrollBarMode(TQScrollView::Auto);
+ mixed_log->setWordWrap(TQTextEdit::NoWrap);
topLayout->addWidget(mixed_log);
page = addPage(i18n("Separated"));
- topLayout = new QVBoxLayout(page, 0, spacingHint());
+ topLayout = new TQVBoxLayout(page, 0, spacingHint());
sep_log = new SeparatedLog(page);
topLayout->addWidget(sep_log);
- connect(this, SIGNAL(closeClicked()), this, SLOT(close()));
+ connect(this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(close()));
// resize( 500, 300 );
}
-void LogWindow::closeEvent(QCloseEvent *e)
+void LogWindow::closeEvent(TQCloseEvent *e)
{
kmain->m_paShowLog->setChecked(false);
kmain->b_viewLogWindow = false;
@@ -188,29 +188,29 @@ void LogWindow::closeEvent(QCloseEvent *e)
}
-void LogWindow::logGeneral(const QString & message)
+void LogWindow::logGeneral(const TQString & message)
{
- QString tmps = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : <b>" + message + "</b>";
+ TQString tmps = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : <b>" + message + "</b>";
mixed_log->append(tmps);
}
-void LogWindow::logTransfer(uint id, const QString & filename, const QString & message)
+void LogWindow::logTransfer(uint id, const TQString & filename, const TQString & message)
{
- QString mixed_msg, single_msg, job_id;
+ TQString mixed_msg, single_msg, job_id;
- job_id = QString("Job[<font color=\"red\">%1</font>] : ").arg(id);
- mixed_msg = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + job_id + message;
+ job_id = TQString("Job[<font color=\"red\">%1</font>] : ").arg(id);
+ mixed_msg = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + job_id + message;
- single_msg = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + message;
+ single_msg = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + message;
mixed_log->append(mixed_msg);
sep_log->addLog(id, filename, single_msg);
}
-QString LogWindow::getText() const
+TQString LogWindow::getText() const
{
return removeHTML(mixed_log->text());
}