summaryrefslogtreecommitdiffstats
path: root/kompare/komparepart
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kompare/komparepart
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare/komparepart')
-rw-r--r--kompare/komparepart/kompare_part.cpp78
-rw-r--r--kompare/komparepart/kompare_part.h9
-rw-r--r--kompare/komparepart/kompare_qsplitter.h121
-rw-r--r--kompare/komparepart/kompareconnectwidget.cpp48
-rw-r--r--kompare/komparepart/kompareconnectwidget.h12
-rw-r--r--kompare/komparepart/komparelistview.cpp102
-rw-r--r--kompare/komparepart/komparelistview.h34
-rw-r--r--kompare/komparepart/kompareprefdlg.h1
-rw-r--r--kompare/komparepart/komparesaveoptionsbase.ui54
-rw-r--r--kompare/komparepart/komparesaveoptionswidget.cpp4
-rw-r--r--kompare/komparepart/komparesaveoptionswidget.h3
-rw-r--r--kompare/komparepart/komparesplitter.cpp52
-rw-r--r--kompare/komparepart/komparesplitter.h7
13 files changed, 267 insertions, 258 deletions
diff --git a/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp
index bf15bb4d..24c23ffe 100644
--- a/kompare/komparepart/kompare_part.cpp
+++ b/kompare/komparepart/kompare_part.cpp
@@ -56,9 +56,9 @@ K_EXPORT_COMPONENT_FACTORY( libkomparepart, KomparePartFactory )
ViewSettings* KomparePart::m_viewSettings = 0L;
DiffSettings* KomparePart::m_diffSettings = 0L;
-KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name, const TQStringList & /*args*/ ) :
- KParts::ReadWritePart(parent, name),
+KomparePart::KomparePart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, const TQStringList & /*args*/ ) :
+ KParts::ReadWritePart(tqparent, name),
m_tempDiff( 0 ),
m_info()
{
@@ -76,8 +76,8 @@ KomparePart::KomparePart( TQWidget *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, TQT_SIGNAL(status( Kompare::Status )),
- this, TQT_SLOT(slotSetStatus( Kompare::Status )) );
+ connect( m_modelList, TQT_SIGNAL(status( Kompare::tqStatus )),
+ this, TQT_SLOT(slotSettqStatus( Kompare::tqStatus )) );
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 )),
@@ -116,7 +116,7 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
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 );
+ m_splitter = new KompareSplitter ( m_viewSettings, tqparentWidget, widgetName );
connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
m_splitter, TQT_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
@@ -136,7 +136,7 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
connect( this, TQT_SIGNAL(configChanged()), m_splitter, TQT_SIGNAL(configChanged()) );
// notify the part that this is our internal widget
- setWidget( m_splitter->parentWidget() );
+ setWidget( m_splitter->tqparentWidget() );
setupActions();
@@ -208,7 +208,7 @@ bool KomparePart::openDiff( const KURL& url )
result = m_modelList->openDiff( m_info.localSource );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
else
{
@@ -232,7 +232,7 @@ bool KomparePart::openDiff( const TQString& diffOutput )
m_modelList->show();
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
return value;
@@ -266,7 +266,7 @@ const TQString KomparePart::fetchURL( const KURL& url )
{
if ( ! KIO::NetAccess::download( url, tempFileName, widget() ) )
{
- slotShowError( i18n( "<qt>The URL <b>%1</b> cannot be downloaded.</qt>" ).arg( url.prettyURL() ) );
+ slotShowError( i18n( "<qt>The URL <b>%1</b> cannot be downloaded.</qt>" ).tqarg( url.prettyURL() ) );
tempFileName = "";
}
return tempFileName;
@@ -278,7 +278,7 @@ const TQString KomparePart::fetchURL( const KURL& url )
return url.path();
else
{
- slotShowError( i18n( "<qt>The URL <b>%1</b> does not exist on your system.</qt>" ).arg( url.prettyURL() ) );
+ slotShowError( i18n( "<qt>The URL <b>%1</b> does not exist on your system.</qt>" ).tqarg( url.prettyURL() ) );
return tempFileName;
}
}
@@ -308,7 +308,7 @@ void KomparePart::compare( const KURL& source, const KURL& destination )
m_modelList->compare( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -329,7 +329,7 @@ void KomparePart::compareFiles( const KURL& sourceFile, const KURL& destinationF
m_modelList->compareFiles( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -350,7 +350,7 @@ void KomparePart::compareDirs( const KURL& sourceDirectory, const KURL& destinat
m_modelList->compareDirs( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -359,7 +359,7 @@ void KomparePart::compare3Files( const KURL& /*originalFile*/, const KURL& /*cha
// FIXME: actually implement this some day :)
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile )
@@ -378,7 +378,7 @@ void KomparePart::openFileAndDiff( const KURL& file, const KURL& diffFile )
m_modelList->openFileAndDiff( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -398,7 +398,7 @@ void KomparePart::openDirAndDiff ( const KURL& dir, const KURL& diffFile )
m_modelList->openDirAndDiff( m_info.localSource, m_info.localDestination );
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
}
}
@@ -415,7 +415,7 @@ bool KomparePart::saveAll()
bool result = m_modelList->saveAll();
updateActions();
updateCaption();
- updateStatus();
+ updatetqStatus();
return result;
}
@@ -484,7 +484,7 @@ KAboutData *KomparePart::createAboutData()
return about;
}
-void KomparePart::slotSetStatus( enum Kompare::Status status )
+void KomparePart::slotSettqStatus( enum Kompare::tqStatus status )
{
updateActions();
@@ -496,10 +496,10 @@ void KomparePart::slotSetStatus( enum Kompare::Status status )
emit setStatusBarText( i18n( "Parsing diff output..." ) );
break;
case Kompare::FinishedParsing:
- updateStatus();
+ updatetqStatus();
break;
case Kompare::FinishedWritingDiff:
- updateStatus();
+ updatetqStatus();
emit diffURLChanged();
break;
default:
@@ -532,7 +532,7 @@ void KomparePart::updateCaption()
emit setWindowCaption( text );
}
-void KomparePart::updateStatus()
+void KomparePart::updatetqStatus()
{
TQString source = m_info.source.prettyURL();
TQString destination = m_info.destination.prettyURL();
@@ -543,26 +543,26 @@ void KomparePart::updateStatus()
{
case Kompare::ComparingFiles :
text = i18n( "Comparing file %1 with file %2" )
- .arg( source )
- .arg( destination );
+ .tqarg( source )
+ .tqarg( destination );
break;
case Kompare::ComparingDirs :
text = i18n( "Comparing files in %1 with files in %2" )
- .arg( source )
- .arg( destination );
+ .tqarg( source )
+ .tqarg( destination );
break;
case Kompare::ShowingDiff :
- text = i18n( "Viewing diff output from %1" ).arg( source );
+ text = i18n( "Viewing diff output from %1" ).tqarg( source );
break;
case Kompare::BlendingFile :
text = i18n( "Blending diff output from %1 into file %2" )
- .arg( source )
- .arg( destination );
+ .tqarg( source )
+ .tqarg( destination );
break;
case Kompare::BlendingDir :
text = i18n( "Blending diff output from %1 into folder %2" )
- .arg( m_info.source.prettyURL() )
- .arg( m_info.destination.prettyURL() );
+ .tqarg( m_info.source.prettyURL() )
+ .tqarg( m_info.destination.prettyURL() );
break;
default:
break;
@@ -608,7 +608,7 @@ void KomparePart::slotSwap()
// Update window caption and statusbar text
updateCaption();
- updateStatus();
+ updatetqStatus();
m_modelList->swap();
}
@@ -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"), TQString::null, false );
+ i18n("Diff Statistics"), TQString(), false );
}
else if ( m_modelList->modelCount() == 1 ) { // 1 file in diff, or 2 files compared
KMessageBox::information( 0L, i18n(
@@ -678,9 +678,9 @@ void KomparePart::slotShowDiffstats( void )
"Format: %3\n"
"Number of hunks: %4\n"
"Number of differences: %5")
- .arg(oldFile).arg(newFile).arg(diffFormat)
- .arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), TQString::null, false );
+ .tqarg(oldFile).tqarg(newFile).tqarg(diffFormat)
+ .tqarg(noOfHunks).tqarg(noOfDiffs),
+ i18n("Diff Statistics"), TQString(), false );
} else { // more than 1 file in diff, or 2 directories compared
KMessageBox::information( 0L, i18n(
"Statistics:\n"
@@ -693,9 +693,9 @@ void KomparePart::slotShowDiffstats( void )
"\n"
"Number of hunks: %5\n"
"Number of differences: %6")
- .arg(filesInDiff).arg(diffFormat).arg(oldFile)
- .arg(newFile).arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), TQString::null, false );
+ .tqarg(filesInDiff).tqarg(diffFormat).tqarg(oldFile)
+ .tqarg(newFile).tqarg(noOfHunks).tqarg(noOfDiffs),
+ i18n("Diff Statistics"), TQString(), false );
}
}
diff --git a/kompare/komparepart/kompare_part.h b/kompare/komparepart/kompare_part.h
index bd8d5621..33c19a64 100644
--- a/kompare/komparepart/kompare_part.h
+++ b/kompare/komparepart/kompare_part.h
@@ -60,12 +60,13 @@ class KomparePart : public KParts::ReadWritePart,
public KompareInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor
*/
- KomparePart( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name, const TQStringList & /*args*/);
+ KomparePart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, const TQStringList & /*args*/);
/**
* Destructor
@@ -182,7 +183,7 @@ protected:
bool patchDir();
protected slots:
- void slotSetStatus( Kompare::Status status );
+ void slotSettqStatus( Kompare::tqStatus status );
void slotShowError( TQString error );
void slotSwap();
@@ -190,7 +191,7 @@ protected slots:
void optionsPreferences();
void updateActions();
void updateCaption();
- void updateStatus();
+ void updatetqStatus();
private:
void cleanUpTemporaryFiles();
diff --git a/kompare/komparepart/kompare_qsplitter.h b/kompare/komparepart/kompare_qsplitter.h
index 84585405..3c9345c7 100644
--- a/kompare/komparepart/kompare_qsplitter.h
+++ b/kompare/komparepart/kompare_qsplitter.h
@@ -1,13 +1,13 @@
/****************************************************************************
**
**
-** Definition of TQSplitter class
+** Definition of QSplitter class
**
** Created : 980105
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
-** This file is part of the widgets module of the Qt GUI Toolkit.
+** This file is part of the widgets module of the TQt GUI Toolkit.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -21,16 +21,15 @@
**
**********************************************************************/
-#ifndef QSPLITTER_H
-#define QSPLITTER_H
+#ifndef KOMPARE_TQSPLITTER_H
+#define KOMPARE_TQSPLITTER_H
-#ifndef QT_H
+#ifndef TQT_H
#include "tqframe.h"
#include "tqvaluelist.h"
-#endif // QT_H
-
-#ifndef QT_NO_SPLITTER
+#endif // TQT_H
+#ifndef TQT_NO_SPLITTER
//class QSplitterHandle;
class QSplitterLayoutStruct;
@@ -40,39 +39,40 @@ class QSplitterPrivate
{
public:
QSplitterPrivate()
- : opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ),
+ : opaque( FALSE ), firstShow( TRUE ), tqchildrenCollapsible( TRUE ),
handleWidth( 0 ) { }
TQPtrList<QSplitterLayoutStruct> list;
bool opaque : 8;
bool firstShow : 8;
- bool childrenCollapsible : 8;
+ bool tqchildrenCollapsible : 8;
int handleWidth;
};
-class Q_EXPORT TQSplitter : public QFrame
+class TQ_EXPORT QSplitter : public TQFrame
{
Q_OBJECT
- Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
- Q_PROPERTY( bool opaqueResize READ opaqueResize WRITE setOpaqueResize )
- Q_PROPERTY( int handleWidth READ handleWidth WRITE setHandleWidth )
- Q_PROPERTY( bool childrenCollapsible READ childrenCollapsible WRITE setChildrenCollapsible )
+ TQ_OBJECT
+ TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation )
+ TQ_PROPERTY( bool opaqueResize READ opaqueResize WRITE setOpaqueResize )
+ TQ_PROPERTY( int handleWidth READ handleWidth WRITE setHandleWidth )
+ TQ_PROPERTY( bool tqchildrenCollapsible READ tqchildrenCollapsible WRITE setChildrenCollapsible )
public:
- // ### Qt 4.0: remove Auto from public API
+ // ### TQt 4.0: remove Auto from public API
enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto };
- TQSplitter( TQWidget* parent = 0, const char* name = 0 );
- TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 );
- ~TQSplitter();
+ QSplitter( TQWidget* tqparent = 0, const char* name = 0 );
+ QSplitter( Qt::Orientation, TQWidget* tqparent = 0, const char* name = 0 );
+ ~QSplitter();
- virtual void setOrientation( Orientation );
- Orientation orientation() const { return orient; }
+ virtual void setOrientation( Qt::Orientation );
+ Qt::Orientation orientation() const { return orient; }
- // ### Qt 4.0: make setChildrenCollapsible() and setCollapsible() virtual
+ // ### TQt 4.0: make setChildrenCollapsible() and setCollapsible() virtual
void setChildrenCollapsible( bool );
- bool childrenCollapsible() const;
+ bool tqchildrenCollapsible() const;
void setCollapsible( TQWidget *w, bool );
virtual void setResizeMode( TQWidget *w, ResizeMode );
@@ -83,8 +83,8 @@ public:
void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
+ TQSize tqsizeHint() const;
+ TQSize tqminimumSizeHint() const;
TQValueList<int> sizes() const;
void setSizes( TQValueList<int> );
@@ -100,9 +100,9 @@ protected:
int idAfter( TQWidget* ) const;
- void moveSplitter( QCOORD pos, int id );
- virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y,
- QCOORD w, QCOORD h );
+ void moveSplitter( TQCOORD pos, int id );
+ virtual void drawSplitter( TQPainter*, TQCOORD x, TQCOORD y,
+ TQCOORD w, TQCOORD h );
void styleChange( TQStyle& );
int adjustPos( int, int );
virtual void setRubberband( int );
@@ -129,51 +129,52 @@ public: // private (:
int findWidgetJustBeforeOrJustAfter( int id, int delta, int &collapsibleSize );
void updateHandles();
- inline QCOORD pick( const TQPoint &p ) const
- { return orient == Horizontal ? p.x() : p.y(); }
- inline QCOORD pick( const TQSize &s ) const
- { return orient == Horizontal ? s.width() : s.height(); }
+ inline TQCOORD pick( const TQPoint &p ) const
+ { return orient ==Qt::Horizontal ? p.x() : p.y(); }
+ inline TQCOORD pick( const TQSize &s ) const
+ { return orient ==Qt::Horizontal ? s.width() : s.height(); }
- inline QCOORD trans( const TQPoint &p ) const
- { return orient == Vertical ? p.x() : p.y(); }
- inline QCOORD trans( const TQSize &s ) const
- { return orient == Vertical ? s.width() : s.height(); }
+ inline TQCOORD trans( const TQPoint &p ) const
+ { return orient ==Qt::Vertical ? p.x() : p.y(); }
+ inline TQCOORD trans( const TQSize &s ) const
+ { return orient ==Qt::Vertical ? s.width() : s.height(); }
QSplitterPrivate *d;
- Orientation orient;
+ Qt::Orientation orient;
friend class QSplitterHandle;
-#ifndef QT_NO_TEXTSTREAM
-// moc doesn't like these.
-// friend Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
-// friend Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
+#ifndef TQT_NO_TEXTSTREAM
+// tqmoc doesn't like these.
+// friend TQ_EXPORT TQTextStream& operator<<( TQTextStream&, const QSplitter& );
+// friend TQ_EXPORT TQTextStream& operator>>( TQTextStream&, QSplitter& );
#endif
public:
-#if defined(Q_DISABLE_COPY)
- TQSplitter( const TQSplitter & );
- TQSplitter& operator=( const TQSplitter & );
+#if defined(TQ_DISABLE_COPY)
+ QSplitter( const QSplitter & );
+ QSplitter& operator=( const QSplitter & );
#endif
};
-#ifndef QT_NO_TEXTSTREAM
-Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
-Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
+#ifndef TQT_NO_TEXTSTREAM
+TQ_EXPORT TQTextStream& operator<<( TQTextStream&, const QSplitter& );
+TQ_EXPORT TQTextStream& operator>>( TQTextStream&, QSplitter& );
#endif
-class QSplitterHandle : public QWidget
+class QSplitterHandle : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QSplitterHandle( Orientation o,
- TQSplitter *parent, const char* name=0 );
- void setOrientation( Orientation o );
- Orientation orientation() const { return orient; }
+ QSplitterHandle( Qt::Orientation o,
+ QSplitter *tqparent, const char* name=0 );
+ void setOrientation( Qt::Orientation o );
+ Qt::Orientation orientation() const { return orient; }
bool opaque() const { return s->opaqueResize(); }
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
int id() const { return myId; } // d->list.at(id())->wid == this
void setId( int i ) { myId = i; }
@@ -185,19 +186,19 @@ protected:
void mouseReleaseEvent( TQMouseEvent * );
public: // private (:
- Orientation orient;
+ Qt::Orientation orient;
bool opaq;
int myId;
- TQSplitter *s;
+ QSplitter *s;
};
const uint Default = 2;
-class QSplitterLayoutStruct : public Qt
+class QSplitterLayoutStruct : public TQt
{
public:
- QCOORD sizer;
+ TQCOORD sizer;
uint isHandle : 1;
uint collapsible : 2;
uint resizeMode : 2;
@@ -205,9 +206,9 @@ public:
QSplitterLayoutStruct()
: sizer( -1 ), collapsible( Default ) { }
- QCOORD getSizer( Orientation orient );
+ TQCOORD getSizer( Qt::Orientation orient );
};
-#endif // QT_NO_SPLITTER
+#endif // TQT_NO_SPLITTER
-#endif // QSPLITTER_H
+#endif // KOMPARE_TQSPLITTER_H
diff --git a/kompare/komparepart/kompareconnectwidget.cpp b/kompare/komparepart/kompareconnectwidget.cpp
index 57185e5a..b0f4ab78 100644
--- a/kompare/komparepart/kompareconnectwidget.cpp
+++ b/kompare/komparepart/kompareconnectwidget.cpp
@@ -39,21 +39,21 @@ using namespace Diff2;
KompareConnectWidgetFrame::KompareConnectWidgetFrame( KompareListView* left,
KompareListView* right,
ViewSettings* settings,
- KompareSplitter* parent,
+ KompareSplitter* tqparent,
const char* name ) :
- QSplitterHandle(Horizontal, (TQSplitter *)parent, name),
+ QSplitterHandle(Qt::Horizontal, (QSplitter *)tqparent, name),
m_wid ( left, right, settings, this, name ),
m_label ( "", this ),
m_layout ( this )
{
- setSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) );
- m_wid.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
- m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
+ tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) );
+ m_wid.tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
+ m_label.tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
m_label.setMargin(3);
TQFrame* bottomLine = new TQFrame(this);
bottomLine->setFrameShape(TQFrame::HLine);
bottomLine->setFrameShadow ( TQFrame::Plain );
- bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
+ bottomLine->tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
bottomLine->setFixedHeight(1);
m_layout.setSpacing(0);
m_layout.setMargin(0);
@@ -66,19 +66,19 @@ KompareConnectWidgetFrame::~KompareConnectWidgetFrame()
{
}
-TQSize KompareConnectWidgetFrame::sizeHint() const
+TQSize KompareConnectWidgetFrame::tqsizeHint() const
{
- return TQSize(50, style().pixelMetric( TQStyle::PM_ScrollBarExtent ) );
+ return TQSize(50, tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent ) );
}
static int kMouseOffset;
void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e )
{
- if ( !(e->state()&LeftButton) )
+ if ( !(e->state()&Qt::LeftButton) )
return;
- QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) )
+ TQCOORD pos = s->pick( tqparentWidget()->mapFromGlobal(e->globalPos()) )
- kMouseOffset;
((KompareSplitter*)s)->moveSplitter( pos, id() );
@@ -86,23 +86,23 @@ void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e )
void KompareConnectWidgetFrame::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
kMouseOffset = s->pick( e->pos() );
QSplitterHandle::mousePressEvent(e);
}
void KompareConnectWidgetFrame::mouseReleaseEvent( TQMouseEvent *e )
{
- if ( !opaque() && e->button() == LeftButton ) {
- QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) )
+ if ( !opaque() && e->button() == Qt::LeftButton ) {
+ TQCOORD pos = s->pick( tqparentWidget()->mapFromGlobal(e->globalPos()) )
- kMouseOffset;
((KompareSplitter*)s)->moveSplitter( pos, id() );
}
}
KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListView* right,
- ViewSettings* settings, TQWidget* parent, const char* name )
- : TQWidget(parent, name),
+ ViewSettings* settings, TQWidget* tqparent, const char* name )
+ : TQWidget(tqparent, name),
m_settings( settings ),
m_leftView( left ),
m_rightView( right ),
@@ -111,8 +111,8 @@ KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListVi
{
// connect( m_settings, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotDelayedRepaint() ) );
setBackgroundMode( NoBackground );
- setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
- setFocusProxy( parent->parentWidget() );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
+ setFocusProxy( tqparent->tqparentWidget() );
}
KompareConnectWidget::~KompareConnectWidget()
@@ -139,7 +139,7 @@ void KompareConnectWidget::slotSetSelection( const DiffModel* model, const Diffe
void KompareConnectWidget::slotDelayedRepaint()
{
- TQTimer::singleShot( 0, this, TQT_SLOT( repaint() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( tqrepaint() ) );
}
void KompareConnectWidget::slotSetSelection( const Difference* diff )
@@ -169,8 +169,8 @@ void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ )
int lastL = m_leftView->lastVisibleDifference();
int lastR = m_rightView->lastVisibleDifference();
- int first = firstL < 0 ? firstR : QMIN( firstL, firstR );
- int last = lastL < 0 ? lastR : QMAX( lastL, lastR );
+ int first = firstL < 0 ? firstR : TQMIN( firstL, firstR );
+ int last = lastL < 0 ? lastR : TQMAX( lastL, lastR );
// kdDebug(8106) << " left: " << firstL << " - " << lastL << endl;
// kdDebug(8106) << " right: " << firstR << " - " << lastR << endl;
@@ -190,13 +190,13 @@ void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ )
if ( TQApplication::reverseLayout() )
{
- leftRect = m_rightView->itemRect( i );
- rightRect = m_leftView->itemRect( i );
+ leftRect = m_rightView->tqitemRect( i );
+ rightRect = m_leftView->tqitemRect( i );
}
else
{
- leftRect = m_leftView->itemRect( i );
- rightRect = m_rightView->itemRect( i );
+ leftRect = m_leftView->tqitemRect( i );
+ rightRect = m_rightView->tqitemRect( i );
}
int tl = leftRect.top();
diff --git a/kompare/komparepart/kompareconnectwidget.h b/kompare/komparepart/kompareconnectwidget.h
index 5287552f..8282463b 100644
--- a/kompare/komparepart/kompareconnectwidget.h
+++ b/kompare/komparepart/kompareconnectwidget.h
@@ -32,13 +32,14 @@ class ViewSettings;
class KompareListView;
class KompareSplitter;
-class KompareConnectWidget : public QWidget
+class KompareConnectWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
KompareConnectWidget( KompareListView* left, KompareListView* right,
- ViewSettings* settings, TQWidget* parent, const char* name = 0 );
+ ViewSettings* settings, TQWidget* tqparent, const char* name = 0 );
~KompareConnectWidget();
public slots:
@@ -69,17 +70,18 @@ private:
class KompareConnectWidgetFrame : public QSplitterHandle
{
Q_OBJECT
+ TQ_OBJECT
public:
KompareConnectWidgetFrame( KompareListView* left, KompareListView* right,
- ViewSettings* settings, KompareSplitter* parent, const char* name = 0 );
+ ViewSettings* settings, KompareSplitter* tqparent, const char* name = 0 );
~KompareConnectWidgetFrame();
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
KompareConnectWidget* wid() { return &m_wid; }
protected:
- // stop the parent QSplitterHandle painting
+ // stop the tqparent QSplitterHandle painting
void paintEvent( TQPaintEvent* /* e */ ) { }
void mouseMoveEvent( TQMouseEvent * );
diff --git a/kompare/komparepart/komparelistview.cpp b/kompare/komparepart/komparelistview.cpp
index 7e3ee953..7dd21845 100644
--- a/kompare/komparepart/komparelistview.cpp
+++ b/kompare/komparepart/komparelistview.cpp
@@ -47,19 +47,19 @@ using namespace Diff2;
KompareListViewFrame::KompareListViewFrame( bool isSource,
ViewSettings* settings,
- KompareSplitter* parent,
+ KompareSplitter* tqparent,
const char* name ):
- TQFrame ( parent, name ),
+ TQFrame ( tqparent, name ),
m_view ( isSource, settings, this, name ),
m_label ( isSource?"Source":"Dest", this ),
m_layout ( this )
{
- setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
- m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
+ tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
+ m_label.tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
TQFrame *bottomLine = new TQFrame(this);
bottomLine->setFrameShape(TQFrame::HLine);
bottomLine->setFrameShadow ( TQFrame::Plain );
- bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
+ bottomLine->tqsetSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
bottomLine->setFixedHeight(1);
m_label.setMargin(3);
m_layout.setSpacing(0);
@@ -69,11 +69,11 @@ KompareListViewFrame::KompareListViewFrame( bool isSource,
m_layout.addWidget(&m_view);
connect( &m_view, TQT_SIGNAL(differenceClicked(const Diff2::Difference*)),
- parent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) );
+ tqparent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) );
- connect( parent, TQT_SIGNAL(scrollViewsToId(int)), &m_view, TQT_SLOT(scrollToId(int)) );
- connect( parent, TQT_SIGNAL(setXOffset(int)), &m_view, TQT_SLOT(setXOffset(int)) );
- connect( &m_view, TQT_SIGNAL(resized()), parent, TQT_SLOT(slotUpdateScrollBars()) );
+ connect( tqparent, TQT_SIGNAL(scrollViewsToId(int)), &m_view, TQT_SLOT(scrollToId(int)) );
+ connect( tqparent, TQT_SIGNAL(setXOffset(int)), &m_view, TQT_SLOT(setXOffset(int)) );
+ connect( &m_view, TQT_SIGNAL(resized()), tqparent, TQT_SLOT(slotUpdateScrollBars()) );
}
void KompareListViewFrame::slotSetModel( const DiffModel* model )
@@ -92,14 +92,14 @@ void KompareListViewFrame::slotSetModel( const DiffModel* model )
m_label.setText( model->destinationFile() );
}
} else {
- m_label.setText( TQString::null );
+ m_label.setText( TQString() );
}
}
KompareListView::KompareListView( bool isSource,
ViewSettings* settings,
- TQWidget* parent, const char* name ) :
- KListView( parent, name ),
+ TQWidget* tqparent, const char* name ) :
+ KListView( tqparent, name ),
m_isSource( isSource ),
m_settings( settings ),
m_scrollId( -1 ),
@@ -122,10 +122,10 @@ KompareListView::KompareListView( bool isSource,
setFrameStyle( TQFrame::NoFrame );
setVScrollBarMode( TQScrollView::AlwaysOff );
setHScrollBarMode( TQScrollView::AlwaysOff );
- setFocusPolicy( TQWidget::NoFocus );
+ setFocusPolicy( TQ_NoFocus );
setFont( m_settings->m_font );
setSpaces( m_settings->m_tabToNumberOfSpaces );
- setFocusProxy( parent->parentWidget() );
+ setFocusProxy( tqparent->tqparentWidget() );
}
KompareListView::~KompareListView()
@@ -154,7 +154,7 @@ int KompareListView::firstVisibleDifference()
}
if( item )
- return m_items.findIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
+ return m_items.tqfindIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
return -1;
}
@@ -177,12 +177,12 @@ int KompareListView::lastVisibleDifference()
}
if( item )
- return m_items.findIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
+ return m_items.tqfindIndex( ((KompareListViewLineItem*)item)->diffItemParent() );
return -1;
}
-TQRect KompareListView::itemRect( int i )
+TQRect KompareListView::tqitemRect( int i )
{
TQListViewItem* item = itemAtIndex( i );
int x = 0;
@@ -390,7 +390,7 @@ void KompareListView::slotApplyAllDifferences( bool apply )
TQPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict );
for( ; it.current(); ++it )
it.current()->applyDifference( apply );
- repaint();
+ tqrepaint();
}
void KompareListView::slotApplyDifference( const Difference* diff, bool apply )
@@ -410,7 +410,7 @@ void KompareListView::setSpaces( int spaces )
void KompareListView::wheelEvent( TQWheelEvent* e )
{
- e->ignore(); // we want the parent to catch wheel events
+ e->ignore(); // we want the tqparent to catch wheel events
}
void KompareListView::resizeEvent( TQResizeEvent* e )
@@ -420,28 +420,28 @@ void KompareListView::resizeEvent( TQResizeEvent* e )
kdDebug() << "resizeEvent " << endl;
}
-KompareListViewItem::KompareListViewItem( KompareListView* parent )
- : TQListViewItem( parent ),
+KompareListViewItem::KompareListViewItem( KompareListView* tqparent )
+ : TQListViewItem( tqparent ),
m_scrollId( 0 )
{
// kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl;
}
-KompareListViewItem::KompareListViewItem( KompareListView* parent, KompareListViewItem* after )
- : TQListViewItem( parent, after ),
+KompareListViewItem::KompareListViewItem( KompareListView* tqparent, KompareListViewItem* after )
+ : TQListViewItem( tqparent, after ),
m_scrollId( after->scrollId() + after->maxHeight() )
{
// kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl;
}
-KompareListViewItem::KompareListViewItem( KompareListViewItem* parent )
- : TQListViewItem( parent ),
+KompareListViewItem::KompareListViewItem( KompareListViewItem* tqparent )
+ : TQListViewItem( tqparent ),
m_scrollId( 0 )
{
}
-KompareListViewItem::KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* /*after*/ )
- : TQListViewItem( parent ),
+KompareListViewItem::KompareListViewItem( KompareListViewItem* tqparent, KompareListViewItem* /*after*/ )
+ : TQListViewItem( tqparent ),
m_scrollId( 0 )
{
}
@@ -456,8 +456,8 @@ void KompareListViewItem::paintFocus( TQPainter* /* p */, const TQColorGroup& /*
// Don't paint anything
}
-KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, Difference* difference )
- : KompareListViewItem( parent ),
+KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* tqparent, Difference* difference )
+ : KompareListViewItem( tqparent ),
m_difference( difference ),
m_sourceItem( 0L ),
m_destItem( 0L )
@@ -465,8 +465,8 @@ KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, Diffe
init();
}
-KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, KompareListViewItem* after, Difference* difference )
- : KompareListViewItem( parent, after ),
+KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* tqparent, KompareListViewItem* after, Difference* difference )
+ : KompareListViewItem( tqparent, after ),
m_difference( difference ),
m_sourceItem( 0L ),
m_destItem( 0L )
@@ -500,12 +500,12 @@ void KompareListViewDiffItem::applyDifference( bool apply )
kdDebug(8104) << "KompareListViewDiffItem::applyDifference( " << apply << " )" << endl;
setVisibility();
setup();
- repaint();
+ tqrepaint();
}
int KompareListViewDiffItem::maxHeight()
{
- int lines = QMAX( m_difference->sourceLineCount(), m_difference->destinationLineCount() );
+ int lines = TQMAX( m_difference->sourceLineCount(), m_difference->destinationLineCount() );
if( lines == 0 )
return BLANK_LINE_HEIGHT;
else
@@ -520,13 +520,13 @@ void KompareListViewDiffItem::setSelected( bool b )
m_sourceItem->firstChild() :
m_destItem->firstChild();
while( item && item->isVisible() ) {
- item->repaint();
+ item->tqrepaint();
item = item->nextSibling();
}
}
-KompareListViewLineContainerItem::KompareListViewLineContainerItem( KompareListViewDiffItem* parent, bool isSource )
- : KompareListViewItem( parent ),
+KompareListViewLineContainerItem::KompareListViewLineContainerItem( KompareListViewDiffItem* tqparent, bool isSource )
+ : KompareListViewItem( tqparent ),
m_isSource( isSource )
{
// kdDebug(8104) << "isSource ? " << (isSource ? " Yes!" : " No!") << endl;
@@ -554,7 +554,7 @@ void KompareListViewLineContainerItem::setup()
KompareListViewDiffItem* KompareListViewLineContainerItem::diffItemParent() const
{
- return (KompareListViewDiffItem*)parent();
+ return (KompareListViewDiffItem*)tqparent();
}
int KompareListViewLineContainerItem::lineCount() const
@@ -575,8 +575,8 @@ DifferenceString* KompareListViewLineContainerItem::lineAt( int i ) const
diffItemParent()->difference()->destinationLineAt( i );
}
-KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, DifferenceString* text )
- : KompareListViewItem( parent )
+KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* tqparent, int line, DifferenceString* text )
+ : KompareListViewItem( tqparent )
{
setText( COL_LINE_NO, TQString::number( line ) );
setText( COL_MAIN, text->string() );
@@ -618,7 +618,7 @@ void KompareListViewLineItem::paintCell( TQPainter * p, const TQColorGroup & cg,
if ( diffItemParent()->isSelected() )
{
p->setPen( bg.dark(135) );
- if ( this == parent()->firstChild() )
+ if ( this == tqparent()->firstChild() )
p->drawLine( 0, 0, width, 0 );
if ( nextSibling() == 0 )
p->drawLine( 0, height() - 1, width, height() - 1 );
@@ -658,14 +658,14 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
// kdDebug(8104) << "c->offset() = " << c->offset() << endl;
// kdDebug(8104) << "prevValue = " << prevValue << endl;
- textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
+ textChunk.tqreplace( TQChar('\t'), kompareListView()->spaces() );
prevValue = m->offset();
if ( m->type() == Marker::End )
{
TQFont font( p->font() );
font.setBold( true );
p->setFont( font );
-// p->setPen( Qt::blue );
+// p->setPen( TQt::blue );
brush = changeBrush;
}
else
@@ -673,7 +673,7 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co
TQFont font( p->font() );
font.setBold( false );
p->setFont( font );
-// p->setPen( Qt::black );
+// p->setPen( TQt::black );
brush = normalBrush;
}
chunkWidth = p->fontMetrics().width( textChunk );
@@ -688,7 +688,7 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co
{
// Still have to draw some string without changes
textChunk = m_text->string().mid( prevValue, kMax( ( unsigned int )1, m_text->string().length() - prevValue ) );
- textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
+ textChunk.tqreplace( TQChar('\t'), kompareListView()->spaces() );
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
TQFont font( p->font() );
font.setBold( false );
@@ -713,12 +713,12 @@ void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int co
KompareListViewDiffItem* KompareListViewLineItem::diffItemParent() const
{
- KompareListViewLineContainerItem* p = (KompareListViewLineContainerItem*)parent();
+ KompareListViewLineContainerItem* p = (KompareListViewLineContainerItem*)tqparent();
return p->diffItemParent();
}
-KompareListViewBlankLineItem::KompareListViewBlankLineItem( KompareListViewLineContainerItem* parent )
- : KompareListViewLineItem( parent, 0, new DifferenceString() )
+KompareListViewBlankLineItem::KompareListViewBlankLineItem( KompareListViewLineContainerItem* tqparent )
+ : KompareListViewLineItem( tqparent, 0, new DifferenceString() )
{
}
@@ -737,16 +737,16 @@ void KompareListViewBlankLineItem::paintText( TQPainter* p, const TQColor& bg, i
}
}
-KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* parent, DiffHunk* hunk, bool zeroHeight )
- : KompareListViewItem( parent ),
+KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* tqparent, DiffHunk* hunk, bool zeroHeight )
+ : KompareListViewItem( tqparent ),
m_zeroHeight( zeroHeight ),
m_hunk( hunk )
{
setSelectable( false );
}
-KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, DiffHunk* hunk, bool zeroHeight )
- : KompareListViewItem( parent, after ),
+KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* tqparent, KompareListViewItem* after, DiffHunk* hunk, bool zeroHeight )
+ : KompareListViewItem( tqparent, after ),
m_zeroHeight( zeroHeight ),
m_hunk( hunk )
{
diff --git a/kompare/komparepart/komparelistview.h b/kompare/komparepart/komparelistview.h
index d617fafd..7c10ff6d 100644
--- a/kompare/komparepart/komparelistview.h
+++ b/kompare/komparepart/komparelistview.h
@@ -46,15 +46,16 @@ class KompareListViewLineContainerItem;
class KompareListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KompareListView( bool isSource, ViewSettings* settings, TQWidget* parent, const char* name = 0 );
+ KompareListView( bool isSource, ViewSettings* settings, TQWidget* tqparent, const char* name = 0 );
virtual ~KompareListView();
KompareListViewItem* itemAtIndex( int i );
int firstVisibleDifference();
int lastVisibleDifference();
- TQRect itemRect( int i );
+ TQRect tqitemRect( int i );
int minScrollId();
int maxScrollId();
int contentsWidth();
@@ -102,12 +103,13 @@ private:
TQString m_spaces;
};
-class KompareListViewFrame : public QFrame
+class KompareListViewFrame : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- KompareListViewFrame( bool isSource, ViewSettings* settings, KompareSplitter* parent, const char* name = 0 );
+ KompareListViewFrame( bool isSource, ViewSettings* settings, KompareSplitter* tqparent, const char* name = 0 );
virtual ~KompareListViewFrame() {};
KompareListView* view() { return &m_view; };
@@ -120,13 +122,13 @@ private:
TQVBoxLayout m_layout;
};
-class KompareListViewItem : public QListViewItem
+class KompareListViewItem : public TQListViewItem
{
public:
- KompareListViewItem( KompareListView* parent );
- KompareListViewItem( KompareListView* parent, KompareListViewItem* after );
- KompareListViewItem( KompareListViewItem* parent );
- KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* after );
+ KompareListViewItem( KompareListView* tqparent );
+ KompareListViewItem( KompareListView* tqparent, KompareListViewItem* after );
+ KompareListViewItem( KompareListViewItem* tqparent );
+ KompareListViewItem( KompareListViewItem* tqparent, KompareListViewItem* after );
void paintFocus( TQPainter* p, const TQColorGroup& cg, const TQRect& r );
int scrollId() { return m_scrollId; };
@@ -142,8 +144,8 @@ private:
class KompareListViewDiffItem : public KompareListViewItem
{
public:
- KompareListViewDiffItem( KompareListView* parent, Diff2::Difference* difference );
- KompareListViewDiffItem( KompareListView* parent, KompareListViewItem* after, Diff2::Difference* difference );
+ KompareListViewDiffItem( KompareListView* tqparent, Diff2::Difference* difference );
+ KompareListViewDiffItem( KompareListView* tqparent, KompareListViewItem* after, Diff2::Difference* difference );
void setup();
void setSelected( bool b );
@@ -165,7 +167,7 @@ private:
class KompareListViewLineContainerItem : public KompareListViewItem
{
public:
- KompareListViewLineContainerItem( KompareListViewDiffItem* parent, bool isSource );
+ KompareListViewLineContainerItem( KompareListViewDiffItem* tqparent, bool isSource );
void setup();
int maxHeight() { return 0; }
@@ -182,7 +184,7 @@ private:
class KompareListViewLineItem : public KompareListViewItem
{
public:
- KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, Diff2::DifferenceString* text );
+ KompareListViewLineItem( KompareListViewLineContainerItem* tqparent, int line, Diff2::DifferenceString* text );
virtual void setup();
int maxHeight() { return 0; }
@@ -199,7 +201,7 @@ private:
class KompareListViewBlankLineItem : public KompareListViewLineItem
{
public:
- KompareListViewBlankLineItem( KompareListViewLineContainerItem* parent );
+ KompareListViewBlankLineItem( KompareListViewLineContainerItem* tqparent );
void setup();
@@ -209,8 +211,8 @@ public:
class KompareListViewHunkItem : public KompareListViewItem
{
public:
- KompareListViewHunkItem( KompareListView* parent, Diff2::DiffHunk* hunk, bool zeroHeight = false );
- KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, Diff2::DiffHunk* hunk, bool zeroHeight= false );
+ KompareListViewHunkItem( KompareListView* tqparent, Diff2::DiffHunk* hunk, bool zeroHeight = false );
+ KompareListViewHunkItem( KompareListView* tqparent, KompareListViewItem* after, Diff2::DiffHunk* hunk, bool zeroHeight= false );
void setup();
void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align );
diff --git a/kompare/komparepart/kompareprefdlg.h b/kompare/komparepart/kompareprefdlg.h
index e81da90c..5a8d969a 100644
--- a/kompare/komparepart/kompareprefdlg.h
+++ b/kompare/komparepart/kompareprefdlg.h
@@ -30,6 +30,7 @@ class ViewSettings;
class KomparePrefDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
KomparePrefDlg( ViewSettings*, DiffSettings* );
~KomparePrefDlg();
diff --git a/kompare/komparepart/komparesaveoptionsbase.ui b/kompare/komparepart/komparesaveoptionsbase.ui
index 4c49b018..05b9be51 100644
--- a/kompare/komparepart/komparesaveoptionsbase.ui
+++ b/kompare/komparepart/komparesaveoptionsbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KompareSaveOptionsBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KompareSaveOptionsBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,7 +22,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>GroupBox2</cstring>
</property>
@@ -65,7 +65,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_CommandLineGB</cstring>
</property>
@@ -83,7 +83,7 @@
<property name="title">
<string>Command Line</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="hAlign" stdset="0">
@@ -100,7 +100,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_CommandLineLabel</cstring>
</property>
@@ -110,7 +110,7 @@
</widget>
</hbox>
</widget>
- <widget class="QButtonGroup" row="0" column="1">
+ <widget class="TQButtonGroup" row="0" column="1">
<property name="name">
<cstring>m_OptionsGB</cstring>
</property>
@@ -127,7 +127,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_SmallerChangesCB</cstring>
</property>
@@ -138,7 +138,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_LargeFilesCB</cstring>
</property>
@@ -149,7 +149,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_IgnoreCaseCB</cstring>
</property>
@@ -157,7 +157,7 @@
<string>Ignore changes in case</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_ExpandTabsCB</cstring>
</property>
@@ -165,7 +165,7 @@
<string>Expand tabs to spaces</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_IgnoreEmptyLinesCB</cstring>
</property>
@@ -173,7 +173,7 @@
<string>Ignore added or removed empty lines</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_IgnoreWhiteSpaceCB</cstring>
</property>
@@ -181,7 +181,7 @@
<string>Ignore changes in whitespace</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_FunctionNamesCB</cstring>
</property>
@@ -192,7 +192,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_RecursiveCB</cstring>
</property>
@@ -203,7 +203,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_NewFilesCB</cstring>
</property>
@@ -219,7 +219,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>m_FormatBG</cstring>
</property>
@@ -236,7 +236,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_ContextRB</cstring>
</property>
@@ -244,7 +244,7 @@
<string>Context</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_EdRB</cstring>
</property>
@@ -252,7 +252,7 @@
<string>Ed</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_NormalRB</cstring>
</property>
@@ -260,7 +260,7 @@
<string>Normal</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_RCSRB</cstring>
</property>
@@ -268,7 +268,7 @@
<string>RCS</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_UnifiedRB</cstring>
</property>
@@ -279,7 +279,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_SideBySideRB</cstring>
</property>
@@ -290,7 +290,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>m_ContextLinesLayout</cstring>
</property>
@@ -304,7 +304,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_ContextLinesLabel</cstring>
</property>
@@ -312,7 +312,7 @@
<string>Number of context lines:</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>m_ContextLinesSB</cstring>
</property>
@@ -332,5 +332,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kompare/komparepart/komparesaveoptionswidget.cpp b/kompare/komparepart/komparesaveoptionswidget.cpp
index 723093ac..cf6e9bf7 100644
--- a/kompare/komparepart/komparesaveoptionswidget.cpp
+++ b/kompare/komparepart/komparesaveoptionswidget.cpp
@@ -31,8 +31,8 @@
#include "komparesaveoptionswidget.h"
KompareSaveOptionsWidget::KompareSaveOptionsWidget( TQString source, TQString destination,
- DiffSettings * settings, TQWidget * parent )
- : KompareSaveOptionsBase( parent, "save options" )
+ DiffSettings * settings, TQWidget * tqparent )
+ : KompareSaveOptionsBase( tqparent, "save options" )
, m_source( source )
, m_destination( destination )
{
diff --git a/kompare/komparepart/komparesaveoptionswidget.h b/kompare/komparepart/komparesaveoptionswidget.h
index 905dcaa4..3618a2b2 100644
--- a/kompare/komparepart/komparesaveoptionswidget.h
+++ b/kompare/komparepart/komparesaveoptionswidget.h
@@ -30,8 +30,9 @@ class DiffSettings;
class KompareSaveOptionsWidget : public KompareSaveOptionsBase, public KompareFunctions
{
Q_OBJECT
+ TQ_OBJECT
public:
- KompareSaveOptionsWidget( TQString source, TQString destination, DiffSettings* settings, TQWidget* parent );
+ KompareSaveOptionsWidget( TQString source, TQString destination, DiffSettings* settings, TQWidget* tqparent );
~KompareSaveOptionsWidget();
void saveOptions();
diff --git a/kompare/komparepart/komparesplitter.cpp b/kompare/komparepart/komparesplitter.cpp
index 59106ffb..e962730a 100644
--- a/kompare/komparepart/komparesplitter.cpp
+++ b/kompare/komparepart/komparesplitter.cpp
@@ -34,37 +34,37 @@
using namespace Diff2;
-KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * parent,
+KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * tqparent,
const char *name) :
- TQSplitter( Horizontal, parent, name ),
+ QSplitter(Qt::Horizontal, tqparent, name ),
m_settings( settings )
{
- TQFrame *scrollFrame = new TQFrame( parent, "scrollFrame" );
+ TQFrame *scrollFrame = new TQFrame( tqparent, "scrollFrame" );
reparent( scrollFrame, *(new TQPoint()), false );
// Set up the scrollFrame
scrollFrame->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain );
- scrollFrame->setLineWidth(scrollFrame->style().pixelMetric(TQStyle::PM_DefaultFrameWidth));
- TQGridLayout *pairlayout = new TQGridLayout(scrollFrame, 2, 2, 0);
- m_vScroll = new TQScrollBar( TQScrollBar::Vertical, scrollFrame );
- pairlayout->addWidget( m_vScroll, 0, 1 );
- m_hScroll = new TQScrollBar( TQScrollBar::Horizontal, scrollFrame );
- pairlayout->addWidget( m_hScroll, 1, 0 );
+ scrollFrame->setLineWidth(scrollFrame->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth));
+ TQGridLayout *pairtqlayout = new TQGridLayout(scrollFrame, 2, 2, 0);
+ m_vScroll = new TQScrollBar( Qt::Vertical, scrollFrame );
+ pairtqlayout->addWidget( m_vScroll, 0, 1 );
+ m_hScroll = new TQScrollBar( Qt::Horizontal, scrollFrame );
+ pairtqlayout->addWidget( m_hScroll, 1, 0 );
new KompareListViewFrame(true, m_settings, this, "source");
new KompareListViewFrame(false, m_settings, this, "destination");
- pairlayout->addWidget( this, 0, 0 );
+ pairtqlayout->addWidget( this, 0, 0 );
// set up our looks
setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
- setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) );
+ setLineWidth( tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) );
setHandleWidth(50);
setChildrenCollapsible( false );
setFrameStyle( TQFrame::NoFrame );
- setSizePolicy( TQSizePolicy (TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
+ tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
setOpaqueResize( true );
- setFocusPolicy( TQWidget::WheelFocus );
+ setFocusPolicy( TQ_WheelFocus );
connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotConfigChanged()) );
connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedRepaintHandles()) );
@@ -121,7 +121,7 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool
s->wid = newHandle;
newHandle->setId( d->list.count() );
s->isHandle = TRUE;
- s->sizer = pick( newHandle->sizeHint() );
+ s->sizer = pick( newHandle->tqsizeHint() );
if ( prepend )
d->list.prepend( s );
else
@@ -184,7 +184,7 @@ void KompareSplitter::childEvent( TQChildEvent *c )
}
}
-// This is from a private qt header (kernel/qlayoutengine_p.h). sorry.
+// This is from a private qt header (kernel/qtqlayoutengine_p.h). sorry.
TQSize qSmartMinSize( TQWidget *w );
static TQPoint toggle( TQWidget *w, TQPoint pos )
@@ -212,11 +212,11 @@ static TQPoint bottomRight( TQWidget *w )
if ( isCollapsed(w) ) {
return toggle( w, w->pos() ) - TQPoint( 1, 1 );
} else {
- return w->geometry().bottomRight();
+ return w->tqgeometry().bottomRight();
}
}
-void KompareSplitter::moveSplitter( QCOORD p, int id )
+void KompareSplitter::moveSplitter( TQCOORD p, int id )
{
QSplitterLayoutStruct *s = d->list.at( id );
int farMin;
@@ -229,7 +229,7 @@ void KompareSplitter::moveSplitter( QCOORD p, int id )
int* ws = new int[d->list.count()];
TQWidget *w = 0;
bool upLeft;
- if ( TQApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) {
int q = p + s->wid->width();
doMove( FALSE, q, id - 1, -1, (p > max), poss, ws );
doMove( TRUE, q, id, -1, (p < min), poss, ws );
@@ -278,8 +278,8 @@ void KompareSplitter::doMove( bool backwards, int pos, int id, int delta,
int dd = backwards ? pos - pick( topLeft(w) )
: pick( bottomRight(w) ) - pos + 1;
if ( dd > 0 || (!isCollapsed(w) && !mayCollapse) ) {
- dd = QMAX( pick(qSmartMinSize(w)),
- QMIN(dd, pick(w->maximumSize())) );
+ dd = TQMAX( pick(qSmartMinSize(w)),
+ TQMIN(dd, pick(w->tqmaximumSize())) );
} else {
dd = 0;
}
@@ -391,12 +391,12 @@ void KompareSplitter::slotDelayedRepaintHandles()
((KompareConnectWidgetFrame*)curr->wid)->wid()->slotDelayedRepaint();
}
-void KompareSplitter::repaintHandles()
+void KompareSplitter::tqrepaintHandles()
{
QSplitterLayoutStruct *curr;
for ( curr = d->list.first(); curr; curr = d->list.next() )
if ( curr->isHandle )
- ((KompareConnectWidgetFrame*)curr->wid)->wid()->repaint();
+ ((KompareConnectWidgetFrame*)curr->wid)->wid()->tqrepaint();
}
// Scrolling stuff
@@ -410,7 +410,7 @@ void KompareSplitter::wheelEvent( TQWheelEvent* e )
// scroll lines...
if ( e->orientation() == Qt::Vertical )
{
- if ( e->state() & Qt::ControlButton )
+ if ( e->state() & TQt::ControlButton )
if ( e->delta() < 0 ) // scroll down one page
m_vScroll->addPage();
else // scroll up one page
@@ -423,7 +423,7 @@ void KompareSplitter::wheelEvent( TQWheelEvent* e )
}
else
{
- if ( e->state() & Qt::ControlButton )
+ if ( e->state() & TQt::ControlButton )
if ( e->delta() < 0 ) // scroll right one page
m_hScroll->addPage();
else // scroll left one page
@@ -435,7 +435,7 @@ void KompareSplitter::wheelEvent( TQWheelEvent* e )
m_hScroll->subtractLine();
}
e->accept();
- repaintHandles();
+ tqrepaintHandles();
}
void KompareSplitter::keyPressEvent( TQKeyEvent* e )
@@ -466,7 +466,7 @@ void KompareSplitter::keyPressEvent( TQKeyEvent* e )
break;
}
e->accept();
- repaintHandles();
+ tqrepaintHandles();
}
void KompareSplitter::timerTimeout()
diff --git a/kompare/komparepart/komparesplitter.h b/kompare/komparepart/komparesplitter.h
index 08d9d94d..e6dd8ae9 100644
--- a/kompare/komparepart/komparesplitter.h
+++ b/kompare/komparepart/komparesplitter.h
@@ -38,9 +38,10 @@ class ViewSettings;
class KompareSplitter : public QSplitter
{
Q_OBJECT
+ TQ_OBJECT
public:
- KompareSplitter(ViewSettings *settings, TQWidget *parent=0, const char *name = 0);
+ KompareSplitter(ViewSettings *settings, TQWidget *tqparent=0, const char *name = 0);
~KompareSplitter();
signals:
@@ -75,7 +76,7 @@ protected:
void wheelEvent( TQWheelEvent* e );
void keyPressEvent( TQKeyEvent* e );
- void moveSplitter( QCOORD pos, int id );
+ void moveSplitter( TQCOORD pos, int id );
private slots:
void slotDelayedRepaintHandles();
@@ -88,7 +89,7 @@ private:
void doMove( bool backwards, int pos, int id, int delta,
bool mayCollapse, int* positions, int* widths );
- void repaintHandles();
+ void tqrepaintHandles();
TQTimer* m_scrollTimer;
bool restartTimer;