forked from AmurSU/TSProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtscontroller.cpp
More file actions
41 lines (35 loc) · 971 Bytes
/
Copy pathtscontroller.cpp
File metadata and controls
41 lines (35 loc) · 971 Bytes
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
#include "tscontroller.h"
#include "tscurvebuffer.h"
#include "tsreaderthread.h"
#include "tsusb3000reader.h"
#include <QTextCodec>
TSController::TSController(TSIView *iview, TSModel *mod, QObject *parent) :
QObject(parent), view(iview), model(mod)
{
QTextCodec::setCodecForTr(QTextCodec::codecForName("Windows-1251"));
}
void TSController::handle()
{
view->showGUI();
}
void TSController::newResearchRequesdted()
{
TSPatientProfileModel *m = model->newResearchModel();
view->showNewResearchDialog(m);
}
void TSController::editPatientProfileRequested()
{
TSPatientProfileModel *m = model->newResearchModel();
view->showEditPatientProfileDialog(m);
}
void TSController::newResearchAccepted()
{
view->showResearchwindow(model->curveModel());
}
void TSController::startRecordingRequested()
{
TSReaderThread *trd = new TSReaderThread(model->curveModel());
trd->startRead();
// trd->stopRead();
view->startRecording();
}