summaryrefslogtreecommitdiffstats
path: root/kompare/komparenavtreepart
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
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')
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.cpp82
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.h66
2 files changed, 74 insertions, 74 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 );
diff --git a/kompare/komparenavtreepart/komparenavtreepart.h b/kompare/komparenavtreepart/komparenavtreepart.h
index e2563d63..a126cfe5 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.h
+++ b/kompare/komparenavtreepart/komparenavtreepart.h
@@ -20,10 +20,10 @@
#ifndef KOMPARENAVTREEPART_H
#define KOMPARENAVTREEPART_H
-#include <qptrdict.h>
-#include <qptrlist.h>
-#include <qsplitter.h>
-#include <qlistview.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
+#include <tqsplitter.h>
+#include <tqlistview.h>
#include <kparts/factory.h>
#include <kparts/part.h>
@@ -49,7 +49,7 @@ class KompareNavTreePart : public KParts::ReadOnlyPart
Q_OBJECT
public:
- KompareNavTreePart( QWidget* parent = 0L, const char* name = 0L );
+ KompareNavTreePart( TQWidget* parent = 0L, const char* name = 0L );
virtual ~KompareNavTreePart();
public:
@@ -66,10 +66,10 @@ signals:
void selectionChanged( const Diff2::Difference* diff );
private slots:
- void slotSrcDirTreeSelectionChanged ( QListViewItem* item );
- void slotDestDirTreeSelectionChanged( QListViewItem* item );
- void slotFileListSelectionChanged ( QListViewItem* item );
- void slotChangesListSelectionChanged( QListViewItem* item );
+ void slotSrcDirTreeSelectionChanged ( TQListViewItem* item );
+ void slotDestDirTreeSelectionChanged( TQListViewItem* item );
+ void slotFileListSelectionChanged ( TQListViewItem* item );
+ void slotChangesListSelectionChanged( TQListViewItem* item );
void slotApplyDifference( bool apply );
void slotApplyAllDifferences( bool apply );
@@ -84,22 +84,22 @@ private:
void buildDirectoryTree();
- QString compareFromEndAndReturnSame( const QString& string1, const QString& string2 );
- void addDirToTreeView( enum Kompare::Target, const QString& filename );
+ TQString compareFromEndAndReturnSame( const TQString& string1, const TQString& string2 );
+ void addDirToTreeView( enum Kompare::Target, const TQString& filename );
- KListViewItem* findDirInDirTree( const KListViewItem* parent, const QString& dir );
+ KListViewItem* findDirInDirTree( const KListViewItem* parent, const TQString& dir );
// KListViewItem* firstItem();
// KListViewItem* lastItem();
private:
- QSplitter* m_splitter;
+ TQSplitter* m_splitter;
const Diff2::DiffModelList* m_modelList;
- QPtrDict<KChangeLVI> m_diffToChangeItemDict;
- QPtrDict<KFileLVI> m_modelToFileItemDict;
- QPtrDict<KDirLVI> m_modelToSrcDirItemDict;
- QPtrDict<KDirLVI> m_modelToDestDirItemDict;
+ TQPtrDict<KChangeLVI> m_diffToChangeItemDict;
+ TQPtrDict<KFileLVI> m_modelToFileItemDict;
+ TQPtrDict<KDirLVI> m_modelToSrcDirItemDict;
+ TQPtrDict<KDirLVI> m_modelToDestDirItemDict;
KListView* m_srcDirTree;
KListView* m_destDirTree;
@@ -112,8 +112,8 @@ private:
const Diff2::DiffModel* m_selectedModel;
const Diff2::Difference* m_selectedDifference;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
struct Kompare::Info* m_info;
};
@@ -128,7 +128,7 @@ public:
~KChangeLVI();
public:
Diff2::Difference* difference() { return m_difference; };
- virtual int compare( QListViewItem* item, int column, bool ascending ) const;
+ virtual int compare( TQListViewItem* item, int column, bool ascending ) const;
void setDifferenceText();
private:
@@ -142,7 +142,7 @@ public:
~KFileLVI();
public:
Diff2::DiffModel* model() { return m_model; };
- void fillChangesList( KListView* changesList, QPtrDict<KChangeLVI>* diffToChangeItemDict );
+ void fillChangesList( KListView* changesList, TQPtrDict<KChangeLVI>* diffToChangeItemDict );
private:
Diff2::DiffModel* m_model;
};
@@ -150,21 +150,21 @@ private:
class KDirLVI : public KListViewItem
{
public:
- KDirLVI( KDirLVI* parent, QString& dir );
- KDirLVI( KListView* parent, QString& dir );
+ KDirLVI( KDirLVI* parent, TQString& dir );
+ KDirLVI( KListView* parent, TQString& dir );
~KDirLVI();
public:
- void addModel( QString& dir, Diff2::DiffModel* model, QPtrDict<KDirLVI>* modelToDirItemDict );
- QString& dirName() { return m_dirName; };
- QString fullPath( QString& path );
- KDirLVI* setSelected( QString dir );
- void fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFileItemDict );
+ void addModel( TQString& dir, Diff2::DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict );
+ TQString& dirName() { return m_dirName; };
+ TQString fullPath( TQString& path );
+ KDirLVI* setSelected( TQString dir );
+ void fillFileList( KListView* fileList, TQPtrDict<KFileLVI>* modelToFileItemDict );
bool isRootItem() { return m_rootItem; };
private:
- KDirLVI* findChild( QString dir );
+ KDirLVI* findChild( TQString dir );
private:
Diff2::DiffModelList m_modelList;
- QString m_dirName;
+ TQString m_dirName;
bool m_rootItem;
};
@@ -178,9 +178,9 @@ class KompareNavTreePartFactory : public KParts::Factory
public:
KompareNavTreePartFactory();
virtual ~KompareNavTreePartFactory();
- virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args );
+ virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args );
static KInstance* instance();
private: