-
Notifications
You must be signed in to change notification settings - Fork 6
/
mainwindow.cpp
44 lines (36 loc) · 1.09 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
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
initData();
initUI();
initConnect();
}
MainWindow::~MainWindow()
{
delete mTopWidget;
delete mCenterWidget;
delete mBottomWidget;
}
void MainWindow::initData()
{
}
void MainWindow::initUI()
{
this->setContentsMargins(STANDARD_MARGIN, STANDARD_MARGIN, STANDARD_MARGIN, STANDARD_MARGIN);
mTopWidget = new ZTopWidget;
mTopWidget->setFloatable(false);
mTopWidget->setMovable(false);
this->addToolBar(mTopWidget);
mCenterWidget = new ZCenterWidget;
this->setCentralWidget(mCenterWidget);
mBottomWidget = new ZBottomWidget;
// this->setStatusBar(mBottomWidget);
}
void MainWindow::initConnect()
{
connect(mTopWidget, SIGNAL(folderComparison()), mCenterWidget, SLOT(folderComparison()));
connect(mTopWidget, SIGNAL(fileComparison()), mCenterWidget, SLOT(fileComparison()));
connect(mTopWidget, SIGNAL(startOrRecompare()), mCenterWidget, SLOT(startOrRecompare()));
connect(mTopWidget, SIGNAL(stopCompare()), mCenterWidget, SLOT(stopCompare()));
}