PNPkurs-PIbd-31-Alekseev-I-S/presenter.cpp

25 lines
755 B
C++
Raw Normal View History

2025-01-15 22:57:00 +04:00
#include "presenter.h"
Presenter::Presenter(QObject *parent)
: QObject{parent}
{
DB = new ServiceLoadDB();
window = new MainWindow();
window->show();
connect(DB, &ServiceLoadDB::sendStages, window, &MainWindow::getStages);
connect(DB, &ServiceLoadDB::sendTeams, window, &MainWindow::getTeams);
connect(DB, &ServiceLoadDB::sendWorkers, window, &MainWindow::getWorkers);
connect(DB, &ServiceLoadDB::sendDeviceTypes, window, &MainWindow::getDeviceTypes);
connect(DB, &ServiceLoadDB::sendDeviceModels, window, &MainWindow::getDeviceModels);
connect(DB, &ServiceLoadDB::sendProjects, window, &MainWindow::getProjects);
DB->start();
}
Presenter::~Presenter()
{
DB->deleteLater();
window->deleteLater();
}