summaryrefslogtreecommitdiffstats
path: root/kompare/komparepart/kompare_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kompare/komparepart/kompare_part.cpp')
-rw-r--r--kompare/komparepart/kompare_part.cpp170
1 files changed, 85 insertions, 85 deletions
diff --git a/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp
index d74945e6..bf15bb4d 100644
--- a/kompare/komparepart/kompare_part.cpp
+++ b/kompare/komparepart/kompare_part.cpp
@@ -21,8 +21,8 @@
#include "kompare_qsplitter.h" // make sure we get there first
-#include <qlayout.h>
-#include <qwidget.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
#include <kaction.h>
#include <kapplication.h>
@@ -56,8 +56,8 @@ K_EXPORT_COMPONENT_FACTORY( libkomparepart, KomparePartFactory )
ViewSettings* KomparePart::m_viewSettings = 0L;
DiffSettings* KomparePart::m_diffSettings = 0L;
-KomparePart::KomparePart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/ ) :
+KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/ ) :
KParts::ReadWritePart(parent, name),
m_tempDiff( 0 ),
m_info()
@@ -76,64 +76,64 @@ KomparePart::KomparePart( QWidget *parentWidget, const char *widgetName,
// This creates the "Model creator" and connects the signals and slots
m_modelList = new Diff2::KompareModelList( m_diffSettings, m_info, this, "komparemodellist" );
- connect( m_modelList, SIGNAL(status( Kompare::Status )),
- this, SLOT(slotSetStatus( Kompare::Status )) );
- connect( m_modelList, SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
- this, SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
- connect( m_modelList, SIGNAL(error( QString )),
- this, SLOT(slotShowError( QString )) );
- connect( m_modelList, SIGNAL(applyAllDifferences( bool )),
- this, SLOT(updateActions()) );
- connect( m_modelList, SIGNAL(applyDifference( bool )),
- this, SLOT(updateActions()) );
- connect( m_modelList, SIGNAL(applyAllDifferences( bool )),
- this, SIGNAL(appliedChanged()) );
- connect( m_modelList, SIGNAL(applyDifference( bool )),
- this, SIGNAL(appliedChanged()) );
-
- connect( m_modelList, SIGNAL( setModified( bool ) ),
- this, SLOT( slotSetModified( bool ) ) );
+ connect( m_modelList, TQT_SIGNAL(status( Kompare::Status )),
+ this, TQT_SLOT(slotSetStatus( Kompare::Status )) );
+ connect( m_modelList, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
+ this, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
+ connect( m_modelList, TQT_SIGNAL(error( TQString )),
+ this, TQT_SLOT(slotShowError( TQString )) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )),
+ this, TQT_SLOT(updateActions()) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference( bool )),
+ this, TQT_SLOT(updateActions()) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )),
+ this, TQT_SIGNAL(appliedChanged()) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference( bool )),
+ this, TQT_SIGNAL(appliedChanged()) );
+
+ connect( m_modelList, TQT_SIGNAL( setModified( bool ) ),
+ this, TQT_SLOT( slotSetModified( bool ) ) );
// This is the stuff to connect the "interface" of the kompare part to the model inside
- connect( m_modelList, SIGNAL(modelsChanged(const Diff2::DiffModelList*)),
- this, SIGNAL(modelsChanged(const Diff2::DiffModelList*)) );
-
- connect( m_modelList, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
- this, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
- connect( this, SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(setSelection(const Diff2::Difference*)),
- this, SIGNAL(setSelection(const Diff2::Difference*)) );
- connect( this, SIGNAL(selectionChanged(const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(applyDifference(bool)),
- this, SIGNAL(applyDifference(bool)) );
- connect( m_modelList, SIGNAL(applyAllDifferences(bool)),
- this, SIGNAL(applyAllDifferences(bool)) );
- connect( m_modelList, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- this, SIGNAL(applyDifference(const Diff2::Difference*, bool)) );
+ connect( m_modelList, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)),
+ this, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)) );
+
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
+ this, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
+ connect( this, TQT_SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)),
+ this, TQT_SIGNAL(setSelection(const Diff2::Difference*)) );
+ connect( this, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(applyDifference(bool)),
+ this, TQT_SIGNAL(applyDifference(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)),
+ this, TQT_SIGNAL(applyAllDifferences(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ this, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)) );
// This creates the splitterwidget and connects the signals and slots
m_splitter = new KompareSplitter ( m_viewSettings, parentWidget, widgetName );
- connect( m_modelList, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
- m_splitter, SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
-// connect( m_splitter, SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)),
-// m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) );
- connect( m_modelList, SIGNAL(setSelection(const Diff2::Difference*)),
- m_splitter, SLOT(slotSetSelection(const Diff2::Difference*)) );
- connect( m_splitter, SIGNAL(selectionChanged(const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(applyDifference(bool)),
- m_splitter, SLOT(slotApplyDifference(bool)) );
- connect( m_modelList, SIGNAL(applyAllDifferences(bool)),
- m_splitter, SLOT(slotApplyAllDifferences(bool)) );
- connect( m_modelList, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- m_splitter, SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
- connect( this, SIGNAL(configChanged()), m_splitter, SIGNAL(configChanged()) );
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
+ m_splitter, TQT_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
+// connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)),
+// m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) );
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)),
+ m_splitter, TQT_SLOT(slotSetSelection(const Diff2::Difference*)) );
+ connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(applyDifference(bool)),
+ m_splitter, TQT_SLOT(slotApplyDifference(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)),
+ m_splitter, TQT_SLOT(slotApplyAllDifferences(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ m_splitter, TQT_SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
+ connect( this, TQT_SIGNAL(configChanged()), m_splitter, TQT_SIGNAL(configChanged()) );
// notify the part that this is our internal widget
setWidget( m_splitter->parentWidget() );
@@ -163,19 +163,19 @@ void KomparePart::setupActions()
// create our actions
m_saveAll = new KAction( i18n("Save &All"), "save_all", 0,
- this, SLOT(saveAll()),
+ this, TQT_SLOT(saveAll()),
actionCollection(), "file_save_all" );
m_saveDiff = new KAction( i18n("Save .&diff..."), 0,
- this, SLOT(saveDiff()),
+ this, TQT_SLOT(saveDiff()),
actionCollection(), "file_save_diff" );
m_swap = new KAction( i18n( "Swap Source with Destination" ), 0,
- this, SLOT(slotSwap()),
+ this, TQT_SLOT(slotSwap()),
actionCollection(), "file_swap" );
m_diffStats = new KAction( i18n( "Show Statistics" ), 0,
- this, SLOT(slotShowDiffstats()),
+ this, TQT_SLOT(slotShowDiffstats()),
actionCollection(), "file_diffstats" );
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
}
void KomparePart::updateActions()
@@ -186,7 +186,7 @@ void KomparePart::updateActions()
m_diffStats->setEnabled( m_modelList->modelCount() > 0 );
}
-void KomparePart::setEncoding( const QString& encoding )
+void KomparePart::setEncoding( const TQString& encoding )
{
kdDebug() << "Encoding: " << encoding << endl;
m_modelList->setEncoding( encoding );
@@ -218,7 +218,7 @@ bool KomparePart::openDiff( const KURL& url )
return result;
}
-bool KomparePart::openDiff( const QString& diffOutput )
+bool KomparePart::openDiff( const TQString& diffOutput )
{
bool value = false;
@@ -245,7 +245,7 @@ bool KomparePart::openDiff3( const KURL& diff3Url )
return false;
}
-bool KomparePart::openDiff3( const QString& diff3Output )
+bool KomparePart::openDiff3( const TQString& diff3Output )
{
// FIXME: Implement this !!!
kdDebug(8103) << "Not implemented yet. diff3 output is: " << endl;
@@ -253,15 +253,15 @@ bool KomparePart::openDiff3( const QString& diff3Output )
return false;
}
-bool KomparePart::exists( const QString& url )
+bool KomparePart::exists( const TQString& url )
{
- QFileInfo fi( url );
+ TQFileInfo fi( url );
return fi.exists();
}
-const QString KomparePart::fetchURL( const KURL& url )
+const TQString KomparePart::fetchURL( const KURL& url )
{
- QString tempFileName( "" );
+ TQString tempFileName( "" );
if ( !url.isLocalFile() )
{
if ( ! KIO::NetAccess::download( url, tempFileName, widget() ) )
@@ -509,10 +509,10 @@ void KomparePart::slotSetStatus( enum Kompare::Status status )
void KomparePart::updateCaption()
{
- QString source = m_info.source.prettyURL();
- QString destination = m_info.destination.prettyURL();
+ TQString source = m_info.source.prettyURL();
+ TQString destination = m_info.destination.prettyURL();
- QString text;
+ TQString text;
switch ( m_info.mode )
{
@@ -534,10 +534,10 @@ void KomparePart::updateCaption()
void KomparePart::updateStatus()
{
- QString source = m_info.source.prettyURL();
- QString destination = m_info.destination.prettyURL();
+ TQString source = m_info.source.prettyURL();
+ TQString destination = m_info.destination.prettyURL();
- QString text;
+ TQString text;
switch ( m_info.mode )
{
@@ -571,7 +571,7 @@ void KomparePart::updateStatus()
emit setStatusBarText( text );
}
-void KomparePart::slotShowError( QString error )
+void KomparePart::slotShowError( TQString error )
{
KMessageBox::error( widget(), error );
}
@@ -602,7 +602,7 @@ void KomparePart::slotSwap()
m_info.source = m_info.destination;
m_info.destination = url;
- QString string = m_info.localSource;
+ TQString string = m_info.localSource;
m_info.localSource = m_info.localDestination;
m_info.localDestination = string;
@@ -618,15 +618,15 @@ void KomparePart::slotShowDiffstats( void )
// Fetch all the args needed for komparestatsmessagebox
// oldfile, newfile, diffformat, noofhunks, noofdiffs
- QString oldFile;
- QString newFile;
- QString diffFormat;
+ TQString oldFile;
+ TQString newFile;
+ TQString diffFormat;
int filesInDiff;
int noOfHunks;
int noOfDiffs;
- oldFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->sourceFile() : QString( "" );
- newFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->destinationFile() : QString( "" );
+ oldFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->sourceFile() : TQString( "" );
+ newFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->destinationFile() : TQString( "" );
if ( m_modelList->selectedModel() )
{
@@ -666,7 +666,7 @@ void KomparePart::slotShowDiffstats( void )
KMessageBox::information( 0L, i18n(
"No diff file, or no 2 files have been diffed. "
"Therefore no stats are available."),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
}
else if ( m_modelList->modelCount() == 1 ) { // 1 file in diff, or 2 files compared
KMessageBox::information( 0L, i18n(
@@ -680,7 +680,7 @@ void KomparePart::slotShowDiffstats( void )
"Number of differences: %5")
.arg(oldFile).arg(newFile).arg(diffFormat)
.arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
} else { // more than 1 file in diff, or 2 directories compared
KMessageBox::information( 0L, i18n(
"Statistics:\n"
@@ -695,7 +695,7 @@ void KomparePart::slotShowDiffstats( void )
"Number of differences: %6")
.arg(filesInDiff).arg(diffFormat).arg(oldFile)
.arg(newFile).arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
}
}
@@ -742,7 +742,7 @@ void KomparePart::optionsPreferences()
// show preferences
KomparePrefDlg* pref = new KomparePrefDlg( m_viewSettings, m_diffSettings );
- connect( pref, SIGNAL(applyClicked()), this, SIGNAL(configChanged()) );
+ connect( pref, TQT_SIGNAL(applyClicked()), this, TQT_SIGNAL(configChanged()) );
if ( pref->exec() )
emit configChanged();