6#include <QtCore/QTimer>
7#if QT_VERSION >= 0x050000 && QT_VERSION < 0x060000
8#include <QtWidgets/QAction>
10#include <QtGui/QAction>
22#include <GeneratedFiles/iloggui/ui_CLogGuiComp.h>
91 I_REGISTER_SUBELEMENT(DiagnosticState);
93 I_REGISTER_SUBELEMENT_INTERFACE(DiagnosticState,
iser::ISerializable, ExtractDiagnosticState);
94 I_REGISTER_SUBELEMENT_INTERFACE(DiagnosticState,
istd::IChangeable, ExtractDiagnosticState);
95 I_REGISTER_SUBELEMENT_INTERFACE(DiagnosticState,
imod::IModel, ExtractDiagnosticState);
96 I_ASSIGN(m_fileLoaderCompPtr,
"Exporter",
"File loader used for log export",
false,
"Exporter");
97 I_ASSIGN(m_slaveMessageConsumerCompPtr,
"SlaveMessageConsumer",
"Slave message consumer",
false,
"SlaveMessageConsumer");
98 I_ASSIGN_TO(m_slaveMessageContainerCompPtr, m_slaveMessageConsumerCompPtr,
false);
99 I_ASSIGN(m_allowDiagnosticMessagesAttrPtr,
"AllowDiagnosticMessages",
"If enabled the collecting of diagnostic messages and display of corresponding GUI elements is allowed",
true,
false);
100 I_ASSIGN(m_maxMessagesCountAttrPtr,
"MaxMessageCount",
"Maximal number of messages supported by the log",
true, 1000);
101 I_ASSIGN(m_defaultModeAttrPtr,
"DefaultMode",
"Default display mode,\n 0 - info,\n 1 - warning,\n 2 - error",
true, 0);
102 I_ASSIGN(m_showLogDescriptionAttrPtr,
"ShowLogDescription",
"Sets the log tables description visible",
true,
false);
103 I_ASSIGN(m_showMessageTextFilterAttrPtr,
"ShowMessageTextFilter",
"If enabled, the text filter for the messages will be shown",
true,
true);
104 I_ASSIGN(m_showPanelAttrPtr,
"ShowPanel",
"If enabled, the text filter and filter buttons will be shown",
true,
true);
105 I_ASSIGN(m_autoUpdateVisualStatusAttrPtr,
"AutoUpdateVisualStatus",
"Automatically update visual status when messages reseived or message mode changed",
true,
true);
106 I_ASSIGN(m_logTimeFormatAttrPtr,
"TimeFormat",
"Format of the date/time used for displaing message's time stamp",
true,
"");
167 int messageCategory = -1,
185 void UpdateVisualStatus();
186 void UpdateItemVisibility(QTreeWidgetItem* itemPtr,
const QString& filterText)
const;
187 void GenerateMessageList();
188 void AddMessageToList(
const MessagePtr& messagePtr);
232 template <
class InterfaceType>
233 static InterfaceType* ExtractDiagnosticState(
CLogGuiComp& component)
235 return &component.m_diagnosticState;
241 I_ATTR(
bool, m_allowDiagnosticMessagesAttrPtr);
242 I_ATTR(
int, m_defaultModeAttrPtr);
243 I_ATTR(
int, m_maxMessagesCountAttrPtr);
244 I_ATTR(
bool, m_showLogDescriptionAttrPtr);
245 I_ATTR(
bool, m_showMessageTextFilterAttrPtr);
246 I_ATTR(
bool, m_showPanelAttrPtr);
247 I_ATTR(
bool, m_autoUpdateVisualStatusAttrPtr);
248 I_ATTR(QString, m_logTimeFormatAttrPtr);
250 int m_currentMessageMode;
252 int m_statusCategory;
254 QTimer m_removeMessagesTimer;
271 DiagnosticStateObserver m_diagnosticStateObserver;
Interface for a provider of the heriarchical commands.
Interface providing loading and saving of data objects.
Basic implementation of a message container.
Common interface for a message container consuming information objects (messages).
Interactive log viewer component with filtering and commands.
istd::TDelPtr< iqtgui::CHierarchicalCommand > m_errorCommand
virtual QString GetCategoryText(int category) const
Get text corresponding to specified information category.
virtual void SetCommandsVisuals()
Setup log gui command visuals.
void EmitAddMessage(const MessagePtr &messagePtr)
virtual void AddMessage(const MessagePtr &messagePtr) override
Adds a message to this consumer.
virtual void OnGuiRetranslate() override
Called from widget event filter when GUI should be retranslated.
virtual void OnComponentCreated() override
virtual QTreeWidgetItem * CreateGuiItem(const istd::IInformationProvider &message)
Create GUI item corresponding to specified message.
QAction * m_diagnosticModeActionPtr
istd::TDelPtr< iqtgui::CHierarchicalCommand > m_diagnosticCommand
istd::TDelPtr< iqtgui::CHierarchicalCommand > m_exportCommand
void EnableDiagnosticMessages(bool state)
QAction * m_exportActionPtr
iqtgui::TDesignerGuiCompBase< Ui::CLogGuiComp > BaseClass
Base class typedef for GUI functionality.
void on_FilterText_textChanged(const QString &filterText)
virtual void OnExportAction()
QAction * m_errorActionPtr
void OnRemoveMessagesTimer()
virtual void OnMessageModeChanged()
ilog::CMessageContainer BaseClass2
Base class typedef for container functionality.
virtual void OnGuiCreated() override
Called just after GUI is initialized.
istd::TDelPtr< iqtgui::CHierarchicalCommand > m_infoCommand
virtual bool IsMessageSupported(int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const override
Check if a message is supported by this consumer.
istd::TDelPtr< iqtgui::CHierarchicalCommand > m_clearCommand
istd::TDelPtr< iqtgui::CHierarchicalCommand > m_warningCommand
virtual void OnAddMessage(const MessagePtr &messagePtr)
virtual const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
virtual QIcon GetCategoryIcon(int category) const
Get icons corresponding to specified information category.
virtual void ClearMessages() override
virtual QIcon GetActionIcon(int functionType) const
Get icons corresponding to specified log action.
virtual void OnClearAction()
QAction * m_clearActionPtr
QAction * m_warningActionPtr
virtual void SetupCommands()
Setup log gui commands.
virtual void OnGuiDesignChanged() override
virtual void OnGuiDestroyed() override
Called just before GUI is released.
QAction * m_infoActionPtr
istd::TDelPtr< iqtgui::CHierarchicalCommand > m_rootCommands
Common interface for model objects, that supports Model/Observer design pattern.
This model wrapper provides a simple connection between a concrete istd::IChangeable implementation a...
Basic implementation for a single model observer with binding to concrete data object interface.
Interface for objects which can be enabled/disabled.
Base class for all Qt GUI components, which use the Qt designer's UI.
Common class for all classes which objects can be archived or restored from archive.
Set of change flags (its IDs).
Common interface for data model objects, which can be changed.
Pointer wrapper providing automatic deleting pointed object during destruction.
Common interface to define the hierarchical graph structures.
Shared ownership smart pointer for interface types.
GUI specific interfaces and components for logging functionality.