QtPdCom  1.6.1
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
QtPdCom::MessageModel::Impl Class Reference

#include <MessageModelImpl.h>

Inheritance diagram for QtPdCom::MessageModel::Impl:
Inheritance graph
[legend]
Collaboration diagram for QtPdCom::MessageModel::Impl:
Collaboration graph
[legend]

Classes

struct  MessageItem
 

Public Member Functions

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

Static Public Member Functions

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

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. More...
 
typedef QHash< Message::Type, QString > IconPathHash
 Icon hash type (with path). More...
 

Private Slots

void stateChanged ()
 Reacts on process values changes of all messages to watch. More...
 
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. More...
 
void announce ()
 Announce next best message as current message. More...
 

Private Attributes

MessageModel *const parent
 
MessageMap messageMap
 
MessageItemList messageItemList
 
IconHash iconHash
 Icons for message types. More...
 
IconPathHash iconPathHash
 Icons for message types (with path). More...
 
MessageItem * announcedMessageItem
 Recently announced message. More...
 
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 More...
 
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)

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, and QtPdCom::MessageModel::Impl::MessageItem::seqNo.

◆ 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()

void MessageModel::Impl::insertItem ( MessageItem *  msgItem)

◆ 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 Function 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: