The UserInfoCard class provides a customizable widget to display detailed user information.
More...
#include <UserInfoCard.h>
|
void | paintEvent (QPaintEvent *event) override |
| Overrides the default paint event for the widget.
|
|
The UserInfoCard class provides a customizable widget to display detailed user information.
This widget is designed to present user details such as avatar, name, phone number, and email in a clear and organized card format. It inherits from QWidget and utilizes QLabel components for displaying individual pieces of information. The layout and appearance can be customized through its paintEvent.
◆ UserInfoCard()
UserInfoCard::UserInfoCard |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Constructs a UserInfoCard object.
- Parameters
-
parent | A pointer to the parent widget, if any. Defaults to nullptr. |
◆ paintEvent()
void UserInfoCard::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotected |
Overrides the default paint event for the widget.
- This method is responsible for custom drawing operations for the UserInfoCard, such as background, borders, or positioning of internal widgets.
- Parameters
-
event | A pointer to the QPaintEvent object that contains information about the paint area. |
◆ setUserInfo
void UserInfoCard::setUserInfo |
( |
const UserInfo & |
info | ) |
|
|
slot |
Sets the user information to be displayed on the card.
- This slot updates the QLabel elements with the provided user information, triggering a repaint of the widget to reflect the changes.
- Parameters
-
info | A constant reference to a UserInfo object containing the details to display. |
The documentation for this class was generated from the following files:
- builtin/gadgets/larger_card/UserInfoCard.h
- builtin/gadgets/larger_card/UserInfoCard.cpp