-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathspeed.cpp
More file actions
37 lines (32 loc) · 776 Bytes
/
speed.cpp
File metadata and controls
37 lines (32 loc) · 776 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
#include "speed.h"
#include "ui_speed.h"
#include <QDebug>
#include "mainwindow.h"
Speed::Speed(QWidget *parent) :
QDialog(parent),
ui(new Ui::Speed)
{
ui->setupUi(this);
}
Speed::~Speed()
{
delete ui;
}
void Speed::showspeed()
{
this->show();
this->setWindowFlags(Qt::WindowCloseButtonHint);
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
this->showNormal();
ui->verticalSlider->setValue(50);
}
void Speed::on_verticalSlider_sliderReleased()
{
MainWindow::speed = ui->verticalSlider->value()/100.0*600;
qDebug()<<MainWindow::speed;
}
void Speed::on_verticalSlider_valueChanged(int value)
{
MainWindow::speed = value/100.0*600;
qDebug()<<MainWindow::speed;
}