| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
learn_card_widget.h
Go to the documentation of this file.
1
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
23 class LearnCardWidget : public QFrame {
24 Q_OBJECT
25 public:
26 explicit LearnCardWidget(QWidget *parent = nullptr);
27 ~LearnCardWidget();
28 void setLinksCollapsed(bool collapsed);
29 bool isLinksCollapsed() const;
30
31 protected:
32 bool event(QEvent *event) override;
33
34 private:
35
36 enum ValidityType {
37 AllVersions,
38 ReleaseOnly,
39 DevOnly
40 };
41
42 struct LinkType {
43 QString url;
44 QString label;
45 QString short_label;
46 QString tooltip;
47 ValidityType validity;
48 };
49
50 struct ButtonType {
51 QString url;
52 QString label;
53 QString tooltip;
54 QColor color;
55 QColor hover_color;
56 ValidityType validity;
57 };
58
59 Ui::LearnCardWidget *ui_;
60 QList<LinkType> links_;
61 QList<ButtonType> buttons_;
62 bool links_collapsed_;
63
64 void loadLinksFromRessource();
65
66 void setupLinks();
67 void setupActionButtons();
68 void updateStyleSheet();
69};
70
71#endif //LEARN_CARD_WIDGET_H
LearnCardWidget
Definition learn_card_widget.h:23