summaryrefslogtreecommitdiffstats
path: root/src/logviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/logviewer.cpp')
-rwxr-xr-xsrc/logviewer.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/logviewer.cpp b/src/logviewer.cpp
index c76f7e6..0cd0d73 100755
--- a/src/logviewer.cpp
+++ b/src/logviewer.cpp
@@ -2,10 +2,10 @@
#include "logviewer.h"
#include "logger.h"
-#include <qlayout.h>
-#include <qstring.h>
-#include <qheader.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqheader.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -16,14 +16,14 @@
// ### soundkonverter 0.4: make sub items for the output
-LogViewerItem::LogViewerItem( KListView* parent, LogViewerItem* after, QString label1 )
- : KListViewItem( parent, after, label1 )
+LogViewerItem::LogViewerItem( KListView* tqparent, LogViewerItem* after, TQString label1 )
+ : KListViewItem( tqparent, after, label1 )
{
converting = false;
}
-LogViewerItem::LogViewerItem( LogViewerItem* parent, LogViewerItem* after, QString label1 )
- : KListViewItem( parent, after, label1 )
+LogViewerItem::LogViewerItem( LogViewerItem* tqparent, LogViewerItem* after, TQString label1 )
+ : KListViewItem( tqparent, after, label1 )
{
converting = false;
}
@@ -31,50 +31,50 @@ LogViewerItem::LogViewerItem( LogViewerItem* parent, LogViewerItem* after, QStri
LogViewerItem::~LogViewerItem()
{}
-void LogViewerItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+void LogViewerItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment )
{
// NOTE calculate the red color
- QColorGroup _cg( cg );
- QColor c;
+ TQColorGroup _cg( cg );
+ TQColor c;
if( isSelected() && converting ) {
- _cg.setColor( QColorGroup::Highlight, QColor( 215, 62, 62 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Highlight, TQColor( 215, 62, 62 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( converting && column != listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 255, 234, 234 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 255, 234, 234 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( converting && column == listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 247, 227, 227 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 247, 227, 227 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
- KListViewItem::paintCell( p, _cg, column, width, alignment );
+ KListViewItem::paintCell( p, _cg, column, width, tqalignment );
}
-LogViewerList::LogViewerList( QWidget* parent, const char* name )
- : KListView( parent, name )
+LogViewerList::LogViewerList( TQWidget* tqparent, const char* name )
+ : KListView( tqparent, name )
{}
LogViewerList::~LogViewerList()
{}
-LogViewer::LogViewer( Logger* _logger, QWidget *parent, const char *name, bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+LogViewer::LogViewer( Logger* _logger, TQWidget *tqparent, const char *name, bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
logger = _logger;
- connect( logger, SIGNAL(removedProcess(int)),
- this, SLOT(processRemoved(int))
+ connect( logger, TQT_SIGNAL(removedProcess(int)),
+ this, TQT_SLOT(processRemoved(int))
);
- connect( logger, SIGNAL(updateProcess(int)),
- this, SLOT(updateProcess(int))
+ connect( logger, TQT_SIGNAL(updateProcess(int)),
+ this, TQT_SLOT(updateProcess(int))
);
// create an icon loader object for loading icons
@@ -84,25 +84,25 @@ LogViewer::LogViewer( Logger* _logger, QWidget *parent, const char *name, bool m
resize( 600, 400 );
setIcon( iconLoader->loadIcon("view_text",KIcon::Small) );
- QGridLayout *grid = new QGridLayout( this, 4, 1, 11, 6 );
+ TQGridLayout *grid = new TQGridLayout( this, 4, 1, 11, 6 );
lLogs = new LogViewerList( this, "lLogs" );
lLogs->addColumn( i18n("Job/File") );
- //lLogs->setSelectionMode( QListView::Extended );
+ //lLogs->setSelectionMode( TQListView::Extended );
//lLogs->setAllColumnsShowFocus( true );
- lLogs->setResizeMode( QListView::LastColumn );
+ lLogs->setResizeMode( TQListView::LastColumn );
lLogs->setSorting( -1 );
lLogs->setRootIsDecorated( true );
lLogs->header()->setClickEnabled( false );
grid->addWidget( lLogs, 0, 0 );
- QHBoxLayout *buttonBox = new QHBoxLayout();
+ TQHBoxLayout *buttonBox = new TQHBoxLayout();
grid->addLayout( buttonBox, 3, 0 );
pReload = new KPushButton(iconLoader->loadIcon("reload",KIcon::Small), i18n("Reload"), this, "pReload" );
buttonBox->addWidget( pReload );
- connect( pReload, SIGNAL(clicked()),
- this, SLOT(refillLogs())
+ connect( pReload, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(refillLogs())
);
buttonBox->addStretch();
@@ -110,8 +110,8 @@ LogViewer::LogViewer( Logger* _logger, QWidget *parent, const char *name, bool m
pOk = new KPushButton(iconLoader->loadIcon("exit",KIcon::Small), i18n("Close"), this, "pOk" );
pOk->setFocus();
buttonBox->addWidget( pOk );
- connect( pOk, SIGNAL(clicked()),
- this, SLOT(accept())
+ connect( pOk, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(accept())
);
// delete the icon loader object
@@ -125,17 +125,17 @@ LogViewer::~LogViewer()
void LogViewer::refillLogs()
{
- LogViewerItem *parent = 0, *last = 0;
+ LogViewerItem *tqparent = 0, *last = 0;
lLogs->clear();
- QValueList<LoggerItem*> logs = logger->getLogs();
- for( QValueList<LoggerItem*>::Iterator a = logs.begin(); a != logs.end(); ++a ) {
- parent = new LogViewerItem( lLogs, parent, KURL::decode_string((*a)->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number((*a)->id) );
- parent->converting = !(*a)->completed;
- //parent->setOpen( true );
+ TQValueList<LoggerItem*> logs = logger->getLogs();
+ for( TQValueList<LoggerItem*>::Iterator a = logs.begin(); a != logs.end(); ++a ) {
+ tqparent = new LogViewerItem( lLogs, tqparent, KURL::decode_string((*a)->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number((*a)->id) );
+ tqparent->converting = !(*a)->completed;
+ //tqparent->setOpen( true );
last = 0;
- for( QStringList::Iterator b = (*a)->data.begin(); b != (*a)->data.end(); ++b ) {
- last = new LogViewerItem( parent, last, *b );
+ for( TQStringList::Iterator b = (*a)->data.begin(); b != (*a)->data.end(); ++b ) {
+ last = new LogViewerItem( tqparent, last, *b );
last->setMultiLinesEnabled( true );
last->converting = !(*a)->completed;
}
@@ -147,10 +147,10 @@ void LogViewer::processRemoved( int id )
LoggerItem* item = logger->getLog( id ); // this is ok, because the item still exists.
// it will be deleted after is function is completed
- QListViewItem* it = lLogs->firstChild();
+ TQListViewItem* it = lLogs->firstChild();
while( it != 0 ) {
- if( it->text(0) == KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number(item->id) ) {
+ if( it->text(0) == KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) ) {
delete it;
return;
}
@@ -167,7 +167,7 @@ void LogViewer::updateProcess( int id )
LogViewerItem *lastItem = 0, *oldItem = 0;
while( it != 0 ) {
- if( it->text(0) == KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number(item->id) ) {
+ if( it->text(0) == KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) ) {
LogViewerItem *a = it->firstChild(), *b;
while( a != 0 ) {
b = a->nextSibling();
@@ -176,7 +176,7 @@ void LogViewer::updateProcess( int id )
}
it->converting = !item->completed;
LogViewerItem* last = 0;
- for( QStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
+ for( TQStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
last = new LogViewerItem( (LogViewerItem*)it, last, *b );
last->setMultiLinesEnabled( true );
}
@@ -185,18 +185,18 @@ void LogViewer::updateProcess( int id )
it = it->nextSibling();
}
- LogViewerItem *parent = 0;
+ LogViewerItem *tqparent = 0;
// get the last list view item
- for( QListViewItem* it = lLogs->firstChild(); it != 0; it = it->nextSibling() ) {
+ for( TQListViewItem* it = lLogs->firstChild(); it != 0; it = it->nextSibling() ) {
lastItem = (LogViewerItem*)it;
}
- parent = new LogViewerItem( lLogs, lastItem, KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number(item->id) );
- parent->converting = !item->completed;
+ tqparent = new LogViewerItem( lLogs, lastItem, KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) );
+ tqparent->converting = !item->completed;
LogViewerItem* last = 0;
- for( QStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
- last = new LogViewerItem( parent, last, *b );
+ for( TQStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
+ last = new LogViewerItem( tqparent, last, *b );
last->setMultiLinesEnabled( true );
}
}