summaryrefslogtreecommitdiffstats
path: root/src/mergeresultwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mergeresultwindow.h')
-rw-r--r--src/mergeresultwindow.h127
1 files changed, 65 insertions, 62 deletions
diff --git a/src/mergeresultwindow.h b/src/mergeresultwindow.h
index fdc4b5c..ed524a5 100644
--- a/src/mergeresultwindow.h
+++ b/src/mergeresultwindow.h
@@ -20,17 +20,18 @@
#include "diff.h"
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
-class QPainter;
+class TQPainter;
-class Overview : public QWidget
+class Overview : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Overview( QWidget* pParent, OptionDialog* pOptions );
+ Overview( TQWidget* pParent, OptionDialog* pOptions );
void init( Diff3LineList* pDiff3LineList, bool bTripleDiff );
void reset();
@@ -52,15 +53,15 @@ private:
bool m_bTripleDiff;
int m_firstLine;
int m_pageHeight;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
bool m_bPaintingAllowed;
e_OverviewMode m_eOverviewMode;
int m_nofLines;
- virtual void paintEvent( QPaintEvent* e );
- virtual void mousePressEvent( QMouseEvent* e );
- virtual void mouseMoveEvent( QMouseEvent* e );
- void drawColumn( QPainter& p, e_OverviewMode eOverviewMode, int x, int w, int h, int nofLines );
+ virtual void paintEvent( TQPaintEvent* e );
+ virtual void mousePressEvent( TQMouseEvent* e );
+ virtual void mouseMoveEvent( TQMouseEvent* e );
+ void drawColumn( TQPainter& p, e_OverviewMode eOverviewMode, int x, int w, int h, int nofLines );
};
@@ -93,14 +94,15 @@ enum e_MergeSrcSelector
C=3
};
-class MergeResultWindow : public QWidget
+class MergeResultWindow : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
MergeResultWindow(
- QWidget* pParent,
+ TQWidget* pParent,
OptionDialog* pOptionDialog,
- QStatusBar* pStatusBar
+ TQStatusBar* pStatusBar
);
void init(
@@ -108,12 +110,12 @@ public:
const LineData* pLineDataB, int sizeB,
const LineData* pLineDataC, int sizeC,
const Diff3LineList* pDiff3LineList,
- TotalDiffStatus* pTotalDiffStatus
+ TotalDifftqStatus* pTotalDifftqStatus
);
void reset();
- bool saveDocument( const QString& fileName, QTextCodec* pEncoding );
+ bool saveDocument( const TQString& fileName, TQTextCodec* pEncoding );
int getNrOfUnsolvedConflicts(int* pNrOfWhiteSpaceConflicts=0);
void choose(int selector);
void chooseGlobal(int selector, bool bConflictsOnly, bool bWhiteSpaceOnly );
@@ -122,7 +124,7 @@ public:
int getNofLines();
int getNofVisibleColumns();
int getNofVisibleLines();
- QString getSelection();
+ TQString getSelection();
void resetSelection();
void showNrOfConflicts();
bool isDeltaAboveCurrent();
@@ -132,7 +134,7 @@ public:
bool isUnsolvedConflictAtCurrent();
bool isUnsolvedConflictAboveCurrent();
bool isUnsolvedConflictBelowCurrent();
- bool findString( const QString& s, int& d3vLine, int& posInLine, bool bDirDown, bool bCaseSensitive );
+ bool findString( const TQString& s, int& d3vLine, int& posInLine, bool bDirDown, bool bCaseSensitive );
void setSelection( int firstLine, int startPos, int lastLine, int endPos );
void setOverviewMode( Overview::e_OverviewMode eOverviewMode );
Overview::e_OverviewMode getOverviewMode();
@@ -168,12 +170,12 @@ signals:
void selectionEnd();
void newSelection();
void updateAvailabilities();
- void showPopupMenu( const QPoint& point );
+ void showPopupMenu( const TQPoint& point );
void noRelevantChangesDetected();
private:
void merge(bool bAutoSolve, int defaultSelector, bool bConflictsOnly=false, bool bWhiteSpaceOnly=false );
- QString getString( int lineIdx );
+ TQString getString( int lineIdx );
OptionDialog* m_pOptionDialog;
@@ -185,7 +187,7 @@ private:
int m_sizeC;
const Diff3LineList* m_pDiff3LineList;
- TotalDiffStatus* m_pTotalDiffStatus;
+ TotalDifftqStatus* m_pTotalDifftqStatus;
bool m_bPaintingAllowed;
int m_delayedDrawTimer;
@@ -196,13 +198,13 @@ private:
{
public:
MergeEditLine(Diff3LineList::const_iterator i, int src=0){m_id3l=i; m_src=src; m_bLineRemoved=false; }
- void setConflict() { m_src=0; m_bLineRemoved=false; m_str=QString(); }
+ void setConflict() { m_src=0; m_bLineRemoved=false; m_str=TQString(); }
bool isConflict() { return m_src==0 && !m_bLineRemoved && m_str.isNull(); }
- void setRemoved(int src=0) { m_src=src; m_bLineRemoved=true; m_str=QString(); }
+ void setRemoved(int src=0) { m_src=src; m_bLineRemoved=true; m_str=TQString(); }
bool isRemoved() { return m_bLineRemoved; }
bool isEditableText() { return !isConflict() && !isRemoved(); }
- void setString( const QString& s ){ m_str=s; m_bLineRemoved=false; m_src=0; }
- QString getString( const MergeResultWindow* );
+ void setString( const TQString& s ){ m_str=s; m_bLineRemoved=false; m_src=0; }
+ TQString getString( const MergeResultWindow* );
bool isModified() { return ! m_str.isNull() || (m_bLineRemoved && m_src==0); }
void setSource( int src, bool bLineRemoved ) { m_src=src; m_bLineRemoved =bLineRemoved; }
@@ -212,7 +214,7 @@ private:
private:
Diff3LineList::const_iterator m_id3l;
int m_src; // 1, 2 or 3 for A, B or C respectively, or 0 when line is from neither source.
- QString m_str; // String when modified by user or null-string when orig data is used.
+ TQString m_str; // String when modified by user or null-string when orig data is used.
bool m_bLineRemoved;
};
@@ -339,7 +341,7 @@ private:
MergeEditLineList& choice( bool bThreeInputs );
bool staysInPlace( bool bThreeInputs, Diff3LineList::const_iterator& iHistoryEnd );
};
- typedef std::map<QString,HistoryMapEntry> HistoryMap;
+ typedef std::map<TQString,HistoryMapEntry> HistoryMap;
void collectHistoryInformation( int src, Diff3LineList::const_iterator iHistoryBegin, Diff3LineList::const_iterator iHistoryEnd, HistoryMap& historyMap, std::list< HistoryMap::iterator >& hitList );
typedef std::list<MergeLine> MergeLineList;
@@ -364,28 +366,28 @@ private:
);
MergeLineList::iterator splitAtDiff3LineIdx( int d3lLineIdx );
- virtual void paintEvent( QPaintEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
void myUpdate(int afterMilliSecs);
- virtual void timerEvent(QTimerEvent*);
+ virtual void timerEvent(TQTimerEvent*);
void writeLine(
- MyPainter& p, int line, const QString& str,
+ MyPainter& p, int line, const TQString& str,
int srcSelect, e_MergeDetails mergeDetails, int rangeMark, bool bUserModified, bool bLineRemoved, bool bWhiteSpaceConflict
);
void setFastSelector(MergeLineList::iterator i);
void convertToLinePos( int x, int y, int& line, int& pos );
- virtual void mousePressEvent ( QMouseEvent* e );
- virtual void mouseDoubleClickEvent ( QMouseEvent* e );
- virtual void mouseReleaseEvent ( QMouseEvent * );
- virtual void mouseMoveEvent ( QMouseEvent * );
- virtual void resizeEvent( QResizeEvent* e );
- virtual void keyPressEvent( QKeyEvent* e );
- virtual void wheelEvent( QWheelEvent* e );
- virtual void focusInEvent( QFocusEvent* e );
+ virtual void mousePressEvent ( TQMouseEvent* e );
+ virtual void mouseDoubleClickEvent ( TQMouseEvent* e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * );
+ virtual void mouseMoveEvent ( TQMouseEvent * );
+ virtual void resizeEvent( TQResizeEvent* e );
+ virtual void keyPressEvent( TQKeyEvent* e );
+ virtual void wheelEvent( TQWheelEvent* e );
+ virtual void focusInEvent( TQFocusEvent* e );
virtual bool focusNextPrevChild(bool){return false;}
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
int m_firstLine;
int m_firstColumn;
int m_nofColumns;
@@ -402,13 +404,13 @@ private:
int m_cursorYPos;
int m_cursorOldXPos;
bool m_bCursorOn; // blinking on and off each second
- QTimer m_cursorTimer;
+ TQTimer m_cursorTimer;
bool m_bCursorUpdate;
- QStatusBar* m_pStatusBar;
+ TQStatusBar* m_pStatusBar;
Selection m_selection;
- bool deleteSelection2( QString& str, int& x, int& y,
+ bool deleteSelection2( TQString& str, int& x, int& y,
MergeLineList::iterator& mlIt, MergeEditLineList::iterator& melIt );
bool doRelevantChangesExist();
public slots:
@@ -418,31 +420,32 @@ private slots:
void slotCursorUpdate();
};
-class QLineEdit;
-class QTextCodec;
-class QComboBox;
-class QLabel;
-class WindowTitleWidget : public QWidget
+class TQLineEdit;
+class TQTextCodec;
+class TQComboBox;
+class TQLabel;
+class WindowTitleWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
private:
- QLabel* m_pLabel;
- QLineEdit* m_pFileNameLineEdit;
- //QPushButton* m_pBrowseButton;
- QLabel* m_pModifiedLabel;
- QLabel* m_pEncodingLabel;
- QComboBox* m_pEncodingSelector;
+ TQLabel* m_pLabel;
+ TQLineEdit* m_pFileNameLineEdit;
+ //TQPushButton* m_pBrowseButton;
+ TQLabel* m_pModifiedLabel;
+ TQLabel* m_pEncodingLabel;
+ TQComboBox* m_pEncodingSelector;
OptionDialog* m_pOptionDialog;
- std::map<int, QTextCodec*> m_codecMap;
+ std::map<int, TQTextCodec*> m_codecMap;
public:
- WindowTitleWidget(OptionDialog* pOptionDialog, QWidget* pParent );
- QTextCodec* getEncoding();
- void setFileName(const QString& fileName );
- QString getFileName();
- void setEncodings( QTextCodec* pCodecForA, QTextCodec* pCodecForB, QTextCodec* pCodecForC );
- void setEncoding( QTextCodec* pCodec );
-
- bool eventFilter( QObject* o, QEvent* e );
+ WindowTitleWidget(OptionDialog* pOptionDialog, TQWidget* pParent );
+ TQTextCodec* getEncoding();
+ void setFileName(const TQString& fileName );
+ TQString getFileName();
+ void setEncodings( TQTextCodec* pCodecForA, TQTextCodec* pCodecForB, TQTextCodec* pCodecForC );
+ void setEncoding( TQTextCodec* pCodec );
+
+ bool eventFilter( TQObject* o, TQEvent* e );
public slots:
void slotSetModified( bool bModified );
//private slots: