![]() |
HAL
|
The CommentEntry class encapsulated information related to a comment. More...
#include <comment_entry.h>
Public Member Functions | |
CommentEntry (Node n, QString text=QString(), QString header=QString()) | |
CommentEntry (const QJsonObject &jsonObj) | |
~CommentEntry () | |
void | setHeader (QString newHeader) |
void | setText (QString newText) |
void | setDirty (bool dirty) |
QString | getHeader () const |
QString | getText () const |
Node | getNode () const |
QDateTime | getCreationTime () const |
QDateTime | getLastModifiedTime () const |
QJsonObject | toJson () const |
bool | isInvalid () const |
void | dump () const |
QString | getDateFormatString () const |
The CommentEntry class encapsulated information related to a comment.
This class holds all relvant information for a gui comment such as a header, the time of creation, and the text itself. For now only gates and modules can be associated with a comment.
Definition at line 42 of file comment_entry.h.
Definition at line 7 of file comment_entry.cpp.
References QDateTime::currentDateTime(), and QDateTime::toUTC().
hal::CommentEntry::CommentEntry | ( | const QJsonObject & | jsonObj | ) |
Definition at line 13 of file comment_entry.cpp.
References QJsonObject::contains(), QDateTime::fromString(), and Qt::ISODate.
|
inline |
Definition at line 47 of file comment_entry.h.
void hal::CommentEntry::dump | ( | ) | const |
Definition at line 95 of file comment_entry.cpp.
References hal::Node::id(), hal::Node::isGate(), QString::left(), QDateTime::toString(), and QIODevice::WriteOnly.
QDateTime hal::CommentEntry::getCreationTime | ( | ) | const |
Definition at line 66 of file comment_entry.cpp.
QString hal::CommentEntry::getDateFormatString | ( | ) | const |
Definition at line 105 of file comment_entry.cpp.
Referenced by hal::CommentDialog::CommentDialog(), and hal::CommentItem::updateCurrentEntry().
QString hal::CommentEntry::getHeader | ( | ) | const |
Definition at line 51 of file comment_entry.cpp.
Referenced by hal::CommentDialog::CommentDialog(), and hal::CommentItem::updateCurrentEntry().
QDateTime hal::CommentEntry::getLastModifiedTime | ( | ) | const |
Definition at line 71 of file comment_entry.cpp.
Referenced by hal::CommentDialog::CommentDialog(), and hal::CommentItem::updateCurrentEntry().
Node hal::CommentEntry::getNode | ( | ) | const |
Definition at line 61 of file comment_entry.cpp.
Referenced by hal::CommentManager::addComment(), and hal::CommentManager::deleteComment().
QString hal::CommentEntry::getText | ( | ) | const |
Definition at line 56 of file comment_entry.cpp.
Referenced by hal::CommentDialog::CommentDialog(), and hal::CommentItem::updateCurrentEntry().
bool hal::CommentEntry::isInvalid | ( | ) | const |
Definition at line 90 of file comment_entry.cpp.
References hal::Node::isNull().
void hal::CommentEntry::setDirty | ( | bool | dirty | ) |
Definition at line 46 of file comment_entry.cpp.
void hal::CommentEntry::setHeader | ( | QString | newHeader | ) |
Definition at line 32 of file comment_entry.cpp.
References QDateTime::currentDateTime(), and QDateTime::toUTC().
void hal::CommentEntry::setText | ( | QString | newText | ) |
Definition at line 39 of file comment_entry.cpp.
References QDateTime::currentDateTime(), and QDateTime::toUTC().
QJsonObject hal::CommentEntry::toJson | ( | ) | const |
Definition at line 76 of file comment_entry.cpp.
References hal::Node::id(), Qt::ISODate, QDateTime::toString(), and hal::Node::type().
Referenced by hal::CommentManager::serialize().