PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::views::trace::View Class Reference

#include <view.hpp>

Inheritance diagram for pv::views::trace::View:
Collaboration diagram for pv::views::trace::View:

Public Slots

void trigger_event (int segment_id, util::Timestamp location)
 
- Public Slots inherited from pv::views::ViewBase
virtual void trigger_event (int segment_id, util::Timestamp location)
 
virtual void signals_changed ()
 
virtual void capture_state_updated (int state)
 
virtual void on_new_segment (int new_segment_id)
 
virtual void on_segment_completed (int new_segment_id)
 
virtual void perform_delayed_view_update ()
 

Signals

void hover_point_changed (const QWidget *widget, const QPoint &hp)
 
void selection_changed ()
 
void offset_changed ()
 Emitted when the offset changed. More...
 
void scale_changed ()
 Emitted when the scale changed. More...
 
void sticky_scrolling_changed (bool state)
 
void always_zoom_to_fit_changed (bool state)
 
void tick_prefix_changed ()
 Emitted when the tick_prefix changed. More...
 
void tick_precision_changed ()
 Emitted when the tick_precision changed. More...
 
void tick_period_changed ()
 Emitted when the tick_period changed. More...
 
void time_unit_changed ()
 Emitted when the time_unit changed. More...
 
void segment_changed (int segment_id)
 Emitted when the currently selected segment changed. More...
 
void segment_display_mode_changed (int mode, bool segment_selectable)
 
void cursor_state_changed (bool show)
 Emitted when the cursors are shown/hidden. More...
 

Public Member Functions

 View (Session &session, bool is_main_view=false, QMainWindow *parent=nullptr)
 
 ~View ()
 
virtual ViewType get_type () const
 
virtual void reset_view_state ()
 
Sessionsession ()
 
const Sessionsession () const
 
vector< shared_ptr< Signal > > signals () const
 
shared_ptr< Signalget_signal_by_signalbase (shared_ptr< data::SignalBase > base) const
 
virtual void clear_signalbases ()
 
virtual void add_signalbase (const shared_ptr< data::SignalBase > signalbase)
 
virtual void remove_signalbase (const shared_ptr< data::SignalBase > signalbase)
 
void remove_trace (shared_ptr< Trace > trace)
 
shared_ptr< Signalget_signal_under_mouse_cursor () const
 
virtual Viewview ()
 
virtual const Viewview () const
 
Viewportviewport ()
 
const Viewportviewport () const
 
QAbstractScrollAreascrollarea () const
 
const Rulerruler () const
 
virtual void save_settings (QSettings &settings) const
 
virtual void restore_settings (QSettings &settings)
 
vector< shared_ptr< TimeItem > > time_items () const
 
double scale () const
 
const pv::util::Timestampoffset () const
 
const pv::util::Timestampruler_offset () const
 
void set_zero_position (const pv::util::Timestamp &position)
 
void reset_zero_position ()
 
pv::util::Timestamp zero_offset () const
 
int owner_visual_v_offset () const
 
void set_v_offset (int offset)
 
void set_h_offset (int offset)
 
int get_h_scrollbar_maximum () const
 
pv::util::SIPrefix tick_prefix () const
 
unsigned int tick_precision () const
 
const pv::util::Timestamptick_period () const
 
unsigned int minor_tick_count () const
 
util::TimeUnit time_unit () const
 
unsigned int depth () const
 
uint32_t current_segment () const
 
bool segment_is_selectable () const
 
Trace::SegmentDisplayMode segment_display_mode () const
 
void set_segment_display_mode (Trace::SegmentDisplayMode mode)
 
void zoom (double steps)
 
void zoom (double steps, int offset)
 
void zoom_fit (bool gui_state)
 
virtual void focus_on_range (uint64_t start_sample, uint64_t end_sample)
 
void set_scale_offset (double scale, const pv::util::Timestamp &offset)
 
vector< shared_ptr< pv::data::SignalData > > get_visible_data () const
 
pair< pv::util::Timestamp, pv::util::Timestampget_time_extents () const
 
bool colored_bg () const
 
bool cursors_shown () const
 
void show_cursors (bool show=true)
 
void set_cursors (pv::util::Timestamp &first, pv::util::Timestamp &second)
 
void center_cursors ()
 
shared_ptr< CursorPaircursors () const
 
shared_ptr< Flagadd_flag (const pv::util::Timestamp &time)
 
void remove_flag (shared_ptr< Flag > flag)
 
