LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
TestStepsPanel.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <QWidget>
6
7#include <cstddef>
8#include <cstdint>
9
10class QFrame;
11class QLabel;
12class QPushButton;
13class QTreeWidget;
14class QTreeWidgetItem;
15
16namespace db {
17class EventsContainer;
18}
19
20namespace ui::qt {
21
35class TestStepsPanel : public QWidget
36{
37 Q_OBJECT
38
39 public:
40 explicit TestStepsPanel(db::EventsContainer& events, QWidget* parent = nullptr);
41
42 public slots:
44 void Refresh();
45
46 signals:
47 void NavigateToEvent(int actualRow);
48
49 protected:
51 bool eventFilter(QObject* watched, QEvent* event) override;
52
53 private:
54 void BuildLayout();
55 void ShowOutline();
56 void ActivateItem(QTreeWidgetItem* item);
57
60
61 // Data the outline was built from (see Refresh()).
62 bool m_built {false};
63 std::uint64_t m_builtGeneration {0};
64 std::size_t m_builtSize {0};
66
67 QLabel* m_hint {nullptr};
68 QFrame* m_banner {nullptr};
69 QLabel* m_bannerText {nullptr};
70 QPushButton* m_goToFailure {nullptr};
71 QTreeWidget* m_tree {nullptr};
72};
73
74} // namespace ui::qt
High-performance, thread-safe container for managing large collections of LogEvent objects.
Definition EventsContainer.hpp:129
std::vector< std::pair< std::string, std::string > > FileMetadata
Definition EventsContainer.hpp:199
"Test Steps" tab: the step outline of a test-harness log.
Definition TestStepsPanel.hpp:36
void ShowOutline()
Definition TestStepsPanel.cpp:210
void ActivateItem(QTreeWidgetItem *item)
Definition TestStepsPanel.cpp:294
void BuildLayout()
Definition TestStepsPanel.cpp:136
db::EventsContainer & m_events
Definition TestStepsPanel.hpp:58
void NavigateToEvent(int actualRow)
std::uint64_t m_builtGeneration
Definition TestStepsPanel.hpp:63
db::EventsContainer::FileMetadata m_builtMetadata
Definition TestStepsPanel.hpp:65
bool m_built
Definition TestStepsPanel.hpp:62
QTreeWidget * m_tree
Definition TestStepsPanel.hpp:71
QLabel * m_bannerText
Definition TestStepsPanel.hpp:69
QLabel * m_hint
Definition TestStepsPanel.hpp:67
QPushButton * m_goToFailure
Definition TestStepsPanel.hpp:70
analyzer::TestOutline m_outline
Definition TestStepsPanel.hpp:59
void Refresh()
Re-analyses the events if they changed since the last call.
Definition TestStepsPanel.cpp:193
QFrame * m_banner
Definition TestStepsPanel.hpp:68
std::size_t m_builtSize
Definition TestStepsPanel.hpp:64
bool eventFilter(QObject *watched, QEvent *event) override
Enter / Return on the tree activates the current row.
Definition TestStepsPanel.cpp:301
Database and data model components for the LogViewer application.
Definition EventsContainer.cpp:17
Definition ConfigEditorDialog.cpp:19
Definition TestOutline.hpp:86