summaryrefslogtreecommitdiffstats
path: root/kompare/komparenavtreepart/komparenavtreepart.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kompare/komparenavtreepart/komparenavtreepart.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare/komparenavtreepart/komparenavtreepart.cpp')
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kompare/komparenavtreepart/komparenavtreepart.cpp b/kompare/komparenavtreepart/komparenavtreepart.cpp
index f2e10759..31b0388f 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.cpp
+++ b/kompare/komparenavtreepart/komparenavtreepart.cpp
@@ -37,7 +37,7 @@
using namespace Diff2;
-KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
+KompareNavTreePart::KompareNavTreePart( TQWidget* parent, const char* name )
: KParts::ReadOnlyPart( parent, name ),
m_splitter( 0 ),
m_modelList( 0 ),
@@ -53,7 +53,7 @@ KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
m_destination( "" ),
m_info( 0 )
{
- m_splitter = new QSplitter( Qt::Horizontal );
+ m_splitter = new TQSplitter( Qt::Horizontal );
setWidget( m_splitter );
@@ -82,14 +82,14 @@ KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
m_changesList->setRootIsDecorated( false );
m_changesList->setSorting( 0, true );
- connect( m_srcDirTree, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotSrcDirTreeSelectionChanged( QListViewItem* )) );
- connect( m_destDirTree, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotDestDirTreeSelectionChanged( QListViewItem* )) );
- connect( m_fileList, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotFileListSelectionChanged( QListViewItem* )) );
- connect( m_changesList, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotChangesListSelectionChanged( QListViewItem* )) );
+ connect( m_srcDirTree, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotSrcDirTreeSelectionChanged( TQListViewItem* )) );
+ connect( m_destDirTree, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotDestDirTreeSelectionChanged( TQListViewItem* )) );
+ connect( m_fileList, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotFileListSelectionChanged( TQListViewItem* )) );
+ connect( m_changesList, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotChangesListSelectionChanged( TQListViewItem* )) );
}
KompareNavTreePart::~KompareNavTreePart()
@@ -140,8 +140,8 @@ void KompareNavTreePart::buildTreeInMemory()
return;
}
- QString srcBase;
- QString destBase;
+ TQString srcBase;
+ TQString destBase;
DiffModel* model;
model = m_modelList->first();
@@ -177,8 +177,8 @@ void KompareNavTreePart::buildTreeInMemory()
m_srcRootItem = new KDirLVI( m_srcDirTree, srcBase );
m_destRootItem = new KDirLVI( m_destDirTree, destBase );
- QString srcPath;
- QString destPath;
+ TQString srcPath;
+ TQString destPath;
// Create the tree from the models
DiffModelListConstIterator modelIt = m_modelList->begin();
@@ -204,11 +204,11 @@ void KompareNavTreePart::buildDirectoryTree()
// kdDebug(8105) << "BuildDirTree called" << endl;
}
-QString KompareNavTreePart::compareFromEndAndReturnSame(
- const QString& string1,
- const QString& string2 )
+TQString KompareNavTreePart::compareFromEndAndReturnSame(
+ const TQString& string1,
+ const TQString& string2 )
{
- QString result;
+ TQString result;
int srcLen = string1.length();
int destLen = string2.length();
@@ -323,13 +323,13 @@ void KompareNavTreePart::slotSetSelection( const Difference* diff )
}
}
-void KompareNavTreePart::slotSrcDirTreeSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotSrcDirTreeSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the sourceDirectoryTree with item = " << item << endl;
m_srcDirTree->ensureItemVisible( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the dest tree view to set its selected item to the same as here
- QString path;
+ TQString path;
// We start with an empty path and after the call path contains the full path
path = dir->fullPath( path );
KDirLVI* selItem = m_destRootItem->setSelected( path );
@@ -341,13 +341,13 @@ void KompareNavTreePart::slotSrcDirTreeSelectionChanged( QListViewItem* item )
dir->fillFileList( m_fileList, &m_modelToFileItemDict );
}
-void KompareNavTreePart::slotDestDirTreeSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotDestDirTreeSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the destinationDirectoryTree with item = " << item << endl;
m_destDirTree->ensureItemVisible( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the src tree view to set its selected item to the same as here
- QString path;
+ TQString path;
// We start with an empty path and after the call path contains the full path
path = dir->fullPath( path );
KDirLVI* selItem = m_srcRootItem->setSelected( path );
@@ -359,7 +359,7 @@ void KompareNavTreePart::slotDestDirTreeSelectionChanged( QListViewItem* item )
dir->fillFileList( m_fileList, &m_modelToFileItemDict );
}
-void KompareNavTreePart::slotFileListSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotFileListSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the fileList with item = " << item << endl;
@@ -378,7 +378,7 @@ void KompareNavTreePart::slotFileListSelectionChanged( QListViewItem* item )
emit selectionChanged( m_selectedModel, m_selectedDifference );
}
-void KompareNavTreePart::slotChangesListSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotChangesListSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the changesList" << endl;
@@ -397,7 +397,7 @@ void KompareNavTreePart::slotApplyDifference( bool /*apply*/ )
void KompareNavTreePart::slotApplyAllDifferences( bool /*apply*/ )
{
- QPtrDictIterator<KChangeLVI> it( m_diffToChangeItemDict );
+ TQPtrDictIterator<KChangeLVI> it( m_diffToChangeItemDict );
kdDebug() << "m_diffToChangeItemDict.count() = " << m_diffToChangeItemDict.count() << endl;
@@ -417,7 +417,7 @@ void KompareNavTreePart::slotApplyDifference( const Difference* diff, bool /*app
void KChangeLVI::setDifferenceText()
{
- QString text;
+ TQString text;
switch( m_difference->type() ) {
case Difference::Change:
// Shouldn't this simply be diff->sourceLineCount() ?
@@ -457,13 +457,13 @@ KChangeLVI::KChangeLVI( KListView* parent, Difference* diff ) : KListViewItem( p
{
m_difference = diff;
- setText( 0, QString::number( diff->sourceLineNumber() ) );
- setText( 1, QString::number( diff->destinationLineNumber() ) );
+ setText( 0, TQString::number( diff->sourceLineNumber() ) );
+ setText( 1, TQString::number( diff->destinationLineNumber() ) );
setDifferenceText();
}
-int KChangeLVI::compare( QListViewItem* item, int column, bool ascending ) const
+int KChangeLVI::compare( TQListViewItem* item, int column, bool ascending ) const
{
if ( ascending )
{
@@ -498,7 +498,7 @@ KFileLVI::KFileLVI( KListView* parent, DiffModel* model ) : KListViewItem( paren
setSelectable( true );
}
-void KFileLVI::fillChangesList( KListView* changesList, QPtrDict<KChangeLVI>* diffToChangeItemDict )
+void KFileLVI::fillChangesList( KListView* changesList, TQPtrDict<KChangeLVI>* diffToChangeItemDict )
{
changesList->clear();
diffToChangeItemDict->clear();
@@ -519,7 +519,7 @@ KFileLVI::~KFileLVI()
{
}
-KDirLVI::KDirLVI( KListView* parent, QString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KListView* parent, TQString& dir ) : KListViewItem( parent )
{
// kdDebug(8105) << "KDirLVI (KListView) constructor called with dir = " << dir << endl;
m_rootItem = true;
@@ -533,7 +533,7 @@ KDirLVI::KDirLVI( KListView* parent, QString& dir ) : KListViewItem( parent )
setText( 0, m_dirName );
}
-KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KDirLVI* parent, TQString& dir ) : KListViewItem( parent )
{
// kdDebug(8105) << "KDirLVI (KDirLVI) constructor called with dir = " << dir << endl;
m_rootItem = false;
@@ -545,7 +545,7 @@ KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : KListViewItem( parent )
}
// addModel always removes it own path from the beginning
-void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* modelToDirItemDict )
+void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict )
{
// kdDebug(8105) << "KDirLVI::addModel called with path = " << path << " from KDirLVI with m_dirName = " << m_dirName << endl;
@@ -565,7 +565,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* mode
KDirLVI* child;
- QString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
+ TQString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
child = findChild( dir );
if ( !child )
{
@@ -577,7 +577,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* mode
child->addModel( path, model, modelToDirItemDict );
}
-KDirLVI* KDirLVI::findChild( QString dir )
+KDirLVI* KDirLVI::findChild( TQString dir )
{
// kdDebug(8105) << "KDirLVI::findChild called with dir = " << dir << endl;
KDirLVI* child;
@@ -592,7 +592,7 @@ KDirLVI* KDirLVI::findChild( QString dir )
return 0L;
}
-void KDirLVI::fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFileItemDict )
+void KDirLVI::fillFileList( KListView* fileList, TQPtrDict<KFileLVI>* modelToFileItemDict )
{
fileList->clear();
@@ -607,7 +607,7 @@ void KDirLVI::fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFile
fileList->setSelected( fileList->firstChild(), true );
}
-QString KDirLVI::fullPath( QString& path )
+TQString KDirLVI::fullPath( TQString& path )
{
// if ( !path.isEmpty() )
// kdDebug(8105) << "KDirLVI::fullPath called with path = " << path << endl;
@@ -628,7 +628,7 @@ QString KDirLVI::fullPath( QString& path )
return path;
}
-KDirLVI* KDirLVI::setSelected( QString dir )
+KDirLVI* KDirLVI::setSelected( TQString dir )
{
// kdDebug(8105) << "KDirLVI::setSelected called with dir = " << dir << endl;
@@ -675,9 +675,9 @@ KompareNavTreePartFactory::~KompareNavTreePartFactory()
s_instance = 0L;
}
-KParts::Part* KompareNavTreePartFactory::createPartObject( QWidget* parentWidget, const char* widgetName,
- QObject* /*parent*/, const char* /*name*/,
- const char* /*classname*/, const QStringList & /*args*/ )
+KParts::Part* KompareNavTreePartFactory::createPartObject( TQWidget* parentWidget, const char* widgetName,
+ TQObject* /*parent*/, const char* /*name*/,
+ const char* /*classname*/, const TQStringList & /*args*/ )
{
// Create an instance of our Part
KompareNavTreePart* obj = new KompareNavTreePart( parentWidget, widgetName );