QtPdCom  1.4.1
Signals | Public Member Functions | Properties | Private Attributes | List of all members
QtPdCom::QmlMessageModel Class Reference

#include <Qml_classes.h>

Inheritance diagram for QtPdCom::QmlMessageModel:
Inheritance graph
[legend]
Collaboration diagram for QtPdCom::QmlMessageModel:
Collaboration graph
[legend]

Signals

void localeChanged ()
 
- Signals inherited from QtPdCom::MessageModel
void currentMessage (const QtPdCom::Message *message)
 Emitted, when a new message gets active. More...
 
void anyMessage (const QtPdCom::Message *message)
 Emitted, when a new message gets active. More...
 

Public Member Functions

 QmlMessageModel (QObject *parent=nullptr)
 
void setLocale (QString locale)
 
QString getLocale () const
 
QmlMessagegetCurrentMessage ()
 
- Public Member Functions inherited from QtPdCom::MessageModel
 MessageModel (QObject *parent=nullptr)
 Constructor. More...
 
 ~MessageModel ()
 Destructor. More...
 
Q_INVOKABLE void load (const QString &path, const QString &lang=QString(), const QString &pathPrefix=QString())
 Loads messages from an Xml file. More...
 
Q_INVOKABLE void clear ()
 Clears the messages. More...
 
void setRowLimit (int)
 Sets the maximum number of rows to fetch. More...
 
int getRowLimit () const
 Gets the maxium number of rows to fetch. More...
 
void connect (QtPdCom::Process *)
 Connects messages to the given process. More...
 
QtPdCom::ProcessgetProcess () const
 
Q_INVOKABLE void translate (const QString &)
 Sets a new language and notifies views. More...
 
void setIcon (Message::Type, const QIcon &)
 Sets an icon for a specific message type. More...
 
const QIcon & getIcon (Message::Type) const
 
Q_INVOKABLE void setIconPath (Message::Type, const QString &)
 Sets the path (url) to an icon for a specific message type. More...
 
QVariantMap getIconPathMap () const
 
void setIconPathMap (QVariantMap map)
 
virtual int rowCount (const QModelIndex &) const override
 Implements the model interface. More...
 
virtual int columnCount (const QModelIndex &) const override
 Implements the model interface. More...
 
virtual QVariant data (const QModelIndex &, int) const override
 Implements the Model interface. More...
 
virtual QVariant headerData (int, Qt::Orientation, int) const override
 Implements the Model interface. More...
 
virtual Qt::ItemFlags flags (const QModelIndex &) const override
 Implements the Model interface. More...
 
virtual QHash< int, QByteArray > roleNames () const override
 Additional Rolename for decoration for use in QML views. More...
 
virtual bool canFetchMore (const QModelIndex &) const override
 
virtual void fetchMore (const QModelIndex &) override
 

Properties

QString locale
 
QmlMessage currentMessage
 
- Properties inherited from QtPdCom::MessageModel
int rowLimit
 
QtPdCom::Process process
 
QVariantMap iconPaths
 Define Icon Paths for decoration role. More...
 

Private Attributes

QString locale_
 
QmlMessage current_message_
 

Additional Inherited Members

- Public Types inherited from QtPdCom::MessageModel
enum  Columns { TextColumn = 0, TimeOccurredColumn, TimeResetColumn }
 
enum  Roles { DecorationPathRole = Qt::UserRole + 1, TimeStringRole = Qt::UserRole + 2, ResetTimeStringRole = Qt::UserRole + 3, MessageTypeRole = Qt::UserRole + 4 }
 
- Protected Member Functions inherited from QtPdCom::MessageModel
bool event (QEvent *) override
 Event handler. More...
 

Constructor & Destructor Documentation

◆ QmlMessageModel()

QtPdCom::QmlMessageModel::QmlMessageModel ( QObject *  parent = nullptr)

Member Function Documentation

◆ getCurrentMessage()

QmlMessage* QtPdCom::QmlMessageModel::getCurrentMessage ( )
inline

References current_message_.

◆ getLocale()

QString QtPdCom::QmlMessageModel::getLocale ( ) const
inline

References locale_.

◆ localeChanged

void QtPdCom::QmlMessageModel::localeChanged ( )
signal

Referenced by setLocale().

◆ setLocale()

void QtPdCom::QmlMessageModel::setLocale ( QString  locale)
inline

References locale, locale_, and localeChanged().

Member Data Documentation

◆ current_message_

QmlMessage QtPdCom::QmlMessageModel::current_message_
private

◆ locale_

QString QtPdCom::QmlMessageModel::locale_
private

Property Documentation

◆ currentMessage

QmlMessage QtPdCom::QmlMessageModel::currentMessage
read

◆ locale

QString QtPdCom::QmlMessageModel::locale
readwrite

Referenced by setLocale().


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