[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [analitza] analitzaplot: Minor correction and added brief setShowMinorGrid documentation
From: Percy_Camilo_Triveño_Aucahuasi <percy.camilo.ta () gmail ! com>
Date: 2014-01-08 7:58:36
Message-ID: E1W0o28-000850-4t () scm ! kde ! org
[Download RAW message or body]
Git commit 3d3748c2e20b8095ae212300f5ea37fa67755bd3 by Percy Camilo Triveño \
Aucahuasi. Committed on 08/01/2014 at 07:57.
Pushed by aucahuasi into branch 'master'.
Minor correction and added brief setShowMinorGrid documentation
M +6 -1 analitzaplot/plotter2d.cpp
M +1 -1 analitzaplot/plotter2d.h
http://commits.kde.org/analitza/3d3748c2e20b8095ae212300f5ea37fa67755bd3
diff --git a/analitzaplot/plotter2d.cpp b/analitzaplot/plotter2d.cpp
index 6a3834d..990b5a6 100644
--- a/analitzaplot/plotter2d.cpp
+++ b/analitzaplot/plotter2d.cpp
@@ -497,7 +497,7 @@ void Plotter2D::drawGridTickLabels(QPainter* painter, const \
GridInfo& gridinfo, if (m_showTickLabels & Qt::Vertical)
drawCartesianTickLabels(painter, gridinfo, YAxis);
- if ((gridStyle == Circles) && m_showPolarAngles) // draw labels for angles \
(polar axis) + if ((gridStyle == Circles) && m_showPolarAngles && m_showGrid) // \
draw labels for angles (polar axis) drawPolarTickLabels(painter, gridinfo);
}
@@ -573,7 +573,12 @@ void Plotter2D::drawCircles(QPainter* painter, const GridInfo& \
gridinfo, GridSty if (j % alternatesubgridcount == 0)
painter->setPen(gridPen);
else
+ {
+ if (!m_showMinorGrid)
+ continue;
+
painter->setPen(subGridPen);
+ }
p = toWidget(QPointF(r*std::cos(t), r*std::sin(t)));
painter->drawLine(origin, p);
diff --git a/analitzaplot/plotter2d.h b/analitzaplot/plotter2d.h
index f1c86ce..9ddb120 100644
--- a/analitzaplot/plotter2d.h
+++ b/analitzaplot/plotter2d.h
@@ -63,7 +63,7 @@ class ANALITZAPLOT_EXPORT Plotter2D
/** Sets whether we will draw the grid. */
void setShowGrid(bool show) { m_showGrid=show; forceRepaint(); }
- //only works if showgrid is true
+ //only works if showgrid is true. for polar grid it affects to subdivision \
of angles/rays
void setShowMinorGrid(bool mt) { m_showMinorGrid=mt; forceRepaint(); }
/** Returns whether we have chosen to draw the grid. */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic