Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #151][DIAGRAM_VIEW] Develop the diagram view #184

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

----

## v.1.0.27 released!

<span style="color:red">Checkout the ['plot view'](./md/plot_view/plot_view.md#plot-view) feature!</span>

----

![DLT Message Analyzer logo](./md/DLTMessageAnalyzer_logo.png)

![Build linux](https://github.com/svlad-90/DLT-Message-Analyzer/workflows/Build%20linux%20Qt5/badge.svg)
Expand Down Expand Up @@ -80,6 +86,10 @@ There are the following schemas of deployment:

- Plugin supports integration with the PlantUML tool, which allows you to create sequence diagrams out of the logs

### [Plot view](./md/plot_view/plot_view.md)

- Plugin supports integration with the QCustomPlot library, which allows you to create plots out of the logs

### [Files view](./md/files_view/files_view.md)

- Extension, which lists the paths & names of all currently opened DLT files
Expand Down
23 changes: 23 additions & 0 deletions dltmessageanalyzerplugin/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ function (DMA_QT_WRAP_UI ui_headers_var_name wrap_ui_var_name)
endfunction()
################### QT_SPECIFIC ( END ) ###################

################### QCUSTOMPLOT ###########################
# function - sync_qcustomplot
# Syncs QCustomPlot, implementation, which is used for
# the creation of plots
function (DMA_sync_q_custom_plot)
include(FetchContent)
FetchContent_Declare(
qcustomplot
GIT_REPOSITORY https://github.com/svlad-90/QCustomPlot-library
GIT_TAG 2.1.1.1
)

FetchContent_GetProperties(qcustomplot)
if(NOT qcustomplot_POPULATED)
FetchContent_Populate(qcustomplot)
add_subdirectory(${qcustomplot_SOURCE_DIR} ${qcustomplot_BINARY_DIR})
endif()

# include_directories(${qcustomplot_SOURCE_DIR}/DMA_Plantuml/include)
endfunction(DMA_sync_q_custom_plot)
################### QCUSTOMPLOT ( END ) ###################

################### COMMON_DEPS ###########################
include(FetchContent)
FetchContent_Declare(
Expand Down Expand Up @@ -60,6 +82,7 @@ add_definitions(-DDMA_FORCE_LINK_ON)
DMA_sync_g_test_framework()
DMA_sync_plantuml()
DMA_sync_framework()
DMA_sync_q_custom_plot()
################### DEPENDENCIES ( END )###################

################### COMPATIBILITY #########################
Expand Down
12 changes: 12 additions & 0 deletions dltmessageanalyzerplugin/src/common/BaseDefinitions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @file BaseDefinitions.cpp
* @author vgoncharuk
* @brief Implementation of the BaseDefinitions
*/

#include "BaseDefinitions.hpp"

bool QOptionalColor::operator== ( const QOptionalColor& rhs ) const
{
return color == rhs.color && isSet == rhs.isSet;
}
48 changes: 48 additions & 0 deletions dltmessageanalyzerplugin/src/common/BaseDefinitions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* @file BaseDefinitions.hpp
* @author vgoncharuk
* @brief Declaration of the BaseDefinitions
*/

#ifndef BASE_DEFINITIONS_HPP
#define BASE_DEFINITIONS_HPP

#include <memory>
#include <vector>

#include <QHash>
#include <QString>
#include <QMetaType>
#include <QColor>

typedef std::shared_ptr<QString> tQStringPtr;
typedef std::vector<tQStringPtr> tQStringPtrVec;

struct tQStringPtrWrapper
{
tQStringPtrWrapper();
tQStringPtrWrapper(const tQStringPtr& pString_);
bool operator== ( const tQStringPtrWrapper& rVal ) const;
bool operator< ( const tQStringPtrWrapper& rVal ) const;
tQStringPtr pString = nullptr;
};

namespace std {
template<> struct hash<tQStringPtrWrapper> {
std::size_t operator()(const tQStringPtrWrapper& pS) const noexcept {
return pS.pString ? (size_t) qHash(*pS.pString) : 0u;
}
};
}

Q_DECLARE_METATYPE(tQStringPtrWrapper)

struct QOptionalColor
{
bool isSet = false;
QColor color;
bool operator== ( const QOptionalColor& rhs ) const;
};
typedef QVector<QOptionalColor> QOptionalColorVec;

#endif // BASE_DEFINITIONS_HPP
2 changes: 2 additions & 0 deletions dltmessageanalyzerplugin/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
add_library(DMA_common STATIC
BaseDefinitions.cpp
CTreeItem.cpp
Definitions.cpp
PlotDefinitions.cpp
CBGColorAnimation.cpp
CRegexDirectoryMonitor.cpp
CTableMemoryJumper.cpp
Expand Down
Loading