Motiv
Marvelous OTF2 Traces Interactive Visualizer
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | List of all members
TraceDataProxy Class Reference

Model class providing access to data and pub/sub architecture of change events. More...

#include <TraceDataProxy.hpp>

Inheritance diagram for TraceDataProxy:
Inheritance graph
[legend]
Collaboration diagram for TraceDataProxy:
Collaboration graph
[legend]

Public Slots

void setSelectionBegin (types::TraceTime newBegin)
 
void setSelectionEnd (types::TraceTime newEnd)
 
void setSelection (types::TraceTime newBegin, types::TraceTime newEnd)
 
void setFilter (Filter filter)
 
void setTimeElementSelection (TimedElement *newSlot)
 

Signals

void selectionChanged (types::TraceTime newBegin, types::TraceTime newEnd)
 
void beginChanged (types::TraceTime newBegin)
 
void endChanged (types::TraceTime newEnd)
 
void infoElementSelected (TimedElement *)
 
void filterChanged (Filter)
 

Public Member Functions

 TraceDataProxy (FileTrace *trace, ViewSettings *settings, QObject *parent=nullptr)
 Constructs a new TraceDataProxy. More...
 
TracegetSelection () const
 Returns the current selection. More...
 
types::TraceTime getBegin () const
 Returns the selected start time. More...
 
types::TraceTime getEnd () const
 Returns the selected end time. More...
 
ViewSettingsgetSettings () const
 Returns the current view settings. More...
 
TracegetFullTrace () const
 Returns the entire trace. More...
 
types::TraceTime getTotalRuntime () const
 

Detailed Description

Model class providing access to data and pub/sub architecture of change events.

TraceDataProxy acts as an intermediate class between the views and the data. This class tracks all state changes related to the representation of the trace, e.g. selections and emits a signal on changes.

Definition at line 35 of file TraceDataProxy.hpp.

Constructor & Destructor Documentation

◆ TraceDataProxy()

TraceDataProxy::TraceDataProxy ( FileTrace trace,
ViewSettings settings,
QObject *  parent = nullptr 
)

Constructs a new TraceDataProxy.

The object takes ownership of the supplied FileTrace.

Parameters
traceThe entire trace
settingsThe view settings
parentThe parent QObject

Definition at line 21 of file TraceDataProxy.cpp.

◆ ~TraceDataProxy()

TraceDataProxy::~TraceDataProxy ( )
overridevirtual

Definition at line 27 of file TraceDataProxy.cpp.

Member Function Documentation

◆ beginChanged

void TraceDataProxy::beginChanged ( types::TraceTime  newBegin)
signal

Signals the begin was changed

◆ endChanged

void TraceDataProxy::endChanged ( types::TraceTime  newEnd)
signal

Signals the end was changed

◆ filterChanged

void TraceDataProxy::filterChanged ( Filter  )
signal

Signals the filter was changes

◆ getBegin()

types::TraceTime TraceDataProxy::getBegin ( ) const

Returns the selected start time.

Returns
The selected start time

Definition at line 36 of file TraceDataProxy.cpp.

◆ getEnd()

types::TraceTime TraceDataProxy::getEnd ( ) const

Returns the selected end time.

Returns
The selected end time

Definition at line 40 of file TraceDataProxy.cpp.

◆ getFullTrace()

Trace * TraceDataProxy::getFullTrace ( ) const

Returns the entire trace.

Returns
The full trace

Definition at line 104 of file TraceDataProxy.cpp.

◆ getSelection()

Trace * TraceDataProxy::getSelection ( ) const

Returns the current selection.

The selection refers to the parts of the trace that is in the selected time window

Returns
The current selection

Definition at line 32 of file TraceDataProxy.cpp.

◆ getSettings()

ViewSettings * TraceDataProxy::getSettings ( ) const

Returns the current view settings.

Returns
The current view settings

Definition at line 52 of file TraceDataProxy.cpp.

◆ getTotalRuntime()

types::TraceTime TraceDataProxy::getTotalRuntime ( ) const

Returns the runtime of the entire loaded trace

Returns

Definition at line 57 of file TraceDataProxy.cpp.

◆ infoElementSelected

void TraceDataProxy::infoElementSelected ( TimedElement )
signal

Signals a change to the selected slot, nullptr if none

◆ selectionChanged

void TraceDataProxy::selectionChanged ( types::TraceTime  newBegin,
types::TraceTime  newEnd 
)
signal

Signals the selection has been changed

◆ setFilter

void TraceDataProxy::setFilter ( Filter  filter)
slot

Change the filter

Parameters
filter

Definition at line 98 of file TraceDataProxy.cpp.

◆ setSelection

void TraceDataProxy::setSelection ( types::TraceTime  newBegin,
types::TraceTime  newEnd 
)
slot

Change the start and end time of the selection

Parameters
newBegin
newEnd
Invariant
newBegin may not be larger than end or total runtime
newEnd may not be smaller than begin and not larger than runtime

Definition at line 68 of file TraceDataProxy.cpp.

◆ setSelectionBegin

void TraceDataProxy::setSelectionBegin ( types::TraceTime  newBegin)
slot

Change the start time of the selection

Parameters
newBegin
Invariant
may not be larger than end or total runtime

Definition at line 44 of file TraceDataProxy.cpp.

◆ setSelectionEnd

void TraceDataProxy::setSelectionEnd ( types::TraceTime  newEnd)
slot

Change the end time of the selection

Parameters
newEnd
Invariant
may not be smaller than begin and not larger than runtime

Definition at line 48 of file TraceDataProxy.cpp.

◆ setTimeElementSelection

void TraceDataProxy::setTimeElementSelection ( TimedElement newSlot)
slot

Change the selected slot

Parameters
newSlotpass nullptr if none selected

Definition at line 94 of file TraceDataProxy.cpp.


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