-
Notifications
You must be signed in to change notification settings - Fork 1
/
UserWindow.cpp
40 lines (33 loc) · 928 Bytes
/
UserWindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "UserWindow.h"
#include "ui_UserWindow.h"
UserWindow::UserWindow(QWidget *parent) : QWidget(parent), ui(new Ui::UserWindow)
{
ui->setupUi(this);
QObject::connect(ui->backButton,SIGNAL(pressed()),this,SLOT(showStatus()));
}
UserWindow::~UserWindow()
{
delete ui;
}
void UserWindow::setUsername(QString username)
{
ui->usernameLabel->setText(username);
}
void UserWindow::setCity(QString city)
{
ui->cityLabel->setText(city);
}
void UserWindow::setEmail(QString email)
{
ui->emailLabel->setText(email);
}
void UserWindow::setProfileImage(QString base64Image)
{
QImage profileImage;
QByteArray imageArray (base64Image.toStdString().c_str());
profileImage.loadFromData(QByteArray::fromBase64(imageArray), "PNG");
ui->profileLabel->setPixmap(QPixmap::fromImage(profileImage));
}
void UserWindow::showStatus(){
emit moveToStatus();
}