summaryrefslogtreecommitdiffstats
path: root/quanta/messages/messageoutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/messages/messageoutput.cpp')
-rw-r--r--quanta/messages/messageoutput.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/quanta/messages/messageoutput.cpp b/quanta/messages/messageoutput.cpp
index 6b89aaa9..de4627ca 100644
--- a/quanta/messages/messageoutput.cpp
+++ b/quanta/messages/messageoutput.cpp
@@ -25,40 +25,40 @@
#include <kiconloader.h>
// Qt includes
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include "messageoutput.h"
#include "messageitem.h"
-MessageOutput::MessageOutput(QWidget *parent, const char *name )
- : QListBox(parent,name)
+MessageOutput::MessageOutput(TQWidget *parent, const char *name )
+ : TQListBox(parent,name)
{
m_maxItems = 2000;
- QPalette pal = palette();
- pal.setColor(QColorGroup::HighlightedText, pal.color(QPalette::Normal, QColorGroup::Text));
- pal.setColor(QColorGroup::Highlight, pal.color(QPalette::Normal, QColorGroup::Mid));
+ TQPalette pal = palette();
+ pal.setColor(TQColorGroup::HighlightedText, pal.color(TQPalette::Normal, TQColorGroup::Text));
+ pal.setColor(TQColorGroup::Highlight, pal.color(TQPalette::Normal, TQColorGroup::Mid));
setPalette(pal);
setFocusPolicy( NoFocus );
m_popupMenu = new KPopupMenu(this);
- connect(this, SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)),
- this, SLOT(showMenu(QListBoxItem*, const QPoint&)));
- m_popupMenu->insertItem( SmallIconSet("editcopy"), i18n("&Copy"), this, SLOT(copyContent()) ) ;
- m_popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save As..."), this, SLOT(saveContent()) ) ;
+ connect(this, TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(showMenu(TQListBoxItem*, const TQPoint&)));
+ m_popupMenu->insertItem( SmallIconSet("editcopy"), i18n("&Copy"), this, TQT_SLOT(copyContent()) ) ;
+ m_popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save As..."), this, TQT_SLOT(saveContent()) ) ;
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem( SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clear()) ) ;
+ m_popupMenu->insertItem( SmallIconSet("editclear"), i18n("Clear"), this, TQT_SLOT(clear()) ) ;
- connect( this, SIGNAL(clicked(QListBoxItem*)), SLOT(clickItem(QListBoxItem*)) );
+ connect( this, TQT_SIGNAL(clicked(TQListBoxItem*)), TQT_SLOT(clickItem(TQListBoxItem*)) );
}
MessageOutput::~MessageOutput()
{
}
-MessageItem *MessageOutput::insertItem(const QString& s)
+MessageItem *MessageOutput::insertItem(const TQString& s)
{
checkMaxItems();
MessageItem *it = new MessageItem(this, s);
@@ -66,7 +66,7 @@ MessageItem *MessageOutput::insertItem(const QString& s)
return it;
}
-void MessageOutput::addToLastItem(const QString& s)
+void MessageOutput::addToLastItem(const TQString& s)
{
int ind = count() - 1;
if ( ind != -1 ) {
@@ -78,10 +78,10 @@ void MessageOutput::addToLastItem(const QString& s)
}
}
-void MessageOutput::showMessage(int line, int col, const QString &fileName, const QString& s, bool append)
+void MessageOutput::showMessage(int line, int col, const TQString &fileName, const TQString& s, bool append)
{
MessageItem *it = 0L;
- QString message = s;
+ TQString message = s;
int endPos;
if ( !count() || (!append && !text(count()-1).stripWhiteSpace().isEmpty()) )
it = insertItem("");
@@ -109,7 +109,7 @@ void MessageOutput::showMessage(int line, int col, const QString &fileName, cons
setBottomItem(count()>0?count()-1:0);
}
-void MessageOutput::showMessage(const QString& s, bool append)
+void MessageOutput::showMessage(const TQString& s, bool append)
{
showMessage(-1, -1, "", s, append);
}
@@ -121,7 +121,7 @@ void MessageOutput::checkMaxItems()
removeItem( index(firstItem()) );
}
-void MessageOutput::clickItem( QListBoxItem * l_item )
+void MessageOutput::clickItem( TQListBoxItem * l_item )
{
MessageItem *item = dynamic_cast<MessageItem*>(l_item);
if ( item ) {
@@ -131,14 +131,14 @@ void MessageOutput::clickItem( QListBoxItem * l_item )
}
}
-void MessageOutput::showMenu( QListBoxItem*, const QPoint& l_point )
+void MessageOutput::showMenu( TQListBoxItem*, const TQPoint& l_point )
{
m_popupMenu->exec(l_point);
}
-QString MessageOutput::content()
+TQString MessageOutput::content()
{
- QString p_content;
+ TQString p_content;
for (uint i=0; i<count(); i++)
p_content.append(text(i) + "\n");
return p_content;
@@ -151,25 +151,25 @@ void MessageOutput::copyContent()
void MessageOutput::saveContent()
{
- 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();