-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.cpp
48 lines (38 loc) · 1.27 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
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
bar = new BottomBar(this);
center = new CentralWidget();
setMenuBar(new TopMenu(this,center));
setStatusBar(bar);
//setCentralWidget(new PatternsBasicWidget());
setCentralWidget(center);
connect(center,SIGNAL(statusReady()),this,SLOT(slotStatusReady()));
connect(center,SIGNAL(statusEngine()),this,SLOT(slotStatusEngine()));
connect(center,SIGNAL(statusHighlighting()),this,SLOT(slotStatusHighlighting()));
connect(center,SIGNAL(statusCompiling()),this,SLOT(slotStatusCompiling()));
}
MainWindow::~MainWindow()
{
}
void MainWindow::slotStatusReady()
{
bar->showMessage(READY);
}
void MainWindow::slotStatusEngine()
{
bar->showMessage(ENGINE_WORKING);
}
void MainWindow::slotStatusHighlighting()
{
bar->showMessage(HIGHLIGHT_PROCESSING);
}
void MainWindow::slotStatusCompiling()
{
bar->showMessage(PATTERN_COMPILING);
}
const QString MainWindow::READY = "Готов";
const QString MainWindow::ENGINE_WORKING = "Шаблоны накладываются ...";
const QString MainWindow::HIGHLIGHT_PROCESSING = "Текст размечается ...";
const QString MainWindow::PATTERN_COMPILING = "Шаблоны компилируются ...";