Commit 108707e8 authored by Michael Reeves's avatar Michael Reeves

Adjust formating use QtNumberType

parent 5a0ddef2
......@@ -9,9 +9,10 @@
* *
***************************************************************************/
#include "Overview.h"
#include "diff.h"
#include "mergeresultwindow.h"
#include "options.h"
#include "diff.h"
#include <QColor>
#include <QMouseEvent>
......@@ -53,7 +54,7 @@ void Overview::slotRedraw()
update();
}
void Overview::setRange(int firstLine, int pageHeight)
void Overview::setRange(QtNumberType firstLine, QtNumberType pageHeight)
{
m_firstLine = firstLine;
m_pageHeight = pageHeight;
......
......@@ -11,46 +11,54 @@
#ifndef OVERVIEW_H
#define OVERVIEW_H
#include "options.h"
#include "diff.h"
#include "options.h"
#include <QWidget>
#include <QPixmap>
#include <QWidget>
class Overview : public QWidget
{
Q_OBJECT
public:
explicit Overview( Options* pOptions );
void init( Diff3LineList* pDiff3LineList, bool bTripleDiff );
void reset();
void setRange( int firstLine, int pageHeight );
void setPaintingAllowed( bool bAllowPainting );
enum e_OverviewMode { eOMNormal, eOMAvsB, eOMAvsC, eOMBvsC };
void setOverviewMode( e_OverviewMode eOverviewMode );
e_OverviewMode getOverviewMode();
public Q_SLOTS:
void setFirstLine(QtNumberType firstLine);
void slotRedraw();
Q_SIGNALS:
void setLine(LineRef);
private:
const Diff3LineList* m_pDiff3LineList;
Options* m_pOptions;
bool m_bTripleDiff;
LineRef m_firstLine;
int m_pageHeight;
QPixmap m_pixmap;
e_OverviewMode m_eOverviewMode;
int m_nofLines;
void paintEvent( QPaintEvent* e ) override;
void mousePressEvent( QMouseEvent* e ) override;
void mouseMoveEvent( QMouseEvent* e ) override;
void drawColumn( QPainter& p, e_OverviewMode eOverviewMode, int x, int w, int h, int nofLines );
Q_OBJECT
public:
enum e_OverviewMode
{
eOMNormal,
eOMAvsB,
eOMAvsC,
eOMBvsC
};
explicit Overview(Options* pOptions);
void init(Diff3LineList* pDiff3LineList, bool bTripleDiff);
void reset();
void setRange(QtNumberType firstLine, QtNumberType pageHeight);
void setPaintingAllowed(bool bAllowPainting);
void setOverviewMode(e_OverviewMode eOverviewMode);
e_OverviewMode getOverviewMode();
public Q_SLOTS:
void setFirstLine(QtNumberType firstLine);
void slotRedraw();
Q_SIGNALS:
void setLine(LineRef);
private:
const Diff3LineList* m_pDiff3LineList;
Options* m_pOptions;
bool m_bTripleDiff;
LineRef m_firstLine;
int m_pageHeight;
QPixmap m_pixmap;
e_OverviewMode m_eOverviewMode;
int m_nofLines;
void paintEvent(QPaintEvent* e) override;
void mousePressEvent(QMouseEvent* e) override;
void mouseMoveEvent(QMouseEvent* e) override;
void drawColumn(QPainter& p, e_OverviewMode eOverviewMode, int x, int w, int h, int nofLines);
};
#endif // !OVERVIEW_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment