mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
#include <QHBoxLayout>
|
|
|
|
#include "mainwindow.h"
|
|
#include "./ui_mainwindow.h"
|
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent)
|
|
: QMainWindow(parent)
|
|
, ui(new Ui::MainWindow)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
QString appDirPath = QCoreApplication::applicationDirPath();
|
|
//QMessageBox::information(this, tr("appFilePath"), appDirPath);
|
|
m_instructorsAndTrainees = new InstructorsAndTrainees(appDirPath);
|
|
m_tasksWidget = new TasksWidget(m_instructorsAndTrainees->getDataBaseTrainees());
|
|
m_viewerTrainees = new ViewerTrainees(m_instructorsAndTrainees->getDataBaseTrainees());
|
|
m_viewerInstructors = new ViewerInstructors(m_instructorsAndTrainees->getDataBaseInstructors());
|
|
|
|
ui->verticalLayout_2->addWidget(m_viewerTrainees);
|
|
ui->verticalLayout_2->addWidget(m_viewerInstructors);
|
|
ui->verticalLayout_2->addWidget(m_tasksWidget);
|
|
|
|
m_tasksWidget->setMaximumHeight(200);
|
|
m_viewerInstructors->setMinimumSize(800, 300);
|
|
m_viewerTrainees->setMinimumSize(800, 800);
|
|
|
|
this->showMaximized();
|
|
}
|
|
|
|
MainWindow::~MainWindow()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void MainWindow::on_btnListTrainees_clicked()
|
|
{
|
|
m_instructorsAndTrainees->EditTrainees(this);
|
|
m_viewerTrainees->updateTrainees();
|
|
}
|
|
|
|
void MainWindow::on_btnListInstructors_clicked()
|
|
{
|
|
m_instructorsAndTrainees->EditInstructors(this);
|
|
m_viewerInstructors->updateInstructors();
|
|
}
|