projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TimeMarker: Replaced time_changed signal with View::time_item_apparance_changed
[pulseview.git]
/
pv
/
view
/
view.cpp
diff --git
a/pv/view/view.cpp
b/pv/view/view.cpp
index 3df87e540b986b0e08b1242c9139950f65f12a5b..d58e074a3ef72ec77bc3e75c3487dac627cbb15d 100644
(file)
--- a/
pv/view/view.cpp
+++ b/
pv/view/view.cpp
@@
-121,11
+121,6
@@
View::View(Session &session, QWidget *parent) :
connect(&session_, SIGNAL(frame_ended()),
this, SLOT(data_updated()));
connect(&session_, SIGNAL(frame_ended()),
this, SLOT(data_updated()));
- connect(cursors_->first().get(), SIGNAL(time_changed()),
- this, SLOT(marker_time_changed()));
- connect(cursors_->second().get(), SIGNAL(time_changed()),
- this, SLOT(marker_time_changed()));
-
connect(header_, SIGNAL(signals_moved()),
this, SLOT(on_signals_moved()));
connect(header_, SIGNAL(signals_moved()),
this, SLOT(on_signals_moved()));
@@
-198,6
+193,7
@@
const Viewport* View::viewport() const
vector< shared_ptr<TimeItem> > View::time_items() const
{
vector< shared_ptr<TimeItem> > items;
vector< shared_ptr<TimeItem> > View::time_items() const
{
vector< shared_ptr<TimeItem> > items;
+ items.push_back(cursors_);
items.push_back(cursors_->first());
items.push_back(cursors_->second());
return items;
items.push_back(cursors_->first());
items.push_back(cursors_->second());
return items;
@@
-482,11
+478,11
@@
void View::update_scroll()
// Set the vertical scrollbar
verticalScrollBar()->setPageStep(areaSize.height());
// Set the vertical scrollbar
verticalScrollBar()->setPageStep(areaSize.height());
+ verticalScrollBar()->setSingleStep(areaSize.height() / 8);
const pair<int, int> extents = v_extents();
const pair<int, int> extents = v_extents();
- const int extra_scroll_height = (extents.second - extents.first) / 4;
- verticalScrollBar()->setRange(extents.first - extra_scroll_height,
- extents.first + extra_scroll_height);
+ verticalScrollBar()->setRange(extents.first - (areaSize.height() / 2),
+ extents.second - (areaSize.height() / 2));
}
void View::update_layout()
}
void View::update_layout()
@@
-606,7
+602,7
@@
void View::resizeEvent(QResizeEvent*)
update_layout();
}
update_layout();
}
-void View::appearance_changed(bool label, bool content)
+void View::
row_item_
appearance_changed(bool label, bool content)
{
if (label)
header_->update();
{
if (label)
header_->update();
@@
-614,11
+610,19
@@
void View::appearance_changed(bool label, bool content)
viewport_->update();
}
viewport_->update();
}
+void View::time_item_appearance_changed(bool label, bool content)
+{
+ if (label)
+ cursorheader_->update();
+ if (content)
+ viewport_->update();
+}
+
void View::extents_changed(bool horz, bool vert)
{
sticky_events_ |=
void View::extents_changed(bool horz, bool vert)
{
sticky_events_ |=
- (horz ?
Selectable
ItemHExtentsChanged : 0) |
- (vert ?
Selectable
ItemVExtentsChanged : 0);
+ (horz ?
Row
ItemHExtentsChanged : 0) |
+ (vert ?
Row
ItemVExtentsChanged : 0);
lazy_event_handler_.start();
}
lazy_event_handler_.start();
}
@@
-727,12
+731,6
@@
void View::data_updated()
viewport_->update();
}
viewport_->update();
}
-void View::marker_time_changed()
-{
- cursorheader_->update();
- viewport_->update();
-}
-
void View::on_signals_moved()
{
update_scroll();
void View::on_signals_moved()
{
update_scroll();
@@
-741,9
+739,9
@@
void View::on_signals_moved()
void View::process_sticky_events()
{
void View::process_sticky_events()
{
- if (sticky_events_ &
Selectable
ItemHExtentsChanged)
+ if (sticky_events_ &
Row
ItemHExtentsChanged)
update_layout();
update_layout();
- if (sticky_events_ &
Selectable
ItemVExtentsChanged)
+ if (sticky_events_ &
Row
ItemVExtentsChanged)
restack_all_row_items();
// Clear the sticky events
restack_all_row_items();
// Clear the sticky events