diff --git a/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.cpp b/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.cpp index 3f0c86d6..0c059bec 100644 --- a/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.cpp +++ b/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.cpp @@ -42,8 +42,8 @@ #include "components/analyzer/api/IDLTMessageAnalyzerController.hpp" #include "common/CBGColorAnimation.hpp" #include "components/patternsView/api/CPatternsView.hpp" -#include "filtersView/CFiltersView.hpp" -#include "filtersView/CFiltersModel.hpp" +#include "components/filtersView/api/CFiltersView.hpp" +#include "components/filtersView/api/IFiltersModel.hpp" #include "components/log/api/CLog.hpp" #include "common/CTableMemoryJumper.hpp" #include "plant_uml/CUMLView.hpp" @@ -60,7 +60,8 @@ CDLTMessageAnalyzer::CDLTMessageAnalyzer(const std::weak_ptr& pFiltersModel, + QLineEdit* pFiltersSearchInput, CUMLView* pUMLView, const std::shared_ptr& pSearchViewTableJumper, CSearchResultView* pSearchResultView, const std::shared_ptr& pSearchResultModel): @@ -84,7 +85,7 @@ CDLTMessageAnalyzer::CDLTMessageAnalyzer(const std::weak_ptrsetTextInteractionFlags(Qt::TextSelectableByMouse); } - if(nullptr != mpFiltersView && - nullptr != mpFiltersModel) + if(nullptr != mpFiltersModel) { - mpFiltersView->setSpecificModel(mpFiltersModel); - if(nullptr != mpRegexLineEdit) { connect( mpRegexLineEdit, &QLineEdit::textChanged, [this](const QString& regex) @@ -180,7 +178,7 @@ CDLTMessageAnalyzer::CDLTMessageAnalyzer(const std::weak_ptrselectAll(); mpRegexLineEdit->insert( regex ); @@ -223,7 +221,7 @@ CDLTMessageAnalyzer::CDLTMessageAnalyzer(const std::weak_ptrhighlightInvalidRegex(index); @@ -582,17 +580,6 @@ void CDLTMessageAnalyzer::handleLoadedConfig() } } -CDLTMessageAnalyzer::~CDLTMessageAnalyzer() -{ - //qDebug() << __FUNCTION__; - - if(mpFiltersModel) - { - delete mpFiltersModel; - mpFiltersModel = nullptr; - } -} - std::shared_ptr CDLTMessageAnalyzer::createRegex( const QString& regex, const QString& onSuccessMessages, const QString& onFailureMessages, @@ -1738,9 +1725,9 @@ PUML_PACKAGE_BEGIN(DMA_Root) PUML_INHERITANCE_CHECKED(IDLTMessageAnalyzerControllerConsumer, implements) PUML_COMPOSITION_DEPENDENCY_CHECKED(IGroupedViewModel, 1, 1, uses) PUML_AGGREGATION_DEPENDENCY_CHECKED(CPatternsView, 1, 1, uses) - PUML_COMPOSITION_DEPENDENCY_CHECKED(IPatternsModel, 1, 1, contains) + PUML_AGGREGATION_DEPENDENCY_CHECKED(IPatternsModel, 1, 1, uses) PUML_AGGREGATION_DEPENDENCY_CHECKED(CFiltersView, 1, 1, uses) - PUML_COMPOSITION_DEPENDENCY_CHECKED(CFiltersModel, 1, 1, contains) + PUML_AGGREGATION_DEPENDENCY_CHECKED(IFiltersModel, 1, 1, uses) PUML_AGGREGATION_DEPENDENCY_CHECKED(CUMLView, 1, 1, uses) PUML_AGGREGATION_DEPENDENCY_CHECKED(CDLTFileWrapper, 1, 1, uses) PUML_USE_DEPENDENCY_CHECKED(CBGColorAnimation, 1, 1, uses) diff --git a/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.hpp b/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.hpp index 8a15da90..426e676d 100644 --- a/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.hpp +++ b/dltmessageanalyzerplugin/src/CDLTMessageAnalyzer.hpp @@ -38,7 +38,7 @@ class CGroupedView; class CPatternsView; class CRegexDirectoryMonitor; class CFiltersView; -class CFiltersModel; +class IFiltersModel; class CUMLView; class CSearchResultView; class ISearchResultModel; @@ -63,16 +63,12 @@ class CDLTMessageAnalyzer : public IDLTMessageAnalyzerControllerConsumer QLabel* pCacheStatusLabel, QTabWidget* pMainTabWidget, QLineEdit* pPatternsSearchInput, QComboBox* pRegexSelectionComboBox, - CFiltersView* pFiltersView, QLineEdit* pFiltersSearchInput, + CFiltersView* pFiltersView, const std::shared_ptr& pFiltersModel, + QLineEdit* pFiltersSearchInput, CUMLView* pUMLView, const std::shared_ptr& pSearchViewTableJumper, CSearchResultView* pSearchResultView, const std::shared_ptr& pSearchResultModel); - /** - * Destructor - */ - ~CDLTMessageAnalyzer(); - /** * @brief setFile - set's the file to be used for analysis * @param pFile - pointer to file to be used @@ -282,7 +278,7 @@ class CDLTMessageAnalyzer : public IDLTMessageAnalyzerControllerConsumer tPatternsModelPtr mpPatternsModel; CFiltersView* mpFiltersView; - CFiltersModel* mpFiltersModel; + std::shared_ptr mpFiltersModel; CUMLView* mpUMLView; diff --git a/dltmessageanalyzerplugin/src/CMakeLists.txt b/dltmessageanalyzerplugin/src/CMakeLists.txt index af8a405a..babdaac4 100644 --- a/dltmessageanalyzerplugin/src/CMakeLists.txt +++ b/dltmessageanalyzerplugin/src/CMakeLists.txt @@ -88,6 +88,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ################### PROJECT ############################### enable_testing() DMA_Prepare() +include(cmake/CMakeHelper.cmake) ################### PROJECT ( END ) ####################### set(TURN_OFF_RCC OFF) @@ -105,7 +106,6 @@ DMA_add_subdirectory_with_clang_tidy(plant_uml) DMA_add_subdirectory_with_clang_tidy(settings) DMA_add_subdirectory_with_clang_tidy(logo) DMA_add_subdirectory_with_clang_tidy(dltWrappers) -DMA_add_subdirectory_with_clang_tidy(filtersView) add_library(DLT-Message-Analyzer MODULE dltmessageanalyzerplugin.cpp diff --git a/dltmessageanalyzerplugin/src/cmake/CMakeHelper.cmake b/dltmessageanalyzerplugin/src/cmake/CMakeHelper.cmake new file mode 100644 index 00000000..3458788e --- /dev/null +++ b/dltmessageanalyzerplugin/src/cmake/CMakeHelper.cmake @@ -0,0 +1,18 @@ +macro (DMA_SuppressClangTidy_START) + set(RESTORE_CLANG_TIDY OFF) + set(CLANG_TIDY_CACHED_VAL "") + + if( DMA_CLANG_TIDY_BUILD ) + set(RESTORE_CLANG_TIDY ON) + set(CLANG_TIDY_CACHED_VAL CMAKE_CXX_CLANG_TIDY) + set(CMAKE_CXX_CLANG_TIDY "") + endif() +endmacro(DMA_SuppressClangTidy_START) + +macro (DMA_SuppressClangTidy_END) + if( RESTORE_CLANG_TIDY ) + set(CMAKE_CXX_CLANG_TIDY CLANG_TIDY_CACHED_VAL) + set(CLANG_TIDY_CACHED_VAL "") + set(RESTORE_CLANG_TIDY OFF) + endif() +endmacro(DMA_SuppressClangTidy_END) \ No newline at end of file diff --git a/dltmessageanalyzerplugin/src/common/PCRE/CMakeLists.txt b/dltmessageanalyzerplugin/src/common/PCRE/CMakeLists.txt index d01c319e..71e41f1c 100644 --- a/dltmessageanalyzerplugin/src/common/PCRE/CMakeLists.txt +++ b/dltmessageanalyzerplugin/src/common/PCRE/CMakeLists.txt @@ -1,22 +1,9 @@ add_definitions(-DQT_NO_KEYWORDS) -set(RESTORE_CLANG_TIDY OFF) -set(CLANG_TIDY_CACHED_VAL "") - -if( DMA_CLANG_TIDY_BUILD ) - set(RESTORE_CLANG_TIDY ON) - set(CLANG_TIDY_CACHED_VAL CMAKE_CXX_CLANG_TIDY) - set(CMAKE_CXX_CLANG_TIDY "") -endif() - +DMA_SuppressClangTidy_START() add_library(DMA_PCRE STATIC PCREHelper.cpp) - -if( RESTORE_CLANG_TIDY ) - set(CMAKE_CXX_CLANG_TIDY CLANG_TIDY_CACHED_VAL) - set(CLANG_TIDY_CACHED_VAL "") - set(RESTORE_CLANG_TIDY OFF) -endif() +DMA_SuppressClangTidy_END() ################### QT #################################### target_link_libraries(DMA_PCRE Qt5::Widgets ) diff --git a/dltmessageanalyzerplugin/src/components/CMakeLists.txt b/dltmessageanalyzerplugin/src/components/CMakeLists.txt index 8b68aed9..c91dc215 100644 --- a/dltmessageanalyzerplugin/src/components/CMakeLists.txt +++ b/dltmessageanalyzerplugin/src/components/CMakeLists.txt @@ -1,4 +1,5 @@ DMA_add_subdirectory_with_clang_tidy(analyzer) +DMA_add_subdirectory_with_clang_tidy(filtersView) DMA_add_subdirectory_with_clang_tidy(groupedView) DMA_add_subdirectory_with_clang_tidy(log) DMA_add_subdirectory_with_clang_tidy(patternsView) diff --git a/dltmessageanalyzerplugin/src/components/filtersView/CMakeLists.txt b/dltmessageanalyzerplugin/src/components/filtersView/CMakeLists.txt new file mode 100644 index 00000000..9d3e30d9 --- /dev/null +++ b/dltmessageanalyzerplugin/src/components/filtersView/CMakeLists.txt @@ -0,0 +1 @@ +DMA_add_subdirectory_with_clang_tidy(src) \ No newline at end of file diff --git a/dltmessageanalyzerplugin/src/filtersView/CFiltersView.hpp b/dltmessageanalyzerplugin/src/components/filtersView/api/CFiltersView.hpp similarity index 91% rename from dltmessageanalyzerplugin/src/filtersView/CFiltersView.hpp rename to dltmessageanalyzerplugin/src/components/filtersView/api/CFiltersView.hpp index 7890dfd6..e2624df6 100644 --- a/dltmessageanalyzerplugin/src/filtersView/CFiltersView.hpp +++ b/dltmessageanalyzerplugin/src/components/filtersView/api/CFiltersView.hpp @@ -1,9 +1,8 @@ -#ifndef CFILTERSVIEW_HPP -#define CFILTERSVIEW_HPP +#pragma once #include -#include "../common/Definitions.hpp" +#include "common/Definitions.hpp" class CFiltersModel; class CFilterItemDelegate; @@ -50,5 +49,3 @@ class CFiltersView : public QTreeView QLineEdit* mpRegexInputField; CFilterItemDelegate* mpFilerItemDelegate; }; - -#endif // CFILTERSVIEW_HPP diff --git a/dltmessageanalyzerplugin/src/components/filtersView/api/CFiltersViewComponent.hpp b/dltmessageanalyzerplugin/src/components/filtersView/api/CFiltersViewComponent.hpp new file mode 100644 index 00000000..c96dfc87 --- /dev/null +++ b/dltmessageanalyzerplugin/src/components/filtersView/api/CFiltersViewComponent.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "memory" + +#include "common/Definitions.hpp" +#include "dma/component/IComponent.hpp" + +class CFiltersView; +class IFiltersModel; + +class CFiltersViewComponent : public DMA::IComponent +{ +public: + + CFiltersViewComponent( CFiltersView* pFiltersView ); + + CFiltersView* getFiltersView() const; + + virtual const char* getName() const override; + + std::shared_ptr getFiltersModel(); + +protected: + virtual DMA::tSyncInitOperationResult init() override; + virtual DMA::tSyncInitOperationResult shutdown() override; + +private: + std::shared_ptr mpFiltersModel; + CFiltersView* mpFiltersView; +}; diff --git a/dltmessageanalyzerplugin/src/components/filtersView/api/IFiltersModel.hpp b/dltmessageanalyzerplugin/src/components/filtersView/api/IFiltersModel.hpp new file mode 100644 index 00000000..3d83cc30 --- /dev/null +++ b/dltmessageanalyzerplugin/src/components/filtersView/api/IFiltersModel.hpp @@ -0,0 +1,36 @@ +#pragma once + +#include "QModelIndex" +#include "QAbstractItemModel" + +#include "common/Definitions.hpp" + +class IFiltersModel : public QAbstractItemModel +{ + Q_OBJECT + +public: + + explicit IFiltersModel(QObject *parent = nullptr); + virtual ~IFiltersModel(); + + virtual void setUsedRegex(const QString& regexStr) = 0; + virtual void addCompletionData( const tFoundMatches& foundMatches ) = 0; + virtual void resetCompletionData() = 0; + virtual void resetData() = 0; + virtual void filterRegexTokens( const QString& filter ) = 0; + + struct tFilteredEntry + { + QModelIndex parentIdx; + int row; + bool filtered; + }; + typedef std::vector tFilteredEntryVec; + +signals: + + void filteredEntriesChanged(const tFilteredEntryVec& filteredEntryVec, bool expandVisible); + void regexUpdatedByUser( const QString& regex ); + void regexUpdatedByUserInvalid( const QModelIndex& index, const QString& error ); +}; diff --git a/dltmessageanalyzerplugin/src/components/filtersView/doc/doc.md b/dltmessageanalyzerplugin/src/components/filtersView/doc/doc.md new file mode 100644 index 00000000..fe086e88 --- /dev/null +++ b/dltmessageanalyzerplugin/src/components/filtersView/doc/doc.md @@ -0,0 +1,25 @@ +[**Go to the previous page**](../../../../../md/dev_docs/dev_docs.md) + +---- + +# DMA_FiltersView + +## Standalone package API diagram + +![Class diagram with dependencies](../../../../../md/dev_docs/puml/DMA_FiltersView_API_standalone.svg) + +## Package API diagram with the first-level dependencies + +![Class diagram with dependencies](../../../../../md/dev_docs/puml/DMA_FiltersView_API.svg) + +## Standalone package diagram + +![Class diagram with dependencies](../../../../../md/dev_docs/puml/DMA_FiltersView_standalone.svg) + +## Package diagram with the first-level dependencies + +![Class diagram with dependencies](../../../../../md/dev_docs/puml/DMA_FiltersView.svg) + +---- + +[**Go to the previous page**](../../../../../md/dev_docs/dev_docs.md) \ No newline at end of file diff --git a/dltmessageanalyzerplugin/src/filtersView/CFilterItemDelegate.cpp b/dltmessageanalyzerplugin/src/components/filtersView/src/CFilterItemDelegate.cpp similarity index 99% rename from dltmessageanalyzerplugin/src/filtersView/CFilterItemDelegate.cpp rename to dltmessageanalyzerplugin/src/components/filtersView/src/CFilterItemDelegate.cpp index 5e91a33a..8798c04c 100644 --- a/dltmessageanalyzerplugin/src/filtersView/CFilterItemDelegate.cpp +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/CFilterItemDelegate.cpp @@ -5,8 +5,8 @@ #include #include "components/log/api/CLog.hpp" -#include "../settings/CSettingsManager.hpp" -#include "../common/Definitions.hpp" +#include "settings/CSettingsManager.hpp" +#include "common/Definitions.hpp" #include "CFiltersModel.hpp" #include "CFilterItemDelegate.hpp" diff --git a/dltmessageanalyzerplugin/src/filtersView/CFilterItemDelegate.hpp b/dltmessageanalyzerplugin/src/components/filtersView/src/CFilterItemDelegate.hpp similarity index 96% rename from dltmessageanalyzerplugin/src/filtersView/CFilterItemDelegate.hpp rename to dltmessageanalyzerplugin/src/components/filtersView/src/CFilterItemDelegate.hpp index 0e74dd72..2d64f700 100644 --- a/dltmessageanalyzerplugin/src/filtersView/CFilterItemDelegate.hpp +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/CFilterItemDelegate.hpp @@ -1,5 +1,4 @@ -#ifndef CFILTERITEMDELEGATE_HPP -#define CFILTERITEMDELEGATE_HPP +#pragma once #include #include @@ -85,5 +84,3 @@ private slots: QTreeView* mpParentTree; CFiltersModel* mpModel; }; - -#endif // CFILTERITEMDELEGATE_HPP diff --git a/dltmessageanalyzerplugin/src/filtersView/CFiltersModel.cpp b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersModel.cpp similarity index 99% rename from dltmessageanalyzerplugin/src/filtersView/CFiltersModel.cpp rename to dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersModel.cpp index ce1d8200..8dd98ca4 100644 --- a/dltmessageanalyzerplugin/src/filtersView/CFiltersModel.cpp +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersModel.cpp @@ -12,15 +12,15 @@ #include "QElapsedTimer" #endif -#include "../settings/CSettingsManager.hpp" +#include "settings/CSettingsManager.hpp" #include "CFiltersModel.hpp" #include "components/log/api/CLog.hpp" -#include "../common/PCRE/PCREHelper.hpp" +#include "common/PCRE/PCREHelper.hpp" #include "DMA_Plantuml.hpp" CFiltersModel::CFiltersModel(QObject *parent) - : QAbstractItemModel(parent), + : IFiltersModel(parent), mRegex(), mSortingColumn(eRegexFiltersColumn::Index), mSortOrder(Qt::SortOrder::AscendingOrder), @@ -804,7 +804,7 @@ QStringList CFiltersModel::getCompletionData( const int& groupIndex, PUML_PACKAGE_BEGIN(DMA_FiltersView) PUML_CLASS_BEGIN_CHECKED(CFiltersModel) - PUML_INHERITANCE_CHECKED(QAbstractItemModel, implements) + PUML_INHERITANCE_CHECKED(IFiltersModel, implements) PUML_COMPOSITION_DEPENDENCY_CHECKED(CTreeItem, 1, *, contains) PUML_CLASS_END() PUML_PACKAGE_END() diff --git a/dltmessageanalyzerplugin/src/filtersView/CFiltersModel.hpp b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersModel.hpp similarity index 70% rename from dltmessageanalyzerplugin/src/filtersView/CFiltersModel.hpp rename to dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersModel.hpp index 74b9c9b9..b004c9eb 100644 --- a/dltmessageanalyzerplugin/src/filtersView/CFiltersModel.hpp +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersModel.hpp @@ -1,25 +1,26 @@ -#ifndef CFILTERSMODEL_HPP -#define CFILTERSMODEL_HPP +#pragma once #include "memory" -#include "QAbstractItemModel" +#include "common/Definitions.hpp" +#include "common/CTreeItem.hpp" -#include "../common/Definitions.hpp" -#include "../common/CTreeItem.hpp" +#include "../api/IFiltersModel.hpp" -class CFiltersModel : public QAbstractItemModel +class CFiltersModel : public IFiltersModel { Q_OBJECT public: explicit CFiltersModel(QObject *parent = nullptr); - void resetData(); - void setUsedRegex(const QString& regexStr); - - void addCompletionData( const tFoundMatches& foundMatches ); - void resetCompletionData(); + // Implementation of the IFiltersModel + void setUsedRegex(const QString& regexStr) override; + void addCompletionData( const tFoundMatches& foundMatches ) override; + void resetCompletionData() override; + void resetData() override; + void filterRegexTokens( const QString& filter ) override; + // Implementation of the IFiltersModel ( END ) QVariant data(const QModelIndex &index, int role) const override; bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; @@ -34,23 +35,8 @@ class CFiltersModel : public QAbstractItemModel virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; - void filterRegexTokens( const QString& filter ); - - struct tFilteredEntry - { - QModelIndex parentIdx; - int row; - bool filtered; - }; - typedef std::vector tFilteredEntryVec; - QStringList getCompletionData( const int& groupIndex, const QString& input, const int& maxNumberOfSuggestions, const int& maxLengthOfSuggestions ); -signals: - void filteredEntriesChanged(const tFilteredEntryVec& filteredEntryVec, bool expandVisible); - void regexUpdatedByUser( const QString& regex ); - void regexUpdatedByUserInvalid( const QModelIndex& index, const QString& error ); - private: QModelIndex createIndexInternal(int arow, int acolumn, void *adata) const; @@ -87,5 +73,3 @@ class CFiltersModel : public QAbstractItemModel }; Q_DECLARE_METATYPE(CFiltersModel::tFilteredEntryVec) - -#endif // CFILTERSMODEL_HPP diff --git a/dltmessageanalyzerplugin/src/filtersView/CFiltersView.cpp b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersView.cpp similarity index 99% rename from dltmessageanalyzerplugin/src/filtersView/CFiltersView.cpp rename to dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersView.cpp index f3668364..ede6ad52 100644 --- a/dltmessageanalyzerplugin/src/filtersView/CFiltersView.cpp +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersView.cpp @@ -12,12 +12,12 @@ #include "QKeyEvent" #include "CFiltersModel.hpp" -#include "../settings/CSettingsManager.hpp" +#include "settings/CSettingsManager.hpp" #include "components/log/api/CLog.hpp" -#include "../common/CQtHelper.hpp" +#include "common/CQtHelper.hpp" #include "CFilterItemDelegate.hpp" -#include "CFiltersView.hpp" +#include "../api/CFiltersView.hpp" #include "DMA_Plantuml.hpp" @@ -543,7 +543,7 @@ void CFiltersView::keyPressEvent ( QKeyEvent * event ) } } -PUML_PACKAGE_BEGIN(DMA_FiltersView) +PUML_PACKAGE_BEGIN(DMA_FiltersView_API) PUML_CLASS_BEGIN_CHECKED(CFiltersView) PUML_INHERITANCE_CHECKED(QTreeView, implements) PUML_COMPOSITION_DEPENDENCY_CHECKED(CFilterItemDelegate, 1, 1, contains) diff --git a/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersViewComponent.cpp b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersViewComponent.cpp new file mode 100644 index 00000000..2ed7a304 --- /dev/null +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/CFiltersViewComponent.cpp @@ -0,0 +1,97 @@ +#include "../api/CFiltersViewComponent.hpp" + +#include "CFiltersModel.hpp" + +#include "../api/CFiltersView.hpp" + +#include "DMA_Plantuml.hpp" + +#include "dma/base/ForceLink.hpp" + +CFiltersViewComponent::CFiltersViewComponent( CFiltersView* pFiltersView ): +mpFiltersModel(nullptr), +mpFiltersView(pFiltersView) +{ + DMA_FORCE_LINK_REFERENCE(IFiltersModel) +} + +std::shared_ptr CFiltersViewComponent::getFiltersModel() +{ + return mpFiltersModel; +} + +const char* CFiltersViewComponent::getName() const +{ + return "CFiltersViewComponent"; +} + +DMA::tSyncInitOperationResult CFiltersViewComponent::init() +{ + DMA::tSyncInitOperationResult result; + + try + { + if(nullptr != mpFiltersView) + { + auto pFiltersModel= std::make_shared(); + + if( nullptr != pFiltersModel ) + { + mpFiltersModel = pFiltersModel; + mpFiltersView->setSpecificModel(pFiltersModel.get()); + } + + result.bIsOperationSuccessful = true; + result.returnCode = 0; + } + else + { + result.bIsOperationSuccessful = false; + result.returnCode = -1; + } + } + catch (...) + { + result.bIsOperationSuccessful = false; + result.returnCode = -1; + } + + return result; +} + +DMA::tSyncInitOperationResult CFiltersViewComponent::shutdown() +{ + DMA::tSyncInitOperationResult result; + + try + { + if(nullptr != mpFiltersModel) + { + mpFiltersModel.reset(); + } + + result.bIsOperationSuccessful = true; + result.returnCode = 0; + } + catch (...) + { + result.bIsOperationSuccessful = false; + result.returnCode = -1; + } + + return result; +} + +CFiltersView* CFiltersViewComponent::getFiltersView() const +{ + return mpFiltersView; +} + +PUML_PACKAGE_BEGIN(DMA_FiltersView_API) + PUML_CLASS_BEGIN(CFiltersViewComponent) + PUML_INHERITANCE_CHECKED(DMA::IComponent, implements) + PUML_COMPOSITION_DEPENDENCY_CHECKED(IFiltersModel, 1, 1, contains) + PUML_USE_DEPENDENCY_CHECKED(CFiltersModel, 1, 1, using to create IFiltersModel) + PUML_AGGREGATION_DEPENDENCY_CHECKED(CFiltersView, 1, 1, uses) + PUML_CLASS_END() +PUML_PACKAGE_END() diff --git a/dltmessageanalyzerplugin/src/components/filtersView/src/CMakeLists.txt b/dltmessageanalyzerplugin/src/components/filtersView/src/CMakeLists.txt new file mode 100644 index 00000000..8b4d8ccc --- /dev/null +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/CMakeLists.txt @@ -0,0 +1,23 @@ +qt5_wrap_cpp(PROCESSED_MOCS + ../api/CFiltersView.hpp + ../api/IFiltersModel.hpp) + +add_library(DMA_filtersView STATIC + CFiltersModel.cpp + CFiltersView.cpp + CFiltersViewComponent.cpp + IFiltersModel.cpp + ${PROCESSED_MOCS}) + +################### QT #################################### +target_link_libraries(DMA_filtersView PUBLIC qdlt Qt5::Widgets DMA_framework_base DMA_framework_component ) +################### QT ( END ) ############################ + +DMA_SuppressClangTidy_START() +add_library(DMA_filtersView_no_clang_tidy STATIC + CFilterItemDelegate.cpp) +DMA_SuppressClangTidy_END() + +################### QT #################################### +target_link_libraries(DMA_filtersView_no_clang_tidy PUBLIC qdlt Qt5::Widgets DMA_framework_base DMA_framework_component ) +################### QT ( END ) ############################ diff --git a/dltmessageanalyzerplugin/src/components/filtersView/src/IFiltersModel.cpp b/dltmessageanalyzerplugin/src/components/filtersView/src/IFiltersModel.cpp new file mode 100644 index 00000000..b5f06bdf --- /dev/null +++ b/dltmessageanalyzerplugin/src/components/filtersView/src/IFiltersModel.cpp @@ -0,0 +1,29 @@ +#include "../api/IFiltersModel.hpp" + +#include "dma/base/ForceLink.hpp" + +#include "DMA_Plantuml.hpp" + +IFiltersModel::IFiltersModel(QObject *parent): +QAbstractItemModel(parent) +{ + +} + +IFiltersModel::~IFiltersModel() +{ + +} + +DMA_FORCE_LINK_ANCHOR_CPP(IFiltersModel) + +PUML_PACKAGE_BEGIN(DMA_FiltersView_API) + PUML_CLASS_BEGIN(IFiltersModel) + PUML_INHERITANCE_CHECKED(QAbstractItemModel, implements) + PUML_PURE_VIRTUAL_METHOD( +, void setUsedRegex(const QString& regexStr) ) + PUML_PURE_VIRTUAL_METHOD( +, void addCompletionData( const tFoundMatches& foundMatches ) ) + PUML_PURE_VIRTUAL_METHOD( +, void resetCompletionData() ) + PUML_PURE_VIRTUAL_METHOD( +, void resetData() ) + PUML_PURE_VIRTUAL_METHOD( +, void filterRegexTokens( const QString& filter ) ) + PUML_CLASS_END() +PUML_PACKAGE_END() diff --git a/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.cpp b/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.cpp index bcedf04b..c1de7aca 100644 --- a/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.cpp +++ b/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.cpp @@ -16,7 +16,6 @@ #include "settings/CSettingsManager.hpp" #include "dltWrappers/CDLTMsgWrapper.hpp" #include "components/patternsView/api/CPatternsView.hpp" -#include "filtersView/CFiltersView.hpp" #include "DMA_Plantuml.hpp" #include "components/log/api/CLog.hpp" @@ -26,6 +25,8 @@ #include "components/searchView/api/CSearchViewComponent.hpp" #include "components/groupedView/api/CGroupedViewComponent.hpp" #include "components/patternsView/api/CPatternsViewComponent.hpp" +#include "components/filtersView/api/CFiltersViewComponent.hpp" +#include "components/filtersView/api/CFiltersView.hpp" #include "DMA_Plantuml.hpp" @@ -42,7 +43,8 @@ mbAnalysisRunning(false), mComponents(), mpSearchViewComponent(nullptr), mpGroupedViewComponent(nullptr), -mpPatternsViewComponent(nullptr) +mpPatternsViewComponent(nullptr), +mpFiltersViewComponent(nullptr) #ifndef PLUGIN_API_COMPATIBILITY_MODE_1_0_0 ,mpMainTableView(nullptr) #endif @@ -182,6 +184,20 @@ QWidget* DLTMessageAnalyzerPlugin::initViewer() mComponents.push_back(pPatternsViewComponent); } + { + auto pFiltersViewComponent = std::make_shared(mpForm->getFiltersView()); + mpFiltersViewComponent = pFiltersViewComponent; + + auto initResult = pFiltersViewComponent->startInit(); + + if(false == initResult.bIsOperationSuccessful) + { + SEND_ERR(QString("Failed to initialize %1").arg(pFiltersViewComponent->getName())); + } + + mComponents.push_back(pFiltersViewComponent); + } + connect( qApp, &QApplication::aboutToQuit, [this]() { for(auto& pComponent : mComponents) @@ -234,7 +250,8 @@ QWidget* DLTMessageAnalyzerPlugin::initViewer() mpForm->getMainTabWidget(), mpForm->getPatternSearchInput(), mpForm->getConfigComboBox(), - mpForm->getFiltersView(), + mpFiltersViewComponent->getFiltersView(), + mpFiltersViewComponent->getFiltersModel(), mpForm->getFiltersSearchInput(), mpForm->getUMLView(), mpSearchViewComponent->getTableMemoryJumper(), @@ -633,6 +650,8 @@ PUML_PACKAGE_BEGIN(DMA_Root) PUML_COMPOSITION_DEPENDENCY_CHECKED(CLogComponent, 1, 1, contains) PUML_COMPOSITION_DEPENDENCY_CHECKED(CGroupedViewComponent, 1, 1, contains) PUML_COMPOSITION_DEPENDENCY_CHECKED(CSearchViewComponent, 1, 1, contains) + PUML_COMPOSITION_DEPENDENCY_CHECKED(CFiltersViewComponent, 1, 1, contains) + PUML_COMPOSITION_DEPENDENCY_CHECKED(CPatternsViewComponent, 1, 1, contains) PUML_COMPOSITION_DEPENDENCY_CHECKED(CDLTFileWrapper, 1, 1, contains) PUML_CLASS_END() PUML_PACKAGE_END() diff --git a/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.hpp b/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.hpp index 4b8e2412..e2f2e78e 100644 --- a/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.hpp +++ b/dltmessageanalyzerplugin/src/dltmessageanalyzerplugin.hpp @@ -28,6 +28,7 @@ class IDLTMessageAnalyzerController; class CSearchViewComponent; class CGroupedViewComponent; class CPatternsViewComponent; +class CFiltersViewComponent; namespace DMA { @@ -139,6 +140,7 @@ public slots: std::shared_ptr mpSearchViewComponent; std::shared_ptr mpGroupedViewComponent; std::shared_ptr mpPatternsViewComponent; + std::shared_ptr mpFiltersViewComponent; #ifndef PLUGIN_API_COMPATIBILITY_MODE_1_0_0 QTableView* mpMainTableView; diff --git a/dltmessageanalyzerplugin/src/filtersView/CMakeLists.txt b/dltmessageanalyzerplugin/src/filtersView/CMakeLists.txt deleted file mode 100644 index 6bf4e95b..00000000 --- a/dltmessageanalyzerplugin/src/filtersView/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -add_library(DMA_filtersView STATIC - CFiltersModel.cpp - CFiltersView.cpp) - -set(RESTORE_CLANG_TIDY OFF) -set(CLANG_TIDY_CACHED_VAL "") - -if( DMA_CLANG_TIDY_BUILD ) - set(RESTORE_CLANG_TIDY ON) - set(CLANG_TIDY_CACHED_VAL CMAKE_CXX_CLANG_TIDY) - set(CMAKE_CXX_CLANG_TIDY "") -endif() - -add_library(DMA_filtersView_no_clang_tidy STATIC - CFilterItemDelegate.cpp) - -if( RESTORE_CLANG_TIDY ) - set(CMAKE_CXX_CLANG_TIDY CLANG_TIDY_CACHED_VAL) - set(CLANG_TIDY_CACHED_VAL "") - set(RESTORE_CLANG_TIDY OFF) -endif() - -################### QT #################################### -target_link_libraries(DMA_filtersView_no_clang_tidy qdlt Qt5::Widgets ) -################### QT ( END ) ############################ - -################### QT #################################### -target_link_libraries(DMA_filtersView qdlt Qt5::Widgets ) -################### QT ( END ) ############################ diff --git a/dltmessageanalyzerplugin/src/filtersView/doc/doc.md b/dltmessageanalyzerplugin/src/filtersView/doc/doc.md deleted file mode 100644 index 4554a24c..00000000 --- a/dltmessageanalyzerplugin/src/filtersView/doc/doc.md +++ /dev/null @@ -1,17 +0,0 @@ -[**Go to the previous page**](../../../../md/dev_docs/dev_docs.md) - ----- - -# DMA_FiltersView - -## Standalone package diagram - -![Class diagram with dependencies](../../../../md/dev_docs/puml/DMA_FiltersView_standalone.svg) - -## Package diagram with the first-level dependencies - -![Class diagram with dependencies](../../../../md/dev_docs/puml/DMA_FiltersView.svg) - ----- - -[**Go to the previous page**](../../../../md/dev_docs/dev_docs.md) \ No newline at end of file diff --git a/dltmessageanalyzerplugin/src/form.ui b/dltmessageanalyzerplugin/src/form.ui index 3e58d6c9..bbc9608f 100644 --- a/dltmessageanalyzerplugin/src/form.ui +++ b/dltmessageanalyzerplugin/src/form.ui @@ -7,7 +7,7 @@ 0 0 857 - 348 + 372 @@ -1186,7 +1186,7 @@ color: rgb(0, 0, 0); CFiltersView QTreeView -
filtersView/CFiltersView.hpp
+
components/filtersView/api/CFiltersView.hpp
CConsoleView diff --git a/md/dev_docs/dev_docs.md b/md/dev_docs/dev_docs.md index eff18f65..1610786f 100644 --- a/md/dev_docs/dev_docs.md +++ b/md/dev_docs/dev_docs.md @@ -21,7 +21,7 @@ It's main purposes is to: #### [DMA_Analyzer](../../dltmessageanalyzerplugin/src/components/analyzer/doc/doc.md) #### [DMA_Common](../../dltmessageanalyzerplugin/src/common/doc/doc.md) #### [DMA_DLTWrappers](../../dltmessageanalyzerplugin/src/dltWrappers/doc/doc.md) -#### [DMA_FiltersView](../../dltmessageanalyzerplugin/src/filtersView/doc/doc.md) +#### [DMA_FiltersView](../../dltmessageanalyzerplugin/src/components/filtersView/doc/doc.md) #### [DMA_GroupedView](../../dltmessageanalyzerplugin/src/components/groupedView/doc/doc.md) #### [DMA_Log](../../dltmessageanalyzerplugin/src/components/log/doc/doc.md) #### [DMA_Logo](../../dltmessageanalyzerplugin/src/logo/doc/doc.md) diff --git a/md/dev_docs/puml/DMA_DLTWrappers.svg b/md/dev_docs/puml/DMA_DLTWrappers.svg index df6f358c..a64e881c 100644 --- a/md/dev_docs/puml/DMA_DLTWrappers.svg +++ b/md/dev_docs/puml/DMA_DLTWrappers.svg @@ -1,23 +1,23 @@ DLTDMA_DLTWrappersDLTDMA_DLTWrappersDMA_RootDMA_SearchViewDMA_SearchView_APIQtQDltFileQDltMsgQDltFileQDltMsgCDLTFileWrapperCDLTMsgWrapperCDLTMsgWrapperCDLTMessageAnalyzerDLTMessageAnalyzerPluginCSearchResultModelCSearchResultViewQObjectextendscache1*uses11uses11cache1*uses11uses11uses11contains11uses11 "1" CFiltersModel : using to create IFiltersModel @enduml \ No newline at end of file diff --git a/md/dev_docs/puml/DMA_FiltersView.svg b/md/dev_docs/puml/DMA_FiltersView.svg index ae3f3497..b9ad104a 100644 --- a/md/dev_docs/puml/DMA_FiltersView.svg +++ b/md/dev_docs/puml/DMA_FiltersView.svg @@ -1,32 +1,26 @@ -DMA_CommonDMA_FiltersViewDMA_RootQtCTreeItemCFilterItemDelegateCFiltersModelCFiltersViewCDLTMessageAnalyzerUi::FormQAbstractItemModelQCompleterQLineEditQStyledItemDelegateQTreeViewextendsimplementsimplementsuses11uses11parent view11contains1*contains11uses11regex input field11contains11uses11contains11DMA_CommonDMA_FiltersViewDMA_FiltersView_APIQtCTreeItemCFilterItemDelegateCFiltersModelCFiltersViewCFiltersViewComponentIFiltersModelvirtual void addCompletionData( const tFoundMatches& foundMatches ) = 0virtual void filterRegexTokens( const QString& filter ) = 0virtual void resetCompletionData() = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regexStr) = 0QCompleterQStyledItemDelegateQTreeViewextendsimplementsuses11uses11parent view11contains1*contains11uses11using to create IFiltersModel11 "1" CFiltersModel : using to create IFiltersModel +CFiltersViewComponent "1" o-- "1" CFiltersView : uses +CFiltersViewComponent "1" *-- "1" IFiltersModel : contains +CDLTMessageAnalyzer "1" o-- "1" CFiltersView : uses +CDLTMessageAnalyzer "1" o-- "1" IFiltersModel : uses +DLTMessageAnalyzerPlugin "1" *-- "1" CFiltersViewComponent : contains +Ui::Form "1" *-- "1" CFiltersView : contains + +@enduml \ No newline at end of file diff --git a/md/dev_docs/puml/DMA_FiltersView_API.svg b/md/dev_docs/puml/DMA_FiltersView_API.svg new file mode 100644 index 00000000..c3da04a4 --- /dev/null +++ b/md/dev_docs/puml/DMA_FiltersView_API.svg @@ -0,0 +1,242 @@ +DMA_FiltersViewDMA_FiltersView_APIDMA_Framework_ComponentDMA_RootQtCFilterItemDelegateCFiltersModelCFiltersViewCFiltersViewComponentIFiltersModelvirtual void addCompletionData( const tFoundMatches& foundMatches ) = 0virtual void filterRegexTokens( const QString& filter ) = 0virtual void resetCompletionData() = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regexStr) = 0DMA::IComponentCDLTMessageAnalyzerDLTMessageAnalyzerPluginUi::FormQAbstractItemModelQLineEditQTreeViewimplementsimplementsimplementsimplementscontains11uses11regex input field11using to create IFiltersModel11uses11contains11uses11uses11contains11contains11 \ No newline at end of file diff --git a/md/dev_docs/puml/DMA_FiltersView_API_standalone.puml b/md/dev_docs/puml/DMA_FiltersView_API_standalone.puml new file mode 100644 index 00000000..1b79e4a3 --- /dev/null +++ b/md/dev_docs/puml/DMA_FiltersView_API_standalone.puml @@ -0,0 +1,59 @@ + +@startuml + +skinparam backgroundColor #FEFEFE +skinparam wrapWidth 600 +package "DMA_FiltersView_API" #DDDDDD +{ + +class "CFiltersView" +{ +} + +class "CFiltersViewComponent" +{ +} + +class "IFiltersModel" +{ + + {abstract} virtual void addCompletionData( const tFoundMatches& foundMatches ) = 0 + + {abstract} virtual void filterRegexTokens( const QString& filter ) = 0 + + {abstract} virtual void resetCompletionData() = 0 + + {abstract} virtual void resetData() = 0 + + {abstract} virtual void setUsedRegex(const QString& regexStr) = 0 +} + +} + +package "DMA_Framework_Component" #DDDDDD +{ + +class "DMA::IComponent" +{ +} + +} + +package "Qt" #DDDDDD +{ + +abstract class "QAbstractItemModel" +{ +} + +class "QTreeView" +{ +} + +} + +'====================Inheritance section==================== +QTreeView <|-- CFiltersView : implements +DMA::IComponent <|-- CFiltersViewComponent : implements +QAbstractItemModel <|-- IFiltersModel : implements + +'====================Dependencies section==================== +CFiltersViewComponent "1" o-- "1" CFiltersView : uses +CFiltersViewComponent "1" *-- "1" IFiltersModel : contains + +@enduml \ No newline at end of file diff --git a/md/dev_docs/puml/DMA_FiltersView_API_standalone.svg b/md/dev_docs/puml/DMA_FiltersView_API_standalone.svg new file mode 100644 index 00000000..934ec588 --- /dev/null +++ b/md/dev_docs/puml/DMA_FiltersView_API_standalone.svg @@ -0,0 +1,139 @@ +DMA_FiltersView_APIDMA_Framework_ComponentQtCFiltersViewCFiltersViewComponentIFiltersModelvirtual void addCompletionData( const tFoundMatches& foundMatches ) = 0virtual void filterRegexTokens( const QString& filter ) = 0virtual void resetCompletionData() = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regexStr) = 0DMA::IComponentQAbstractItemModelQTreeViewimplementsimplementsimplementsuses11contains11 \ No newline at end of file diff --git a/md/dev_docs/puml/DMA_FiltersView_standalone.puml b/md/dev_docs/puml/DMA_FiltersView_standalone.puml index 367a0973..9bddd98f 100644 --- a/md/dev_docs/puml/DMA_FiltersView_standalone.puml +++ b/md/dev_docs/puml/DMA_FiltersView_standalone.puml @@ -14,24 +14,26 @@ class "CFiltersModel" { } -class "CFiltersView" -{ -} - } -package "Qt" #DDDDDD +package "DMA_FiltersView_API" #DDDDDD { -abstract class "QAbstractItemModel" +class "IFiltersModel" { + + {abstract} virtual void addCompletionData( const tFoundMatches& foundMatches ) = 0 + + {abstract} virtual void filterRegexTokens( const QString& filter ) = 0 + + {abstract} virtual void resetCompletionData() = 0 + + {abstract} virtual void resetData() = 0 + + {abstract} virtual void setUsedRegex(const QString& regexStr) = 0 } -class "QStyledItemDelegate" -{ } -class "QTreeView" +package "Qt" #DDDDDD +{ + +class "QStyledItemDelegate" { } @@ -39,12 +41,9 @@ class "QTreeView" '====================Inheritance section==================== QStyledItemDelegate <|-- CFilterItemDelegate : extends -QAbstractItemModel <|-- CFiltersModel : implements -QTreeView <|-- CFiltersView : implements +IFiltersModel <|-- CFiltersModel : implements '====================Dependencies section==================== CFilterItemDelegate "1" o-- "1" CFiltersModel : uses -CFiltersView "1" *-- "1" CFilterItemDelegate : contains -CFiltersView "1" o-- "1" CFiltersModel : uses @enduml \ No newline at end of file diff --git a/md/dev_docs/puml/DMA_FiltersView_standalone.svg b/md/dev_docs/puml/DMA_FiltersView_standalone.svg index bfaecafd..999af349 100644 --- a/md/dev_docs/puml/DMA_FiltersView_standalone.svg +++ b/md/dev_docs/puml/DMA_FiltersView_standalone.svg @@ -1,18 +1,14 @@ -DMA_FiltersViewQtCFilterItemDelegateCFiltersModelCFiltersViewQAbstractItemModelQStyledItemDelegateQTreeViewextendsimplementsimplementsuses11contains11uses11DMA_FiltersViewDMA_FiltersView_APIQtCFilterItemDelegateCFiltersModelIFiltersModelvirtual void addCompletionData( const tFoundMatches& foundMatches ) = 0virtual void filterRegexTokens( const QString& filter ) = 0virtual void resetCompletionData() = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regexStr) = 0QStyledItemDelegateextendsimplementsuses11DMA_Analyzer_APIDMA_Framework_BaseDMA_Framework_ComponentDMA_GroupedView_APIDMA_Log_APIDMA_PatternsView_APIDMA_SearchView_APICAnalyzerComponentDMA::CBaseSynchronousInitializablevirtual virtual tSyncInitOperationResult init() = 0virtual virtual tSyncInitOperationResult shutdown() = 0virtual virtual tSyncInitOperationResult startInit()virtual virtual tSyncInitOperationResult startShutdown()virtual virtual virtual bool isInitialized () constDMA::INamedObjectchar* getName() constDMA::IComponentCGroupedViewComponentCLogComponentCPatternsViewComponentCSearchViewComponentimplementsextendsimplementsimplementsimplementsimplementsimplementsDMA_Analyzer_APIDMA_FiltersView_APIDMA_Framework_BaseDMA_Framework_ComponentDMA_GroupedView_APIDMA_Log_APIDMA_PatternsView_APIDMA_SearchView_APICAnalyzerComponentCFiltersViewComponentDMA::CBaseSynchronousInitializablevirtual virtual tSyncInitOperationResult init() = 0virtual virtual tSyncInitOperationResult shutdown() = 0virtual virtual tSyncInitOperationResult startInit()virtual virtual tSyncInitOperationResult startShutdown()virtual virtual virtual bool isInitialized () constDMA::INamedObjectchar* getName() constDMA::IComponentCGroupedViewComponentCLogComponentCPatternsViewComponentCSearchViewComponentimplementsimplementsextendsimplementsimplementsimplementsimplementsimplementsDLTDMA_AnalyzerDMA_Analyzer_APIDMA_CommonDMA_CommonDMA_DLTWrappersDMA_FiltersViewDMA_Framework_BaseDMA_PatternsViewDMA_PlantUMLDMA_RootDMA_SearchViewDMA_SearchViewDMA_SettingsQtQDLTPluginInterfaceIDLTMessageAnalyzerControllervirtual int getMaximumNumberOfThreads() const = 0virtual tRequestId requestAnalyze( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, consttDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages, const QRegularExpression& regex,const int& numberOfThreads, const tRegexScriptingMetadata& regexScriptingMetadata, bool isContinuous) = 0virtual void cancelRequest( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, const tRequestId&requestId ) = 0IDLTMessageAnalyzerControllerConsumertRequestId requestAnalyze( const tDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages,const QRegularExpression& regex, const int& numberOfThreads, bool isContinuous )virtual void progressNotification( const tRequestId& requestId, const eRequestState& requestState, const int8_t&progress, const tFoundMatchesPack& processedMatches) = 0std::enable_shared_from_thisIDLTMessageAnalyzerControllerConsumerCBGColorAnimationCRegexDirectoryMonitorCTableMemoryJumperCTreeItemCBGColorAnimationCRegexDirectoryMonitorCTableMemoryJumperCTreeItemCDLTFileWrapperCDLTMsgWrapperCFilterItemDelegateDLTMessageAnalyzerPluginFormUi::FormCSearchResultHighlightingDelegateCSearchResultModelCSearchResultViewCSearchResultHighlightingDelegateCSearchResultModelCSearchResultViewCSettingItemvirtual const QString& getKey() overridevirtual const tUpdateSettingsFileFunc& getUpdateFileFunc() override«Singleton»CSettingsManagerISettingItemvirtual QJsonObject writeData() const = 0virtual bool readData( const QJsonValueRef& setting ) = 0virtual const QString& getKey() = 0virtual const tUpdateSettingsFileFunc& getUpdateFileFunc() = 0virtual tGeneralUpdateDataFunc getGeneralUpdateDataFunc() = 0QAbstractItemModelQAbstractTableModelQCompleterQElapsedTimerQFileSystemWatcherQElapsedTimerQFileSystemWatcherQImageQLineEditQObjectQObjectQPlainTextEditQProcessQPushButtonQStyledItemDelegateQStyledItemDelegateQTabWidgetQTableViewQThreadQThreadQTimerQTreeViewQWidgetimplementsimplementsuses11extendsextendsimplementsimplementsextendsextendsextendsextendsextendsextendsextendsextendsextendsextendsextendsextendsextendsimplementsimplementsimplementsextendsimplementsextendsextendsimplementsextendsextendsextendsextendsextendsextendsimplementsimplementsextendsextendsextendsextendsextendsextendsimplementsimplementsimplementsimplementsextendsextendsextendsextendsimplementsextendsextendsimplementsextendspartially implementsextendsextendsextendscontains11creates and feeds into CContinuousAnalyzer11contains11contains1*contains1*contains1*uses11animation widget11contains11contains11contains1*animation widget11contains11contains11contains1*cache1*uses11uses11uses11uses11parent view11contains1*contains1*contains11uses11regex input field11contains1*contains1*console text edit11console view tab widget11console tab11console input11contains1*contains1*uses11contains11patterns search input11contains11contains11contains12uses11uses11contains11uses11contains11uses11uses11contains11contains11contains11uses11contains11contains11uses11contains11contains11contains11uses11contains11uses11gets and feeds to IDLTMessageAnalyzerControllerConsumer11uses1manycontains11contains11contains11contains11contains11contains11uses11contains11contains11contains11contains11contains11contains11uses11uses11uses11uses11uses11uses11uses11uses11contains1* "1" CPatternsModel : using to create IPatternsMod CPatternsViewComponent "1" o-- "1" CPatternsView : uses CPatternsViewComponent "1" *-- "1" IPatternsModel : contains CDLTMessageAnalyzer "1" o-- "1" CPatternsView : uses -CDLTMessageAnalyzer "1" *-- "1" IPatternsModel : contains +CDLTMessageAnalyzer "1" o-- "1" IPatternsModel : uses +DLTMessageAnalyzerPlugin "1" *-- "1" CPatternsViewComponent : contains Ui::Form "1" *-- "1" CPatternsView : contains @enduml \ No newline at end of file diff --git a/md/dev_docs/puml/DMA_PatternsView_API.svg b/md/dev_docs/puml/DMA_PatternsView_API.svg index d3ba3195..6e73d8a2 100644 --- a/md/dev_docs/puml/DMA_PatternsView_API.svg +++ b/md/dev_docs/puml/DMA_PatternsView_API.svg @@ -1,33 +1,35 @@ -DMA_Framework_ComponentDMA_PatternsViewDMA_PatternsView_APIDMA_RootQtDMA::IComponentCPatternsModelCPatternsViewCPatternsViewComponentCTreeRepresentationDelegateIPatternsModelvirtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isCombine, Qt::CheckStateisDefault) = 0virtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isDefault = Qt::Unchecked) = 0virtual QModelIndex editData(const QModelIndex& idx, const QString& alias, const QString& regex, Qt::CheckStateisDefault, Qt::CheckState isCombine) = 0virtual QString getAliasEditName( const QModelIndex& idx ) = 0virtual removeData(const QModelIndex& idx) = 0virtual tSearchResult search( const QString& alias ) = 0virtual void filterPatterns( const QString& filter ) = 0virtual void resetData() = 0virtual void updatePatternsInPersistency() = 0virtual void updateView() = 0CDLTMessageAnalyzerUi::FormQLineEditQStyledItemDelegateQTreeViewimplementsextendsimplementsextendsuses11contains11patterns search input11using to create IPatternsModel11uses11contains11uses11contains11contains11DMA_Framework_ComponentDMA_PatternsViewDMA_PatternsView_APIDMA_RootQtDMA::IComponentCPatternsModelCPatternsViewCPatternsViewComponentCTreeRepresentationDelegateIPatternsModelvirtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isCombine, Qt::CheckStateisDefault) = 0virtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isDefault = Qt::Unchecked) = 0virtual QModelIndex editData(const QModelIndex& idx, const QString& alias, const QString& regex, Qt::CheckStateisDefault, Qt::CheckState isCombine) = 0virtual QString getAliasEditName( const QModelIndex& idx ) = 0virtual removeData(const QModelIndex& idx) = 0virtual tSearchResult search( const QString& alias ) = 0virtual void filterPatterns( const QString& filter ) = 0virtual void resetData() = 0virtual void updatePatternsInPersistency() = 0virtual void updateView() = 0CDLTMessageAnalyzerDLTMessageAnalyzerPluginUi::FormQLineEditQStyledItemDelegateQTreeViewimplementsextendsimplementsextendsuses11contains11patterns search input11using to create IPatternsModel11uses11contains11uses11uses11contains11contains11 "1" CBGColorAnimation : uses CDLTMessageAnalyzer "1" o-- "1" CDLTFileWrapper : uses -CDLTMessageAnalyzer "1" *-- "1" CFiltersModel : contains CDLTMessageAnalyzer "1" o-- "1" CFiltersView : uses CDLTMessageAnalyzer "1" o-- "1" CPatternsView : uses CDLTMessageAnalyzer "1" *-- "1" CRegexDirectoryMonitor : contains @@ -241,16 +253,19 @@ CDLTMessageAnalyzer "1" o-- "1" CSearchResultView : uses CDLTMessageAnalyzer "1" o-- "1" CTableMemoryJumper : gets and uses CDLTMessageAnalyzer "1" o-- "1" CUMLView : uses CDLTMessageAnalyzer "1" --> "1" IDLTMessageAnalyzerController : gets and feeds to IDLTMessageAnalyzerControllerConsumer +CDLTMessageAnalyzer "1" o-- "1" IFiltersModel : uses CDLTMessageAnalyzer "1" *-- "1" IGroupedViewModel : uses -CDLTMessageAnalyzer "1" *-- "1" IPatternsModel : contains +CDLTMessageAnalyzer "1" o-- "1" IPatternsModel : uses CDLTMessageAnalyzer "1" o-- "1" ISearchResultModel : gets and uses CDLTMessageAnalyzer "1" o-- "many" QDltPlugin : uses CDLTMessageAnalyzer "1" *-- "1" QDltPluginManager : contains DLTMessageAnalyzerPlugin "1" *-- "1" CAnalyzerComponent : contains DLTMessageAnalyzerPlugin "1" *-- "1" CDLTFileWrapper : contains DLTMessageAnalyzerPlugin "1" *-- "1" CDLTMessageAnalyzer : contains +DLTMessageAnalyzerPlugin "1" *-- "1" CFiltersViewComponent : contains DLTMessageAnalyzerPlugin "1" *-- "1" CGroupedViewComponent : contains DLTMessageAnalyzerPlugin "1" *-- "1" CLogComponent : contains +DLTMessageAnalyzerPlugin "1" *-- "1" CPatternsViewComponent : contains DLTMessageAnalyzerPlugin "1" *-- "1" CSearchViewComponent : contains DLTMessageAnalyzerPlugin "1" *-- "1" Form : contains Form "1" o-- "1" DLTMessageAnalyzerPlugin : uses diff --git a/md/dev_docs/puml/DMA_Root.svg b/md/dev_docs/puml/DMA_Root.svg index 7473e81d..4856477f 100644 --- a/md/dev_docs/puml/DMA_Root.svg +++ b/md/dev_docs/puml/DMA_Root.svg @@ -1,86 +1,90 @@ -DLTDMA_Analyzer_APIDMA_CommonDMA_DLTWrappersDMA_FiltersViewDMA_GroupedView_APIDMA_Log_APIDMA_LogoDMA_PatternsView_APIDMA_PlantUMLDMA_RootDMA_SearchView_APIQtQDLTPluginInterfaceQDltPluginQDltPluginControlInterfaceQDltPluginManagerQDltPluginViewerInterfaceCAnalyzerComponentIDLTMessageAnalyzerControllervirtual int getMaximumNumberOfThreads() const = 0virtual tRequestId requestAnalyze( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, consttDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages, const QRegularExpression& regex,const int& numberOfThreads, const tRegexScriptingMetadata& regexScriptingMetadata, bool isContinuous) = 0virtual void cancelRequest( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, const tRequestId&requestId ) = 0IDLTMessageAnalyzerControllerConsumertRequestId requestAnalyze( const tDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages,const QRegularExpression& regex, const int& numberOfThreads, bool isContinuous )virtual void progressNotification( const tRequestId& requestId, const eRequestState& requestState, const int8_t&progress, const tFoundMatchesPack& processedMatches) = 0CBGColorAnimationCRegexDirectoryMonitorCTableMemoryJumperCDLTFileWrapperCFiltersModelCFiltersViewCGroupedViewCGroupedViewComponentIGroupedViewModelvirtual int rowCount(const QModelIndex &parent = QModelIndex()) const = 0virtual std::pair<bool__QString> exportToHTML(QString& resultHTML) = 0virtual void addMatches( const tFoundMatches& matches, bool update ) = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regex) = 0CConsoleViewCLogComponentCLogoCPatternsViewIPatternsModelvirtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isCombine, Qt::CheckStateisDefault) = 0virtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isDefault = Qt::Unchecked) = 0virtual QModelIndex editData(const QModelIndex& idx, const QString& alias, const QString& regex, Qt::CheckStateisDefault, Qt::CheckState isCombine) = 0virtual QString getAliasEditName( const QModelIndex& idx ) = 0virtual removeData(const QModelIndex& idx) = 0virtual tSearchResult search( const QString& alias ) = 0virtual void filterPatterns( const QString& filter ) = 0virtual void resetData() = 0virtual void updatePatternsInPersistency() = 0virtual void updateView() = 0CUMLViewCDLTMessageAnalyzerDLTMessageAnalyzerPluginFormUi::FormCSearchResultViewCSearchViewComponentISearchResultModelvirtual int getFileIdx( const QModelIndex& idx ) const = 0virtual std::pair<bool__tIntRange> addNextMessageIdxVec(const tFoundMatchesPack& foundMatchesPack) = 0virtual std::pair<int__QString > getUMLDiagramContent() const = 0virtual void resetData() = 0virtual void setFile(const tDLTFileWrapperPtr& pFile) = 0virtual void updateView(const int& fromRow = 0) = 0QObjectQWidgetimplementsimplementsimplementsimplementsextendsextendsuses11uses11contains11uses11uses11contains11uses11gets and uses11uses11gets and feeds to IDLTMessageAnalyzerControllerConsumer11uses11contains11gets and uses11uses1manycontains11contains11contains11contains11contains11contains11contains11contains11uses11contains11contains11contains11contains11contains11contains11contains11contains11DLTDMA_Analyzer_APIDMA_CommonDMA_DLTWrappersDMA_FiltersView_APIDMA_GroupedView_APIDMA_Log_APIDMA_LogoDMA_PatternsView_APIDMA_PlantUMLDMA_RootDMA_SearchView_APIQtQDLTPluginInterfaceQDltPluginQDltPluginControlInterfaceQDltPluginManagerQDltPluginViewerInterfaceCAnalyzerComponentIDLTMessageAnalyzerControllervirtual int getMaximumNumberOfThreads() const = 0virtual tRequestId requestAnalyze( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, consttDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages, const QRegularExpression& regex,const int& numberOfThreads, const tRegexScriptingMetadata& regexScriptingMetadata, bool isContinuous) = 0virtual void cancelRequest( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, const tRequestId&requestId ) = 0IDLTMessageAnalyzerControllerConsumertRequestId requestAnalyze( const tDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages,const QRegularExpression& regex, const int& numberOfThreads, bool isContinuous )virtual void progressNotification( const tRequestId& requestId, const eRequestState& requestState, const int8_t&progress, const tFoundMatchesPack& processedMatches) = 0CBGColorAnimationCRegexDirectoryMonitorCTableMemoryJumperCDLTFileWrapperCFiltersViewCFiltersViewComponentIFiltersModelvirtual void addCompletionData( const tFoundMatches& foundMatches ) = 0virtual void filterRegexTokens( const QString& filter ) = 0virtual void resetCompletionData() = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regexStr) = 0CGroupedViewCGroupedViewComponentIGroupedViewModelvirtual int rowCount(const QModelIndex &parent = QModelIndex()) const = 0virtual std::pair<bool__QString> exportToHTML(QString& resultHTML) = 0virtual void addMatches( const tFoundMatches& matches, bool update ) = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regex) = 0CConsoleViewCLogComponentCLogoCPatternsViewCPatternsViewComponentIPatternsModelvirtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isCombine, Qt::CheckStateisDefault) = 0virtual QModelIndex addData(const QString& alias, const QString& regex, Qt::CheckState isDefault = Qt::Unchecked) = 0virtual QModelIndex editData(const QModelIndex& idx, const QString& alias, const QString& regex, Qt::CheckStateisDefault, Qt::CheckState isCombine) = 0virtual QString getAliasEditName( const QModelIndex& idx ) = 0virtual removeData(const QModelIndex& idx) = 0virtual tSearchResult search( const QString& alias ) = 0virtual void filterPatterns( const QString& filter ) = 0virtual void resetData() = 0virtual void updatePatternsInPersistency() = 0virtual void updateView() = 0CUMLViewCDLTMessageAnalyzerDLTMessageAnalyzerPluginFormUi::FormCSearchResultViewCSearchViewComponentISearchResultModelvirtual int getFileIdx( const QModelIndex& idx ) const = 0virtual std::pair<bool__tIntRange> addNextMessageIdxVec(const tFoundMatchesPack& foundMatchesPack) = 0virtual std::pair<int__QString > getUMLDiagramContent() const = 0virtual void resetData() = 0virtual void setFile(const tDLTFileWrapperPtr& pFile) = 0virtual void updateView(const int& fromRow = 0) = 0QObjectQWidgetimplementsimplementsimplementsimplementsextendsextendsuses11uses11uses11uses11contains11uses11gets and uses11uses11gets and feeds to IDLTMessageAnalyzerControllerConsumer11uses11uses11uses11gets and uses11uses1manycontains11contains11contains11contains11contains11contains11contains11contains11contains11contains11uses11contains11contains11contains11contains11contains11contains11contains11contains11DMA_AnalyzerDMA_Analyzer_APIDMA_CommonDMA_DLTWrappersDMA_FiltersViewDMA_GroupedViewDMA_GroupedView_APIDMA_LogDMA_Log_APIDMA_LogoDMA_PatternsViewDMA_PatternsView_APIDMA_PlantUMLDMA_RootDMA_SearchViewDMA_SearchView_APIDMA_SettingsQtCDLTRegexAnalyzerWorkerCMTAnalyzerIDLTMessageAnalyzerControllervirtual int getMaximumNumberOfThreads() const = 0virtual tRequestId requestAnalyze( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, consttDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages, const QRegularExpression& regex,const int& numberOfThreads, const tRegexScriptingMetadata& regexScriptingMetadata, bool isContinuous) = 0virtual void cancelRequest( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, const tRequestId&requestId ) = 0IDLTMessageAnalyzerControllerConsumertRequestId requestAnalyze( const tDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages,const QRegularExpression& regex, const int& numberOfThreads, bool isContinuous )virtual void progressNotification( const tRequestId& requestId, const eRequestState& requestState, const int8_t&progress, const tFoundMatchesPack& processedMatches) = 0CBGColorAnimationCRegexDirectoryMonitorCTableMemoryJumperCDLTFileWrapperCFilterItemDelegateCFiltersModelCFiltersViewCGroupedViewModelCGroupedView«Singleton»CConsoleCtrlCConsoleInputProcessorCConsoleViewCLogoCPatternsModelCPatternsViewCTreeRepresentationDelegateCImageViewerCUMLViewDLTMessageAnalyzerPluginFormCSearchResultHighlightingDelegateCSearchResultModelCSearchResultViewCSearchViewComponent«Singleton»CSettingsManagerQAbstractItemModelQAbstractTableModelQCompleterQElapsedTimerQFileSystemWatcherQImageQLineEditQObjectQPlainTextEditQProcessQPushButtonQStyledItemDelegateQTabWidgetQTableViewQThreadQTimerQTreeViewQWidgetextendsextendsextendsextendsextendsextendsextendsimplementsimplementsimplementsextendsextendsextendsextendsextendsimplementsextendsextendsextendsextendsextendsextendsextendsimplementsextendsextendsextendscontains1*animation widget11contains11contains11uses11parent view11regex input field11console text edit11console view tab widget11console tab11console input11patterns search input11contains11contains12DMA_AnalyzerDMA_Analyzer_APIDMA_CommonDMA_DLTWrappersDMA_FiltersViewDMA_FiltersView_APIDMA_GroupedViewDMA_GroupedView_APIDMA_LogDMA_Log_APIDMA_LogoDMA_PatternsViewDMA_PatternsView_APIDMA_PlantUMLDMA_RootDMA_SearchViewDMA_SearchView_APIDMA_SettingsQtCDLTRegexAnalyzerWorkerCMTAnalyzerIDLTMessageAnalyzerControllervirtual int getMaximumNumberOfThreads() const = 0virtual tRequestId requestAnalyze( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, consttDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages, const QRegularExpression& regex,const int& numberOfThreads, const tRegexScriptingMetadata& regexScriptingMetadata, bool isContinuous) = 0virtual void cancelRequest( const std::weak_ptr<IDLTMessageAnalyzerControllerConsumer>& pClient, const tRequestId&requestId ) = 0IDLTMessageAnalyzerControllerConsumertRequestId requestAnalyze( const tDLTFileWrapperPtr& pFile, const int& fromMessage, const int& numberOfMessages,const QRegularExpression& regex, const int& numberOfThreads, bool isContinuous )virtual void progressNotification( const tRequestId& requestId, const eRequestState& requestState, const int8_t&progress, const tFoundMatchesPack& processedMatches) = 0CBGColorAnimationCRegexDirectoryMonitorCTableMemoryJumperCDLTFileWrapperCFilterItemDelegateCFiltersViewIFiltersModelvirtual void addCompletionData( const tFoundMatches& foundMatches ) = 0virtual void filterRegexTokens( const QString& filter ) = 0virtual void resetCompletionData() = 0virtual void resetData() = 0virtual void setUsedRegex(const QString& regexStr) = 0CGroupedViewModelCGroupedView«Singleton»CConsoleCtrlCConsoleInputProcessorCConsoleViewCLogoCPatternsModelCPatternsViewCTreeRepresentationDelegateCImageViewerCUMLViewDLTMessageAnalyzerPluginFormCSearchResultHighlightingDelegateCSearchResultModelCSearchResultViewCSearchViewComponent«Singleton»CSettingsManagerQAbstractItemModelQAbstractTableModelQCompleterQElapsedTimerQFileSystemWatcherQImageQLineEditQObjectQPlainTextEditQProcessQPushButtonQStyledItemDelegateQTabWidgetQTableViewQThreadQTimerQTreeViewQWidgetextendsextendsextendsextendsextendsextendsextendsimplementsimplementsimplementsextendsextendsextendsextendsextendsimplementsextendsextendsextendsextendsextendsextendsextendsimplementsextendsextendsextendscontains1*animation widget11contains11contains11uses11parent view11regex input field11console text edit11console view tab widget11console tab11console input11patterns search input11contains11contains12