CCIMXDesktop
 
Loading...
Searching...
No Matches
UserInfoCard Class Reference

The UserInfoCard class provides a customizable widget to display detailed user information. More...

#include <UserInfoCard.h>

Inheritance diagram for UserInfoCard:

Public Slots

void setUserInfo (const UserInfo &info)
 Sets the user information to be displayed on the card.
 

Public Member Functions

 UserInfoCard (QWidget *parent=nullptr)
 Constructs a UserInfoCard object.
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 Overrides the default paint event for the widget.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UserInfoCard()

UserInfoCard::UserInfoCard ( QWidget *  parent = nullptr)
explicit

Constructs a UserInfoCard object.

Parameters
parentA pointer to the parent widget, if any. Defaults to nullptr.

Member Function Documentation

◆ 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
    eventA 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
    infoA constant reference to a UserInfo object containing the details to display.

The documentation for this class was generated from the following files: