| 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 <QVBoxLayout>
16#include <QColor>
17
18#include "clickable_label.h"
19
20 class QPushButton;
21
22 struct learn_link_t {
23 QString url;
24 QString label;
25 QString short_label;
26 QString tooltip;
27};
28
29 class LearnCardWidget : public QFrame {
30 Q_OBJECT
31 public:
32 explicit LearnCardWidget(QWidget *parent = nullptr);
33 void updateStyleSheets(const QColor &header_text_color, const QColor &header_hover_color);
34 void setLinksCollapsed(bool collapsed);
35 bool isLinksCollapsed() const;
36
37 private:
38 QVBoxLayout *main_layout_;
39 ClickableLabel *header_label_;
40 QFrame *header_separator_;
41 QWidget *link_container_;
42 QWidget *compact_link_container_;
43 QPushButton *discord_button_;
44 QPushButton *donate_button_;
45 QList<learn_link_t> links_;
46 bool links_collapsed_;
47
48 void setupHeader();
49 void setupLinks();
50 void setupActionButtons();
51};
52
53#endif //LEARN_CARD_WIDGET_H
ClickableLabel
Definition clickable_label.h:18
LearnCardWidget
Definition learn_card_widget.h:29
clickable_label.h
learn_link_t
Definition learn_card_widget.h:22