Mercurial > hg > easyhg-kdiff3
comparison kdiff3/src/directorymergewindow.h @ 70:5bbfe4784324
KDiff3 0.9.89 for Qt4
author | joachim99 |
---|---|
date | Tue, 18 Apr 2006 20:19:57 +0000 |
parents | 8febbfb1148c |
children |
comparison
equal
deleted
inserted
replaced
69:8febbfb1148c | 70:5bbfe4784324 |
---|---|
17 | 17 |
18 #ifndef DIRECTORY_MERGE_WINDOW_H | 18 #ifndef DIRECTORY_MERGE_WINDOW_H |
19 #define DIRECTORY_MERGE_WINDOW_H | 19 #define DIRECTORY_MERGE_WINDOW_H |
20 | 20 |
21 #include <qfileinfo.h> | 21 #include <qfileinfo.h> |
22 #include <qlistview.h> | 22 #include <q3listview.h> |
23 #include <qtimer.h> | 23 #include <qtimer.h> |
24 #include <qdir.h> | 24 #include <qdir.h> |
25 //Added by qt3to4: | |
26 #include <QLabel> | |
27 #include <QFocusEvent> | |
28 #include <Q3Frame> | |
29 #include <QKeyEvent> | |
30 #include <QResizeEvent> | |
31 #include <QEvent> | |
25 #include <list> | 32 #include <list> |
26 #include <map> | 33 #include <map> |
27 #include "common.h" | 34 #include "common.h" |
28 #include "fileaccess.h" | 35 #include "fileaccess.h" |
29 #include "diff.h" //TotalDiffStatus | 36 #include "diff.h" //TotalDiffStatus |
100 FileAccess m_fileInfoC; | 107 FileAccess m_fileInfoC; |
101 | 108 |
102 TotalDiffStatus m_totalDiffStatus; | 109 TotalDiffStatus m_totalDiffStatus; |
103 }; | 110 }; |
104 | 111 |
105 class DirMergeItem : public QListViewItem | 112 class DirMergeItem : public Q3ListViewItem |
106 { | 113 { |
107 public: | 114 public: |
108 DirMergeItem( QListView* pParent, const QString&, MergeFileInfos*); | 115 DirMergeItem( Q3ListView* pParent, const QString&, MergeFileInfos*); |
109 DirMergeItem( DirMergeItem* pParent, const QString&, MergeFileInfos*); | 116 DirMergeItem( DirMergeItem* pParent, const QString&, MergeFileInfos*); |
110 ~DirMergeItem(); | 117 ~DirMergeItem(); |
111 MergeFileInfos* m_pMFI; | 118 MergeFileInfos* m_pMFI; |
112 virtual int compare(QListViewItem *i, int col, bool ascending) const; | 119 virtual int compare(Q3ListViewItem *i, int col, bool ascending) const; |
113 virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align ); | 120 virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align ); |
114 void init(MergeFileInfos* pMFI); | 121 void init(MergeFileInfos* pMFI); |
115 }; | 122 }; |
116 | 123 |
117 class DirectoryMergeWindow : public QListView | 124 class DirectoryMergeWindow : public Q3ListView |
118 { | 125 { |
119 Q_OBJECT | 126 Q_OBJECT |
120 public: | 127 public: |
121 DirectoryMergeWindow( QWidget* pParent, OptionDialog* pOptions, KIconLoader* pIconLoader ); | 128 DirectoryMergeWindow( QWidget* pParent, OptionDialog* pOptions, KIconLoader* pIconLoader ); |
122 ~DirectoryMergeWindow(); | 129 ~DirectoryMergeWindow(); |
198 void calcSuggestedOperation( MergeFileInfos& mfi, e_MergeOperation eDefaultOperation ); | 205 void calcSuggestedOperation( MergeFileInfos& mfi, e_MergeOperation eDefaultOperation ); |
199 void setAllMergeOperations( e_MergeOperation eDefaultOperation ); | 206 void setAllMergeOperations( e_MergeOperation eDefaultOperation ); |
200 friend class MergeFileInfos; | 207 friend class MergeFileInfos; |
201 | 208 |
202 bool canContinue(); | 209 bool canContinue(); |
203 void prepareMergeStart( QListViewItem* pBegin, QListViewItem* pEnd, bool bVerbose ); | 210 void prepareMergeStart( Q3ListViewItem* pBegin, Q3ListViewItem* pEnd, bool bVerbose ); |
204 bool executeMergeOperation( MergeFileInfos& mfi, bool& bSingleFileMerge ); | 211 bool executeMergeOperation( MergeFileInfos& mfi, bool& bSingleFileMerge ); |
205 | 212 |
206 void scanDirectory( const QString& dirName, t_DirectoryList& dirList ); | 213 void scanDirectory( const QString& dirName, t_DirectoryList& dirList ); |
207 void scanLocalDirectory( const QString& dirName, t_DirectoryList& dirList ); | 214 void scanLocalDirectory( const QString& dirName, t_DirectoryList& dirList ); |
208 void fastFileComparison( FileAccess& fi1, FileAccess& fi2, | 215 void fastFileComparison( FileAccess& fi1, FileAccess& fi2, |
312 void startDiffMerge(QString fn1,QString fn2, QString fn3, QString ofn, QString,QString,QString,TotalDiffStatus*); | 319 void startDiffMerge(QString fn1,QString fn2, QString fn3, QString ofn, QString,QString,QString,TotalDiffStatus*); |
313 void checkIfCanContinue( bool* pbContinue ); | 320 void checkIfCanContinue( bool* pbContinue ); |
314 void updateAvailabilities(); | 321 void updateAvailabilities(); |
315 void statusBarMessage( const QString& msg ); | 322 void statusBarMessage( const QString& msg ); |
316 protected slots: | 323 protected slots: |
317 void onDoubleClick( QListViewItem* lvi ); | 324 void onDoubleClick( Q3ListViewItem* lvi ); |
318 void onClick( int button, QListViewItem* lvi, const QPoint&, int c ); | 325 void onClick( int button, Q3ListViewItem* lvi, const QPoint&, int c ); |
319 void slotShowContextMenu(QListViewItem* lvi,const QPoint &,int c); | 326 void slotShowContextMenu(Q3ListViewItem* lvi,const QPoint &,int c); |
320 void onSelectionChanged(QListViewItem* lvi); | 327 void onSelectionChanged(Q3ListViewItem* lvi); |
321 }; | 328 }; |
322 | 329 |
323 class DirectoryMergeInfo : public QFrame | 330 class DirectoryMergeInfo : public Q3Frame |
324 { | 331 { |
325 Q_OBJECT | 332 Q_OBJECT |
326 public: | 333 public: |
327 DirectoryMergeInfo( QWidget* pParent ); | 334 DirectoryMergeInfo( QWidget* pParent ); |
328 void setInfo( | 335 void setInfo( |
329 const FileAccess& APath, | 336 const FileAccess& APath, |
330 const FileAccess& BPath, | 337 const FileAccess& BPath, |
331 const FileAccess& CPath, | 338 const FileAccess& CPath, |
332 const FileAccess& DestPath, | 339 const FileAccess& DestPath, |
333 MergeFileInfos& mfi ); | 340 MergeFileInfos& mfi ); |
334 QListView* getInfoList() {return m_pInfoList;} | 341 Q3ListView* getInfoList() {return m_pInfoList;} |
335 virtual bool eventFilter( QObject* o, QEvent* e ); | 342 virtual bool eventFilter( QObject* o, QEvent* e ); |
336 signals: | 343 signals: |
337 void gotFocus(); | 344 void gotFocus(); |
338 private: | 345 private: |
339 QLabel* m_pInfoA; | 346 QLabel* m_pInfoA; |
344 QLabel* m_pA; | 351 QLabel* m_pA; |
345 QLabel* m_pB; | 352 QLabel* m_pB; |
346 QLabel* m_pC; | 353 QLabel* m_pC; |
347 QLabel* m_pDest; | 354 QLabel* m_pDest; |
348 | 355 |
349 QListView* m_pInfoList; | 356 Q3ListView* m_pInfoList; |
350 }; | 357 }; |
351 | 358 |
352 | 359 |
353 #endif | 360 #endif |