]> sigrok.org Git - pulseview.git/blobdiff - pv/view/ruler.hpp
View: Change the type of tick_period to pv::util::Timestamp
[pulseview.git] / pv / view / ruler.hpp
index d01b151243aeb2ea3c9a32ab8a3077cf20a76677..f717c3785674c2b814838b915a18d18741ad6fed 100644 (file)
 #include "marginwidget.hpp"
 #include <pv/util.hpp>
 
+namespace RulerTest {
+class tick_position_test_0;
+class tick_position_test_1;
+class tick_position_test_2;
+}
+
 namespace pv {
 namespace view {
 
@@ -39,6 +45,10 @@ class Ruler : public MarginWidget
 {
        Q_OBJECT
 
+       friend class RulerTest::tick_position_test_0;
+       friend class RulerTest::tick_position_test_1;
+       friend class RulerTest::tick_position_test_2;
+
 private:
 
        /// Height of the ruler in multipes of the text height
@@ -116,7 +126,7 @@ private:
         *         tick positions.
         */
        static TickPositions calculate_tick_positions(
-               const double major_period,
+               const pv::util::Timestamp& major_period,
                const pv::util::Timestamp& offset,
                const double scale,
                const int width,