-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from svlad-90/dev/vladyslav-goncharuk/ISSUE-37
[ISSUE #37][COVERAGE_NOTE] Introduce coverage note functionality
- Loading branch information
Showing
94 changed files
with
5,968 additions
and
734 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
dltmessageanalyzerplugin/src/components/coverageNote/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DMA_add_subdirectory_with_clang_tidy(src) |
91 changes: 91 additions & 0 deletions
91
dltmessageanalyzerplugin/src/components/coverageNote/api/CCoverageNoteComponent.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#pragma once | ||
|
||
#include "memory" | ||
|
||
#include "QTextEdit" | ||
#include "QTableView" | ||
#include "QPushButton" | ||
|
||
#include "common/Definitions.hpp" | ||
#include "dma/component/IComponent.hpp" | ||
#include "components/settings/api/ISettingsManager.hpp" | ||
|
||
#include "ICoverageNoteProvider.hpp" | ||
|
||
/** | ||
* @brief Class representing the coverage note component. | ||
* | ||
* This component is responsible for managing the coverage notes functionality. | ||
*/ | ||
class CCoverageNoteComponent : public DMA::IComponent | ||
{ | ||
public: | ||
/** | ||
* @brief Constructor for CCoverageNoteComponent. | ||
* | ||
* @param pSettingsManager Pointer to the settings manager. | ||
* @param pCommentTextEdit Pointer to the QTextEdit for comments. | ||
* @param pItemsTableView Pointer to the QTableView for items. | ||
* @param MessagesTextEdit Pointer to the QTextEdit for messages. | ||
* @param pRegexTextEdit Pointer to the QTextEdit for regex. | ||
* @param pUseRegexButton Pointer to the QPushButton for using regex. | ||
* @param pCurrentFileLineEdit Pointer to the QLineEdit for current file. | ||
* @param pFilesViewTextEdit Pointer to the QTextEdit for files view. | ||
*/ | ||
CCoverageNoteComponent(const tSettingsManagerPtr& pSettingsManager, | ||
QTextEdit* pCommentTextEdit, | ||
QTableView* pItemsTableView, | ||
QTextEdit* MessagesTextEdit, | ||
QTextEdit* pRegexTextEdit, | ||
QPushButton* pUseRegexButton, | ||
QLineEdit* pCurrentFileLineEdit, | ||
QTextEdit* pFilesViewTextEdit); | ||
|
||
/** | ||
* @brief Gets the name of the component. | ||
* | ||
* @return The name of the component as a const char pointer. | ||
*/ | ||
virtual const char* getName() const override; | ||
|
||
/** | ||
* @brief Gets the coverage note provider pointer. | ||
* | ||
* @return A shared pointer to the ICoverageNoteProvider. | ||
*/ | ||
const tCoverageNoteProviderPtr& getCoverageNoteProviderPtr(); | ||
|
||
/** | ||
* @brief Sets the main table view for the component. | ||
* | ||
* @param pMainTableView Pointer to the QTableView to be set as the main table view. | ||
*/ | ||
void setMainTableView(QTableView* pMainTableView); | ||
|
||
protected: | ||
/** | ||
* @brief Initializes the component. | ||
* | ||
* @return The result of the initialization operation. | ||
*/ | ||
virtual DMA::tSyncInitOperationResult init() override; | ||
|
||
/** | ||
* @brief Shuts down the component. | ||
* | ||
* @return The result of the shutdown operation. | ||
*/ | ||
virtual DMA::tSyncInitOperationResult shutdown() override; | ||
|
||
private: | ||
tCoverageNoteProviderPtr mpCoverageNoteProvider; ///< Pointer to the coverage note provider. | ||
tSettingsManagerPtr mpSettingsManager; ///< Pointer to the settings manager. | ||
QTextEdit* mpCommentTextEdit; ///< Pointer to the comment text edit. | ||
QTableView* mpItemsTableView; ///< Pointer to the items table view. | ||
QTextEdit* mpMessagesTextEdit; ///< Pointer to the messages text edit. | ||
QTextEdit* mpRegexTextEdit; ///< Pointer to the regex text edit. | ||
QPushButton* mpUseRegexButton; ///< Pointer to the use regex button. | ||
QLineEdit* mpCurrentFileLineEdit; ///< Pointer to the current file line edit. | ||
QTextEdit* mpFilesViewTextEdit; ///< Pointer to the file view text edit. | ||
QTableView* mpMainTableView; ///< Pointer to the main table view. | ||
}; |
84 changes: 84 additions & 0 deletions
84
dltmessageanalyzerplugin/src/components/coverageNote/api/ICoverageNoteProvider.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#pragma once | ||
|
||
#include "QObject" | ||
#include "QTableView" | ||
|
||
#include "../api/Types.hpp" | ||
|
||
/** | ||
* @brief Interface class for providing coverage note functionalities. | ||
* | ||
* This class serves as an interface for managing coverage note items, | ||
* including adding items, setting regex and messages, and handling | ||
* externally triggered coverage note UI interactions. | ||
*/ | ||
class ICoverageNoteProvider : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
/** | ||
* @brief Constructor for ICoverageNoteProvider. | ||
* @param parent The parent QObject, default is nullptr. | ||
*/ | ||
ICoverageNoteProvider(QObject *parent = nullptr); | ||
|
||
/** | ||
* @brief Virtual destructor for ICoverageNoteProvider. | ||
*/ | ||
virtual ~ICoverageNoteProvider(); | ||
|
||
/** | ||
* @brief Adds a new coverage note item. | ||
* @return The ID of the newly added coverage note item. | ||
*/ | ||
virtual tCoverageNoteItemId addCoverageNoteItem() = 0; | ||
|
||
/** | ||
* @brief Sets the regex pattern for a coverage note item. | ||
* @param id The ID of the coverage note item. | ||
* @param regex The regex pattern to set. | ||
*/ | ||
virtual void setCoverageNoteItemRegex(const tCoverageNoteItemId& id, const QString& regex) = 0; | ||
|
||
/** | ||
* @brief Sets the message for a coverage note item. | ||
* @param id The ID of the coverage note item. | ||
* @param comment The message/comment to set. | ||
*/ | ||
virtual void setCoverageNoteItemMessage(const tCoverageNoteItemId& id, const QString& comment) = 0; | ||
|
||
/** | ||
* @brief Scrolls to the last coverage note item in the UI. | ||
*/ | ||
virtual void scrollToLastCoveageNoteItem() = 0; | ||
|
||
/** | ||
* @brief Sets the main table view for creation of comments | ||
* from the main dlt-viewer's table. | ||
* @param pMainTableView Pointer to the main QTableView. | ||
*/ | ||
virtual void setMainTableView(QTableView* pMainTableView) = 0; | ||
|
||
/** | ||
* @brief Shuts down the coverage note provider, releasing any resources. | ||
*/ | ||
virtual void shutdown() = 0; | ||
|
||
signals: | ||
/** | ||
* @brief Signal emitted when regex application is requested. | ||
* @param regex The regex pattern to apply. | ||
*/ | ||
void regexApplicationRequested(const QString& regex); | ||
|
||
/** | ||
* @brief Signal emitted when a request is made to add a comment from the main table. | ||
*/ | ||
void addCommentFromMainTableRequested(); | ||
}; | ||
|
||
/** | ||
* @brief Shared pointer for ICoverageNoteProvider. | ||
*/ | ||
typedef std::shared_ptr<ICoverageNoteProvider> tCoverageNoteProviderPtr; |
Oops, something went wrong.