QtPdCom  1.5.2
QtPdCom::Message::Impl Class Reference

#include <MessageImpl.h>

Inheritance diagram for QtPdCom::Message::Impl:
Collaboration diagram for QtPdCom::Message::Impl:

Public Member Functions

 Impl (Message *)
 Constructor.
 ~Impl ()
 Destructor.
void fromPlainXmlElement (QDomElement, const QString &=QString())
 Constructor with XML element.
void fromPdComMessage (const PdCom::Message &)
 Constructor with PdCom5 message.

Static Public Member Functions

static QString pathFromPlainXmlElement (QDomElement, const QString &=QString())
 Get the path.
static int indexFromPlainXmlElement (QDomElement)
 Get the index.
static QString timeString (quint64)
 Returns the message time as a string.

Private Types

typedef QMap< QString, QString > TranslationMap

Private Slots

void valueChanged ()
 Variable value changed.

Private Member Functions

void loadTranslations (QDomElement, TranslationMap &)
 Processes a TextNode XML element.

Static Private Member Functions

static Message::Type typeFromString (const QString &)
 Converts a message type string to the appropriate Type.

Private Attributes

Message *const parent
Type type
 Message type.
QString path
 Path of the process variable.
int index
TranslationMap text
 Text of the message.
TranslationMap description
 Description of the message.
DoubleVariable variable
MessageModel::Impl::MessageItemcurrentItem
bool announced
 Already announced via anyMessage.

Friends

class Message
class MessageModel

Member Typedef Documentation

◆ TranslationMap

typedef QMap<QString, QString> QtPdCom::Message::Impl::TranslationMap
private

Constructor & Destructor Documentation

◆ Impl()

Message::Impl::Impl ( Message * message)

◆ ~Impl()

Message::Impl::~Impl ( )

Destructor.

Member Function Documentation

◆ fromPdComMessage()

void Message::Impl::fromPdComMessage ( const PdCom::Message & message)

Constructor with PdCom5 message.

References QtPdCom::Message::Error, index, QtPdCom::Message::Information, path, text, type, and QtPdCom::Message::Warning.

◆ fromPlainXmlElement()

void Message::Impl::fromPlainXmlElement ( QDomElement elem,
const QString & pathPrefix = QString() )

Constructor with XML element.

Parameters
elemElement.
pathPrefixPrefix to path (with leading /).

References description, index, indexFromPlainXmlElement(), loadTranslations(), path, pathFromPlainXmlElement(), text, type, and typeFromString().

◆ indexFromPlainXmlElement()

int Message::Impl::indexFromPlainXmlElement ( QDomElement elem)
static

Get the index.

Parameters
elemElement.

Referenced by fromPlainXmlElement(), and QtPdCom::MessageModel::load().

◆ loadTranslations()

void Message::Impl::loadTranslations ( QDomElement elem,
TranslationMap & map )
private

Processes a TextNode XML element.

Parameters
elemElement.
mapTranslation map.

Referenced by fromPlainXmlElement().

◆ pathFromPlainXmlElement()

QString Message::Impl::pathFromPlainXmlElement ( QDomElement elem,
const QString & pathPrefix = QString() )
static

Get the path.

Parameters
elemElement.
pathPrefixPrefix to path (with leading /).

Referenced by fromPlainXmlElement(), and QtPdCom::MessageModel::load().

◆ timeString()

QString Message::Impl::timeString ( quint64 time_ns)
static

Returns the message time as a string.

◆ typeFromString()

Message::Type Message::Impl::typeFromString ( const QString & str)
staticprivate

Converts a message type string to the appropriate Type.

References QtPdCom::Message::Critical, QtPdCom::Message::Error, QtPdCom::Message::Information, and QtPdCom::Message::Warning.

Referenced by fromPlainXmlElement().

◆ valueChanged

void Message::Impl::valueChanged ( )
privateslot

Variable value changed.

References parent.

Referenced by Impl().

◆ Message

friend class Message
friend

References Message.

Referenced by Impl(), Message, and MessageModel.

◆ MessageModel

friend class MessageModel
friend

References Message, and MessageModel.

Referenced by MessageModel.

Member Data Documentation

◆ announced

bool QtPdCom::Message::Impl::announced
private

Already announced via anyMessage.

Referenced by Impl().

◆ currentItem

MessageModel::Impl::MessageItem* QtPdCom::Message::Impl::currentItem
private

Referenced by Impl().

◆ description

TranslationMap QtPdCom::Message::Impl::description
private

Description of the message.

Referenced by fromPlainXmlElement().

◆ index

int QtPdCom::Message::Impl::index
private

◆ parent

Message* const QtPdCom::Message::Impl::parent
private

Referenced by Impl(), and valueChanged().

◆ path

QString QtPdCom::Message::Impl::path
private

Path of the process variable.

Referenced by fromPdComMessage(), and fromPlainXmlElement().

◆ text

TranslationMap QtPdCom::Message::Impl::text
private

Text of the message.

Referenced by fromPdComMessage(), and fromPlainXmlElement().

◆ type

Type QtPdCom::Message::Impl::type
private

◆ variable

DoubleVariable QtPdCom::Message::Impl::variable
private

Referenced by Impl().


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