matrixion/src/dialogs/UserProfile.h

54 lines
915 B
C
Raw Normal View History

2018-07-20 12:02:35 +03:00
#pragma once
#include <QString>
#include <QWidget>
class Avatar;
class FlatButton;
class QLabel;
class QListWidget;
namespace dialogs {
class DeviceItem : public QWidget
{
Q_OBJECT
public:
explicit DeviceItem(QWidget *parent, QString deviceName);
private:
QString name_;
// Toggle *verifyToggle_;
};
class UserProfile : public QWidget
{
Q_OBJECT
public:
explicit UserProfile(QWidget *parent = nullptr);
void init(const QString &userId, const QString &roomId);
protected:
void paintEvent(QPaintEvent *) override;
private:
Avatar *avatar_;
QString displayName_;
QString userId_;
QLabel *userIdLabel_;
QLabel *displayNameLabel_;
FlatButton *banBtn_;
FlatButton *kickBtn_;
FlatButton *ignoreBtn_;
FlatButton *startChat_;
QListWidget *devices_;
};
} // dialogs