A card widget displaying learning resources, links, and action buttons.
More...
#include <learn_card_widget.h>
|
| | LearnCardWidget (QWidget *parent=nullptr) |
| | Construct a LearnCardWidget.
|
|
| ~LearnCardWidget () |
| | Destroy the widget and its UI form.
|
| void | setLinksCollapsed (bool collapsed) |
| | Collapse or expand the links section.
|
| bool | isLinksCollapsed () const |
| | Return whether the links section is currently collapsed.
|
| void | setStyledByParent (bool styled_by_parent) |
| | Leave the card's styling to an ancestor's style sheet.
|
| void | setCardLinkColor (const QColor &color) |
| | Set the link color of the card (normally CardLink of the live theme). A card styled by its parent keeps this color across theme changes, so the parent can set the color of the theme it shows.
|
|
| bool | event (QEvent *event) override |
| | Handle widget events, including palette and style changes.
|
A card widget displaying learning resources, links, and action buttons.
◆ LearnCardWidget()
| LearnCardWidget::LearnCardWidget |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Construct a LearnCardWidget.
- Parameters
-
| parent | The parent widget; may be nullptr. |
◆ event()
| bool LearnCardWidget::event |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Handle widget events, including palette and style changes.
- Parameters
-
| event | The event to handle. |
- Returns
- true if the event was consumed; false to allow further processing by the base class.
◆ isLinksCollapsed()
| bool LearnCardWidget::isLinksCollapsed |
( |
| ) |
const |
Return whether the links section is currently collapsed.
- Returns
- true if the link list is hidden; false if it is visible.
◆ setCardLinkColor()
| void LearnCardWidget::setCardLinkColor |
( |
const QColor & | color | ) |
|
Set the link color of the card (normally CardLink of the live theme). A card styled by its parent keeps this color across theme changes, so the parent can set the color of the theme it shows.
- Parameters
-
◆ setLinksCollapsed()
| void LearnCardWidget::setLinksCollapsed |
( |
bool | collapsed | ) |
|
Collapse or expand the links section.
- Parameters
-
| collapsed | true to hide the links list; false to show it. |
◆ setStyledByParent()
| void LearnCardWidget::setStyledByParent |
( |
bool | styled_by_parent | ) |
|
Leave the card's styling to an ancestor's style sheet.
By default the card sets the live learn-card style sheet on itself and renews it on every theme change. A widget's own sheet wins over its ancestors', so a preview that styles the card from its own sheet (the Theme Designer's draft preview) turns this off.
- Parameters
-
| styled_by_parent | true to clear the card's own sheet and keep it clear. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/learn_card_widget.h
- /builds/wireshark/wireshark/ui/qt/widgets/learn_card_widget.cpp