]> sigrok.org Git - pulseview.git/blobdiff - pv/view/ruler.cpp
Replaced using namespace with using class directives
[pulseview.git] / pv / view / ruler.cpp
index bf1507a7fab31d0117e67ec4d18e50db8a0bbab0..aec3de979cf5171062df6777e78a42aaf4c74b03 100644 (file)
 
 #include <pv/widgets/popup.h>
 
-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;