-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunform.cpp
More file actions
84 lines (61 loc) · 1.67 KB
/
runform.cpp
File metadata and controls
84 lines (61 loc) · 1.67 KB
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
#include "runform.h"
#include "ui_runform.h"
#include "setupform.h"
#include "savestyleform.h"
#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/videoio.hpp>
#include <iostream>
#include "global.h"
using namespace std;
using namespace cv;
RunForm::RunForm(QWidget *parent) :
QDialog(parent),
ui(new Ui::RunForm)
{
// myPlayer = new Player();
// QObject::connect(myPlayer, SIGNAL(processedImage(QImage)),
// this, SLOT(updatePlayerUI(QImage)));
// myPlayer->loadVideo();
timer = new QTimer(this);
QObject::connect(timer, SIGNAL(timeout()), this, SLOT(updateLCD()));
timer->start(1000);
ui->setupUi(this);
}
RunForm::~RunForm()
{
delete ui;
}
void RunForm::updatePlayerUI(QImage img)
{
// if (!img.isNull())
// {
// ui->label->setAlignment(Qt::AlignCenter);
// ui->label->setPixmap(QPixmap::fromImage(img).scaled(ui->label->size(),Qt::KeepAspectRatio, Qt::FastTransformation));
// }
}
void RunForm::on_pushButton_setupAgain_clicked()
{
close();
SetupForm *setupForm = new SetupForm(this);
setupForm->setModal(false);
setupForm->setFixedSize(395,300);
setupForm->show();
}
void RunForm::on_pushButton_clicked()
{
//close();
// SaveStyleForm saveForm;
// saveForm.setModal(false);
// saveForm.exec();
RunForm::close();
SaveStyleForm* saveForm = new SaveStyleForm(this);
saveForm->setModal(false);
saveForm->setFixedSize(474,300);
saveForm->show();
}
void RunForm::updateLCD(){
int foldWidth = GlobalData::styleData.getDynamicFoldwidth();
ui->lcdNumber->display(foldWidth);
}