11 mLastModified = mCreated;
16 if (!jsonObj.
contains(
"node") || !jsonObj[
"node"].isObject()
23 const QJsonObject& nodeObj = jsonObj[
"node"].toObject();
27 mHeader = jsonObj[
"header"].toString();
30 mText = jsonObj[
"text"].toString();
81 node[
"id"] = (int) mNode.
id();
82 node[
"type"] = (int) mNode.
type();
83 retval[
"node"] = node;
84 retval[
"header"] = mHeader;
87 retval[
"text"] = mText;
99 xout << (mNode.
isGate() ?
"Gate" :
"Module") <<
" " << mNode.
id() <<
"\n";
100 xout <<
" header: <" << mHeader <<
">\n";
101 xout <<
" created: " << mCreated.
toString(
"dd.MM.yyyy hh:mm:ss") <<
"\n";
102 xout <<
" modified: " << mLastModified.
toString(
"dd.MM.yyyy hh:mm:ss") <<
"\n";
103 xout <<
" text: <" << mText.
left(35) <<
">\n";
108 return QString(
"dd.MM.yy hh:mm");
The Node class object represents a module or a gate.
NodeType type() const
type getter for type information
bool isGate() const
isGate test whether node is a gate
bool isNull() const
isNull test for null-Node object typically returned from functions
u32 id() const
id getter for ID information
QDateTime currentDateTime()
QDateTime fromString(const QString &string, Qt::DateFormat format)
QString toString(Qt::DateFormat format) const const
QDateTime toUTC() const const
bool contains(const QString &key) const const
QString left(int n) const const