projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ccee923
)
ViewItem: Moved in LabelPadding
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 20 Dec 2014 15:59:06 +0000
(15:59 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 28 Dec 2014 18:52:53 +0000
(18:52 +0000)
pv/view/cursor.cpp
patch
|
blob
|
history
pv/view/cursorpair.cpp
patch
|
blob
|
history
pv/view/timemarker.cpp
patch
|
blob
|
history
pv/view/trace.cpp
patch
|
blob
|
history
pv/view/view.cpp
patch
|
blob
|
history
pv/view/view.hpp
patch
|
blob
|
history
pv/view/viewitem.cpp
patch
|
blob
|
history
pv/view/viewitem.hpp
patch
|
blob
|
history
diff --git
a/pv/view/cursor.cpp
b/pv/view/cursor.cpp
index b5fcf9d6798ebc466c63859e687294a9583ba2ac..0ea6f5ab7b0c5e3edbc21b64600bc06e2f1346dd 100644
(file)
--- a/
pv/view/cursor.cpp
+++ b/
pv/view/cursor.cpp
@@
-66,8
+66,8
@@
QRectF Cursor::label_rect(const QRectF &rect) const
QSize text_size = m.boundingRect(get_text()).size();
const QSizeF label_size(
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();
const float top = rect.height() - label_size.height() -
TimeMarker::ArrowSize - 0.5f;
const float height = label_size.height();
diff --git
a/pv/view/cursorpair.cpp
b/pv/view/cursorpair.cpp
index 0395d03446d03abb72d6b5e8a92917e8b1f73bcd..c3753e6560707cbeacd132e4b94140a7a9455c28 100644
(file)
--- a/
pv/view/cursorpair.cpp
+++ b/
pv/view/cursorpair.cpp
@@
-85,8
+85,8
@@
pv::widgets::Popup* CursorPair::create_popup(QWidget *parent)
QRectF CursorPair::label_rect(const QRectF &rect) const
{
const QSizeF label_size(
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 pair<float, float> offsets(get_cursor_offsets());
const pair<float, float> normal_offsets(
(offsets.first < offsets.second) ? offsets :
diff --git
a/pv/view/timemarker.cpp
b/pv/view/timemarker.cpp
index 2b17184408a4ba8a5fb5f44f03320d832afdca8f..47ba34559a1dd15fa45fc2ff4d979d6a23f17dab 100644
(file)
--- a/
pv/view/timemarker.cpp
+++ b/
pv/view/timemarker.cpp
@@
-89,8
+89,8
@@
QRectF TimeMarker::label_rect(const QRectF &rect) const
const float text_height = m.height();
const QSizeF label_size(
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 float top = rect.height() - label_size.height() -
TimeMarker::ArrowSize - 0.5f;
const float height = label_size.height();
diff --git
a/pv/view/trace.cpp
b/pv/view/trace.cpp
index 24f97fb76da1c2f0052008354d801aef1bae2925..df5a954b43a216f66d7cb11c5799464d882a3fe4 100644
(file)
--- a/
pv/view/trace.cpp
+++ b/
pv/view/trace.cpp
@@
-151,8
+151,8
@@
QRectF Trace::label_rect(const QRectF &rect) const
const QSize text_size(
m.boundingRect(QRect(), 0, name_).width(), m.height());
const QSizeF label_size(
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 float half_height = label_size.height() / 2;
return QRectF(
rect.right() - half_height - label_size.width() - 0.5,
diff --git
a/pv/view/view.cpp
b/pv/view/view.cpp
index 59127c364bb7f0bf35ed83e3de0a8398357d53d1..e4b22c2fef63806094b516ba7e1e97fc9161ee69 100644
(file)
--- a/
pv/view/view.cpp
+++ b/
pv/view/view.cpp
@@
-84,8
+84,6
@@
const int View::MaxScrollValue = INT_MAX / 2;
const int View::ScaleUnits[3] = {1, 2, 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),
View::View(Session &session, QWidget *parent) :
QAbstractScrollArea(parent),
session_(session),
diff --git
a/pv/view/view.hpp
b/pv/view/view.hpp
index 167f43de0b50f497bcd2191851669fb3825dad51..9c7c13bcd3801089d5838c51ceb994cadfc4841f 100644
(file)
--- a/
pv/view/view.hpp
+++ b/
pv/view/view.hpp
@@
-67,9
+67,6
@@
private:
static const int ScaleUnits[3];
static const int ScaleUnits[3];
-public:
- static const QSizeF LabelPadding;
-
public:
explicit View(Session &session, QWidget *parent = 0);
public:
explicit View(Session &session, QWidget *parent = 0);
diff --git
a/pv/view/viewitem.cpp
b/pv/view/viewitem.cpp
index b833b4bbad0c19d2ea3afd6974381e35ecdf82fd..ae5c427aff426acae5db7baa319567f5e13cda41 100644
(file)
--- a/
pv/view/viewitem.cpp
+++ b/
pv/view/viewitem.cpp
@@
-29,6
+29,7
@@
namespace pv {
namespace view {
namespace pv {
namespace view {
+const QSizeF ViewItem::LabelPadding(4, 0);
const int ViewItem::HighlightRadius = 3;
ViewItem::ViewItem() :
const int ViewItem::HighlightRadius = 3;
ViewItem::ViewItem() :
diff --git
a/pv/view/viewitem.hpp
b/pv/view/viewitem.hpp
index 3e6801fe3186dffe74c10263f27b4192e95ef871..1e02ffde289514bac8bf816aef3532ea46630e5f 100644
(file)
--- a/
pv/view/viewitem.hpp
+++ b/
pv/view/viewitem.hpp
@@
-44,6
+44,7
@@
class ViewItem : public QObject
Q_OBJECT
public:
Q_OBJECT
public:
+ static const QSizeF LabelPadding;
static const int HighlightRadius;
public:
static const int HighlightRadius;
public: