// ************************************************************************** // // (C) Copyright 2009 Swiss SIMTEC AG // // ************************************************************************** // // $HeadURL$ // $LastChangedBy$ // $LastChangedDate$ // $LastChangedRevision$ // // ************************************************************************** #pragma once #include #include "logger.h" class QGridLayout; class QTabWidget; class QFrame; class QScrollArea; class QLineEdit; namespace N_LogView { class LogViewWidget; class LogViewTelegram; class LogViewField; /** * @author alois.wismer * @version 1.0 * @created 09-Feb-2010 15:05:05 */ class LogViewTelegramDialog : public QDialog { Q_OBJECT public: explicit LogViewTelegramDialog(QWidget *a_parent = nullptr, const bool a_readonly = true); void showDialog(const QSharedPointer &a_telegram); void showDataDump(const QSharedPointer &a_telegram, bool showErrorMessage); void makePretty(); void showTree(LogViewField *a_fieldTree, QGridLayout *a_box); /** * Removes the elements from m_EditInfoList matching the path */ bool removeItemsFromEditInfoList(const QStringList &jsonPath); Q_SIGNALS: void sendTelegram(const QSharedPointer &telegramToSend); protected slots: void saveTelegram(); void sendCurrentTelegram(); protected: void fillTelegram(LogViewTelegram *a_telegram); void showButtons(QLayout *a_layout); void showEditField(LogViewField *a_logViewField, QGridLayout *a_box); void showTab(LogViewField *a_logViewField, QGridLayout *a_box); private: QSharedPointer m_Telegram; QVector m_EditInfoList; QScopedPointer m_fieldTree; QWidget *m_contentsWidget = nullptr; QScrollArea *m_ScrollArea = nullptr; QLineEdit *m_NameEdit = nullptr; QLineEdit *m_WaitTimeEdit = nullptr; bool m_ReadOnly = false; NGL::INGLLogger &m_logger; }; }