Added AccountWindow to display account tables linked to devices and TransactionWindow for viewing account details. Enhanced DeviceDAO and AccountDAO to support additional filtering and data retrieval functionalities.
22 lines
688 B
C++
22 lines
688 B
C++
#include "TransactionWindow.h"
|
|
#include <QVBoxLayout>
|
|
#include <QLabel>
|
|
|
|
#include "dao/AccountDAO.h"
|
|
|
|
TransactionWindow::TransactionWindow(const int accountId, QWidget *parent): QDialog(parent) {
|
|
setWindowTitle("Транзакции");
|
|
setMinimumSize(300, 200); // минимальный размер
|
|
setMaximumSize(800, 400); // максимальный размер
|
|
|
|
auto *layout = new QVBoxLayout(this);
|
|
layout->setAlignment(Qt::AlignCenter);
|
|
|
|
AccountInfo account = AccountDAO::getAccountById(accountId);
|
|
|
|
QLabel *label = new QLabel(QString("*%1 | %2").arg(account.cardName, account.description), this);
|
|
layout->addWidget(label);
|
|
|
|
setModal(true);
|
|
}
|