summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/gui-error-log/errorlog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 03:43:07 +0000
commit70b9eea2ba01c3691497f49e4c45cb070c16193c (patch)
tree9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/plugins/gui-error-log/errorlog.cpp
parent998c1384ace4ae4655997c181fa33242148cd0a4 (diff)
downloadtderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz
tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip
TQt4 port kradio
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/gui-error-log/errorlog.cpp')
-rw-r--r--kradio3/plugins/gui-error-log/errorlog.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kradio3/plugins/gui-error-log/errorlog.cpp b/kradio3/plugins/gui-error-log/errorlog.cpp
index 2eb58ad..82498ce 100644
--- a/kradio3/plugins/gui-error-log/errorlog.cpp
+++ b/kradio3/plugins/gui-error-log/errorlog.cpp
@@ -17,13 +17,13 @@
#include "errorlog.h"
-#include <qframe.h>
-#include <qdatetime.h>
-#include <qlayout.h>
+#include <tqframe.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <kfiledialog.h>
#include <kurl.h>
#include <ktempfile.h>
@@ -40,7 +40,7 @@ PLUGIN_LIBRARY_FUNCTIONS(ErrorLog, "kradio-gui-error-log", i18n("Error Logging W
/////////////////////////////////////////////////////////////////////////////
-ErrorLog::ErrorLog(const QString &name)
+ErrorLog::ErrorLog(const TQString &name)
: KDialogBase(KDialogBase::IconList,
"",
KDialogBase::Close|KDialogBase::User1,
@@ -54,60 +54,60 @@ ErrorLog::ErrorLog(const QString &name)
WidgetPluginBase(name, i18n("Error Logger")),
init_done(false)
{
- QWidget::setCaption(i18n("KRadio Logger"));
- QFrame *info = addPage(i18n("Information"), i18n("Information"),
+ TQWidget::setCaption(i18n("KRadio Logger"));
+ TQFrame *info = addPage(i18n("Information"), i18n("Information"),
KGlobal::instance()->iconLoader()->loadIcon(
"messagebox_info", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *linfo = new QGridLayout(info);
+ TQGridLayout *linfo = new TQGridLayout(info);
linfo->setSpacing( 5 );
linfo->setMargin ( 0 );
- m_teInfos = new QTextEdit(info);
+ m_teInfos = new TQTextEdit(info);
linfo->addWidget(m_teInfos, 0, 0);
m_teInfos->setReadOnly(true);
logInfo(i18n("logging started"));
- QFrame *warn = addPage(i18n("Warnings"), i18n("Warnings"),
+ TQFrame *warn = addPage(i18n("Warnings"), i18n("Warnings"),
KGlobal::instance()->iconLoader()->loadIcon(
"messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *lwarn = new QGridLayout(warn);
+ TQGridLayout *lwarn = new TQGridLayout(warn);
lwarn->setSpacing( 5 );
lwarn->setMargin ( 0 );
- m_teWarnings = new QTextEdit(warn);
+ m_teWarnings = new TQTextEdit(warn);
lwarn->addWidget(m_teWarnings, 0, 0);
m_teWarnings->setReadOnly(true);
logWarning(i18n("logging started"));
- QFrame *err = addPage(i18n("Errors"), i18n("Errors"),
+ TQFrame *err = addPage(i18n("Errors"), i18n("Errors"),
KGlobal::instance()->iconLoader()->loadIcon(
"messagebox_critical", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *lerr = new QGridLayout(err);
+ TQGridLayout *lerr = new TQGridLayout(err);
lerr->setSpacing( 5 );
lerr->setMargin ( 0 );
- m_teErrors = new QTextEdit(err);
+ m_teErrors = new TQTextEdit(err);
lerr->addWidget(m_teErrors, 0, 0);
m_teErrors->setReadOnly(true);
logError(i18n("logging started"));
- QFrame *debug = addPage(i18n("Debugging"), i18n("Debugging"),
+ TQFrame *debug = addPage(i18n("Debugging"), i18n("Debugging"),
KGlobal::instance()->iconLoader()->loadIcon(
- "find", KIcon::NoGroup, KIcon::SizeMedium
+ "tqfind", KIcon::NoGroup, KIcon::SizeMedium
)
);
- QGridLayout *ldebug = new QGridLayout(debug);
+ TQGridLayout *ldebug = new TQGridLayout(debug);
ldebug->setSpacing( 5 );
ldebug->setMargin ( 0 );
- m_teDebug = new QTextEdit(debug);
+ m_teDebug = new TQTextEdit(debug);
ldebug->addWidget(m_teDebug, 0, 0);
m_teDebug->setReadOnly(true);
logDebug(i18n("logging started"));
@@ -136,14 +136,14 @@ bool ErrorLog::disconnectI (Interface *i)
void ErrorLog::restoreState (KConfig *config)
{
- config->setGroup(QString("errorlog-") + WidgetPluginBase::name());
+ config->setGroup(TQString("errorlog-") + WidgetPluginBase::name());
WidgetPluginBase::restoreState(config, false);
}
void ErrorLog::saveState (KConfig *config) const
{
- config->setGroup(QString("errorlog-") + WidgetPluginBase::name());
+ config->setGroup(TQString("errorlog-") + WidgetPluginBase::name());
WidgetPluginBase::saveState(config);
}
@@ -162,18 +162,18 @@ void ErrorLog::showOnOrgDesktop()
void ErrorLog::hide()
{
- logDebug(QString("%1, ErrorLog::hide: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").arg(name()).arg(m_saveSticky).arg(m_saveDesktop).arg(isReallyVisible()).arg(isAnywhereVisible()).arg(m_geoCacheValid));
+ logDebug(TQString("%1, ErrorLog::hide: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").tqarg(name()).tqarg(m_saveSticky).tqarg(m_saveDesktop).tqarg(isReallyVisible()).tqarg(isAnywhereVisible()).tqarg(m_geoCacheValid));
WidgetPluginBase::pHide();
KDialogBase::hide();
}
-void ErrorLog::showEvent(QShowEvent *e)
+void ErrorLog::showEvent(TQShowEvent *e)
{
KDialogBase::showEvent(e);
WidgetPluginBase::pShowEvent(e);
}
-void ErrorLog::hideEvent(QHideEvent *e)
+void ErrorLog::hideEvent(TQHideEvent *e)
{
KDialogBase::hideEvent(e);
WidgetPluginBase::pHideEvent(e);
@@ -181,9 +181,9 @@ void ErrorLog::hideEvent(QHideEvent *e)
// IErrorLog
-bool ErrorLog::logError (const QString &s)
+bool ErrorLog::logError (const TQString &s)
{
- m_teErrors->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teErrors->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
if (init_done) {
showPage(PAGE_ID_ERROR);
show();
@@ -191,21 +191,21 @@ bool ErrorLog::logError (const QString &s)
return true;
}
-bool ErrorLog::logWarning(const QString &s)
+bool ErrorLog::logWarning(const TQString &s)
{
- m_teWarnings->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teWarnings->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
return true;
}
-bool ErrorLog::logInfo (const QString &s)
+bool ErrorLog::logInfo (const TQString &s)
{
- m_teInfos->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teInfos->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
return true;
}
-bool ErrorLog::logDebug (const QString &s)
+bool ErrorLog::logDebug (const TQString &s)
{
- m_teDebug->append("<i>" + QDateTime::currentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
+ m_teDebug->append("<i>" + TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "</i> " + s + "\n");
return true;
}
@@ -224,15 +224,15 @@ void ErrorLog::slotUser1()
fd.setOperationMode(KFileDialog::Saving);
fd.setCaption (i18n("Save KRadio Logging Data as ..."));
- if (fd.exec() == QDialog::Accepted) {
+ if (fd.exec() == TQDialog::Accepted) {
KURL url = fd.selectedURL();
KTempFile tmpFile;
tmpFile.setAutoDelete(true);
- QFile *outf = tmpFile.file();
+ TQFile *outf = tmpFile.file();
- QTextStream outs(outf);
- outs.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream outs(outf);
+ outs.setEncoding(TQTextStream::UnicodeUTF8);
switch (activePageIndex()) {
case PAGE_ID_INFO: outs << m_teInfos->text(); break;
@@ -244,7 +244,7 @@ void ErrorLog::slotUser1()
if (outf->status() != IO_Ok) {
logError("ErrorLogger: " +
- i18n("error writing to tempfile %1").arg(tmpFile.name()));
+ i18n("error writing to tempfile %1").tqarg(tmpFile.name()));
return;
}
@@ -253,7 +253,7 @@ void ErrorLog::slotUser1()
if (!KIO::NetAccess::upload(tmpFile.name(), url, this)) {
logError("ErrorLogger: " +
- i18n("error uploading preset file %1").arg(url.url()));
+ i18n("error uploading preset file %1").tqarg(url.url()));
}
}
setIconListAllVisible(true);