18#include "TraceDataProxy.hpp"
19#include "src/models/UITrace.hpp"
22 : QObject(parent), trace(trace), settings(settings), begin(trace->getStartTime()),
23 end(trace->getStartTime() + trace->getRuntime()) {
27TraceDataProxy::~TraceDataProxy() {
28 delete this->selection;
33 return this->selection;
61void TraceDataProxy::updateSelection() {
63 auto subtrace = trace->
subtrace(begin, end);
69 newBegin = qMax(types::TraceTime(0), newBegin);
72 newBegin = qMin(newEnd, newBegin);
73 newEnd = qMax(newBegin, newEnd);
75 auto oldBegin = begin;
81 if(oldBegin != begin) {
89 if(oldBegin != begin || oldEnd != end) {
Trace representing the whole trace loaded from trace files.
Class containing options to filter the view.
Trace * subtrace(otf2::chrono::duration from, otf2::chrono::duration to) override
Creates a subtrace of the current trace.
otf2::chrono::duration getRuntime() const override
Returns the runtime of the current trace.
A base class for all elements with a start and end time.
void endChanged(types::TraceTime newEnd)
ViewSettings * getSettings() const
Returns the current view settings.
types::TraceTime getTotalRuntime() const
void setFilter(Filter filter)
types::TraceTime getBegin() const
Returns the selected start time.
void setSelectionBegin(types::TraceTime newBegin)
Trace * getSelection() const
Returns the current selection.
TraceDataProxy(FileTrace *trace, ViewSettings *settings, QObject *parent=nullptr)
Constructs a new TraceDataProxy.
void selectionChanged(types::TraceTime newBegin, types::TraceTime newEnd)
Trace * getFullTrace() const
Returns the entire trace.
void beginChanged(types::TraceTime newBegin)
void setTimeElementSelection(TimedElement *newSlot)
types::TraceTime getEnd() const
Returns the selected end time.
void setSelectionEnd(types::TraceTime newEnd)
void setSelection(types::TraceTime newBegin, types::TraceTime newEnd)
void filterChanged(Filter)
void infoElementSelected(TimedElement *)
Abstract base class for a trace.
static UITrace * forResolution(Trace *trace, otf2::chrono::duration timePerPixel)
The ViewSettings class encapsulates settings for the main view.
void setFilter(Filter filter)
Sets the current filter.