HAL
comment_entry.h
Go to the documentation of this file.
1
// MIT License
2
//
3
// Copyright (c) 2019 Ruhr University Bochum, Chair for Embedded Security. All Rights reserved.
4
// Copyright (c) 2021 Max Planck Institute for Security and Privacy. All Rights reserved.
5
//
6
// Permission is hereby granted, free of charge, to any person obtaining a copy
7
// of this software and associated documentation files (the "Software"), to deal
8
// in the Software without restriction, including without limitation the rights
9
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
// copies of the Software, and to permit persons to whom the Software is
11
// furnished to do so, subject to the following conditions:
12
//
13
// The above copyright notice and this permission notice shall be included in all
14
// copies or substantial portions of the Software.
15
//
16
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
// SOFTWARE.
23
24
#pragma once
25
26
#include "
gui/gui_def.h
"
27
#include <QString>
28
#include <QDateTime>
29
#include <QJsonObject>
30
31
namespace
hal
32
{
42
class
CommentEntry
43
{
44
public
:
45
CommentEntry
(
Node
n
,
QString
text =
QString
(),
QString
header =
QString
());
46
CommentEntry
(
const
QJsonObject
& jsonObj);
47
~CommentEntry
(){};
48
49
void
setHeader
(
QString
newHeader);
50
void
setText
(
QString
newText);
51
void
setDirty
(
bool
dirty);
52
53
QString
getHeader
()
const
;
54
QString
getText
()
const
;
55
Node
getNode
()
const
;
56
QDateTime
getCreationTime
()
const
;
57
QDateTime
getLastModifiedTime
()
const
;
58
QJsonObject
toJson
()
const
;
59
bool
isInvalid
()
const
;
60
void
dump
()
const
;
61
62
QString
getDateFormatString
()
const
;
63
64
//create all setter/getter for datetimes for serialization/deserialization in case
65
//the content manager parses file? Or omit them and create parse/write json methods
66
//compareable to user actions, then there would be no need to set datetimes from outside.
67
68
private
:
69
Node
mNode;
70
QString
mHeader;
71
QDateTime
mCreated;
72
QDateTime
mLastModified;
73
QString
mText;
74
bool
mDirty;
75
};
76
}
hal::CommentEntry
The CommentEntry class encapsulated information related to a comment.
Definition:
comment_entry.h:43
hal::CommentEntry::isInvalid
bool isInvalid() const
Definition:
comment_entry.cpp:90
hal::CommentEntry::getCreationTime
QDateTime getCreationTime() const
Definition:
comment_entry.cpp:66
hal::CommentEntry::getLastModifiedTime
QDateTime getLastModifiedTime() const
Definition:
comment_entry.cpp:71
hal::CommentEntry::getHeader
QString getHeader() const
Definition:
comment_entry.cpp:51
hal::CommentEntry::toJson
QJsonObject toJson() const
Definition:
comment_entry.cpp:76
hal::CommentEntry::CommentEntry
CommentEntry(Node n, QString text=QString(), QString header=QString())
Definition:
comment_entry.cpp:7
hal::CommentEntry::setDirty
void setDirty(bool dirty)
Definition:
comment_entry.cpp:46
hal::CommentEntry::getNode
Node getNode() const
Definition:
comment_entry.cpp:61
hal::CommentEntry::~CommentEntry
~CommentEntry()
Definition:
comment_entry.h:47
hal::CommentEntry::getText
QString getText() const
Definition:
comment_entry.cpp:56
hal::CommentEntry::setText
void setText(QString newText)
Definition:
comment_entry.cpp:39
hal::CommentEntry::getDateFormatString
QString getDateFormatString() const
Definition:
comment_entry.cpp:105
hal::CommentEntry::setHeader
void setHeader(QString newHeader)
Definition:
comment_entry.cpp:32
hal::CommentEntry::dump
void dump() const
Definition:
comment_entry.cpp:95
hal::Node
The Node class object represents a module or a gate.
Definition:
gui_def.h:61
gui_def.h
hal
Definition:
parser_liberty.cpp:10
test.n
n
Definition:
test.py:6
QDateTime
QJsonObject
QString
plugins
gui
include
gui
comment_system
comment_entry.h
Generated on Fri Feb 14 2025 14:22:41 for HAL by
1.9.1