summaryrefslogtreecommitdiffstats
path: root/kommander/editor/messagelog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/messagelog.cpp')
-rw-r--r--kommander/editor/messagelog.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp
index 952dd19f..ecaed31a 100644
--- a/kommander/editor/messagelog.cpp
+++ b/kommander/editor/messagelog.cpp
@@ -24,26 +24,26 @@
#include <kpopupmenu.h>
#include <kprocess.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
-MessageLog::MessageLog(QWidget* parent, const char* name) : QTabWidget(parent, name)
+MessageLog::MessageLog(TQWidget* parent, const char* name) : TQTabWidget(parent, name)
{
m_popupMenu = new KPopupMenu(this);
- m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, SLOT(copyLine()));
- m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("&Copy Content"), this, SLOT(copyContent()));
- m_popupMenu->insertItem(SmallIconSet("filesaveas"), i18n("&Save As..."), this, SLOT(saveToFile()));
+ m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, TQT_SLOT(copyLine()));
+ m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("&Copy Content"), this, TQT_SLOT(copyContent()));
+ m_popupMenu->insertItem(SmallIconSet("filesaveas"), i18n("&Save As..."), this, TQT_SLOT(saveToFile()));
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clearContent()));
+ m_popupMenu->insertItem(SmallIconSet("editclear"), i18n("Clear"), this, TQT_SLOT(clearContent()));
for (int i = 0; i < m_listCount; i++)
{
m_lists[i] = new KListBox(this);
addTab(m_lists[i], m_listNames[i]);
m_seenEOL[i] = false;
- connect(m_lists[i], SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)),
- this, SLOT(showMenu(QListBoxItem*, const QPoint&)));
+ connect(m_lists[i], TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(showMenu(TQListBoxItem*, const TQPoint&)));
}
}
@@ -51,13 +51,13 @@ MessageLog::~MessageLog()
{
}
-void MessageLog::insertItem(InfoType i, QString text)
+void MessageLog::insertItem(InfoType i, TQString text)
{
bool seenEOL = text.endsWith("\n");
if (seenEOL)
text.truncate(text.length() - 1);
- QStringList items(QStringList::split('\n', text));
- for (QStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
+ TQStringList items(TQStringList::split('\n', text));
+ for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
{
if (!m_seenEOL[i] && m_lists[i]->count() && it == items.begin())
m_lists[i]->changeItem(m_lists[i]->text(m_lists[i]->count() - 1) + *it, m_lists[i]->count() - 1);
@@ -69,9 +69,9 @@ void MessageLog::insertItem(InfoType i, QString text)
m_lists[i]->ensureCurrentVisible();
}
-QString MessageLog::content()
+TQString MessageLog::content()
{
- QString p_content;
+ TQString p_content;
KListBox* list = m_lists[currentPageIndex()];
for (uint i=0; i < list->count(); i++)
p_content.append(list->text(i) + "\n");
@@ -92,12 +92,12 @@ void MessageLog::clear(InfoType i)
void MessageLog::receivedStdout(KProcess*, char* buffer, int buflen)
{
- insertItem(Stdout, QString::fromLocal8Bit(buffer, buflen));
+ insertItem(Stdout, TQString::fromLocal8Bit(buffer, buflen));
}
void MessageLog::receivedStderr(KProcess*, char* buffer, int buflen)
{
- insertItem(Stderr, QString::fromLocal8Bit(buffer, buflen));
+ insertItem(Stderr, TQString::fromLocal8Bit(buffer, buflen));
}
void MessageLog::clearContent()
@@ -118,32 +118,32 @@ void MessageLog::copyContent()
void MessageLog::saveToFile()
{
- KURL url=KFileDialog::getSaveURL(QDir::currentDirPath(),
+ KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(),
i18n("*.log|Log Files (*.log)\n*|All Files"), this, i18n("Save Log File"));
if (url.isEmpty())
return;
- QFileInfo fileinfo(url.path());
+ TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::warningContinueCancel(0,
i18n("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .arg(url.path()), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ .arg(url.path()), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
return;
- QFile file(url.path());
+ TQFile file(url.path());
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("<qt>Cannot save log file<br><b>%1</b></qt>")
.arg(url.url()));
return;
}
- QTextStream textfile(&file);
+ TQTextStream textfile(&file);
textfile << content();
file.close();
}
-void MessageLog::showMenu(QListBoxItem*, const QPoint& l_point)
+void MessageLog::showMenu(TQListBoxItem*, const TQPoint& l_point)
{
m_popupMenu->exec(l_point);
}
-QString MessageLog::m_listNames[m_listCount] = {i18n("Stdout"), i18n("Stderr")};
+TQString MessageLog::m_listNames[m_listCount] = {i18n("Stdout"), i18n("Stderr")};
#include "messagelog.moc"