-
Notifications
You must be signed in to change notification settings - Fork 0
/
pn_absvalue.cpp
56 lines (28 loc) · 966 Bytes
/
pn_absvalue.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "pn_absvalue.h"
PN_AbsValue::PN_AbsValue(QObject *parent)
: ProcessNode{parent}
{
m_processorType = TypeHelper::AbsValue;
}
PN_AbsValue::PN_AbsValue(QByteArray identifier, int idxInControlller, PN_AbsValue *controller, TypeHelper::ValueType type, quint16 valueNumber, QObject *parent)
: ProcessNode{identifier, idxInControlller, type, valueNumber, parent}
{
m_processorType = TypeHelper::AbsValue;
}
//void PN_AbsValue::initSaveData()
//{
//}
//void PN_AbsValue::loadDataFromQdomElement(QDomElement domElement)
//{
//}
ProcessNode *PN_AbsValue::createSubprocessor(QString objectname_id)
{
PN_AbsValue *newSubprocessor = new PN_AbsValue(identifier(), subProcessor.size(), this);
connect(this, &QObject::destroyed, newSubprocessor, &QObject::deleteLater);
emit newSubprocessorWasCreated(newSubprocessor);
return newSubprocessor;
}
float PN_AbsValue::process(float value)
{
return qAbs(value);
}