44 lines
856 B
C++
44 lines
856 B
C++
#ifndef SETPOINT_H
|
|
#define SETPOINT_H
|
|
|
|
#include <QWidget>
|
|
#include "data_config.h"
|
|
#include "rangeslider.h"
|
|
#include "vibrationdata.h"
|
|
|
|
namespace Ui {
|
|
class Setpoint;
|
|
}
|
|
|
|
class Setpoint : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Setpoint(int slot_no_,int cardtype,QWidget *parent = nullptr);
|
|
~Setpoint();
|
|
int slot_no;
|
|
CardType car_type;
|
|
private slots:
|
|
void on_pushButton_confirm_clicked();
|
|
|
|
void on_pushButton_cancel_clicked();
|
|
|
|
void on_pushButton_set_default_clicked();
|
|
|
|
void onComboBoxIndexChanged(int index);
|
|
|
|
private:
|
|
Ui::Setpoint *ui;
|
|
RangeSlider *slider_direct;
|
|
RangeSlider *slider_1x_ampl;
|
|
RangeSlider *slider_2x_ampl;
|
|
RangeSlider *slider_danger;
|
|
std::shared_ptr<VibrationData> vib_alert_ptr = nullptr;
|
|
int current_index;
|
|
void Init();
|
|
void update();
|
|
};
|
|
|
|
#endif // SETPOINT_H
|