-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdialog_loadpoints.cpp
47 lines (39 loc) · 1.54 KB
/
dialog_loadpoints.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
#include "dialog_loadpoints.h"
#include "ui_dialog_loadpoints.h"
Dialog_LoadPoints::Dialog_LoadPoints(TrajectorySender* trajectory_sender, QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog_LoadPoints)
{
//ui->frame->layout()->setContentsMargins(0,0,0,0);
this->trajectory_sender=trajectory_sender;
ui->setupUi(this);
ui->btn_sendData->setEnabled(false);
setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
// progressBar = new QProgressBar();
// progressBar->setMinimum(0);
// progressBar->setMaximum(time);
// ui->verticalLayout->addWidget(progressBar);
// ui->label_numbe_of_points->setText("Number of Points: "+number_of_points);
// QTimer *timer = new QTimer(this);
// connect(timer, &QTimer::timeout, this, &dialog_loadingPoints::updateProgress);
// timer->start(1000);
//resize(200, 200);
}
Dialog_LoadPoints::~Dialog_LoadPoints()
{
delete ui;
}
void Dialog_LoadPoints::finishedLoadingDataSlot(int number_of_points,int time)
{
QString s="number of points: "+QString::number(number_of_points)+"time: "+QString::number(time);
qDebug(s.toLatin1());
ui->label_number_of_points->setText(QString("Number Of Points: %L1 ms").arg(number_of_points)); //QString::number(number_of_points));
ui->label_expected_time->setText(QString("Expected Execution Time: %L1").arg(time));
ui->btn_sendData->setEnabled(true);
}
void Dialog_LoadPoints::on_btn_sendData_clicked()
{
ui->btn_sendData->hide();
trajectory_sender->start();
this->accept();
}