1
0
forked from BRT/arc
arc/views/TransactionWindow.cpp
slava c1b34ce7d7 Implement AccountWindow and TransactionWindow for account management
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.
2025-04-22 12:22:56 +07:00

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);
}