X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fruler.cpp;h=aec3de979cf5171062df6777e78a42aaf4c74b03;hp=bf1507a7fab31d0117e67ec4d18e50db8a0bbab0;hb=819f4c25391a9c74d3d2f528d462142d5c4aad4d;hpb=4d3c4e342104dcba47c252e734dee441faaf2a9e diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index bf1507a7..aec3de97 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -37,12 +37,13 @@ #include -using namespace boost; -using namespace std; +using namespace Qt; +using boost::shared_ptr; namespace pv { namespace view { +const int Ruler::RulerHeight = 30; const int Ruler::MinorTickSubdivision = 4; const int Ruler::ScaleUnits[3] = {1, 2, 5}; @@ -84,9 +85,13 @@ 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; const double SpacingIncrement = 32.0f; const double MinValueSpacing = 32.0f;