diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/editor/workspace.cpp | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/workspace.cpp')
-rw-r--r-- | kommander/editor/workspace.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp index 90f0891d..ecccce3d 100644 --- a/kommander/editor/workspace.cpp +++ b/kommander/editor/workspace.cpp @@ -1,7 +1,7 @@ /********************************************************************** ** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -102,11 +102,11 @@ static TQPixmap *filePixmap = 0; static TQPixmap* formPixmap = 0; #ifndef KOMMANDER -WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p ) +WorkspaceItem::WorkspaceItem( TQListView *tqparent, Project* p ) #else -WorkspaceItem::WorkspaceItem( TQListView *parent ) +WorkspaceItem::WorkspaceItem( TQListView *tqparent ) #endif - : TQListViewItem( parent ) + : TQListViewItem( tqparent ) { init(); #ifndef KOMMANDER @@ -118,8 +118,8 @@ WorkspaceItem::WorkspaceItem( TQListView *parent ) } #ifndef KOMMANDER -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) - : TQListViewItem( parent ) +WorkspaceItem::WorkspaceItem( TQListViewItem *tqparent, SourceFile* sf ) + : TQListViewItem( tqparent ) { init(); sourceFile = sf; @@ -128,8 +128,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) } #endif -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) - : TQListViewItem( parent ) +WorkspaceItem::WorkspaceItem( TQListViewItem *tqparent, FormFile* ff, Type type ) + : TQListViewItem( tqparent ) { init(); formFile = ff; @@ -146,8 +146,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) } } -WorkspaceItem::WorkspaceItem( TQListView *parent, FormFile* ff, Type type ) - : TQListViewItem( parent ) +WorkspaceItem::WorkspaceItem( TQListView *tqparent, FormFile* ff, Type type ) + : TQListViewItem( tqparent ) { init(); formFile = ff; @@ -180,7 +180,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, { TQColorGroup g( cg ); g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, Qt::black ); + g.setColor( TQColorGroup::Foreground, TQt::black ); #ifndef KOMMANDER if ( type() == FormSourceType && !formFile->hasFormCode() ) { @@ -188,7 +188,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) ); } else { #endif - g.setColor( TQColorGroup::Text, Qt::black ); + g.setColor( TQColorGroup::Text, TQt::black ); #ifndef KOMMANDER } #endif @@ -236,7 +236,7 @@ TQString WorkspaceItem::text( int column ) const #endif } - return TQString::null; // shut up compiler + return TQString(); // shut up compiler } void WorkspaceItem::fillCompletionList( TQStringList& completion ) @@ -310,8 +310,8 @@ TQString WorkspaceItem::key( int column, bool ) const TQColor WorkspaceItem::backgroundColor() { bool b = useOddColor; - if ( t == FormSourceType && parent() ) - b = ( ( WorkspaceItem*)parent() )->useOddColor; + if ( t == FormSourceType && tqparent() ) + b = ( ( WorkspaceItem*)tqparent() )->useOddColor; return b ? *backColor2 : *backColor1; } @@ -328,8 +328,8 @@ void WorkspaceItem::setAutoOpen( bool b ) autoOpen = b; } -Workspace::Workspace( TQWidget *parent, MainWindow *mw ) - : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | +Workspace::Workspace( TQWidget *tqparent, MainWindow *mw ) + : TQListView( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), #ifndef KOMMANDER project( 0 ), completionDirty( false ) @@ -485,9 +485,9 @@ void Workspace::update( FormFile* ff ) { TQListViewItem* i = findItem( ff ); if ( i ) { - i->repaint(); + i->tqrepaint(); if ( (i = i->firstChild()) ) - i->repaint(); + i->tqrepaint(); } } @@ -559,7 +559,7 @@ void Workspace::closeAutoOpenItems() TQListViewItemIterator it( this ); for ( ; it.current(); ++it ) { WorkspaceItem* i = (WorkspaceItem*) it.current(); - WorkspaceItem* ip = (WorkspaceItem*) i->parent(); + WorkspaceItem* ip = (WorkspaceItem*) i->tqparent(); if ( i->type() == WorkspaceItem::FormSourceType ) { if ( !i->isSelected() && !ip->isSelected() && ip->isAutoOpen() ) { @@ -583,7 +583,7 @@ void Workspace::itemDoubleClicked( TQListViewItem *i ) void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) { - if ( !i || button != LeftButton ) + if ( !i || button != Qt::LeftButton ) return; closeAutoOpenItems(); @@ -699,7 +699,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) break; #endif case OPEN_SOURCE: - itemClicked( LeftButton, i, pos ); + itemClicked( Qt::LeftButton, i, pos ); break; #ifndef KOMMANDER case REMOVE_FORM: // FIXME @@ -707,10 +707,10 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) break; #endif case OPEN_FORM: - itemClicked( LeftButton, i, pos ); + itemClicked( Qt::LeftButton, i, pos ); break; case OPEN_FORM_SOURCE: - itemClicked( LeftButton, i, pos ); + itemClicked( Qt::LeftButton, i, pos ); break; default: break; @@ -720,7 +720,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) bool Workspace::eventFilter( TQObject *o, TQEvent * e ) { // Reggie, on what type of events do we have to execute updateBufferEdit() - if ( o ==bufferEdit && e->type() != TQEvent::ChildRemoved ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved ) updateBufferEdit(); return TQListView::eventFilter( o, e ); } @@ -755,7 +755,7 @@ void Workspace::bufferChosen( const TQString &buffer ) bufferEdit->setText( "" ); #ifndef KOMMANDER - if ( MainWindow::self->projectFileNames().contains( buffer ) ) { + if ( MainWindow::self->projectFileNames().tqcontains( buffer ) ) { MainWindow::self->setCurrentProjectByFilename( buffer ); return; } @@ -764,7 +764,7 @@ void Workspace::bufferChosen( const TQString &buffer ) TQListViewItemIterator it( this ); while ( it.current() ) { if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { - itemClicked( LeftButton, it.current(), TQPoint() ); + itemClicked( Qt::LeftButton, it.current(), TQPoint() ); break; } ++it; |