QtPdCom  1.6.1
QtPdCom::MessageModel::Impl Class Reference

#include <MessageModelImpl.h>

Inheritance diagram for QtPdCom::MessageModel::Impl:
Collaboration diagram for QtPdCom::MessageModel::Impl:

Classes

struct  MessageItem
 

Public Member Functions

 Impl (MessageModel *)
 Constructor.
 
 ~Impl ()
 Destructor.
 
void insertItem (MessageItem *)
 Insert a message item.
 
void addProcessMessage (const PdCom::Message &)
 Called from the PdCom interface, if a new message appears via processMessage() or in context of activeMessagesReply().
 
void addHistoricMessage (const PdCom::Message &, const PdCom::Message &)
 Called from the PdCom interface, if a historic message appears via getMessageReply().
 

Static Public Member Functions

static QString wrapText (const QString &, unsigned int=78)
 Returns a wrapped version of a string.
 

Private Types

typedef QHash< int, Message * > MessageHash
 
typedef QMap< QString, MessageHash > MessageMap
 
typedef QList< MessageItem * > MessageItemList
 
typedef QHash< Message::Type, QIcon > IconHash
 Icon hash type.
 
typedef QHash< Message::Type, QString > IconPathHash
 Icon hash type (with path).
 

Private Slots

void stateChanged ()
 Reacts on process values changes of all messages to watch.
 
void processMessage (PdCom::Message message)
 
void getMessageReply (PdCom::Message message)
 
void activeMessagesReply (std::vector< PdCom::Message >)
 
void processReset ()
 
void reloadActiveMessages ()
 

Private Member Functions

void getHistoryMessage ()
 Spin up a FutureWatcher and connect its signals.
 
void announce ()
 Announce next best message as current message.
 

Private Attributes

MessageModel *const parent
 
MessageMap messageMap
 
MessageItemList messageItemList
 
IconHash iconHash
 Icons for message types.
 
IconPathHash iconPathHash
 Icons for message types (with path).
 
MessageItem * announcedMessageItem
 Recently announced message.
 
QString lang
 
MessageManager * messageManager
 
int rowLimit
 
bool canFetchMore
 
uint32_t historicSeqNo
 
bool(* lessThan )(const MessageItem *, const MessageItem *)
 
QList< PdCom::Message > resetMessagesList
 list of history messages that were reset
 
Process * process = nullptr
 

Friends

class MessageModel
 
class Message
 

Member Typedef Documentation

◆ IconHash

Icon hash type.

◆ IconPathHash

Icon hash type (with path).

◆ MessageHash

◆ MessageItemList

◆ MessageMap

Constructor & Destructor Documentation

◆ Impl()

MessageModel::Impl::Impl ( MessageModel * model)

Constructor.

◆ ~Impl()

MessageModel::Impl::~Impl ( )

Destructor.

Member Function Documentation

◆ activeMessagesReply

void MessageModel::Impl::activeMessagesReply ( std::vector< PdCom::Message > messageList)
privateslot

Referenced by reloadActiveMessages().

◆ addHistoricMessage()

void MessageModel::Impl::addHistoricMessage ( const PdCom::Message & pdComMsg,
const PdCom::Message & resetMsg )

Called from the PdCom interface, if a historic message appears via getMessageReply().

References QtPdCom::Message::impl.

◆ addProcessMessage()

void MessageModel::Impl::addProcessMessage ( const PdCom::Message & pdComMsg)

Called from the PdCom interface, if a new message appears via processMessage() or in context of activeMessagesReply().

References QtPdCom::Message::impl, and QtPdCom::MessageModel::Impl::MessageItem::seqNo.

◆ announce()

void MessageModel::Impl::announce ( )
private

Announce next best message as current message.

◆ getHistoryMessage()

void MessageModel::Impl::getHistoryMessage ( )
private

Spin up a FutureWatcher and connect its signals.

References QtPdCom::MessageModel::canFetchMore(), and getMessageReply().

◆ getMessageReply

void MessageModel::Impl::getMessageReply ( PdCom::Message message)
privateslot

◆ insertItem()

◆ processMessage

void MessageModel::Impl::processMessage ( PdCom::Message message)
privateslot

◆ processReset

void MessageModel::Impl::processReset ( )
privateslot

◆ reloadActiveMessages

void MessageModel::Impl::reloadActiveMessages ( )
privateslot

◆ stateChanged

void MessageModel::Impl::stateChanged ( )
privateslot

◆ wrapText()

QString MessageModel::Impl::wrapText ( const QString & text,
unsigned int width = 78 )
static

Returns a wrapped version of a string.

Friends And Related Symbol Documentation

◆ Message

friend class Message
friend

◆ MessageModel

friend class MessageModel
friend

Member Data Documentation

◆ announcedMessageItem

MessageItem* QtPdCom::MessageModel::Impl::announcedMessageItem
private

Recently announced message.

◆ canFetchMore

bool QtPdCom::MessageModel::Impl::canFetchMore
private

◆ historicSeqNo

uint32_t QtPdCom::MessageModel::Impl::historicSeqNo
private

◆ iconHash

IconHash QtPdCom::MessageModel::Impl::iconHash
private

Icons for message types.

See also
Message::Type.

◆ iconPathHash

IconPathHash QtPdCom::MessageModel::Impl::iconPathHash
private

Icons for message types (with path).

See also
Message::Type.

◆ lang

QString QtPdCom::MessageModel::Impl::lang
private

◆ lessThan

bool(* QtPdCom::MessageModel::Impl::lessThan) (const MessageItem *, const MessageItem *)
private

◆ messageItemList

MessageItemList QtPdCom::MessageModel::Impl::messageItemList
private

◆ messageManager

MessageManager* QtPdCom::MessageModel::Impl::messageManager
private

◆ messageMap

MessageMap QtPdCom::MessageModel::Impl::messageMap
private

◆ parent

MessageModel* const QtPdCom::MessageModel::Impl::parent
private

◆ process

Process* QtPdCom::MessageModel::Impl::process = nullptr
private

◆ resetMessagesList

QList<PdCom::Message> QtPdCom::MessageModel::Impl::resetMessagesList
private

list of history messages that were reset

◆ rowLimit

int QtPdCom::MessageModel::Impl::rowLimit
private

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