diff options
Diffstat (limited to 'kompare/komparepart')
-rw-r--r-- | kompare/komparepart/kompare_part.cpp | 170 | ||||
-rw-r--r-- | kompare/komparepart/kompare_part.h | 18 | ||||
-rw-r--r-- | kompare/komparepart/kompare_qsplitter.h | 86 | ||||
-rw-r--r-- | kompare/komparepart/kompareconnectwidget.cpp | 76 | ||||
-rw-r--r-- | kompare/komparepart/kompareconnectwidget.h | 26 | ||||
-rw-r--r-- | kompare/komparepart/komparelistview.cpp | 114 | ||||
-rw-r--r-- | kompare/komparepart/komparelistview.h | 46 | ||||
-rw-r--r-- | kompare/komparepart/kompareprefdlg.cpp | 4 | ||||
-rw-r--r-- | kompare/komparepart/komparesaveoptionswidget.cpp | 58 | ||||
-rw-r--r-- | kompare/komparepart/komparesaveoptionswidget.h | 8 | ||||
-rw-r--r-- | kompare/komparepart/komparesplitter.cpp | 98 | ||||
-rw-r--r-- | kompare/komparepart/komparesplitter.h | 16 |
12 files changed, 360 insertions, 360 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(); diff --git a/kompare/komparepart/kompare_part.h b/kompare/komparepart/kompare_part.h index 0a9716c3..b7b05ce8 100644 --- a/kompare/komparepart/kompare_part.h +++ b/kompare/komparepart/kompare_part.h @@ -64,8 +64,8 @@ public: /** * Default constructor */ - KomparePart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList & /*args*/); + KomparePart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList & /*args*/); /** * Destructor @@ -96,13 +96,13 @@ public: virtual bool openDiff( const KURL& diffUrl ); /** Added on request of Harald Fernengel */ - virtual bool openDiff( const QString& diffOutput ); + virtual bool openDiff( const TQString& diffOutput ); /** Open and parse the diff3 file at diff3Url */ virtual bool openDiff3( const KURL& diff3URL ); /** Open and parse the file diff3Output with the output of diff3 */ - virtual bool openDiff3( const QString& diff3Output ); + virtual bool openDiff3( const TQString& diff3Output ); /** Compare, with diff, source with destination */ virtual void compare( const KURL& sourceFile, const KURL& destinationFile ); @@ -123,7 +123,7 @@ public: virtual void openDirAndDiff ( const KURL& dir, const KURL& diffFile ); /** Reimplementing this because this one knows more about the real part then the interface */ - virtual void setEncoding( const QString& encoding ); + virtual void setEncoding( const TQString& encoding ); // This is the interpart interface, it is signal and slot based so no "real" interface here // All you have to do is connect the parts from your application. @@ -166,7 +166,7 @@ signals: void diffURLChanged(); void kompareInfo( Kompare::Info* info ); void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount ); -// void setStatusBarText( const QString& text ); +// void setStatusBarText( const TQString& text ); protected: /** @@ -183,7 +183,7 @@ protected: protected slots: void slotSetStatus( Kompare::Status status ); - void slotShowError( QString error ); + void slotShowError( TQString error ); void slotSwap(); void slotShowDiffstats(); @@ -195,9 +195,9 @@ protected slots: private: void cleanUpTemporaryFiles(); void setupActions(); - bool exists( const QString& url ); + bool exists( const TQString& url ); bool isDirectory( const KURL& url ); - const QString fetchURL( const KURL& url ); + const TQString fetchURL( const KURL& url ); private: // Uhm why were these static again ??? diff --git a/kompare/komparepart/kompare_qsplitter.h b/kompare/komparepart/kompare_qsplitter.h index 1f1be49d..ca7f4bd1 100644 --- a/kompare/komparepart/kompare_qsplitter.h +++ b/kompare/komparepart/kompare_qsplitter.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** -** Definition of QSplitter class +** Definition of TQSplitter class ** ** Created : 980105 ** @@ -25,8 +25,8 @@ #define QSPLITTER_H #ifndef QT_H -#include "qframe.h" -#include "qvaluelist.h" +#include "tqframe.h" +#include "tqvaluelist.h" #endif // QT_H #ifndef QT_NO_SPLITTER @@ -43,14 +43,14 @@ public: : opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ), handleWidth( 0 ) { } - QPtrList<QSplitterLayoutStruct> list; + TQPtrList<QSplitterLayoutStruct> list; bool opaque : 8; bool firstShow : 8; bool childrenCollapsible : 8; int handleWidth; }; -class Q_EXPORT QSplitter : public QFrame +class Q_EXPORT TQSplitter : public QFrame { Q_OBJECT Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) @@ -62,9 +62,9 @@ public: // ### Qt 4.0: remove Auto from public API enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto }; - QSplitter( QWidget* parent = 0, const char* name = 0 ); - QSplitter( Orientation, QWidget* parent = 0, const char* name = 0 ); - ~QSplitter(); + TQSplitter( TQWidget* parent = 0, const char* name = 0 ); + TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 ); + ~TQSplitter(); virtual void setOrientation( Orientation ); Orientation orientation() const { return orient; } @@ -74,36 +74,36 @@ public: void setChildrenCollapsible( bool ); bool childrenCollapsible() const; - void setCollapsible( QWidget *w, bool ); - virtual void setResizeMode( QWidget *w, ResizeMode ); + void setCollapsible( TQWidget *w, bool ); + virtual void setResizeMode( TQWidget *w, ResizeMode ); virtual void setOpaqueResize( bool = TRUE ); bool opaqueResize() const; - void moveToFirst( QWidget * ); - void moveToLast( QWidget * ); + void moveToFirst( TQWidget * ); + void moveToLast( TQWidget * ); void refresh() { recalc( TRUE ); } - QSize sizeHint() const; - QSize minimumSizeHint() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; - QValueList<int> sizes() const; - void setSizes( QValueList<int> ); + TQValueList<int> sizes() const; + void setSizes( TQValueList<int> ); int handleWidth() const; void setHandleWidth( int ); protected: - void childEvent( QChildEvent * ); + void childEvent( TQChildEvent * ); - bool event( QEvent * ); - void resizeEvent( QResizeEvent * ); + bool event( TQEvent * ); + void resizeEvent( TQResizeEvent * ); - int idAfter( QWidget* ) const; + int idAfter( TQWidget* ) const; void moveSplitter( QCOORD pos, int id ); - virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y, + virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y, QCOORD w, QCOORD h ); - void styleChange( QStyle& ); + void styleChange( TQStyle& ); int adjustPos( int, int ); virtual void setRubberband( int ); void getRange( int id, int *, int * ); @@ -120,23 +120,23 @@ public: // private (: int adjustPos( int, int, int *, int *, int *, int * ); bool collapsible( QSplitterLayoutStruct * ); void processChildEvents(); - QSplitterLayoutStruct *findWidget( QWidget * ); - QSplitterLayoutStruct *addWidget( QWidget *, bool prepend = FALSE ); + QSplitterLayoutStruct *findWidget( TQWidget * ); + QSplitterLayoutStruct *addWidget( TQWidget *, bool prepend = FALSE ); void recalcId(); void doMove( bool backwards, int pos, int id, int delta, bool upLeft, bool mayCollapse ); - void setGeo( QWidget *w, int pos, int size, bool splitterMoved ); + void setGeo( TQWidget *w, int pos, int size, bool splitterMoved ); int findWidgetJustBeforeOrJustAfter( int id, int delta, int &collapsibleSize ); void updateHandles(); - inline QCOORD pick( const QPoint &p ) const + inline QCOORD pick( const TQPoint &p ) const { return orient == Horizontal ? p.x() : p.y(); } - inline QCOORD pick( const QSize &s ) const + inline QCOORD pick( const TQSize &s ) const { return orient == Horizontal ? s.width() : s.height(); } - inline QCOORD trans( const QPoint &p ) const + inline QCOORD trans( const TQPoint &p ) const { return orient == Vertical ? p.x() : p.y(); } - inline QCOORD trans( const QSize &s ) const + inline QCOORD trans( const TQSize &s ) const { return orient == Vertical ? s.width() : s.height(); } QSplitterPrivate *d; @@ -146,20 +146,20 @@ public: // private (: #ifndef QT_NO_TEXTSTREAM // moc doesn't like these. -// friend Q_EXPORT QTextStream& operator<<( QTextStream&, const QSplitter& ); -// friend Q_EXPORT QTextStream& operator>>( QTextStream&, QSplitter& ); +// friend Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& ); +// friend Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& ); #endif public: #if defined(Q_DISABLE_COPY) - QSplitter( const QSplitter & ); - QSplitter& operator=( const QSplitter & ); + TQSplitter( const TQSplitter & ); + TQSplitter& operator=( const TQSplitter & ); #endif }; #ifndef QT_NO_TEXTSTREAM -Q_EXPORT QTextStream& operator<<( QTextStream&, const QSplitter& ); -Q_EXPORT QTextStream& operator>>( QTextStream&, QSplitter& ); +Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& ); +Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& ); #endif class QSplitterHandle : public QWidget @@ -167,29 +167,29 @@ class QSplitterHandle : public QWidget Q_OBJECT public: QSplitterHandle( Orientation o, - QSplitter *parent, const char* name=0 ); + TQSplitter *parent, const char* name=0 ); void setOrientation( Orientation o ); Orientation orientation() const { return orient; } bool opaque() const { return s->opaqueResize(); } - QSize sizeHint() const; + TQSize sizeHint() const; int id() const { return myId; } // d->list.at(id())->wid == this void setId( int i ) { myId = i; } protected: - void paintEvent( QPaintEvent * ); - void mouseMoveEvent( QMouseEvent * ); - void mousePressEvent( QMouseEvent * ); - void mouseReleaseEvent( QMouseEvent * ); + void paintEvent( TQPaintEvent * ); + void mouseMoveEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); public: // private (: Orientation orient; bool opaq; int myId; - QSplitter *s; + TQSplitter *s; }; const uint Default = 2; @@ -201,7 +201,7 @@ public: uint isHandle : 1; uint collapsible : 2; uint resizeMode : 2; - QWidget *wid; + TQWidget *wid; QSplitterLayoutStruct() : sizer( -1 ), collapsible( Default ) { } diff --git a/kompare/komparepart/kompareconnectwidget.cpp b/kompare/komparepart/kompareconnectwidget.cpp index eed8e99c..57185e5a 100644 --- a/kompare/komparepart/kompareconnectwidget.cpp +++ b/kompare/komparepart/kompareconnectwidget.cpp @@ -19,11 +19,11 @@ * * ***************************************************************************/ -#include <qapplication.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstyle.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstyle.h> +#include <tqtimer.h> #include <kdebug.h> @@ -41,19 +41,19 @@ KompareConnectWidgetFrame::KompareConnectWidgetFrame( KompareListView* left, ViewSettings* settings, KompareSplitter* parent, const char* name ) : - QSplitterHandle(Horizontal, (QSplitter *)parent, name), + QSplitterHandle(Horizontal, (TQSplitter *)parent, name), m_wid ( left, right, settings, this, name ), m_label ( "", this ), m_layout ( this ) { - setSizePolicy ( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored) ); - m_wid.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored) ); - m_label.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) ); + setSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) ); + m_wid.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) ); + m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); m_label.setMargin(3); - QFrame* bottomLine = new QFrame(this); - bottomLine->setFrameShape(QFrame::HLine); - bottomLine->setFrameShadow ( QFrame::Plain ); - bottomLine->setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) ); + TQFrame* bottomLine = new TQFrame(this); + bottomLine->setFrameShape(TQFrame::HLine); + bottomLine->setFrameShadow ( TQFrame::Plain ); + bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) ); bottomLine->setFixedHeight(1); m_layout.setSpacing(0); m_layout.setMargin(0); @@ -66,14 +66,14 @@ KompareConnectWidgetFrame::~KompareConnectWidgetFrame() { } -QSize KompareConnectWidgetFrame::sizeHint() const +TQSize KompareConnectWidgetFrame::sizeHint() const { - return QSize(50, style().pixelMetric( QStyle::PM_ScrollBarExtent ) ); + return TQSize(50, style().pixelMetric( TQStyle::PM_ScrollBarExtent ) ); } static int kMouseOffset; -void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e ) +void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e ) { if ( !(e->state()&LeftButton) ) return; @@ -84,14 +84,14 @@ void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e ) ((KompareSplitter*)s)->moveSplitter( pos, id() ); } -void KompareConnectWidgetFrame::mousePressEvent( QMouseEvent *e ) +void KompareConnectWidgetFrame::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) kMouseOffset = s->pick( e->pos() ); QSplitterHandle::mousePressEvent(e); } -void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e ) +void KompareConnectWidgetFrame::mouseReleaseEvent( TQMouseEvent *e ) { if ( !opaque() && e->button() == LeftButton ) { QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) ) @@ -101,17 +101,17 @@ void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e ) } KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListView* right, - ViewSettings* settings, QWidget* parent, const char* name ) - : QWidget(parent, name), + ViewSettings* settings, TQWidget* parent, const char* name ) + : TQWidget(parent, name), m_settings( settings ), m_leftView( left ), m_rightView( right ), m_selectedModel( 0 ), m_selectedDifference( 0 ) { -// connect( m_settings, SIGNAL( settingsChanged() ), this, SLOT( slotDelayedRepaint() ) ); +// connect( m_settings, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotDelayedRepaint() ) ); setBackgroundMode( NoBackground ); - setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) ); setFocusProxy( parent->parentWidget() ); } @@ -139,7 +139,7 @@ void KompareConnectWidget::slotSetSelection( const DiffModel* model, const Diffe void KompareConnectWidget::slotDelayedRepaint() { - QTimer::singleShot( 0, this, SLOT( repaint() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( repaint() ) ); } void KompareConnectWidget::slotSetSelection( const Difference* diff ) @@ -152,13 +152,13 @@ void KompareConnectWidget::slotSetSelection( const Difference* diff ) slotDelayedRepaint(); } -void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ ) +void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ ) { // kdDebug(8106) << "KompareConnectWidget::paintEvent()" << endl; - QPixmap pixbuf(size()); - QPainter paint(&pixbuf, this); - QPainter* p = &paint; + TQPixmap pixbuf(size()); + TQPainter paint(&pixbuf, this); + TQPainter* p = &paint; p->fillRect( 0, 0, pixbuf.width(), pixbuf.height(), white.dark(110) ); @@ -181,14 +181,14 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ ) DifferenceListConstIterator diffIt = differences->at( first ); DifferenceListConstIterator dEnd = differences->at( last + 1 ); - QRect leftRect, rightRect; + TQRect leftRect, rightRect; for ( int i = first; i <= last; ++diffIt, ++i ) { Difference* diff = *diffIt; bool selected = ( diff == m_selectedDifference ); - if ( QApplication::reverseLayout() ) + if ( TQApplication::reverseLayout() ) { leftRect = m_rightView->itemRect( i ); rightRect = m_leftView->itemRect( i ); @@ -211,10 +211,10 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ ) br = br <= 32767 ? br : 32767; // kdDebug(8106) << "drawing: " << tl << " " << tr << " " << bl << " " << br << endl; - QPointArray topBezier = makeTopBezier( tl, tr ); - QPointArray bottomBezier = makeBottomBezier( bl, br ); + TQPointArray topBezier = makeTopBezier( tl, tr ); + TQPointArray bottomBezier = makeBottomBezier( bl, br ); - QColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110); + TQColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110); p->setPen( color ); p->setBrush( color ); p->drawPolygon ( makeConnectPoly( topBezier, bottomBezier ) ); @@ -233,12 +233,12 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ ) bitBlt(this, 0, 0, &pixbuf); } -QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr ) +TQPointArray KompareConnectWidget::makeTopBezier( int tl, int tr ) { int l = 0; int r = width(); int o = (int)((double)r*0.4); // 40% of width - QPointArray controlPoints; + TQPointArray controlPoints; if ( tl != tr ) { @@ -252,12 +252,12 @@ QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr ) } } -QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br ) +TQPointArray KompareConnectWidget::makeBottomBezier( int bl, int br ) { int l = 0; int r = width(); int o = (int)((double)r*0.4); // 40% of width - QPointArray controlPoints; + TQPointArray controlPoints; if ( bl != br ) { @@ -271,9 +271,9 @@ QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br ) } } -QPointArray KompareConnectWidget::makeConnectPoly( const QPointArray& topBezier, const QPointArray& bottomBezier ) +TQPointArray KompareConnectWidget::makeConnectPoly( const TQPointArray& topBezier, const TQPointArray& bottomBezier ) { - QPointArray poly( topBezier.size() + bottomBezier.size() ); + TQPointArray poly( topBezier.size() + bottomBezier.size() ); for( uint i = 0; i < topBezier.size(); i++ ) poly.setPoint( i, topBezier.point( i ) ); for( uint i = 0; i < bottomBezier.size(); i++ ) diff --git a/kompare/komparepart/kompareconnectwidget.h b/kompare/komparepart/kompareconnectwidget.h index 96160c97..5287552f 100644 --- a/kompare/komparepart/kompareconnectwidget.h +++ b/kompare/komparepart/kompareconnectwidget.h @@ -23,7 +23,7 @@ #define KOMPARECONNECTWIDGET_H #include "kompare_qsplitter.h" -#include <qwidget.h> +#include <tqwidget.h> namespace Diff2 { class DiffModel; @@ -38,7 +38,7 @@ class KompareConnectWidget : public QWidget public: KompareConnectWidget( KompareListView* left, KompareListView* right, - ViewSettings* settings, QWidget* parent, const char* name = 0 ); + ViewSettings* settings, TQWidget* parent, const char* name = 0 ); ~KompareConnectWidget(); public slots: @@ -51,10 +51,10 @@ signals: void selectionChanged(const Diff2::Difference* diff); protected: - void paintEvent( QPaintEvent* e ); - QPointArray makeTopBezier( int tl, int tr ); - QPointArray makeBottomBezier( int bl, int br ); - QPointArray makeConnectPoly( const QPointArray& topBezier, const QPointArray& bottomBezier ); + void paintEvent( TQPaintEvent* e ); + TQPointArray makeTopBezier( int tl, int tr ); + TQPointArray makeBottomBezier( int bl, int br ); + TQPointArray makeConnectPoly( const TQPointArray& topBezier, const TQPointArray& bottomBezier ); private: ViewSettings* m_settings; @@ -74,22 +74,22 @@ public: ViewSettings* settings, KompareSplitter* parent, const char* name = 0 ); ~KompareConnectWidgetFrame(); - QSize sizeHint() const; + TQSize sizeHint() const; KompareConnectWidget* wid() { return &m_wid; } protected: // stop the parent QSplitterHandle painting - void paintEvent( QPaintEvent* /* e */ ) { } + void paintEvent( TQPaintEvent* /* e */ ) { } - void mouseMoveEvent( QMouseEvent * ); - void mousePressEvent( QMouseEvent * ); - void mouseReleaseEvent( QMouseEvent * ); + void mouseMoveEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); private: KompareConnectWidget m_wid; - QLabel m_label; - QVBoxLayout m_layout; + TQLabel m_label; + TQVBoxLayout m_layout; }; #endif diff --git a/kompare/komparepart/komparelistview.cpp b/kompare/komparepart/komparelistview.cpp index b86bdef9..7e3ee953 100644 --- a/kompare/komparepart/komparelistview.cpp +++ b/kompare/komparepart/komparelistview.cpp @@ -19,10 +19,10 @@ ** ***************************************************************************/ -#include <qheader.h> -#include <qpainter.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqheader.h> +#include <tqpainter.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kdebug.h> #include <kglobal.h> @@ -49,17 +49,17 @@ KompareListViewFrame::KompareListViewFrame( bool isSource, ViewSettings* settings, KompareSplitter* parent, const char* name ): - QFrame ( parent, name ), + TQFrame ( parent, name ), m_view ( isSource, settings, this, name ), m_label ( isSource?"Source":"Dest", this ), m_layout ( this ) { - setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored) ); - m_label.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) ); - QFrame *bottomLine = new QFrame(this); - bottomLine->setFrameShape(QFrame::HLine); - bottomLine->setFrameShadow ( QFrame::Plain ); - bottomLine->setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) ); + setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) ); + m_label.setSizePolicy ( 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->setFixedHeight(1); m_label.setMargin(3); m_layout.setSpacing(0); @@ -68,12 +68,12 @@ KompareListViewFrame::KompareListViewFrame( bool isSource, m_layout.addWidget(bottomLine); m_layout.addWidget(&m_view); - connect( &m_view, SIGNAL(differenceClicked(const Diff2::Difference*)), - parent, SLOT(slotDifferenceClicked(const Diff2::Difference*)) ); + connect( &m_view, TQT_SIGNAL(differenceClicked(const Diff2::Difference*)), + parent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) ); - connect( parent, SIGNAL(scrollViewsToId(int)), &m_view, SLOT(scrollToId(int)) ); - connect( parent, SIGNAL(setXOffset(int)), &m_view, SLOT(setXOffset(int)) ); - connect( &m_view, SIGNAL(resized()), parent, SLOT(slotUpdateScrollBars()) ); + 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()) ); } void KompareListViewFrame::slotSetModel( const DiffModel* model ) @@ -92,13 +92,13 @@ void KompareListViewFrame::slotSetModel( const DiffModel* model ) m_label.setText( model->destinationFile() ); } } else { - m_label.setText( QString::null ); + m_label.setText( TQString::null ); } } KompareListView::KompareListView( bool isSource, ViewSettings* settings, - QWidget* parent, const char* name ) : + TQWidget* parent, const char* name ) : KListView( parent, name ), m_isSource( isSource ), m_settings( settings ), @@ -119,10 +119,10 @@ KompareListView::KompareListView( bool isSource, setColumnWidthMode( COL_LINE_NO, Maximum ); setColumnWidthMode( COL_MAIN, Maximum ); setResizeMode( LastColumn ); - setFrameStyle( QFrame::NoFrame ); - setVScrollBarMode( QScrollView::AlwaysOff ); - setHScrollBarMode( QScrollView::AlwaysOff ); - setFocusPolicy( QWidget::NoFocus ); + setFrameStyle( TQFrame::NoFrame ); + setVScrollBarMode( TQScrollView::AlwaysOff ); + setHScrollBarMode( TQScrollView::AlwaysOff ); + setFocusPolicy( TQWidget::NoFocus ); setFont( m_settings->m_font ); setSpaces( m_settings->m_tabToNumberOfSpaces ); setFocusProxy( parent->parentWidget() ); @@ -139,7 +139,7 @@ KompareListViewItem* KompareListView::itemAtIndex( int i ) int KompareListView::firstVisibleDifference() { - QListViewItem* item = itemAt( QPoint( 0, 0 ) ); + TQListViewItem* item = itemAt( TQPoint( 0, 0 ) ); if( item == 0 ) { @@ -161,7 +161,7 @@ int KompareListView::firstVisibleDifference() int KompareListView::lastVisibleDifference() { - QListViewItem* item = itemAt( QPoint( 0, visibleHeight() - 1 ) ); + TQListViewItem* item = itemAt( TQPoint( 0, visibleHeight() - 1 ) ); if( item == 0 ) { @@ -182,14 +182,14 @@ int KompareListView::lastVisibleDifference() return -1; } -QRect KompareListView::itemRect( int i ) +TQRect KompareListView::itemRect( int i ) { - QListViewItem* item = itemAtIndex( i ); + TQListViewItem* item = itemAtIndex( i ); int x = 0; int y = itemPos( item ); int vx, vy; contentsToViewport( x, y, vx, vy ); - return QRect( vx, vy, 0, item->totalHeight() ); + return TQRect( vx, vy, 0, item->totalHeight() ); } int KompareListView::minScrollId() @@ -238,7 +238,7 @@ void KompareListView::scrollToId( int id ) int y = pos + (int)( r * (double)height ) - minScrollId(); // kdDebug(8104) << "scrollToID: " << endl; // kdDebug(8104) << " id = " << id << endl; -// kdDebug(8104) << " id after = " << ( item->nextSibling() ? QString::number( ((KompareListViewItem*)item->nextSibling())->scrollId() ) : "no such sibling..." ) << endl; +// kdDebug(8104) << " id after = " << ( item->nextSibling() ? TQString::number( ((KompareListViewItem*)item->nextSibling())->scrollId() ) : "no such sibling..." ) << endl; // kdDebug(8104) << " pos = " << pos << endl; // kdDebug(8104) << " itemId = " << itemId << endl; // kdDebug(8104) << " r = " << r << endl; @@ -354,9 +354,9 @@ void KompareListView::slotSetSelection( const DiffModel* model, const Difference slotSetSelection( diff ); } -void KompareListView::contentsMousePressEvent( QMouseEvent* e ) +void KompareListView::contentsMousePressEvent( TQMouseEvent* e ) { - QPoint vp = contentsToViewport( e->pos() ); + TQPoint vp = contentsToViewport( e->pos() ); KompareListViewLineItem* lineItem = dynamic_cast<KompareListViewLineItem*>( itemAt( vp ) ); if( !lineItem ) return; @@ -366,9 +366,9 @@ void KompareListView::contentsMousePressEvent( QMouseEvent* e ) } } -void KompareListView::contentsMouseDoubleClickEvent( QMouseEvent* e ) +void KompareListView::contentsMouseDoubleClickEvent( TQMouseEvent* e ) { - QPoint vp = contentsToViewport( e->pos() ); + TQPoint vp = contentsToViewport( e->pos() ); KompareListViewLineItem* lineItem = dynamic_cast<KompareListViewLineItem*>( itemAt( vp ) ); if ( !lineItem ) return; @@ -387,7 +387,7 @@ void KompareListView::slotApplyDifference( bool apply ) void KompareListView::slotApplyAllDifferences( bool apply ) { - QPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict ); + TQPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict ); for( ; it.current(); ++it ) it.current()->applyDifference( apply ); repaint(); @@ -408,12 +408,12 @@ void KompareListView::setSpaces( int spaces ) triggerUpdate(); } -void KompareListView::wheelEvent( QWheelEvent* e ) +void KompareListView::wheelEvent( TQWheelEvent* e ) { e->ignore(); // we want the parent to catch wheel events } -void KompareListView::resizeEvent( QResizeEvent* e ) +void KompareListView::resizeEvent( TQResizeEvent* e ) { KListView::resizeEvent(e); emit resized(); @@ -421,27 +421,27 @@ void KompareListView::resizeEvent( QResizeEvent* e ) } KompareListViewItem::KompareListViewItem( KompareListView* parent ) - : QListViewItem( parent ), + : TQListViewItem( parent ), m_scrollId( 0 ) { // kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl; } KompareListViewItem::KompareListViewItem( KompareListView* parent, KompareListViewItem* after ) - : QListViewItem( parent, after ), + : TQListViewItem( parent, after ), m_scrollId( after->scrollId() + after->maxHeight() ) { // kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl; } KompareListViewItem::KompareListViewItem( KompareListViewItem* parent ) - : QListViewItem( parent ), + : TQListViewItem( parent ), m_scrollId( 0 ) { } KompareListViewItem::KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* /*after*/ ) - : QListViewItem( parent ), + : TQListViewItem( parent ), m_scrollId( 0 ) { } @@ -451,7 +451,7 @@ KompareListView* KompareListViewItem::kompareListView() const return (KompareListView*)listView(); } -void KompareListViewItem::paintFocus( QPainter* /* p */, const QColorGroup& /* cg */, const QRect& /* r */ ) +void KompareListViewItem::paintFocus( TQPainter* /* p */, const TQColorGroup& /* cg */, const TQRect& /* r */ ) { // Don't paint anything } @@ -516,7 +516,7 @@ void KompareListViewDiffItem::setSelected( bool b ) { kdDebug(8104) << "KompareListViewDiffItem::setSelected( " << b << " )" << endl; KompareListViewItem::setSelected( b ); - QListViewItem* item = m_sourceItem->isVisible() ? + TQListViewItem* item = m_sourceItem->isVisible() ? m_sourceItem->firstChild() : m_destItem->firstChild(); while( item && item->isVisible() ) { @@ -578,7 +578,7 @@ DifferenceString* KompareListViewLineContainerItem::lineAt( int i ) const KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, DifferenceString* text ) : KompareListViewItem( parent ) { - setText( COL_LINE_NO, QString::number( line ) ); + setText( COL_LINE_NO, TQString::number( line ) ); setText( COL_MAIN, text->string() ); m_text = text; } @@ -589,9 +589,9 @@ void KompareListViewLineItem::setup() setHeight( listView()->fontMetrics().lineSpacing() ); } -void KompareListViewLineItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) +void KompareListViewLineItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { - QColor bg = cg.base(); + TQColor bg = cg.base(); p->fillRect( 0, 0, width, height(), bg ); if ( diffItemParent()->difference()->type() == Difference::Unchanged ) { @@ -625,17 +625,17 @@ void KompareListViewLineItem::paintCell( QPainter * p, const QColorGroup & cg, i } } -void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int align ) +void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int column, int width, int align ) { if ( column == COL_MAIN ) { - QString textChunk; + TQString textChunk; int offset = listView()->itemMargin(); unsigned int prevValue = 0; int chunkWidth; - QBrush changeBrush( bg, Dense3Pattern ); - QBrush normalBrush( bg, SolidPattern ); - QBrush brush; + TQBrush changeBrush( bg, Dense3Pattern ); + TQBrush normalBrush( bg, SolidPattern ); + TQBrush brush; if ( m_text->string().isEmpty() ) { @@ -658,11 +658,11 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu // kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl; // kdDebug(8104) << "c->offset() = " << c->offset() << endl; // kdDebug(8104) << "prevValue = " << prevValue << endl; - textChunk.replace( QChar('\t'), kompareListView()->spaces() ); + textChunk.replace( TQChar('\t'), kompareListView()->spaces() ); prevValue = m->offset(); if ( m->type() == Marker::End ) { - QFont font( p->font() ); + TQFont font( p->font() ); font.setBold( true ); p->setFont( font ); // p->setPen( Qt::blue ); @@ -670,7 +670,7 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu } else { - QFont font( p->font() ); + TQFont font( p->font() ); font.setBold( false ); p->setFont( font ); // p->setPen( Qt::black ); @@ -688,9 +688,9 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu { // 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( QChar('\t'), kompareListView()->spaces() ); + textChunk.replace( TQChar('\t'), kompareListView()->spaces() ); // kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl; - QFont font( p->font() ); + TQFont font( p->font() ); font.setBold( false ); p->setFont( font ); chunkWidth = p->fontMetrics().width( textChunk ); @@ -728,11 +728,11 @@ void KompareListViewBlankLineItem::setup() setHeight( BLANK_LINE_HEIGHT ); } -void KompareListViewBlankLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int ) +void KompareListViewBlankLineItem::paintText( TQPainter* p, const TQColor& bg, int column, int width, int ) { if ( column == COL_MAIN ) { - QBrush normalBrush( bg, SolidPattern ); + TQBrush normalBrush( bg, SolidPattern ); p->fillRect( 0, 0, width, height(), normalBrush ); } } @@ -771,7 +771,7 @@ void KompareListViewHunkItem::setup() setHeight( maxHeight() ); } -void KompareListViewHunkItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) +void KompareListViewHunkItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { p->fillRect( 0, 0, width, height(), cg.mid() ); if( column == COL_MAIN ) { diff --git a/kompare/komparepart/komparelistview.h b/kompare/komparepart/komparelistview.h index 26a6dacb..d617fafd 100644 --- a/kompare/komparepart/komparelistview.h +++ b/kompare/komparepart/komparelistview.h @@ -22,10 +22,10 @@ #ifndef KOMPARELISTVIEW_H #define KOMPARELISTVIEW_H -#include <qptrlist.h> -#include <qptrdict.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqptrlist.h> +#include <tqptrdict.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klistview.h> @@ -48,13 +48,13 @@ class KompareListView : public KListView Q_OBJECT public: - KompareListView( bool isSource, ViewSettings* settings, QWidget* parent, const char* name = 0 ); + KompareListView( bool isSource, ViewSettings* settings, TQWidget* parent, const char* name = 0 ); virtual ~KompareListView(); KompareListViewItem* itemAtIndex( int i ); int firstVisibleDifference(); int lastVisibleDifference(); - QRect itemRect( int i ); + TQRect itemRect( int i ); int minScrollId(); int maxScrollId(); int contentsWidth(); @@ -64,7 +64,7 @@ public: void setSelectedDifference( const Diff2::Difference* diff, bool scroll ); - const QString& spaces() const { return m_spaces; }; + const TQString& spaces() const { return m_spaces; }; void setSpaces( int spaces ); public slots: @@ -83,23 +83,23 @@ signals: void resized(); protected: - void wheelEvent( QWheelEvent* e ); - void resizeEvent( QResizeEvent* e ); - void contentsMousePressEvent ( QMouseEvent * e ); - void contentsMouseDoubleClickEvent ( QMouseEvent* ); - void contentsMouseReleaseEvent ( QMouseEvent * ) {}; - void contentsMouseMoveEvent ( QMouseEvent * ) {}; + void wheelEvent( TQWheelEvent* e ); + void resizeEvent( TQResizeEvent* e ); + void contentsMousePressEvent ( TQMouseEvent * e ); + void contentsMouseDoubleClickEvent ( TQMouseEvent* ); + void contentsMouseReleaseEvent ( TQMouseEvent * ) {}; + void contentsMouseMoveEvent ( TQMouseEvent * ) {}; private: - QValueList<KompareListViewDiffItem*> m_items; - QPtrDict<KompareListViewDiffItem> m_itemDict; + TQValueList<KompareListViewDiffItem*> m_items; + TQPtrDict<KompareListViewDiffItem> m_itemDict; bool m_isSource; ViewSettings* m_settings; int m_scrollId; int m_maxMainWidth; const Diff2::DiffModel* m_selectedModel; const Diff2::Difference* m_selectedDifference; - QString m_spaces; + TQString m_spaces; }; class KompareListViewFrame : public QFrame @@ -116,8 +116,8 @@ public slots: private: KompareListView m_view; - QLabel m_label; - QVBoxLayout m_layout; + TQLabel m_label; + TQVBoxLayout m_layout; }; class KompareListViewItem : public QListViewItem @@ -128,7 +128,7 @@ public: KompareListViewItem( KompareListViewItem* parent ); KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* after ); - void paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r ); + void paintFocus( TQPainter* p, const TQColorGroup& cg, const TQRect& r ); int scrollId() { return m_scrollId; }; virtual int maxHeight() = 0; @@ -187,8 +187,8 @@ public: virtual void setup(); int maxHeight() { return 0; } - virtual void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ); - virtual void paintText( QPainter* p, const QColor& bg, int column, int width, int align ); + virtual void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); + virtual void paintText( TQPainter* p, const TQColor& bg, int column, int width, int align ); KompareListViewDiffItem* diffItemParent() const; @@ -203,7 +203,7 @@ public: void setup(); - void paintText( QPainter* p, const QColor& bg, int column, int width, int align ); + void paintText( TQPainter* p, const TQColor& bg, int column, int width, int align ); }; class KompareListViewHunkItem : public KompareListViewItem @@ -213,7 +213,7 @@ public: KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, Diff2::DiffHunk* hunk, bool zeroHeight= false ); void setup(); - void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ); + void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); int maxHeight(); diff --git a/kompare/komparepart/kompareprefdlg.cpp b/kompare/komparepart/kompareprefdlg.cpp index 2d731af3..f920d03d 100644 --- a/kompare/komparepart/kompareprefdlg.cpp +++ b/kompare/komparepart/kompareprefdlg.cpp @@ -17,7 +17,7 @@ ** ***************************************************************************/ -#include <qvbox.h> +#include <tqvbox.h> #include <kdebug.h> #include <kiconloader.h> @@ -35,7 +35,7 @@ KomparePrefDlg::KomparePrefDlg( ViewSettings* viewSets, DiffSettings* diffSets ) // ok i need some stuff in that pref dlg... setIconListAllVisible(true); - QVBox* frame; + TQVBox* frame; frame = addVBoxPage( i18n( "View" ), i18n( "View Settings" ), UserIcon( "diff_view" ) ); m_viewPage = new ViewPage( frame ); m_viewPage->setSettings( viewSets ); diff --git a/kompare/komparepart/komparesaveoptionswidget.cpp b/kompare/komparepart/komparesaveoptionswidget.cpp index 866ecc0d..723093ac 100644 --- a/kompare/komparepart/komparesaveoptionswidget.cpp +++ b/kompare/komparepart/komparesaveoptionswidget.cpp @@ -17,11 +17,11 @@ ** ***************************************************************************/ -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qspinbox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> #include <kdebug.h> #include <kfiledialog.h> @@ -30,8 +30,8 @@ #include "diffsettings.h" #include "komparesaveoptionswidget.h" -KompareSaveOptionsWidget::KompareSaveOptionsWidget( QString source, QString destination, - DiffSettings * settings, QWidget * parent ) +KompareSaveOptionsWidget::KompareSaveOptionsWidget( TQString source, TQString destination, + DiffSettings * settings, TQWidget * parent ) : KompareSaveOptionsBase( parent, "save options" ) , m_source( source ) , m_destination( destination ) @@ -58,23 +58,23 @@ KompareSaveOptionsWidget::KompareSaveOptionsWidget( QString source, QString dest m_directoryRequester->setURL( root.url() ); } - connect( m_SmallerChangesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_LargeFilesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_IgnoreCaseCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_ExpandTabsCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_IgnoreEmptyLinesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_IgnoreWhiteSpaceCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_FunctionNamesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_RecursiveCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_NewFilesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_ContextRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_EdRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_NormalRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_RCSRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_UnifiedRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_SideBySideRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) ); - connect( m_ContextLinesSB, SIGNAL(valueChanged(int)), SLOT(updateCommandLine()) ); - connect( m_directoryRequester, SIGNAL(textChanged(const QString&)), SLOT(updateCommandLine()) ); + connect( m_SmallerChangesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_LargeFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_IgnoreCaseCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_ExpandTabsCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_IgnoreEmptyLinesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_IgnoreWhiteSpaceCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_FunctionNamesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_RecursiveCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_NewFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_ContextRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_EdRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_NormalRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_RCSRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_UnifiedRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_SideBySideRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); + connect( m_ContextLinesSB, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateCommandLine()) ); + connect( m_directoryRequester, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateCommandLine()) ); loadOptions(); } @@ -84,23 +84,23 @@ KompareSaveOptionsWidget::~KompareSaveOptionsWidget() } -QString KompareSaveOptionsWidget::directory() const +TQString KompareSaveOptionsWidget::directory() const { return KURL( m_directoryRequester->url() ).path(); } void KompareSaveOptionsWidget::updateCommandLine() { - QString cmdLine = "diff"; + TQString cmdLine = "diff"; - QString options = ""; + TQString options = ""; switch( static_cast<Kompare::Format>( m_FormatBG->id( m_FormatBG->selected() ) ) ) { case Kompare::Unified : - cmdLine += " -U " + QString::number( m_ContextLinesSB->value() ); + cmdLine += " -U " + TQString::number( m_ContextLinesSB->value() ); break; case Kompare::Context : - cmdLine += " -C " + QString::number( m_ContextLinesSB->value() ); + cmdLine += " -C " + TQString::number( m_ContextLinesSB->value() ); break; case Kompare::RCS : options += "n"; diff --git a/kompare/komparepart/komparesaveoptionswidget.h b/kompare/komparepart/komparesaveoptionswidget.h index 6361ca77..905dcaa4 100644 --- a/kompare/komparepart/komparesaveoptionswidget.h +++ b/kompare/komparepart/komparesaveoptionswidget.h @@ -31,11 +31,11 @@ class KompareSaveOptionsWidget : public KompareSaveOptionsBase, public KompareFu { Q_OBJECT public: - KompareSaveOptionsWidget( QString source, QString destination, DiffSettings* settings, QWidget* parent ); + KompareSaveOptionsWidget( TQString source, TQString destination, DiffSettings* settings, TQWidget* parent ); ~KompareSaveOptionsWidget(); void saveOptions(); - QString directory() const; + TQString directory() const; protected slots: void updateCommandLine(); @@ -44,8 +44,8 @@ private: void loadOptions(); DiffSettings* m_settings; - QString m_source; - QString m_destination; + TQString m_source; + TQString m_destination; }; #endif diff --git a/kompare/komparepart/komparesplitter.cpp b/kompare/komparepart/komparesplitter.cpp index fcf014cb..59106ffb 100644 --- a/kompare/komparepart/komparesplitter.cpp +++ b/kompare/komparepart/komparesplitter.cpp @@ -17,9 +17,9 @@ #include "komparesplitter.h" -#include <qstyle.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqstyle.h> +#include <tqstring.h> +#include <tqtimer.h> #include <kdebug.h> #include <kapplication.h> @@ -34,21 +34,21 @@ using namespace Diff2; -KompareSplitter::KompareSplitter( ViewSettings *settings, QWidget * parent, +KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * parent, const char *name) : - QSplitter( Horizontal, parent, name ), + TQSplitter( Horizontal, parent, name ), m_settings( settings ) { - QFrame *scrollFrame = new QFrame( parent, "scrollFrame" ); - reparent( scrollFrame, *(new QPoint()), false ); + TQFrame *scrollFrame = new TQFrame( parent, "scrollFrame" ); + reparent( scrollFrame, *(new TQPoint()), false ); // Set up the scrollFrame - scrollFrame->setFrameStyle( QFrame::NoFrame | QFrame::Plain ); - scrollFrame->setLineWidth(scrollFrame->style().pixelMetric(QStyle::PM_DefaultFrameWidth)); - QGridLayout *pairlayout = new QGridLayout(scrollFrame, 2, 2, 0); - m_vScroll = new QScrollBar( QScrollBar::Vertical, 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 QScrollBar( QScrollBar::Horizontal, scrollFrame ); + m_hScroll = new TQScrollBar( TQScrollBar::Horizontal, scrollFrame ); pairlayout->addWidget( m_hScroll, 1, 0 ); new KompareListViewFrame(true, m_settings, this, "source"); @@ -56,33 +56,33 @@ KompareSplitter::KompareSplitter( ViewSettings *settings, QWidget * parent, pairlayout->addWidget( this, 0, 0 ); // set up our looks - setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); - setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth ) ); + setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) ); setHandleWidth(50); setChildrenCollapsible( false ); - setFrameStyle( QFrame::NoFrame ); - setSizePolicy( QSizePolicy (QSizePolicy::Ignored, QSizePolicy::Ignored )); + setFrameStyle( TQFrame::NoFrame ); + setSizePolicy( TQSizePolicy (TQSizePolicy::Ignored, TQSizePolicy::Ignored )); setOpaqueResize( true ); - setFocusPolicy( QWidget::WheelFocus ); + setFocusPolicy( TQWidget::WheelFocus ); - connect( this, SIGNAL(configChanged()), SLOT(slotConfigChanged()) ); - connect( this, SIGNAL(configChanged()), SLOT(slotDelayedRepaintHandles()) ); - connect( this, SIGNAL(configChanged()), SLOT(slotDelayedUpdateScrollBars()) ); + connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotConfigChanged()) ); + connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedRepaintHandles()) ); + connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedUpdateScrollBars()) ); // scrolling - connect( m_vScroll, SIGNAL(valueChanged(int)), SLOT(scrollToId(int)) ); - connect( m_vScroll, SIGNAL(sliderMoved(int)), SLOT(scrollToId(int)) ); - connect( m_hScroll, SIGNAL(valueChanged(int)), SIGNAL(setXOffset(int)) ); - connect( m_hScroll, SIGNAL(sliderMoved(int)), SIGNAL(setXOffset(int)) ); + connect( m_vScroll, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollToId(int)) ); + connect( m_vScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(scrollToId(int)) ); + connect( m_hScroll, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(setXOffset(int)) ); + connect( m_hScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SIGNAL(setXOffset(int)) ); - m_scrollTimer=new QTimer(); + m_scrollTimer=new TQTimer(); restartTimer = false; - connect (m_scrollTimer, SIGNAL(timeout()), SLOT(timerTimeout()) ); + connect (m_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(timerTimeout()) ); // we need to receive childEvents now so that d->list is ready for when // slotSetSelection(...) arrives - kapp->sendPostedEvents(this, QEvent::ChildInserted); + kapp->sendPostedEvents(this, TQEvent::ChildInserted); // init stuff slotUpdateScrollBars(); @@ -111,7 +111,7 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool if ( d->list.count() > 0 ) { s = new QSplitterLayoutStruct; s->resizeMode = KeepSize; - QString tmp = "qt_splithandle_"; + TQString tmp = "qt_splithandle_"; tmp += w->name(); KompareListView *lw = ((KompareListViewFrame*)(prepend?w:d->list.last()->wid))->view(); @@ -144,13 +144,13 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool been inserted or removed. */ -void KompareSplitter::childEvent( QChildEvent *c ) +void KompareSplitter::childEvent( TQChildEvent *c ) { - if ( c->type() == QEvent::ChildInserted ) { + if ( c->type() == TQEvent::ChildInserted ) { if ( !c->child()->isWidgetType() ) return; - if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) ) + if ( ((TQWidget*)c->child())->testWFlags( WType_TopLevel ) ) return; QSplitterLayoutStruct *s = d->list.first(); @@ -161,7 +161,7 @@ void KompareSplitter::childEvent( QChildEvent *c ) } addWidget( (KompareListViewFrame*)c->child() ); recalc( isVisible() ); - } else if ( c->type() == QEvent::ChildRemoved ) { + } else if ( c->type() == TQEvent::ChildRemoved ) { QSplitterLayoutStruct *prev = 0; if ( d->list.count() > 1 ) prev = d->list.at( 1 ); // yes, this is correct @@ -170,7 +170,7 @@ void KompareSplitter::childEvent( QChildEvent *c ) if ( curr->wid == c->child() ) { d->list.removeRef( curr ); if ( prev && prev->isHandle ) { - QWidget *w = prev->wid; + TQWidget *w = prev->wid; d->list.removeRef( prev ); delete w; // will call childEvent() } @@ -185,20 +185,20 @@ void KompareSplitter::childEvent( QChildEvent *c ) } // This is from a private qt header (kernel/qlayoutengine_p.h). sorry. -QSize qSmartMinSize( QWidget *w ); +TQSize qSmartMinSize( TQWidget *w ); -static QPoint toggle( QWidget *w, QPoint pos ) +static TQPoint toggle( TQWidget *w, TQPoint pos ) { - QSize minS = qSmartMinSize( w ); - return -pos - QPoint( minS.width(), minS.height() ); + TQSize minS = qSmartMinSize( w ); + return -pos - TQPoint( minS.width(), minS.height() ); } -static bool isCollapsed( QWidget *w ) +static bool isCollapsed( TQWidget *w ) { return w->x() < 0 || w->y() < 0; } -static QPoint topLeft( QWidget *w ) +static TQPoint topLeft( TQWidget *w ) { if ( isCollapsed(w) ) { return toggle( w, w->pos() ); @@ -207,10 +207,10 @@ static QPoint topLeft( QWidget *w ) } } -static QPoint bottomRight( QWidget *w ) +static TQPoint bottomRight( TQWidget *w ) { if ( isCollapsed(w) ) { - return toggle( w, w->pos() ) - QPoint( 1, 1 ); + return toggle( w, w->pos() ) - TQPoint( 1, 1 ); } else { return w->geometry().bottomRight(); } @@ -227,9 +227,9 @@ void KompareSplitter::moveSplitter( QCOORD p, int id ) int oldP = pick( s->wid->pos() ); int* poss = new int[d->list.count()]; int* ws = new int[d->list.count()]; - QWidget *w = 0; + TQWidget *w = 0; bool upLeft; - if ( QApplication::reverseLayout() && orient == Horizontal ) { + if ( TQApplication::reverseLayout() && orient == 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 ); @@ -260,7 +260,7 @@ void KompareSplitter::doMove( bool backwards, int pos, int id, int delta, bool mayCollapse, int* positions, int* widths ) { QSplitterLayoutStruct *s; - QWidget *w; + TQWidget *w; for ( ; id >= 0 && id < (int)d->list.count(); id = backwards ? id - delta : id + delta ) { s = d->list.at( id ); @@ -405,7 +405,7 @@ void KompareSplitter::repaintHandles() * FIXME: i'm a nasty hack */ -void KompareSplitter::wheelEvent( QWheelEvent* e ) +void KompareSplitter::wheelEvent( TQWheelEvent* e ) { // scroll lines... if ( e->orientation() == Qt::Vertical ) @@ -438,7 +438,7 @@ void KompareSplitter::wheelEvent( QWheelEvent* e ) repaintHandles(); } -void KompareSplitter::keyPressEvent( QKeyEvent* e ) +void KompareSplitter::keyPressEvent( TQKeyEvent* e ) { //keyboard scrolling switch ( e->key() ) { @@ -502,7 +502,7 @@ void KompareSplitter::scrollToId( int id ) void KompareSplitter::slotDelayedUpdateScrollBars() { - QTimer::singleShot( 0, this, SLOT( slotUpdateScrollBars() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateScrollBars() ) ); } void KompareSplitter::slotUpdateScrollBars() @@ -543,7 +543,7 @@ void KompareSplitter::slotUpdateScrollBars() void KompareSplitter::slotDelayedUpdateVScrollValue() { - QTimer::singleShot( 0, this, SLOT( slotUpdateVScrollValue() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateVScrollValue() ) ); } void KompareSplitter::slotUpdateVScrollValue() @@ -582,7 +582,7 @@ int KompareSplitter::pageSize() if ( !curr->isHandle ) { KompareListView *view = ((KompareListViewFrame*) curr->wid)->view(); - return view->visibleHeight() - QStyle::PM_ScrollBarExtent; + return view->visibleHeight() - TQStyle::PM_ScrollBarExtent; } } return 1; diff --git a/kompare/komparepart/komparesplitter.h b/kompare/komparepart/komparesplitter.h index 47eee6bf..8653cfee 100644 --- a/kompare/komparepart/komparesplitter.h +++ b/kompare/komparepart/komparesplitter.h @@ -20,7 +20,7 @@ #include "kompare_qsplitter.h" -#include <qtimer.h> +#include <tqtimer.h> #include "komparelistview.h" #include "komparemodellist.h" @@ -40,7 +40,7 @@ class KompareSplitter : public QSplitter Q_OBJECT public: - KompareSplitter(ViewSettings *settings, QWidget *parent=0, const char *name = 0); + KompareSplitter(ViewSettings *settings, TQWidget *parent=0, const char *name = 0); ~KompareSplitter(); signals: @@ -71,9 +71,9 @@ public slots: void slotUpdateVScrollValue(); protected: - void childEvent( QChildEvent * ); - void wheelEvent( QWheelEvent* e ); - void keyPressEvent( QKeyEvent* e ); + void childEvent( TQChildEvent * ); + void wheelEvent( TQWheelEvent* e ); + void keyPressEvent( TQKeyEvent* e ); void moveSplitter( QCOORD pos, int id ); @@ -90,7 +90,7 @@ private: void repaintHandles(); - QTimer* m_scrollTimer; + TQTimer* m_scrollTimer; bool restartTimer; int scrollTo; @@ -107,8 +107,8 @@ private: int minVisibleWidth(); ViewSettings* m_settings; - QScrollBar* m_vScroll; - QScrollBar* m_hScroll; + TQScrollBar* m_vScroll; + TQScrollBar* m_hScroll; friend class KompareConnectWidgetFrame; }; |