Major changes on code

Remove Qt4 support
Change include headers
Change the include of QCustomPlot lib and updated code based on upstream
This commit is contained in:
jfmcarreira committed 2017-12-06 03:11:02 +00:00
1 parent 73d843abf5
commit 430bdc09cd
66 files changed
+38551 -29387

No files matched your search

+6 -12
View File
@@ -70,13 +70,11 @@ void GridManager::drawGrid( QPixmap& image, const QRect& area, QPainter* painter
{
painter->setPen( mainPen );
// Draw crosses or dots on intersections
for( int x = offsetx; x <= area.right(); x += hSpacing )
{
for( int x = offsetx; x <= area.right(); x += hSpacing ) {
if( x >= imageWidth )
break;
for( int y = offsety; y <= area.bottom(); y += vSpacing )
{
for( int y = offsety; y <= area.bottom(); y += vSpacing ) {
if( y >= imageHeight )
break;
@@ -104,8 +102,7 @@ void GridManager::drawGrid( QPixmap& image, const QRect& area, QPainter* painter
painter->setPen( mainPen );
// Draw vertical line
for( int x = offsetx; x <= area.right(); x += hSpacing )
{
for( int x = offsetx; x <= area.right(); x += hSpacing ) {
if( x >= imageWidth )
break;
@@ -118,8 +115,7 @@ void GridManager::drawGrid( QPixmap& image, const QRect& area, QPainter* painter
}
}
// Draw horizontal line
for( int y = offsety; y <= area.bottom(); y += vSpacing )
{
for( int y = offsety; y <= area.bottom(); y += vSpacing ) {
if( y >= imageHeight )
break;
@@ -238,10 +234,8 @@ bool GridManager::isNear( int x, int y )
int gy;
// In the worse case we have 4 points of the gride surrounding
for( int j = 0; j < 2; j++ )
{
for( int i = 0; i < 2; i++ )
{
for( int j = 0; j < 2; j++ ) {
for( int i = 0; i < 2; i++ ) {
gx = (int)( multiPosX * hSpacing + i * hSpacing );
gy = (int)( multiPosY * vSpacing + j * vSpacing );
gridPoint.setX( gx );