DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
SignalPlotterBackend.cpp
Go to the documentation of this file.
1// This file is part of DynExp.
2
3#include "stdafx.h"
5
7{
8 SignalPlotterBackend::SignalPlotterBackend(QObject* parent) : QObject(parent)
9 {
10 }
11
12 void SignalPlotterBackend::SetRunning(bool Running) noexcept
13 {
14 if (this->Running == Running)
15 return;
16
17 this->Running = Running;
18
19 emit runningChanged(Running);
20 }
21
23 {
24 if (!Graph)
25 throw Util::InvalidStateException("Graph backend has not been assigned yet.");
26
27 return Graph;
28 }
29
31 {
32 return const_cast<DynExpQuick::DynExpLineGraphBackend*>(std::as_const(*this).GetGraph());
33 }
34
35 Q_INVOKABLE void SignalPlotterBackend::SetGraphBackend(QObject* Object)
36 {
37 Graph = qobject_cast<DynExpQuick::DynExpLineGraphBackend*>(Object);
38 }
39}
C++ backend of the SignalPlotter QML module.
DynExpQuick::DynExpLineGraphBackend * GetGraph() const
DynExpQuick::DynExpLineGraphBackend * Graph
An operation cannot be performed currently since the related object is in an invalid state like an er...
Definition Exception.h:151
Accumulates include statements to provide a precompiled header.