summaryrefslogtreecommitdiffstats
path: root/parts/fileview/vcsfiletreewidgetimpl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/fileview/vcsfiletreewidgetimpl.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/fileview/vcsfiletreewidgetimpl.cpp')
-rw-r--r--parts/fileview/vcsfiletreewidgetimpl.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/parts/fileview/vcsfiletreewidgetimpl.cpp b/parts/fileview/vcsfiletreewidgetimpl.cpp
index 131c2b4f..a513a1ae 100644
--- a/parts/fileview/vcsfiletreewidgetimpl.cpp
+++ b/parts/fileview/vcsfiletreewidgetimpl.cpp
@@ -42,16 +42,16 @@ using namespace filetreeview;
class VCSFileTreeViewItem : public filetreeview::FileTreeViewItem
{
public:
- VCSFileTreeViewItem( KFileTreeViewItem* parent, KFileItem* item, KFileTreeBranch* branch, bool pf )
- : FileTreeViewItem( parent, item, branch, pf ), m_statusColor( &FileViewPart::vcsColors.unknown ) {}
- VCSFileTreeViewItem( KFileTreeView* parent, KFileItem* item, KFileTreeBranch* branch )
- : FileTreeViewItem( parent, item, branch ), m_statusColor( &FileViewPart::vcsColors.unknown ) {}
- virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment )
+ VCSFileTreeViewItem( KFileTreeViewItem* tqparent, KFileItem* item, KFileTreeBranch* branch, bool pf )
+ : FileTreeViewItem( tqparent, item, branch, pf ), m_statusColor( &FileViewPart::vcsColors.unknown ) {}
+ VCSFileTreeViewItem( KFileTreeView* tqparent, KFileItem* item, KFileTreeBranch* branch )
+ : FileTreeViewItem( tqparent, item, branch ), m_statusColor( &FileViewPart::vcsColors.unknown ) {}
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment )
{
// paint cell in a different color depending on VCS state
TQColorGroup mycg( cg );
mycg.setColor( TQColorGroup::Base, *m_statusColor );
- FileTreeViewItem::paintCell( p, mycg, column, width, alignment );
+ FileTreeViewItem::paintCell( p, mycg, column, width, tqalignment );
}
void setVCSInfo( const VCSFileInfo &info );
@@ -62,7 +62,7 @@ public:
void setFileName( const TQString &p ) { setText( FILENAME_COLUMN, p ); }
void setWorkingRev( const TQString &p ) { setText( WORKREVISION_COLUMN, p ); }
void setRepositoryRev( const TQString &p ) { setText( REPOREVISION_COLUMN, p ); }
- void setStatus( const VCSFileInfo::FileState status );
+ void settqStatus( const VCSFileInfo::FileState status );
private:
TQColor *m_statusColor; // cached
@@ -75,12 +75,12 @@ void VCSFileTreeViewItem::setVCSInfo( const VCSFileInfo &info )
//setFileName( info.fileName );
setRepositoryRev( info.repoRevision );
setWorkingRev( info.workRevision );
- setStatus( info.state );
+ settqStatus( info.state );
}
///////////////////////////////////////////////////////////////////////////////
-void VCSFileTreeViewItem::setStatus( const VCSFileInfo::FileState status )
+void VCSFileTreeViewItem::settqStatus( const VCSFileInfo::FileState status )
{
setText( STATUS_COLUMN, VCSFileInfo::state2String( status ) );
// Update color too
@@ -130,7 +130,7 @@ public:
KDevVCSFileInfoProvider *vcsInfoProvider )
: FileTreeBranchItem( view, url, name, pix ), m_vcsInfoProvider( vcsInfoProvider ) {}
// virtual ~VCSFileTreeBranchItem() {}
- virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem* parent, KFileItem* fileItem );
+ virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem* tqparent, KFileItem* fileItem );
private:
KDevVCSFileInfoProvider *m_vcsInfoProvider;
@@ -138,24 +138,24 @@ private:
///////////////////////////////////////////////////////////////////////////////
-KFileTreeViewItem* VCSFileTreeBranchItem::createTreeViewItem( KFileTreeViewItem* parent, KFileItem* fileItem )
+KFileTreeViewItem* VCSFileTreeBranchItem::createTreeViewItem( KFileTreeViewItem* tqparent, KFileItem* fileItem )
{
// kdDebug(9017) << "MyFileTreeBranch::createTreeViewItem(): " + fileItem->url().path() << endl;
- if (!parent || !fileItem)
+ if (!tqparent || !fileItem)
return 0;
- FileTreeWidget *lv = static_cast<filetreeview::FileTreeViewItem*>( parent )->listView();
+ FileTreeWidget *lv = static_cast<filetreeview::FileTreeViewItem*>( tqparent )->listView();
const KURL fileURL = fileItem->url();
const bool isDirectory = lv->isInProject( fileURL.path() );
- VCSFileTreeViewItem *newItem = new VCSFileTreeViewItem( parent, fileItem, this, isDirectory );
+ VCSFileTreeViewItem *newItem = new VCSFileTreeViewItem( tqparent, fileItem, this, isDirectory );
// TQString fileName = fileURL.fileName();
// TQString dirName = URLUtil::extractPathNameRelative( lv->projectDirectory(), fileURL.directory() );
// const VCSFileInfoMap &vcsFiles = *m_vcsInfoProvider->status( dirName );
// kdDebug(9017) << "Dir has " << vcsFiles.count() << " registered files!" << endl;
-// if (vcsFiles.contains( fileName ))
+// if (vcsFiles.tqcontains( fileName ))
// newItem->setVCSInfo( vcsFiles[ fileName ] );
// else
// kdDebug(9017) << "!!!No VCS info for this file!!!" << endl;
@@ -182,8 +182,8 @@ private:
// class VCSFileTreeWidgetImpl
///////////////////////////////////////////////////////////////////////////////
-VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFileInfoProvider *infoProvider )
- : FileTreeViewWidgetImpl( parent, "vcsfiletreewidgetimpl" ),
+VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *tqparent, KDevVCSFileInfoProvider *infoProvider )
+ : FileTreeViewWidgetImpl( tqparent, "vcsfiletreewidgetimpl" ),
m_actionToggleShowVCSFields( 0 ), m_actionSyncWithRepository( 0 ), m_vcsInfoProvider( infoProvider ),
m_isSyncingWithRepository( false ), m_vcsStatusRequestedItem( 0 )
{
@@ -193,10 +193,10 @@ VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFil
setBranchItemFactory( new VCSBranchItemFactory( m_vcsInfoProvider ) );
// Update the #define order on top if you change this order!
- parent->addColumn( "Filename" );
- parent->addColumn( "Status" );
- parent->addColumn( "Work" );
- parent->addColumn( "Repo" );
+ tqparent->addColumn( "Filename" );
+ tqparent->addColumn( "tqStatus" );
+ tqparent->addColumn( "Work" );
+ tqparent->addColumn( "Repo" );
connect( m_vcsInfoProvider, TQT_SIGNAL(statusReady(const VCSFileInfoMap&, void *)),
this, TQT_SLOT(vcsDirStatusReady(const VCSFileInfoMap&, void*)) );
@@ -218,7 +218,7 @@ VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFil
TQDomDocument &dom = projectDom();
m_actionToggleShowVCSFields->setChecked( DomUtil::readBoolEntry(dom, "/kdevfileview/tree/showvcsfields") );
slotToggleShowVCSFields( showVCSFields() ); // show or hide fields depending on read settings
- connect( parent, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SLOT(slotDirectoryExpanded(TQListViewItem*)));
+ connect( tqparent, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SLOT(slotDirectoryExpanded(TQListViewItem*)));
}
///////////////////////////////////////////////////////////////////////////////
@@ -308,7 +308,7 @@ void VCSFileTreeWidgetImpl::vcsDirStatusReady( const VCSFileInfoMap &modifiedFil
{
const TQString fileName = item->fileName();
kdDebug(9017) << "Widget item filename is: " << fileName << endl;
- if (modifiedFiles.contains( fileName ))
+ if (modifiedFiles.tqcontains( fileName ))
{
const VCSFileInfo &vcsInfo = modifiedFiles[ fileName ];
kdDebug(9017) << "Nice! Found info for this file: " << vcsInfo.toString() << endl;
@@ -331,7 +331,7 @@ void VCSFileTreeWidgetImpl::slotSyncWithRepository()
const VCSFileTreeViewItem *myFileItem = static_cast<VCSFileTreeViewItem *>( m_vcsStatusRequestedItem );
const TQString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), myFileItem->fileItem()->url().path() );
kdDebug(9017) << "VCS Info requested for: " << relDirPath << endl;
- m_vcsInfoProvider->requestStatus( relDirPath, m_vcsStatusRequestedItem );
+ m_vcsInfoProvider->requesttqStatus( relDirPath, m_vcsStatusRequestedItem );
m_isSyncingWithRepository = true;
}
@@ -344,7 +344,7 @@ void VCSFileTreeWidgetImpl::slotDirectoryExpanded( TQListViewItem* aItem )
const TQString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), item->fileItem()->url().path() );
kdDebug(9017) << "ASync VCS Info requested for: " << relDirPath << endl;
- m_vcsInfoProvider->requestStatus( relDirPath, item, false, false );
+ m_vcsInfoProvider->requesttqStatus( relDirPath, item, false, false );
// m_isSyncingWithRepository = true;