-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdialog.cpp
More file actions
56 lines (43 loc) · 1004 Bytes
/
Copy pathdialog.cpp
File metadata and controls
56 lines (43 loc) · 1004 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "dialog.h"
#include "ui_dialog.h"
#include "mythread.h"
#include <qmovie.h>
//testing git
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
// create an instance of MyThread
mThread = new MyThread(this);
// connect signal/slot
connect(mThread, SIGNAL(valueChanged(int)),
this, SLOT(onValueChanged(int)));
}
Dialog::~Dialog()
{
delete ui;
}
// Absorb the signal emitted from a run() method
// and reflect the count change to the count label
// in our dialog
void Dialog::onValueChanged(int count)
{
ui->label->setText(QString::number(count));
}
// Start button
void Dialog::on_pushButton_clicked()
{
mThread->start();
//QLabel *lbl = new QLabel;
QMovie *movie = new QMovie("/home/pi/loader1.gif");
ui->label_2->setMovie(movie);
//lbl->show();
movie->start();
}
// Stop button
void Dialog::on_pushButton_2_clicked()
{
mThread->Stop = true;
ui->label_2->hide();
}