diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
commit | f636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch) | |
tree | 5365045e6bce685a7cbaeb81b4797a719e86089f /src/kdiff3.h | |
parent | 63862fdfcb61f302ef69e86d40772bb1318d3763 (diff) | |
download | kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip |
TQt4 port kdiff3
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kdiff3.h')
-rw-r--r-- | src/kdiff3.h | 80 |
1 files changed, 41 insertions, 39 deletions
diff --git a/src/kdiff3.h b/src/kdiff3.h index 72b1a79..2934648 100644 --- a/src/kdiff3.h +++ b/src/kdiff3.h @@ -24,10 +24,10 @@ #include <config.h> #endif -// include files for Qt -#include <qdialog.h> -#include <qsplitter.h> -#include <qscrollbar.h> +// include files for TQt +#include <tqdialog.h> +#include <tqsplitter.h> +#include <tqscrollbar.h> // include files for KDE #include <kapplication.h> @@ -48,11 +48,11 @@ class MergeResultWindow; class WindowTitleWidget; class Overview; -class QScrollBar; -class QComboBox; -class QLineEdit; -class QCheckBox; -class QSplitter; +class TQScrollBar; +class TQComboBox; +class TQLineEdit; +class TQCheckBox; +class TQSplitter; class KDiff3Part; @@ -60,18 +60,19 @@ class DirectoryMergeWindow; class DirectoryMergeInfo; -class ReversibleScrollBar : public QScrollBar +class ReversibleScrollBar : public TQScrollBar { Q_OBJECT + TQ_OBJECT bool* m_pbRightToLeftLanguage; int m_realVal; public: - ReversibleScrollBar( Orientation o, QWidget* pParent, bool* pbRightToLeftLanguage ) - : QScrollBar( o, pParent ) + ReversibleScrollBar( Qt::Orientation o, TQWidget* pParent, bool* pbRightToLeftLanguage ) + : TQScrollBar( o, pParent ) { m_pbRightToLeftLanguage=pbRightToLeftLanguage; m_realVal=0; - connect( this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int))); + connect( this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int))); } void setAgain(){ setValue(m_realVal); } public slots: @@ -85,22 +86,23 @@ public slots: void setValue(int i) { if(m_pbRightToLeftLanguage && *m_pbRightToLeftLanguage) - QScrollBar::setValue( maxValue()-(i-minValue()) ); + TQScrollBar::setValue( maxValue()-(i-minValue()) ); else - QScrollBar::setValue( i ); + TQScrollBar::setValue( i ); } signals: void valueChanged2(int); }; -class KDiff3App : public QSplitter +class KDiff3App : public TQSplitter { Q_OBJECT + TQ_OBJECT public: /** constructor of KDiff3App, calls all init functions to create the application. */ - KDiff3App( QWidget* parent, const char* name, KDiff3Part* pKDiff3Part ); + KDiff3App( TQWidget* tqparent, const char* name, KDiff3Part* pKDiff3Part ); ~KDiff3App(); bool isPart(); @@ -108,7 +110,7 @@ class KDiff3App : public QSplitter /** initializes the KActions of the application */ void initActions( KActionCollection* ); - /** save general Options like all bar positions and status as well as the geometry + /** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration file */ void saveOptions( KConfig* ); @@ -116,7 +118,7 @@ class KDiff3App : public QSplitter void readOptions( KConfig* ); // Finish initialisation (virtual, so that it can be called from the shell too.) - virtual void completeInit(const QString& fn1="", const QString& fn2="", const QString& fn3=""); + virtual void completeInit(const TQString& fn1="", const TQString& fn2="", const TQString& fn3=""); /** queryClose is called by KMainWindow on each closeEvent of a window. Against the * default implementation (only returns true), this calles saveModified() on the document object to ask if the document shall @@ -128,7 +130,7 @@ class KDiff3App : public QSplitter virtual bool isFileSaved(); signals: - void createNewInstance( const QString& fn1, const QString& fn2, const QString& fn3 ); + void createNewInstance( const TQString& fn1, const TQString& fn2, const TQString& fn3 ); protected: void initDirectoryMergeActions(); /** sets up the statusbar for the main window by initialzing a statuslabel. */ @@ -141,10 +143,10 @@ class KDiff3App : public QSplitter /** open a file and load it into the document*/ void slotFileOpen(); - void slotFileOpen2( QString fn1, QString fn2, QString fn3, QString ofn, - QString an1, QString an2, QString an3, TotalDiffStatus* pTotalDiffStatus ); + void slotFileOpen2( TQString fn1, TQString fn2, TQString fn3, TQString ofn, + TQString an1, TQString an2, TQString an3, TotalDifftqStatus* pTotalDifftqStatus ); - void slotFileNameChanged(const QString& fileName, int winIdx); + void slotFileNameChanged(const TQString& fileName, int winIdx); /** save a document */ void slotFileSave(); @@ -176,7 +178,7 @@ class KDiff3App : public QSplitter /** changes the statusbar contents for the standard label permanently, used to indicate current actions. * @param text the text that is displayed in the statusbar */ - void slotStatusMsg(const QString &text); + void slotStatusMsg(const TQString &text); private: /** the configuration object of the application */ @@ -249,14 +251,14 @@ class KDiff3App : public QSplitter KToggleAction *overviewModeBC; - QPopupMenu* m_pMergeEditorPopupMenu; + TQPopupMenu* m_pMergeEditorPopupMenu; - QSplitter* m_pMainSplitter; - QWidget* m_pMainWidget; - QWidget* m_pMergeWindowFrame; + TQSplitter* m_pMainSplitter; + TQWidget* m_pMainWidget; + TQWidget* m_pMergeWindowFrame; ReversibleScrollBar* m_pHScrollBar; - QScrollBar* m_pDiffVScrollBar; - QScrollBar* m_pMergeVScrollBar; + TQScrollBar* m_pDiffVScrollBar; + TQScrollBar* m_pMergeVScrollBar; DiffTextWindow* m_pDiffTextWindow1; DiffTextWindow* m_pDiffTextWindow2; @@ -264,28 +266,28 @@ class KDiff3App : public QSplitter DiffTextWindowFrame* m_pDiffTextWindowFrame1; DiffTextWindowFrame* m_pDiffTextWindowFrame2; DiffTextWindowFrame* m_pDiffTextWindowFrame3; - QSplitter* m_pDiffWindowSplitter; + TQSplitter* m_pDiffWindowSplitter; MergeResultWindow* m_pMergeResultWindow; WindowTitleWidget* m_pMergeResultWindowTitle; bool m_bTripleDiff; - QSplitter* m_pDirectoryMergeSplitter; + TQSplitter* m_pDirectoryMergeSplitter; DirectoryMergeWindow* m_pDirectoryMergeWindow; DirectoryMergeInfo* m_pDirectoryMergeInfo; bool m_bDirCompare; Overview* m_pOverview; - QWidget* m_pCornerWidget; + TQWidget* m_pCornerWidget; - TotalDiffStatus m_totalDiffStatus; + TotalDifftqStatus m_totalDifftqStatus; SourceData m_sd1; SourceData m_sd2; SourceData m_sd3; - QString m_outputFilename; + TQString m_outputFilename; bool m_bDefaultFilename; DiffList m_diffList12; @@ -308,10 +310,10 @@ class KDiff3App : public QSplitter OptionDialog* m_pOptionDialog; FindDialog* m_pFindDialog; - void init( bool bAuto=false, TotalDiffStatus* pTotalDiffStatus=0, bool bLoadFiles=true ); + void init( bool bAuto=false, TotalDifftqStatus* pTotalDifftqStatus=0, bool bLoadFiles=true ); - virtual bool eventFilter( QObject* o, QEvent* e ); - virtual void resizeEvent(QResizeEvent*); + virtual bool eventFilter( TQObject* o, TQEvent* e ); + virtual void resizeEvent(TQResizeEvent*); bool improveFilenames(bool bCreateNewInstance); @@ -335,7 +337,7 @@ public slots: void resizeMergeResultWindow(); void slotRecalcWordWrap(); - void showPopupMenu( const QPoint& point ); + void showPopupMenu( const TQPoint& point ); void scrollDiffTextWindow( int deltaX, int deltaY ); void scrollMergeResultWindow( int deltaX, int deltaY ); |