vector< shared_ptr< Flag > > flags () const
 
const QPoint & hover_point () const
 
const QWidget * hover_widget () const
 
int64_t get_nearest_level_change (const QPoint &p)
 
void restack_all_trace_tree_items ()
 
int header_width () const
 
void on_setting_changed (const QString &key, const QVariant &value)
 
void row_item_appearance_changed (bool label, bool content)
 
void time_item_appearance_changed (bool label, bool content)
 
void extents_changed (bool horz, bool vert)
 
- Public Member Functions inherited from pv::views::ViewBase
 ViewBase (Session &session, bool is_main_view=false, QMainWindow *parent=nullptr)
 
bool is_main_view () const
 
Sessionsession ()
 
const Sessionsession () const
 
vector< shared_ptr< data::SignalBase > > signalbases () const
 
- Public Member Functions inherited from pv::views::trace::TraceTreeItemOwner
virtual const item_listchild_items () const
 
vector< shared_ptr< TraceTreeItem > > trace_tree_child_items () const
 
void clear_child_items ()
 
void add_child_item (shared_ptr< TraceTreeItem > item)
 
void remove_child_item (shared_ptr< TraceTreeItem > item)
 
virtual void restack_items ()
 
pair< int, int > v_extents () const
 
- Public Member Functions inherited from pv::views::trace::ViewItemOwner
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
template<class T >
vector< shared_ptr< T > > list_by_type ()
 

Private Types

enum  StickyEvents { TraceTreeItemHExtentsChanged = 1, TraceTreeItemVExtentsChanged = 2 }
 

Private Slots

void on_signal_name_changed ()
 
void on_splitter_moved ()
 
void on_zoom_in_shortcut_triggered ()
 
void on_zoom_out_shortcut_triggered ()
 
void on_scroll_to_start_shortcut_triggered ()
 
void on_scroll_to_end_shortcut_triggered ()
 
void h_scroll_value_changed (int value)
 
void v_scroll_value_changed ()
 
void on_grab_ruler (int ruler_id)
 
void signals_changed ()
 
void capture_state_updated (int state)
 
void on_new_segment (int new_segment_id)
 
void on_segment_completed (int new_segment_id)
 
void on_segment_changed (int segment)
 
void on_settingViewTriggerIsZeroTime_changed (const QVariant new_value)
 
void on_create_marker_here ()
 
virtual void perform_delayed_view_update ()
 
void process_sticky_events ()
 
void set_offset (const pv::util::Timestamp &offset, bool force_update=false)
 
void set_scale (double scale)
 
void set_tick_prefix (pv::util::SIPrefix tick_prefix)
 
void set_tick_precision (unsigned tick_precision)
 
void set_tick_period (const pv::util::Timestamp &tick_period)
 
void set_time_unit (pv::util::TimeUnit time_unit)
 
void set_current_segment (uint32_t segment_id)
 

Private Member Functions

void get_scroll_layout (double &length, pv::util::Timestamp &offset) const
 
void set_zoom (double scale, int offset)
 
void calculate_tick_spacing ()
 
void adjust_top_margin ()
 
void update_scroll ()
 
void reset_scroll ()
 
void set_scroll_default ()
 
void determine_if_header_was_shrunk ()
 
void resize_header_to_fit ()
 
void update_layout ()
 
TraceTreeItemOwnerfind_prevalent_trace_group (const shared_ptr< sigrok::ChannelGroup > &group, const map< shared_ptr< data::SignalBase >, shared_ptr< Signal > > &signal_map)
 
void determine_time_unit ()
 
bool eventFilter (QObject *object, QEvent *event)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
void resizeEvent (QResizeEvent *event)
 
void update_view_range_metaobject () const
 
void update_hover_point ()
 

Static Private Member Functions

static vector< shared_ptr< Trace > > extract_new_traces_for_channels (const vector< shared_ptr< sigrok::Channel > > &channels, const map< shared_ptr< data::SignalBase >, shared_ptr< Signal > > &signal_map, set< shared_ptr< Trace > > &add_list)
 

Private Attributes

CustomScrollAreascrollarea_
 
Viewportviewport_
 
Rulerruler_
 
Headerheader_
 
QSplitter * splitter_
 
QShortcut * zoom_in_shortcut_
 
QShortcut * zoom_in_shortcut_2_
 
QShortcut * zoom_out_shortcut_
 
QShortcut * zoom_out_shortcut_2_
 
