namespace pv {
-const QSizeF Signal::LabelPadding(4, 0);
const int Signal::LabelHitPadding = 2;
Signal::Signal(QString name) :
QRectF Signal::get_label_rect(const QRect &rect)
{
+ using pv::view::View;
+
const float nominal_offset = get_nominal_offset(rect);
const QSizeF label_size(
- _text_size.width() + LabelPadding.width() * 2,
- _text_size.height() + LabelPadding.height() * 2);
+ _text_size.width() + View::LabelPadding.width() * 2,
+ _text_size.height() + View::LabelPadding.height() * 2);
const float label_arrow_length = label_size.height() / 2;
return QRectF(
rect.right() - label_arrow_length - label_size.width(),
const QColor View::CursorAreaColour(220, 231, 243);
+const QSizeF View::LabelPadding(4, 0);
+
View::View(SigSession &session, QWidget *parent) :
QAbstractScrollArea(parent),
_session(session),
#include <utility>
#include <QAbstractScrollArea>
+#include <QSizeF>
#include "cursor.h"
static const QColor CursorAreaColour;
+ static const QSizeF LabelPadding;
+
public:
explicit View(SigSession &session, QWidget *parent = 0);