-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.cpp
133 lines (117 loc) · 3.07 KB
/
mainwindow.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QLabel>
#include "drivers.h"
#include "motortransport.h"
#include "routes.h"
#include "employeddrivers.h"
#include "vehiclesmileage.h"
#include "travelsheets.h"
#include "otherworkers.h"
#include "checkinworktime.h"
#include "employedotherworkers.h"
#include "travelsheet.h"
#include "registertravelsheets.h"
#include "summarylogbybrand.h"
#include "help.h"
#include "aboutprogram.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
m_pBackground = new QLabel();
m_pBackground->setPixmap(QPixmap(":/images/Background.jpg"));
m_pBackground->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
m_pBackground->setScaledContents(true);
setCentralWidget(m_pBackground);
m_pDriversForm = new Drivers();
m_pMotorTransportForm = new MotorTransport();
m_pRoutesForm = new Routes();
m_pEmployedDriversForm = new EmployedDrivers();
m_pVehiclesMileageForm = new VehiclesMileage();
m_pTravelSheetsForm = new TravelSheets();
m_pOtherWorkersForm = new OtherWorkers();
m_pCheckInWorkTimeForm = new CheckInWorkTime();
m_pEmployedOtherWorkersForm = new EmployedOtherWorkers();
m_pTravelSheetForm = new TravelSheet();
m_pRegisterTravelSheetsForm = new RegisterTravelSheets();
m_pSummaryLogByBrandForm = new SummaryLogByBrand();
m_pHelpForm = new Help();
m_pAboutProgramForm = new AboutProgram();
}
MainWindow::~MainWindow()
{
delete ui;
delete m_pBackground;
delete m_pDriversForm;
delete m_pMotorTransportForm;
delete m_pRoutesForm;
delete m_pEmployedDriversForm;
delete m_pVehiclesMileageForm;
delete m_pTravelSheetsForm;
delete m_pOtherWorkersForm;
delete m_pCheckInWorkTimeForm;
delete m_pEmployedOtherWorkersForm;
delete m_pTravelSheetForm;
delete m_pRegisterTravelSheetsForm;
delete m_pSummaryLogByBrandForm;
delete m_pHelpForm;
delete m_pAboutProgramForm;
}
void MainWindow::showDriversForm()
{
m_pDriversForm->show();
}
void MainWindow::showMotorTransportForm()
{
m_pMotorTransportForm->show();
}
void MainWindow::showRoutesForm()
{
m_pRoutesForm->show();
}
void MainWindow::showEmployedDriversForm()
{
m_pEmployedDriversForm->show();
}
void MainWindow::showVehiclesMileageForm()
{
m_pVehiclesMileageForm->show();
}
void MainWindow::showTravelSheetsForm()
{
m_pTravelSheetsForm->show();
}
void MainWindow::showOtherWorkersForm()
{
m_pOtherWorkersForm->show();
}
void MainWindow::showCheckInWorkTimeForm()
{
m_pCheckInWorkTimeForm->show();
}
void MainWindow::showEmployedOtherWorkersForm()
{
m_pEmployedOtherWorkersForm->show();
}
void MainWindow::showTravelSheetForm()
{
m_pTravelSheetForm->show();
}
void MainWindow::showRegisterTravelSheetsForm()
{
m_pRegisterTravelSheetsForm->show();
}
void MainWindow::showSummaryLogByBrandForm()
{
m_pSummaryLogByBrandForm->show();
}
void MainWindow::showHelpForm()
{
m_pHelpForm->show();
}
void MainWindow::showAboutProgramForm()
{
m_pAboutProgramForm->show();
}