QShortcut * home_shortcut_
 
QShortcut * end_shortcut_
 
QShortcut * grab_ruler_left_shortcut_
 
QShortcut * grab_ruler_right_shortcut_
 
QShortcut * cancel_grab_shortcut_
 
mutex signal_mutex_
 
vector< shared_ptr< Signal > > signals_
 
Trace::SegmentDisplayMode segment_display_mode_
 
bool segment_selectable_
 Signals whether the user can change the currently shown segment. More...
 
double scale_
 The view time scale in seconds per pixel. More...
 
pv::util::Timestamp offset_
 The internal view version of the time offset in seconds. More...
 
pv::util::Timestamp ruler_offset_
 The ruler version of the time offset in seconds. More...
 
pv::util::Timestamp zero_offset_
 The offset of the zero point in seconds. More...
 
bool custom_zero_offset_set_
 Shows whether the user set a custom zero offset that we should keep. More...
 
bool updating_scroll_
 
bool restoring_state_
 
bool header_was_shrunk_
 
bool sticky_scrolling_
 
bool colored_bg_
 
bool always_zoom_to_fit_
 
pv::util::Timestamp tick_period_
 
pv::util::SIPrefix tick_prefix_
 
unsigned int minor_tick_count_
 
unsigned int tick_precision_
 
util::TimeUnit time_unit_
 
bool show_cursors_
 
shared_ptr< CursorPaircursors_
 
list< shared_ptr< Flag > > flags_
 
char next_flag_text_
 
vector< shared_ptr< TriggerMarker > > trigger_markers_
 
QWidget * hover_widget_
 
TimeMarkergrabbed_widget_
 
QPoint hover_point_
 
shared_ptr< Signalsignal_under_mouse_cursor_
 
uint16_t snap_distance_
 
unsigned int sticky_events_
 
QTimer lazy_event_handler_
 
bool scroll_needs_defaults_
 
int saved_v_offset_
 
double scale_at_acq_start_
 
pv::util::Timestamp offset_at_acq_start_
 
uint32_t context_menu_x_pos_
 

Static Private Attributes

static const pv::util::Timestamp MaxScale
 
static const pv::util::Timestamp MinScale
 
static const int MaxScrollValue = INT_MAX / 2
 
static const int ViewScrollMargin = 50
 
static const int ScaleUnits [3] = {1, 2, 5}
 

Additional Inherited Members

- Public Types inherited from pv::views::trace::ViewItemOwner
typedef vector< shared_ptr< ViewItem > > item_list
 
typedef ViewItemIterator< ViewItemOwner, ViewItemiterator
 
typedef ViewItemIterator< const ViewItemOwner, ViewItemconst_iterator
 
- Static Public Attributes inherited from pv::views::ViewBase
static const int MaxViewAutoUpdateRate = 25
 
- Protected Attributes inherited from pv::views::ViewBase
Sessionsession_
 
const bool is_main_view_
 
util::TimeUnit time_unit_
 
vector< shared_ptr< data::SignalBase > > signalbases_
 
uint32_t current_segment_
 The ID of the currently displayed segment. More...
 
QTimer delayed_view_updater_
 
- Protected Attributes inherited from pv::views::trace::ViewItemOwner
item_list items_
 

Detailed Description

Definition at line 83 of file view.hpp.

Member Enumeration Documentation

Enumerator
TraceTreeItemHExtentsChanged 
TraceTreeItemVExtentsChanged 

Definition at line 88 of file view.hpp.

Constructor & Destructor Documentation

pv::views::trace::View::View ( Session session,
bool  is_main_view = false,
QMainWindow parent = nullptr 
)
explicit

Definition at line 127 of file view.cpp.

Here is the call graph for this function:

pv::views::trace::View::~View ( )

Definition at line 268 of file view.cpp.

Here is the call graph for this function:

Member Function Documentation

shared_ptr< Flag > pv::views::trace::View::add_flag ( const pv::util::Timestamp time)

Adds a new flag at a specified time.

Definition at line 1012 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::add_signalbase ( const shared_ptr< data::SignalBase signalbase)
virtual

Reimplemented from pv::views::ViewBase.

Definition at line 354 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::adjust_top_margin ( )
private

Definition at line 1299 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::always_zoom_to_fit_changed ( bool  state)
signal

Definition at line 538 of file moc_view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::calculate_tick_spacing ( )
private

Find a tick spacing and number formatting that does not cause the values to collide.

