QSize text_size = m.boundingRect(get_text()).size();
const QSizeF label_size(
- text_size.width() + View::LabelPadding.width() * 2,
- text_size.height() + View::LabelPadding.height() * 2);
+ text_size.width() + LabelPadding.width() * 2,
+ text_size.height() + LabelPadding.height() * 2);
const float top = rect.height() - label_size.height() -
TimeMarker::ArrowSize - 0.5f;
const float height = label_size.height();
QRectF CursorPair::label_rect(const QRectF &rect) const
{
const QSizeF label_size(
- text_size_.width() + View::LabelPadding.width() * 2,
- text_size_.height() + View::LabelPadding.height() * 2);
+ text_size_.width() + LabelPadding.width() * 2,
+ text_size_.height() + LabelPadding.height() * 2);
const pair<float, float> offsets(get_cursor_offsets());
const pair<float, float> normal_offsets(
(offsets.first < offsets.second) ? offsets :
const float text_height = m.height();
const QSizeF label_size(
- text_width + View::LabelPadding.width() * 2,
- text_height + View::LabelPadding.height() * 2);
+ text_width + LabelPadding.width() * 2,
+ text_height + LabelPadding.height() * 2);
const float top = rect.height() - label_size.height() -
TimeMarker::ArrowSize - 0.5f;
const float height = label_size.height();
const QSize text_size(
m.boundingRect(QRect(), 0, name_).width(), m.height());
const QSizeF label_size(
- text_size.width() + View::LabelPadding.width() * 2,
- ceilf((text_size.height() + View::LabelPadding.height() * 2) / 2) * 2);
+ text_size.width() + LabelPadding.width() * 2,
+ ceilf((text_size.height() + LabelPadding.height() * 2) / 2) * 2);
const float half_height = label_size.height() / 2;
return QRectF(
rect.right() - half_height - label_size.width() - 0.5,
const int View::ScaleUnits[3] = {1, 2, 5};
-const QSizeF View::LabelPadding(4, 0);
-
View::View(Session &session, QWidget *parent) :
QAbstractScrollArea(parent),
session_(session),
static const int ScaleUnits[3];
-public:
- static const QSizeF LabelPadding;
-
public:
explicit View(Session &session, QWidget *parent = 0);
namespace pv {
namespace view {
+const QSizeF ViewItem::LabelPadding(4, 0);
const int ViewItem::HighlightRadius = 3;
ViewItem::ViewItem() :
Q_OBJECT
public:
+ static const QSizeF LabelPadding;
static const int HighlightRadius;
public: