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

typedef QHash<int, Message *> QtPdCom::MessageModel::Impl::MessageHash
private

◆ MessageItemList

◆ MessageMap

typedef QMap<QString, MessageHash> QtPdCom::MessageModel::Impl::MessageMap
private

Constructor & Destructor Documentation

◆ Impl()

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

◆ ~Impl()

MessageModel::Impl::~Impl ( )

Destructor.

Member Function Documentation

◆ activeMessagesReply

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

◆ 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, insertItem(), Message, and messageMap.

Referenced by getMessageReply().

◆ 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 announce(), announcedMessageItem, QtPdCom::Message::impl, insertItem(), Message, messageItemList, messageMap, and parent.

Referenced by activeMessagesReply(), and processMessage().

◆ announce()

void MessageModel::Impl::announce ( )
private

◆ getHistoryMessage()

void MessageModel::Impl::getHistoryMessage ( )
private

Spin up a FutureWatcher and connect its signals.

References canFetchMore, getMessageReply(), historicSeqNo, and messageManager.

Referenced by activeMessagesReply(), 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

◆ wrapText()

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

Returns a wrapped version of a string.

◆ Message

◆ MessageModel

friend class MessageModel
friend

References MessageModel.

Referenced by Impl(), Message, and MessageModel.

Member Data Documentation

◆ announcedMessageItem

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

Recently announced message.

Referenced by addProcessMessage(), announce(), Impl(), insertItem(), processReset(), and stateChanged().

◆ 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

Referenced by activeMessagesReply(), getMessageReply(), and processReset().

◆ rowLimit

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

Referenced by Impl().


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