Definition at line 1231 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::capture_state_updated ( int  state)
privateslot

Definition at line 1994 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::center_cursors ( )

Moves the cursors to a convenient position in the view. You still have to call show_cursors() separately.

Definition at line 995 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::clear_signalbases ( )
virtual

Reimplemented from pv::views::ViewBase.

Definition at line 348 of file view.cpp.

Here is the call graph for this function:

bool pv::views::trace::View::colored_bg ( ) const

Returns true if the trace background should be drawn with a colored background.

Definition at line 963 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::contextMenuEvent ( QContextMenuEvent *  event)
privatevirtual

Definition at line 1596 of file view.cpp.

Here is the call graph for this function:

uint32_t pv::views::trace::View::current_segment ( ) const

Returns the currently displayed segment, starting at 0.

Definition at line 681 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::cursor_state_changed ( bool  show)
signal

Emitted when the cursors are shown/hidden.

Definition at line 583 of file moc_view.cpp.

Here is the caller graph for this function:

shared_ptr< CursorPair > pv::views::trace::View::cursors ( ) const

Returns a reference to the pair of cursors.

Definition at line 1007 of file view.cpp.

Here is the caller graph for this function:

bool pv::views::trace::View::cursors_shown ( ) const

Returns true if cursors are displayed, false otherwise.

Definition at line 968 of file view.cpp.

Here is the caller graph for this function:

unsigned int pv::views::trace::View::depth ( ) const
virtual

Returns the number of nested parents that this row item owner has.

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 676 of file view.cpp.

void pv::views::trace::View::determine_if_header_was_shrunk ( )
private

Definition at line 1400 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::determine_time_unit ( )
private

Definition at line 1499 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool pv::views::trace::View::eventFilter ( QObject object,
QEvent *  event 
)
private

Definition at line 1518 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::extents_changed ( bool  horz,
bool  vert 
)
virtual

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 1712 of file view.cpp.

vector< shared_ptr< Trace > > pv::views::trace::View::extract_new_traces_for_channels ( const vector< shared_ptr< sigrok::Channel > > &  channels,
const map< shared_ptr< data::SignalBase >, shared_ptr< Signal > > &  signal_map,
set< shared_ptr< Trace > > &  add_list 
)
staticprivate

Definition at line 1475 of file view.cpp.

Here is the caller graph for this function:

TraceTreeItemOwner * pv::views::trace::View::find_prevalent_trace_group ( const shared_ptr< sigrok::ChannelGroup > &  group,
const map< shared_ptr< data::SignalBase >, shared_ptr< Signal > > &  signal_map 
)
private

Definition at line 1439 of file view.cpp.

Here is the caller graph for this function:

vector< shared_ptr< Flag > > pv::views::trace::View::flags ( ) const

Gets the list of flags.

Definition at line 1031 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::focus_on_range ( uint64_t  start_sample,
uint64_t  end_sample 
)
virtual

Reimplemented from pv::views::ViewBase.

Definition at line 859 of file view.cpp.

Here is the call graph for this function:

int pv::views::trace::View::get_h_scrollbar_maximum ( ) const

Gets the length of the horizontal scrollbar.

Definition at line 671 of file view.cpp.

Here is the caller graph for this function:

int64_t pv::views::trace::View::get_nearest_level_change ( const QPoint &  p)

Determines the closest level change (i.e. edge) to a given point, which is useful for e.g. the "snap to edge" functionality.

Parameters
pThe current position of the mouse cursor
Returns
The sample number of the nearest level change or -1 if none

Definition at line 1052 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::get_scroll_layout ( double &  length,
pv::util::Timestamp offset 
) const
private

Definition at line 1212 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

shared_ptr< Signal > pv::views::trace::View::get_signal_by_signalbase ( shared_ptr< data::SignalBase base) const

Definition at line 335 of file view.cpp.

Here is the caller graph for this function:

shared_ptr< Signal > pv::views::trace::View::get_signal_under_mouse_cursor ( ) const

Definition at line 461 of file view.cpp.

Here is the caller graph for this function:

pair< Timestamp, Timestamp > pv::views::trace::View::get_time_extents ( ) const

Definition at line 928 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ViewType pv::views::trace::View::get_type ( ) const
virtual

Implements pv::views::ViewBase.

Definition at line 273 of file view.cpp.

vector< shared_ptr< SignalData > > pv::views::trace::View::get_visible_data ( ) const

Definition at line 917 of file view.cpp.

