| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
learn_card_widget.h
Go to the documentation of this file.
1
9
10#ifndef LEARN_CARD_WIDGET_H
11#define LEARN_CARD_WIDGET_H
12
13#include <QWidget>
14#include <QFrame>
15#include <QColor>
16
17 class QPushButton;
18
19 namespace Ui {
20 class LearnCardWidget;
21}
22
26 class LearnCardWidget : public QFrame
27{
28 Q_OBJECT
29
30 public:
35 explicit LearnCardWidget(QWidget *parent = nullptr);
36
38 ~LearnCardWidget();
39
45 void setLinksCollapsed(bool collapsed);
46
51 bool isLinksCollapsed() const;
52
53 protected:
61 bool event(QEvent *event) override;
62
63 private:
67 enum ValidityType {
68 AllVersions,
69 ReleaseOnly,
70 DevOnly
71 };
72
76 struct LinkType {
77 QString url;
78 QString label;
79 QString short_label;
80 QString tooltip;
81 ValidityType validity;
82 };
83
87 struct ButtonType {
88 QString url;
89 QString label;
90 QString tooltip;
91 QColor color;
92 QColor hover_color;
93 ValidityType validity;
94 };
95
96 Ui::LearnCardWidget *ui_;
97 QList<LinkType> links_;
98 QList<ButtonType> buttons_;
99 bool links_collapsed_;
100
104 void loadLinksFromRessource();
105
109 void setupLinks();
110
114 void setupActionButtons();
115};
116
117#endif //LEARN_CARD_WIDGET_H
LearnCardWidget::~LearnCardWidget
~LearnCardWidget()
Destroy the widget and its UI form.
Definition learn_card_widget.cpp:56
LearnCardWidget::isLinksCollapsed
bool isLinksCollapsed() const
Return whether the links section is currently collapsed.
Definition learn_card_widget.cpp:224
LearnCardWidget::event
bool event(QEvent *event) override
Handle widget events, including palette and style changes.
Definition learn_card_widget.cpp:229
LearnCardWidget::setLinksCollapsed
void setLinksCollapsed(bool collapsed)
Collapse or expand the links section.
Definition learn_card_widget.cpp:208
LearnCardWidget::LearnCardWidget
LearnCardWidget(QWidget *parent=nullptr)
Construct a LearnCardWidget.
Definition learn_card_widget.cpp:31