diff options
Diffstat (limited to 'src/directorymergewindow.h')
-rw-r--r-- | src/directorymergewindow.h | 124 |
1 files changed, 63 insertions, 61 deletions
diff --git a/src/directorymergewindow.h b/src/directorymergewindow.h index 77b09fd..25a66f7 100644 --- a/src/directorymergewindow.h +++ b/src/directorymergewindow.h @@ -18,26 +18,26 @@ #ifndef DIRECTORY_MERGE_WINDOW_H #define DIRECTORY_MERGE_WINDOW_H -#include <qfileinfo.h> -#include <qlistview.h> -#include <qtimer.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqlistview.h> +#include <tqtimer.h> +#include <tqdir.h> #include <list> #include <map> #include "common.h" #include "fileaccess.h" -#include "diff.h" //TotalDiffStatus +#include "diff.h" //TotalDifftqStatus class OptionDialog; class KIconLoader; class StatusInfo; class DirectoryMergeInfo; class OneDirectoryInfo; -class QLabel; +class TQLabel; class KAction; class KToggleAction; class KActionCollection; -class TotalDiffStatus; +class TotalDifftqStatus; enum e_MergeOperation { @@ -70,7 +70,7 @@ public: m_ageA = eNotThere; m_ageB=eNotThere; m_ageC=eNotThere; m_bConflictingAges=false; } bool operator>( const MergeFileInfos& ); - QString m_subPath; + TQString m_subPath; bool m_bExistsInA; bool m_bExistsInB; @@ -99,26 +99,27 @@ public: FileAccess m_fileInfoB; FileAccess m_fileInfoC; - TotalDiffStatus m_totalDiffStatus; + TotalDifftqStatus m_totalDifftqStatus; }; -class DirMergeItem : public QListViewItem +class DirMergeItem : public TQListViewItem { public: - DirMergeItem( QListView* pParent, const QString&, MergeFileInfos*); - DirMergeItem( DirMergeItem* pParent, const QString&, MergeFileInfos*); + DirMergeItem( TQListView* pParent, const TQString&, MergeFileInfos*); + DirMergeItem( DirMergeItem* pParent, const TQString&, MergeFileInfos*); ~DirMergeItem(); MergeFileInfos* m_pMFI; - virtual int compare(QListViewItem *i, int col, bool ascending) const; - virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align ); + virtual int compare(TQListViewItem *i, int col, bool ascending) const; + virtual void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); void init(MergeFileInfos* pMFI); }; -class DirectoryMergeWindow : public QListView +class DirectoryMergeWindow : public TQListView { Q_OBJECT + TQ_OBJECT public: - DirectoryMergeWindow( QWidget* pParent, OptionDialog* pOptions, KIconLoader* pIconLoader ); + DirectoryMergeWindow( TQWidget* pParent, OptionDialog* pOptions, KIconLoader* pIconLoader ); ~DirectoryMergeWindow(); void setDirectoryMergeInfo(DirectoryMergeInfo* p){ m_pDirectoryMergeInfo=p; } bool init( @@ -135,19 +136,19 @@ public: int totalColumnWidth(); bool isSyncMode() { return m_bSyncMode; } bool isScanning() { return m_bScanning; } - void initDirectoryMergeActions( QObject* pKDiff3App, KActionCollection* ac ); + void initDirectoryMergeActions( TQObject* pKDiff3App, KActionCollection* ac ); void updateAvailabilities( bool bDirCompare, bool bDiffWindowVisible, KToggleAction* chooseA, KToggleAction* chooseB, KToggleAction* chooseC ); void updateFileVisibilities(); - virtual void keyPressEvent( QKeyEvent* e ); - virtual void focusInEvent( QFocusEvent* e ); - virtual void focusOutEvent( QFocusEvent* e ); + virtual void keyPressEvent( TQKeyEvent* e ); + virtual void focusInEvent( TQFocusEvent* e ); + virtual void focusOutEvent( TQFocusEvent* e ); - QString getDirNameA(){ return m_dirA.prettyAbsPath(); } - QString getDirNameB(){ return m_dirB.prettyAbsPath(); } - QString getDirNameC(){ return m_dirC.prettyAbsPath(); } - QString getDirNameDest(){ return m_dirDest.prettyAbsPath(); } + TQString getDirNameA(){ return m_dirA.prettyAbsPath(); } + TQString getDirNameB(){ return m_dirB.prettyAbsPath(); } + TQString getDirNameC(){ return m_dirC.prettyAbsPath(); } + TQString getDirNameDest(){ return m_dirDest.prettyAbsPath(); } public slots: void reload(); @@ -155,7 +156,7 @@ public slots: void compareCurrentFile(); void slotRunOperationForAllItems(); void slotRunOperationForCurrentItem(); - void mergeResultSaved(const QString& fileName); + void mergeResultSaved(const TQString& fileName); void slotChooseAEverywhere(); void slotChooseBEverywhere(); void slotChooseCEverywhere(); @@ -197,7 +198,7 @@ public slots: protected: void mergeContinue( bool bStart, bool bVerbose ); - void resizeEvent(QResizeEvent* e); + void resizeEvent(TQResizeEvent* e); bool m_bAllowResizeEvents; void prepareListView(ProgressProxy& pp); @@ -206,33 +207,33 @@ protected: friend class MergeFileInfos; bool canContinue(); - void prepareMergeStart( QListViewItem* pBegin, QListViewItem* pEnd, bool bVerbose ); + void prepareMergeStart( TQListViewItem* pBegin, TQListViewItem* pEnd, bool bVerbose ); bool executeMergeOperation( MergeFileInfos& mfi, bool& bSingleFileMerge ); - void scanDirectory( const QString& dirName, t_DirectoryList& dirList ); - void scanLocalDirectory( const QString& dirName, t_DirectoryList& dirList ); + void scanDirectory( const TQString& dirName, t_DirectoryList& dirList ); + void scanLocalDirectory( const TQString& dirName, t_DirectoryList& dirList ); void fastFileComparison( FileAccess& fi1, FileAccess& fi2, - bool& bEqual, bool& bError, QString& status ); + bool& bEqual, bool& bError, TQString& status ); void compareFilesAndCalcAges( MergeFileInfos& mfi ); - QString fullNameA( const MergeFileInfos& mfi ) + TQString fullNameA( const MergeFileInfos& mfi ) { return mfi.m_bExistsInA ? mfi.m_fileInfoA.absFilePath() : m_dirA.absFilePath() + "/" + mfi.m_subPath; } - QString fullNameB( const MergeFileInfos& mfi ) + TQString fullNameB( const MergeFileInfos& mfi ) { return mfi.m_bExistsInB ? mfi.m_fileInfoB.absFilePath() : m_dirB.absFilePath() + "/" + mfi.m_subPath; } - QString fullNameC( const MergeFileInfos& mfi ) + TQString fullNameC( const MergeFileInfos& mfi ) { return mfi.m_bExistsInC ? mfi.m_fileInfoC.absFilePath() : m_dirC.absFilePath() + "/" + mfi.m_subPath; } - QString fullNameDest( const MergeFileInfos& mfi ) + TQString fullNameDest( const MergeFileInfos& mfi ) { if ( m_dirDestInternal.prettyAbsPath() == m_dirC.prettyAbsPath() ) return fullNameC(mfi); else if ( m_dirDestInternal.prettyAbsPath() == m_dirB.prettyAbsPath() ) return fullNameB(mfi); else return m_dirDestInternal.absFilePath() + "/" + mfi.m_subPath; } - bool copyFLD( const QString& srcName, const QString& destName ); - bool deleteFLD( const QString& name, bool bCreateBackup ); - bool makeDir( const QString& name, bool bQuiet=false ); - bool renameFLD( const QString& srcName, const QString& destName ); - bool mergeFLD( const QString& nameA,const QString& nameB,const QString& nameC, - const QString& nameDest, bool& bSingleFileMerge ); + bool copyFLD( const TQString& srcName, const TQString& destName ); + bool deleteFLD( const TQString& name, bool bCreateBackup ); + bool makeDir( const TQString& name, bool bQuiet=false ); + bool renameFLD( const TQString& srcName, const TQString& destName ); + bool mergeFLD( const TQString& nameA,const TQString& nameB,const TQString& nameC, + const TQString& nameDest, bool& bSingleFileMerge ); FileAccess m_dirA; FileAccess m_dirB; @@ -240,9 +241,9 @@ protected: FileAccess m_dirDest; FileAccess m_dirDestInternal; - QString m_dirMergeStateFilename; + TQString m_dirMergeStateFilename; - std::map<QString, MergeFileInfos> m_fileMergeMap; + std::map<TQString, MergeFileInfos> m_fileMergeMap; bool m_bFollowDirLinks; bool m_bFollowFileLinks; @@ -318,44 +319,45 @@ protected: KAction* m_pDirSaveMergeState; KAction* m_pDirLoadMergeState; signals: - void startDiffMerge(QString fn1,QString fn2, QString fn3, QString ofn, QString,QString,QString,TotalDiffStatus*); + void startDiffMerge(TQString fn1,TQString fn2, TQString fn3, TQString ofn, TQString,TQString,TQString,TotalDifftqStatus*); void checkIfCanContinue( bool* pbContinue ); void updateAvailabilities(); - void statusBarMessage( const QString& msg ); + void statusBarMessage( const TQString& msg ); protected slots: - void onDoubleClick( QListViewItem* lvi ); - void onClick( int button, QListViewItem* lvi, const QPoint&, int c ); - void slotShowContextMenu(QListViewItem* lvi,const QPoint &,int c); - void onSelectionChanged(QListViewItem* lvi); + void onDoubleClick( TQListViewItem* lvi ); + void onClick( int button, TQListViewItem* lvi, const TQPoint&, int c ); + void slotShowContextMenu(TQListViewItem* lvi,const TQPoint &,int c); + void onSelectionChanged(TQListViewItem* lvi); }; -class DirectoryMergeInfo : public QFrame +class DirectoryMergeInfo : public TQFrame { Q_OBJECT + TQ_OBJECT public: - DirectoryMergeInfo( QWidget* pParent ); + DirectoryMergeInfo( TQWidget* pParent ); void setInfo( const FileAccess& APath, const FileAccess& BPath, const FileAccess& CPath, const FileAccess& DestPath, MergeFileInfos& mfi ); - QListView* getInfoList() {return m_pInfoList;} - virtual bool eventFilter( QObject* o, QEvent* e ); + TQListView* getInfoList() {return m_pInfoList;} + virtual bool eventFilter( TQObject* o, TQEvent* e ); signals: void gotFocus(); private: - QLabel* m_pInfoA; - QLabel* m_pInfoB; - QLabel* m_pInfoC; - QLabel* m_pInfoDest; + TQLabel* m_pInfoA; + TQLabel* m_pInfoB; + TQLabel* m_pInfoC; + TQLabel* m_pInfoDest; - QLabel* m_pA; - QLabel* m_pB; - QLabel* m_pC; - QLabel* m_pDest; + TQLabel* m_pA; + TQLabel* m_pB; + TQLabel* m_pC; + TQLabel* m_pDest; - QListView* m_pInfoList; + TQListView* m_pInfoList; }; |