void pv::views::trace::View::h_scroll_value_changed ( int  value)
privateslot

Definition at line 1757 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int pv::views::trace::View::header_width ( ) const

Definition at line 1175 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const QPoint & pv::views::trace::View::hover_point ( ) const

Definition at line 1042 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::hover_point_changed ( const QWidget *  widget,
const QPoint &  hp 
)
signal

Definition at line 506 of file moc_view.cpp.

Here is the caller graph for this function:

const QWidget * pv::views::trace::View::hover_widget ( ) const

Definition at line 1047 of file view.cpp.

unsigned int pv::views::trace::View::minor_tick_count ( ) const

Returns number of minor division ticks per time marking.

Definition at line 717 of file view.cpp.

Here is the caller graph for this function:

const Timestamp & pv::views::trace::View::offset ( ) const

Returns the internal view version of the time offset of the left edge of the view in seconds.

Definition at line 605 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::offset_changed ( )
signal

Emitted when the offset changed.

Definition at line 519 of file moc_view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::on_create_marker_here ( )
privateslot

Definition at line 2086 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_grab_ruler ( int  ruler_id)
privateslot

Definition at line 1789 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_new_segment ( int  new_segment_id)
privateslot

Definition at line 2055 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::on_scroll_to_end_shortcut_triggered ( )
privateslot

Definition at line 1752 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_scroll_to_start_shortcut_triggered ( )
privateslot

Definition at line 1747 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_segment_changed ( int  segment)
privateslot

Definition at line 2065 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_segment_completed ( int  new_segment_id)
privateslot

Definition at line 2060 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::on_setting_changed ( const QString &  key,
const QVariant &  value 
)
virtual

Implements pv::GlobalSettingsInterface.

Definition at line 1180 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::on_settingViewTriggerIsZeroTime_changed ( const QVariant  new_value)
privateslot

Definition at line 2093 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_signal_name_changed ( )
privateslot

Definition at line 1722 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_splitter_moved ( )
privateslot

Definition at line 1728 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_zoom_in_shortcut_triggered ( )
privateslot

Definition at line 1737 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::on_zoom_out_shortcut_triggered ( )
privateslot

Definition at line 1742 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int pv::views::trace::View::owner_visual_v_offset ( ) const
virtual

Returns the vertical scroll offset.

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 652 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::perform_delayed_view_update ( )
privatevirtualslot

Definition at line 2101 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::process_sticky_events ( )
privateslot

Definition at line 2123 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::remove_flag ( shared_ptr< Flag flag)

Removes a flag from the list.

Definition at line 1025 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::remove_signalbase ( const shared_ptr< data::SignalBase signalbase)
virtual

Reimplemented from pv::views::ViewBase.

Definition at line 396 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::remove_trace ( shared_ptr< Trace trace)

Definition at line 440 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::reset_scroll ( )
private

Definition at line 1376 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::reset_view_state ( )
virtual

Resets the view to its default state after construction. It does however not reset the signal bases or any other connections with the session.

Reimplemented from pv::views::ViewBase.

Definition at line 278 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::reset_zero_position ( )

Definition at line 625 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::resize_header_to_fit ( )
private

Definition at line 1411 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::resizeEvent ( QResizeEvent *  event)
private

Definition at line 1621 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::restack_all_trace_tree_items ( )

Definition at line 1153 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::restore_settings ( QSettings settings)
virtual

Reimplemented from pv::views::ViewBase.

Definition at line 519 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::row_item_appearance_changed ( bool  label,
bool  content 
)
virtual

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 1691 of file view.cpp.

const Ruler * pv::views::trace::View::ruler ( ) const

Definition at line 491 of file view.cpp.

Here is the caller graph for this function:

const Timestamp & pv::views::trace::View::ruler_offset ( ) const

Returns the ruler version of the time offset of the left edge of the view in seconds.

Definition at line 610 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::save_settings ( QSettings settings) const
virtual

Reimplemented from pv::views::ViewBase.

Definition at line 496 of file view.cpp.

Here is the call graph for this function:

double pv::views::trace::View::scale ( ) const

Returns the view time scale in seconds per pixel.

Definition at line 577 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::scale_changed ( )
signal

Emitted when the scale changed.

Definition at line 525 of file moc_view.cpp.

Here is the caller graph for this function:

QAbstractScrollArea * pv::views::trace::View::scrollarea ( ) const

Definition at line 486 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::segment_changed ( int  segment_id)
signal

