summaryrefslogtreecommitdiffstats
path: root/parts/fileview/vcsfiletreewidgetimpl.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 /parts/fileview/vcsfiletreewidgetimpl.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 'parts/fileview/vcsfiletreewidgetimpl.cpp')
-rw-r--r--parts/fileview/vcsfiletreewidgetimpl.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/parts/fileview/vcsfiletreewidgetimpl.cpp b/parts/fileview/vcsfiletreewidgetimpl.cpp
index 1db873ed..131c2b4f 100644
--- a/parts/fileview/vcsfiletreewidgetimpl.cpp
+++ b/parts/fileview/vcsfiletreewidgetimpl.cpp
@@ -9,9 +9,9 @@
* *
***************************************************************************/
-#include <qpainter.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
#include <kxmlguiclient.h>
#include <kaction.h>
#include <klocale.h>
@@ -46,26 +46,26 @@ public:
: 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( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment )
{
// paint cell in a different color depending on VCS state
- QColorGroup mycg( cg );
- mycg.setColor( QColorGroup::Base, *m_statusColor );
+ TQColorGroup mycg( cg );
+ mycg.setColor( TQColorGroup::Base, *m_statusColor );
FileTreeViewItem::paintCell( p, mycg, column, width, alignment );
}
void setVCSInfo( const VCSFileInfo &info );
- QString fileName() const { return text( FILENAME_COLUMN ); }
- QString workingRev() const { return text( WORKREVISION_COLUMN ); }
- QString repositoryRev() const { return text( REPOREVISION_COLUMN ); }
- QString status() const { return text( STATUS_COLUMN ); }
- void setFileName( const QString &p ) { setText( FILENAME_COLUMN, p ); }
- void setWorkingRev( const QString &p ) { setText( WORKREVISION_COLUMN, p ); }
- void setRepositoryRev( const QString &p ) { setText( REPOREVISION_COLUMN, p ); }
+ TQString fileName() const { return text( FILENAME_COLUMN ); }
+ TQString workingRev() const { return text( WORKREVISION_COLUMN ); }
+ TQString repositoryRev() const { return text( REPOREVISION_COLUMN ); }
+ TQString status() const { return text( STATUS_COLUMN ); }
+ 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 );
private:
- QColor *m_statusColor; // cached
+ TQColor *m_statusColor; // cached
};
///////////////////////////////////////////////////////////////////////////////
@@ -126,7 +126,7 @@ void VCSFileTreeViewItem::setStatus( const VCSFileInfo::FileState status )
class VCSFileTreeBranchItem : public filetreeview::FileTreeBranchItem
{
public:
- VCSFileTreeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix,
+ VCSFileTreeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix,
KDevVCSFileInfoProvider *vcsInfoProvider )
: FileTreeBranchItem( view, url, name, pix ), m_vcsInfoProvider( vcsInfoProvider ) {}
// virtual ~VCSFileTreeBranchItem() {}
@@ -150,8 +150,8 @@ KFileTreeViewItem* VCSFileTreeBranchItem::createTreeViewItem( KFileTreeViewItem*
VCSFileTreeViewItem *newItem = new VCSFileTreeViewItem( parent, fileItem, this, isDirectory );
-// QString fileName = fileURL.fileName();
-// QString dirName = URLUtil::extractPathNameRelative( lv->projectDirectory(), fileURL.directory() );
+// 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;
@@ -170,7 +170,7 @@ class VCSBranchItemFactory : public filetreeview::BranchItemFactory
{
public:
VCSBranchItemFactory( KDevVCSFileInfoProvider *vcsInfoProvider ) : m_vcsInfoProvider( vcsInfoProvider ) {}
- virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix )
+ virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix )
{
return new VCSFileTreeBranchItem( view, url, name, pix, m_vcsInfoProvider );
}
@@ -198,27 +198,27 @@ VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFil
parent->addColumn( "Work" );
parent->addColumn( "Repo" );
- connect( m_vcsInfoProvider, SIGNAL(statusReady(const VCSFileInfoMap&, void *)),
- this, SLOT(vcsDirStatusReady(const VCSFileInfoMap&, void*)) );
+ connect( m_vcsInfoProvider, TQT_SIGNAL(statusReady(const VCSFileInfoMap&, void *)),
+ this, TQT_SLOT(vcsDirStatusReady(const VCSFileInfoMap&, void*)) );
// Harakiri itself if the infoProvider object is destroyed since we cannot work anymore :-(
- connect( m_vcsInfoProvider, SIGNAL(destroyed()), SIGNAL(implementationInvalidated()) );
+ connect( m_vcsInfoProvider, TQT_SIGNAL(destroyed()), TQT_SIGNAL(implementationInvalidated()) );
m_actionToggleShowVCSFields = new KToggleAction( i18n("Show VCS Fields"), KShortcut(),
this, "actiontoggleshowvcsfieldstoggleaction" );
m_actionToggleShowVCSFields->setCheckedState(i18n("Hide VCS Fields"));
- QString aboutAction = i18n("<b>Show VCS fields</b><p>Shows <b>Revision</b> and <b>Timestamp</b> for each file contained in VCS repository.");
+ TQString aboutAction = i18n("<b>Show VCS fields</b><p>Shows <b>Revision</b> and <b>Timestamp</b> for each file contained in VCS repository.");
m_actionToggleShowVCSFields->setWhatsThis( aboutAction );
- connect( m_actionToggleShowVCSFields, SIGNAL(toggled(bool)), this, SLOT(slotToggleShowVCSFields(bool)) );
+ connect( m_actionToggleShowVCSFields, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleShowVCSFields(bool)) );
m_actionSyncWithRepository = new KAction( i18n( "Sync with Repository"), KShortcut(),
- this, SLOT(slotSyncWithRepository()), this, "actionsyncwithrepository" );
+ this, TQT_SLOT(slotSyncWithRepository()), this, "actionsyncwithrepository" );
aboutAction = i18n("<b>Sync with repository</b><p>Synchronize file status with remote repository.");
m_actionSyncWithRepository->setWhatsThis( aboutAction );
- QDomDocument &dom = projectDom();
+ TQDomDocument &dom = projectDom();
m_actionToggleShowVCSFields->setChecked( DomUtil::readBoolEntry(dom, "/kdevfileview/tree/showvcsfields") );
slotToggleShowVCSFields( showVCSFields() ); // show or hide fields depending on read settings
- connect( parent, SIGNAL(expanded(QListViewItem*)), this, SLOT(slotDirectoryExpanded(QListViewItem*)));
+ connect( parent, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SLOT(slotDirectoryExpanded(TQListViewItem*)));
}
///////////////////////////////////////////////////////////////////////////////
@@ -227,7 +227,7 @@ VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl()
{
kdDebug(9017) << "VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl()" << endl;
- QDomDocument &dom = projectDom();
+ TQDomDocument &dom = projectDom();
DomUtil::writeBoolEntry( dom, "/kdevfileview/tree/showvcsfields", showVCSFields() );
}
@@ -240,7 +240,7 @@ bool VCSFileTreeWidgetImpl::canReloadTree() const
///////////////////////////////////////////////////////////////////////////////
-void VCSFileTreeWidgetImpl::fillPopupMenu( QPopupMenu *popupMenu, QListViewItem *item ) const
+void VCSFileTreeWidgetImpl::fillPopupMenu( TQPopupMenu *popupMenu, TQListViewItem *item ) const
{
FileTreeViewWidgetImpl::fillPopupMenu( popupMenu, item );
@@ -306,7 +306,7 @@ void VCSFileTreeWidgetImpl::vcsDirStatusReady( const VCSFileInfoMap &modifiedFil
item = static_cast<VCSFileTreeViewItem*>( item->firstChild() );
while (item)
{
- const QString fileName = item->fileName();
+ const TQString fileName = item->fileName();
kdDebug(9017) << "Widget item filename is: " << fileName << endl;
if (modifiedFiles.contains( fileName ))
{
@@ -329,7 +329,7 @@ void VCSFileTreeWidgetImpl::slotSyncWithRepository()
{
kdDebug(9017) << "VCSFileTreeWidgetImpl::slotSyncWithRepository()" << endl;
const VCSFileTreeViewItem *myFileItem = static_cast<VCSFileTreeViewItem *>( m_vcsStatusRequestedItem );
- const QString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), myFileItem->fileItem()->url().path() );
+ 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_isSyncingWithRepository = true;
@@ -337,12 +337,12 @@ void VCSFileTreeWidgetImpl::slotSyncWithRepository()
///////////////////////////////////////////////////////////////////////////////
-void VCSFileTreeWidgetImpl::slotDirectoryExpanded( QListViewItem* aItem )
+void VCSFileTreeWidgetImpl::slotDirectoryExpanded( TQListViewItem* aItem )
{
VCSFileTreeViewItem *item = static_cast<VCSFileTreeViewItem *>( aItem );
if( !item ) return;
- const QString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), item->fileItem()->url().path() );
+ 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 );