CCIMXDesktop
 
Loading...
Searching...
No Matches
UserInfoCard.h
Go to the documentation of this file.
1
6#ifndef USERINFOCARD_H
7#define USERINFOCARD_H
8
10#include <QWidget>
11
12// Forward declarations for QLabel to avoid including its header in UserInfoCard.h if not strictly necessary,
13// improving compilation times. However, for QLabel, it's often included directly.
14// This is more for demonstrating good practice if there were more complex dependencies.
15class QLabel;
16
26class UserInfoCard : public QWidget {
27 Q_OBJECT
28
29public:
34 explicit UserInfoCard(QWidget* parent = nullptr);
35
36public slots:
43 void setUserInfo(const UserInfo& info);
44
45protected:
52 void paintEvent(QPaintEvent* event) override;
53
54private:
58 QLabel* avatarLabel;
62 QLabel* nameLabel;
66 QLabel* phoneLabel;
70 QLabel* emailLabel;
71};
72
73#endif // USERINFOCARD_H
Defines the UserInfo class and its nested UserInfoBuilder class for managing user profile data.
The UserInfoCard class provides a customizable widget to display detailed user information.
Definition UserInfoCard.h:26
void setUserInfo(const UserInfo &info)
Sets the user information to be displayed on the card.
Definition UserInfoCard.cpp:84
void paintEvent(QPaintEvent *event) override
Overrides the default paint event for the widget.
Definition UserInfoCard.cpp:91
Represents a user's profile information, including name, email, phone number, and avatar path.
Definition UserInfo.h:22