Emitted when the currently selected segment changed.

Definition at line 569 of file moc_view.cpp.

Here is the caller graph for this function:

Trace::SegmentDisplayMode pv::views::trace::View::segment_display_mode ( ) const

Definition at line 773 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::segment_display_mode_changed ( int  mode,
bool  segment_selectable 
)
signal

Emitted when the multi-segment display mode changed

Parameters
modeis a value of Trace::SegmentDisplayMode

Definition at line 576 of file moc_view.cpp.

Here is the caller graph for this function:

bool pv::views::trace::View::segment_is_selectable ( ) const

Returns whether the currently shown segment can be influenced (selected) or not.

Definition at line 768 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::selection_changed ( )
signal

Definition at line 513 of file moc_view.cpp.

Here is the caller graph for this function:

Session & pv::views::trace::View::session ( )
virtual

Returns the session of the owner.

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 320 of file view.cpp.

Here is the caller graph for this function:

const Session & pv::views::trace::View::session ( ) const
virtual

Returns the session of the owner.

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 325 of file view.cpp.

void pv::views::trace::View::set_current_segment ( uint32_t  segment_id)
privateslot

Sets the current segment with the first segment starting at 0.

Definition at line 743 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_cursors ( pv::util::Timestamp first,
pv::util::Timestamp second 
)

Sets the cursors to the given offsets. You still have to call show_cursors() separately.

Definition at line 984 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::set_h_offset ( int  offset)

Sets the visual h-offset.

Definition at line 664 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::set_offset ( const pv::util::Timestamp offset,
bool  force_update = false 
)
privateslot

Sets the 'offset_' and ruler_offset_ members and emits the 'offset_changed' signal if needed.

Definition at line 593 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_scale ( double  scale)
privateslot

Sets the 'scale_' member and emits the 'scale_changed' signal if needed.

Definition at line 582 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_scale_offset ( double  scale,
const pv::util::Timestamp offset 
)

Sets the scale and offset.

Parameters
scaleThe new view scale in seconds per pixel.
offsetThe view time offset in seconds.

Definition at line 889 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_scroll_default ( )
private

Definition at line 1381 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_segment_display_mode ( Trace::SegmentDisplayMode  mode)

Definition at line 778 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_tick_period ( const pv::util::Timestamp tick_period)
privateslot

Sets the 'tick_period_' member and emits the 'tick_period_changed' signal if needed.

Definition at line 722 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_tick_precision ( unsigned  tick_precision)
privateslot

Sets the 'tick_precision_' member and emits the 'tick_precision_changed' signal if needed.

Definition at line 704 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_tick_prefix ( pv::util::SIPrefix  tick_prefix)
privateslot

Sets the 'tick_prefix_' member and emits the 'tick_prefix_changed' signal if needed.

Definition at line 691 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_time_unit ( pv::util::TimeUnit  time_unit)
privateslot

Sets the 'time_unit' member and emits the 'time_unit_changed' signal if needed.

Definition at line 735 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_v_offset ( int  offset)

Sets the visual v-offset.

Definition at line 657 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::set_zero_position ( const pv::util::Timestamp position)

Definition at line 615 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::set_zoom ( double  scale,
int  offset 
)
private

Simultaneously sets the zoom and offset.

Parameters
scaleThe scale to set the view to in seconds per pixel. This value is clamped between MinScale and MaxScale.
offsetThe offset of the left edge of the view in seconds.

Definition at line 1219 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::show_cursors ( bool  show = true)

Shows or hides the cursors.

Definition at line 973 of file view.cpp.

Here is the caller graph for this function:

vector< shared_ptr< Signal > > pv::views::trace::View::signals ( ) const

Returns the signals contained in this view.

Definition at line 330 of file view.cpp.

void pv::views::trace::View::signals_changed ( )
privateslot

Definition at line 1809 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::sticky_scrolling_changed ( bool  state)
signal

Definition at line 531 of file moc_view.cpp.

Here is the caller graph for this function:

const pv::util::Timestamp & pv::views::trace::View::tick_period ( ) const

Returns period of the graticule time markings.

Definition at line 712 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::tick_period_changed ( )
signal

Emitted when the tick_period changed.

Definition at line 557 of file moc_view.cpp.

Here is the caller graph for this function:

unsigned int pv::views::trace::View::tick_precision ( ) const

Returns the number of fractional digits shown for the time markings.

Definition at line 699 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::tick_precision_changed ( )
signal

Emitted when the tick_precision changed.

Definition at line 551 of file moc_view.cpp.

Here is the caller graph for this function:

pv::util::SIPrefix pv::views::trace::View::tick_prefix ( ) const

Returns the SI prefix to apply to the graticule time markings.

Definition at line 686 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::tick_prefix_changed ( )
signal

Emitted when the tick_prefix changed.

Definition at line 545 of file moc_view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::time_item_appearance_changed ( bool  label,
bool  content 
)

Definition at line 1699 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

vector< shared_ptr< TimeItem > > pv::views::trace::View::time_items ( ) const

Gets a list of time markers.

Definition at line 560 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

TimeUnit pv::views::trace::View::time_unit ( ) const

Returns the unit of time currently used.

Definition at line 730 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::time_unit_changed ( )
signal

Emitted when the time_unit changed.

Definition at line 563 of file moc_view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::trigger_event ( int  segment_id,
util::Timestamp  location 
)
slot

Definition at line 1200 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::update_hover_point ( )
private

Definition at line 1655 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::update_layout ( )
private

Definition at line 1432 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::update_scroll ( )
private

Definition at line 1323 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::update_view_range_metaobject ( ) const
private

Definition at line 1630 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::views::trace::View::v_scroll_value_changed ( )
privateslot

Definition at line 1783 of file view.cpp.

Here is the caller graph for this function:

View * pv::views::trace::View::view ( )
virtual

Returns the view of the owner.

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 466 of file view.cpp.

const View * pv::views::trace::View::view ( ) const
virtual

Returns the view of the owner.

Implements pv::views::trace::TraceTreeItemOwner.

Definition at line 471 of file view.cpp.

Viewport * pv::views::trace::View::viewport ( )

Definition at line 476 of file view.cpp.

Here is the caller graph for this function:

const Viewport * pv::views::trace::View::viewport ( ) const

Definition at line 481 of file view.cpp.

pv::util::Timestamp pv::views::trace::View::zero_offset ( ) const

Definition at line 647 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::zoom ( double  steps)

Definition at line 824 of file view.cpp.

Here is the caller graph for this function:

void pv::views::trace::View::zoom ( double  steps,
int  offset 
)

Definition at line 829 of file view.cpp.

Here is the call graph for this function:

void pv::views::trace::View::zoom_fit ( bool  gui_state)

Definition at line 834 of file view.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool pv::views::trace::View::always_zoom_to_fit_
private

Definition at line 545 of file view.hpp.

QShortcut* pv::views::trace::View::cancel_grab_shortcut_
private

Definition at line 513 of file view.hpp.

bool pv::views::trace::View::colored_bg_
private

Definition at line 544 of file view.hpp.

uint32_t pv::views::trace::View::context_menu_x_pos_
private

Definition at line 581 of file view.hpp.

shared_ptr<CursorPair> pv::views::trace::View::cursors_
private

Definition at line 554 of file view.hpp.

bool pv::views::trace::View::custom_zero_offset_set_
private

Shows whether the user set a custom zero offset that we should keep.

Definition at line 537 of file view.hpp.

QShortcut * pv::views::trace::View::end_shortcut_
private

Definition at line 511 of file view.hpp.

list< shared_ptr<Flag> > pv::views::trace::View::flags_
private

Definition at line 556 of file view.hpp.

QShortcut* pv::views::trace::View::grab_ruler_left_shortcut_
private

Definition at line 512 of file view.hpp.

QShortcut * pv::views::trace::View::grab_ruler_right_shortcut_
private

Definition at line 512 of file view.hpp.

TimeMarker* pv::views::trace::View::grabbed_widget_
private

Definition at line 562 of file view.hpp.

Header* pv::views::trace::View::header_
private

Definition at line 506 of file view.hpp.

bool pv::views::trace::View::header_was_shrunk_
private

Definition at line 541 of file view.hpp.

QShortcut* pv::views::trace::View::home_shortcut_
private

Definition at line 511 of file view.hpp.

QPoint pv::views::trace::View::hover_point_
private

Definition at line 563 of file view.hpp.

QWidget* pv::views::trace::View::hover_widget_
private

Definition at line 561 of file view.hpp.

QTimer pv::views::trace::View::lazy_event_handler_
private

Definition at line 568 of file view.hpp.

const Timestamp pv::views::trace::View::MaxScale
staticprivate

Definition at line 94 of file view.hpp.

const int pv::views::trace::View::MaxScrollValue = INT_MAX / 2
staticprivate

Definition at line 97 of file view.hpp.

unsigned int pv::views::trace::View::minor_tick_count_
private

Definition at line 549 of file view.hpp.

const Timestamp pv::views::trace::View::MinScale
staticprivate

Definition at line 95 of file view.hpp.

char pv::views::trace::View::next_flag_text_
private

Definition at line 557 of file view.hpp.

pv::util::Timestamp pv::views::trace::View::offset_
private

The internal view version of the time offset in seconds.

Definition at line 531 of file view.hpp.

pv::util::Timestamp pv::views::trace::View::offset_at_acq_start_
private

Definition at line 578 of file view.hpp.

bool pv::views::trace::View::restoring_state_
private

Definition at line 540 of file view.hpp.

Ruler* pv::views::trace::View::ruler_
private

Definition at line 505 of file view.hpp.

pv::util::Timestamp pv::views::trace::View::ruler_offset_
private

The ruler version of the time offset in seconds.

Definition at line 533 of file view.hpp.

int pv::views::trace::View::saved_v_offset_
private

Definition at line 574 of file view.hpp.

double pv::views::trace::View::scale_
private

The view time scale in seconds per pixel.

Definition at line 528 of file view.hpp.

double pv::views::trace::View::scale_at_acq_start_
private

Definition at line 577 of file view.hpp.

const int pv::views::trace::View::ScaleUnits = {1, 2, 5}
staticprivate

Definition at line 100 of file view.hpp.

bool pv::views::trace::View::scroll_needs_defaults_
private

Definition at line 571 of file view.hpp.

CustomScrollArea* pv::views::trace::View::scrollarea_
private

Definition at line 503 of file view.hpp.

Trace::SegmentDisplayMode pv::views::trace::View::segment_display_mode_
private

Definition at line 522 of file view.hpp.

bool pv::views::trace::View::segment_selectable_
private

Signals whether the user can change the currently shown segment.

Definition at line 525 of file view.hpp.

bool pv::views::trace::View::show_cursors_
private

Definition at line 553 of file view.hpp.

mutex pv::views::trace::View::signal_mutex_
mutableprivate

Definition at line 515 of file view.hpp.

shared_ptr<Signal> pv::views::trace::View::signal_under_mouse_cursor_
private

Definition at line 564 of file view.hpp.

vector< shared_ptr<Signal> > pv::views::trace::View::signals_
private

Definition at line 516 of file view.hpp.

uint16_t pv::views::trace::View::snap_distance_
private

Definition at line 565 of file view.hpp.

QSplitter* pv::views::trace::View::splitter_
private

Definition at line 507 of file view.hpp.

unsigned int pv::views::trace::View::sticky_events_
private

Definition at line 567 of file view.hpp.

bool pv::views::trace::View::sticky_scrolling_
private

Definition at line 543 of file view.hpp.

pv::util::Timestamp pv::views::trace::View::tick_period_
private

Definition at line 547 of file view.hpp.

unsigned int pv::views::trace::View::tick_precision_
private

Definition at line 550 of file view.hpp.

pv::util::SIPrefix pv::views::trace::View::tick_prefix_
private

Definition at line 548 of file view.hpp.

util::TimeUnit pv::views::trace::View::time_unit_
private

Definition at line 551 of file view.hpp.

vector< shared_ptr<TriggerMarker> > pv::views::trace::View::trigger_markers_
private

Definition at line 559 of file view.hpp.

bool pv::views::trace::View::updating_scroll_
private

Definition at line 539 of file view.hpp.

Viewport* pv::views::trace::View::viewport_
private

Definition at line 504 of file view.hpp.

const int pv::views::trace::View::ViewScrollMargin = 50
staticprivate

Definition at line 98 of file view.hpp.

pv::util::Timestamp pv::views::trace::View::zero_offset_
private

The offset of the zero point in seconds.

Definition at line 535 of file view.hpp.

QShortcut* pv::views::trace::View::zoom_in_shortcut_
private

Definition at line 509 of file view.hpp.

QShortcut * pv::views::trace::View::zoom_in_shortcut_2_
private

Definition at line 509 of file view.hpp.

QShortcut* pv::views::trace::View::zoom_out_shortcut_
private

Definition at line 510 of file view.hpp.

QShortcut * pv::views::trace::View::zoom_out_shortcut_2_
private

Definition at line 510 of file view.hpp.


The documentation for this class was generated from the following files: