HAL
hal::CommentEntry Class Reference

The CommentEntry class encapsulated information related to a comment. More...

#include <comment_entry.h>

Collaboration diagram for hal::CommentEntry:
Collaboration graph

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CommentEntry() [1/2]

hal::CommentEntry::CommentEntry ( Node  n,
QString  text = QString(),
QString  header = QString() 
)

Definition at line 7 of file comment_entry.cpp.

References QDateTime::currentDateTime(), and QDateTime::toUTC().

◆ CommentEntry() [2/2]

hal::CommentEntry::CommentEntry ( const QJsonObject jsonObj)

Definition at line 13 of file comment_entry.cpp.

References QJsonObject::contains(), QDateTime::fromString(), and Qt::ISODate.

◆ ~CommentEntry()

hal::CommentEntry::~CommentEntry ( )
inline

Definition at line 47 of file comment_entry.h.

Member Function Documentation

◆ dump()

void hal::CommentEntry::dump ( ) const

◆ getCreationTime()

QDateTime hal::CommentEntry::getCreationTime ( ) const

Definition at line 66 of file comment_entry.cpp.

◆ getDateFormatString()

QString hal::CommentEntry::getDateFormatString ( ) const

◆ getHeader()

QString hal::CommentEntry::getHeader ( ) const

◆ getLastModifiedTime()

QDateTime hal::CommentEntry::getLastModifiedTime ( ) const

◆ getNode()

Node hal::CommentEntry::getNode ( ) const

◆ getText()

QString hal::CommentEntry::getText ( ) const

◆ isInvalid()

bool hal::CommentEntry::isInvalid ( ) const

Definition at line 90 of file comment_entry.cpp.

References hal::Node::isNull().

◆ setDirty()

void hal::CommentEntry::setDirty ( bool  dirty)

Definition at line 46 of file comment_entry.cpp.

◆ setHeader()

void hal::CommentEntry::setHeader ( QString  newHeader)

Definition at line 32 of file comment_entry.cpp.

References QDateTime::currentDateTime(), and QDateTime::toUTC().

◆ setText()

void hal::CommentEntry::setText ( QString  newText)

Definition at line 39 of file comment_entry.cpp.

References QDateTime::currentDateTime(), and QDateTime::toUTC().

◆ toJson()

QJsonObject hal::CommentEntry::toJson ( ) const

The documentation for this class was generated from the following files: