summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/outputwindow.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/designer/outputwindow.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/outputwindow.cpp')
-rw-r--r--kdevdesigner/designer/outputwindow.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kdevdesigner/designer/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp
index f51a54a3..17477a95 100644
--- a/kdevdesigner/designer/outputwindow.cpp
+++ b/kdevdesigner/designer/outputwindow.cpp
@@ -29,23 +29,23 @@
#include "metadatabase.h"
#include "mainwindow.h"
-#include <qlistview.h>
-#include <qtextedit.h>
-#include <qapplication.h>
-#include <qheader.h>
+#include <tqlistview.h>
+#include <tqtextedit.h>
+#include <tqapplication.h>
+#include <tqheader.h>
#include <stdlib.h>
#include <stdio.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
-static QTextEdit *debugoutput = 0;
+static TQTextEdit *debugoutput = 0;
bool debugToStderr = FALSE;
QtMsgHandler OutputWindow::oldMsgHandler = 0;
-OutputWindow::OutputWindow( QWidget *parent )
- : QTabWidget( parent, "output_window" ), debugView( 0 ), errorView( 0 )
+OutputWindow::OutputWindow( TQWidget *parent )
+ : TQTabWidget( parent, "output_window" ), debugView( 0 ), errorView( 0 )
{
setupDebug();
setupError();
@@ -69,12 +69,12 @@ void OutputWindow::shuttingDown()
void OutputWindow::setupError()
{
- errorView = new QListView( this, "OutputWindow::errorView" );
+ errorView = new TQListView( this, "OutputWindow::errorView" );
errorView->setSorting( -1 );
- connect( errorView, SIGNAL( currentChanged( QListViewItem* ) ),
- this, SLOT( currentErrorChanged( QListViewItem* ) ) );
- connect( errorView, SIGNAL( clicked( QListViewItem* ) ),
- this, SLOT( currentErrorChanged( QListViewItem* ) ) );
+ connect( errorView, TQT_SIGNAL( currentChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) );
+ connect( errorView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) );
if ( MetaDataBase::languages().count() > 1 )
addTab( errorView, i18n( "Warnings/Errors" ) );
@@ -84,7 +84,7 @@ void OutputWindow::setupError()
errorView->addColumn( i18n( "Message" ) );
errorView->addColumn( i18n( "Line" ) );
errorView->addColumn( i18n( "Location" ) );
- errorView->setResizeMode( QListView::LastColumn );
+ errorView->setResizeMode( TQListView::LastColumn );
errorView->setColumnWidth( 0, errorView->fontMetrics().width( "WARNING1234" ) );
errorView->setColumnWidth( 1, errorView->fontMetrics().width( "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP" ) );
errorView->setColumnWidth( 2, errorView->fontMetrics().width( "9999999" ) );
@@ -94,7 +94,7 @@ void OutputWindow::setupError()
static void debugMessageOutput( QtMsgType type, const char *msg )
{
- QString s( msg );
+ TQString s( msg );
s += "\n";
if ( type != QtFatalMsg ) {
@@ -114,7 +114,7 @@ static void debugMessageOutput( QtMsgType type, const char *msg )
void OutputWindow::setupDebug()
{
- debugoutput = debugView = new QTextEdit( this, "OutputWindow::debugView" );
+ debugoutput = debugView = new TQTextEdit( this, "OutputWindow::debugView" );
//debugView->setReadOnly( TRUE );
addTab( debugView, "Debug Output" );
@@ -122,18 +122,18 @@ void OutputWindow::setupDebug()
oldMsgHandler = qInstallMsgHandler( debugMessageOutput );
}
-void OutputWindow::setErrorMessages( const QStringList &errors, const QValueList<uint> &lines,
- bool clear, const QStringList &locations,
- const QObjectList &locationObjects )
+void OutputWindow::setErrorMessages( const TQStringList &errors, const TQValueList<uint> &lines,
+ bool clear, const TQStringList &locations,
+ const TQObjectList &locationObjects )
{
if ( clear )
errorView->clear();
- QStringList::ConstIterator mit = errors.begin();
- QValueList<uint>::ConstIterator lit = lines.begin();
- QStringList::ConstIterator it = locations.begin();
- QObjectList objects = (QObjectList)locationObjects;
- QObject *o = objects.first();
- QListViewItem *after = 0;
+ TQStringList::ConstIterator mit = errors.begin();
+ TQValueList<uint>::ConstIterator lit = lines.begin();
+ TQStringList::ConstIterator it = locations.begin();
+ TQObjectList objects = (TQObjectList)locationObjects;
+ TQObject *o = objects.first();
+ TQListViewItem *after = 0;
for ( ; lit != lines.end() && mit != errors.end(); ++lit, ++mit, ++it, o = objects.next() )
after = new ErrorItem( errorView, after, *mit, *lit, *it, o );
setCurrentPage( 1 );
@@ -144,7 +144,7 @@ DesignerOutputDock *OutputWindow::iFace()
return iface;
}
-void OutputWindow::appendDebug( const QString &text )
+void OutputWindow::appendDebug( const TQString &text )
{
debugView->append( text + "\n" );
}
@@ -164,7 +164,7 @@ void OutputWindow::showDebugTab()
showPage( debugView );
}
-void OutputWindow::currentErrorChanged( QListViewItem *i )
+void OutputWindow::currentErrorChanged( TQListViewItem *i )
{
if ( !i )
return;
@@ -175,17 +175,17 @@ void OutputWindow::currentErrorChanged( QListViewItem *i )
-ErrorItem::ErrorItem( QListView *parent, QListViewItem *after, const QString &message, int line,
- const QString &locationString, QObject *locationObject )
- : QListViewItem( parent, after )
+ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString &message, int line,
+ const TQString &locationString, TQObject *locationObject )
+ : TQListViewItem( parent, after )
{
setMultiLinesEnabled( TRUE );
- QString m( message );
+ TQString m( message );
type = m.startsWith( "Warning: " ) ? Warning : Error;
m = m.mid( m.find( ':' ) + 1 );
setText( 0, type == Error ? "Error" : "Warning" );
setText( 1, m );
- setText( 2, QString::number( line ) );
+ setText( 2, TQString::number( line ) );
setText( 3, locationString );
object = locationObject;
read = !after;
@@ -195,15 +195,15 @@ ErrorItem::ErrorItem( QListView *parent, QListViewItem *after, const QString &me
}
}
-void ErrorItem::paintCell( QPainter *p, const QColorGroup & cg,
+void ErrorItem::paintCell( TQPainter *p, const TQColorGroup & cg,
int column, int width, int alignment )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Text, type == Error ? Qt::red : Qt::darkYellow );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Text, type == Error ? Qt::red : Qt::darkYellow );
if ( !read ) {
- QFont f( p->font() );
+ TQFont f( p->font() );
f.setBold( TRUE );
p->setFont( f );
}
- QListViewItem::paintCell( p, g, column, width, alignment );
+ TQListViewItem::paintCell( p, g, column, width, alignment );
}