userprofilewidget.h 741 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef USERPROFILEWIDGET_H
  2. #define USERPROFILEWIDGET_H
  3. #include <QLabel>
  4. #include <QPixmap>
  5. #include <QPushButton>
  6. #include <QVBoxLayout>
  7. #include <QWidget>
  8. class UserProfileWidget : public QWidget
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit UserProfileWidget(QWidget *parent = nullptr);
  13. ~UserProfileWidget();
  14. void setUsername(const QString &username);
  15. void setAvatar(const QPixmap &avatar);
  16. void setStatus(const QString &status);
  17. signals:
  18. void profileClicked();
  19. void settingsClicked();
  20. void logoutClicked();
  21. private:
  22. QLabel *avatarLabel;
  23. QLabel *usernameLabel;
  24. QLabel *statusLabel;
  25. QPushButton *settingsButton;
  26. QPushButton *logoutButton;
  27. void setupUI();
  28. };
  29. #endif // USERPROFILEWIDGET_H