-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuyer.cpp
45 lines (32 loc) · 796 Bytes
/
buyer.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
41
42
#include "buyer.h"
#include "ui_buyer.h"
/*!
* \brief Buyer::Buyer
* buyer page
* \param parent
* \param buyer
*
*/
Buyer::Buyer(QWidget *parent, Global::Buyer current_buyerUser) :
QMainWindow(parent),
ui(new Ui::Buyer)
{
ui->setupUi(this);
this->current_buyerUser = current_buyerUser;
ui->actionWallet->setText("Wallet: " + QString::number(current_buyerUser.wallet) + "Rial");
productListModel = new ProductListModel(this);
ui->product_tableView->setModel(productListModel);
}
Buyer::~Buyer()
{
delete ui;
}
void Buyer::on_actionLogout_triggered()
{
emit closed();
}
void Buyer::on_actionProfile_triggered()
{
profileDialog = new ProfileDialog(this, current_buyerUser.username, current_buyerUser.password);
profileDialog->exec();
}