]> sigrok.org Git - pulseview.git/blobdiff - pv/view/ruler.cpp
Moved RulerHeight out of View into Ruler
[pulseview.git] / pv / view / ruler.cpp
index bf1507a7fab31d0117e67ec4d18e50db8a0bbab0..8d7569e35b427769c191b76d0b50c009116ea156 100644 (file)
@@ -43,6 +43,7 @@ using namespace std;
 namespace pv {
 namespace view {
 
+const int Ruler::RulerHeight = 30;
 const int Ruler::MinorTickSubdivision = 4;
 const int Ruler::ScaleUnits[3] = {1, 2, 5};
 
@@ -84,6 +85,11 @@ QString Ruler::format_time(double t, unsigned int prefix,
        return s;
 }
 
+QSize Ruler::sizeHint() const
+{
+       return QSize(0, RulerHeight);
+}
+
 void Ruler::paintEvent(QPaintEvent*)
 {
        using namespace Qt;