Physics Simulation & Visualization Tool 0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
ScalarWidget.h
Go to the documentation of this file.
1#pragma once
2#include <QWidget>
3#include <QHBoxLayout>
4#include <QDoubleSpinBox>
5
6class ScalarWidget : public QWidget {
7 Q_OBJECT
8
9public:
10 explicit ScalarWidget(const QString& suffix = "", QWidget* parent = nullptr);
11
12 double getValue() const;
13 void setValue(double val);
14
15 void setRange(double min, double max);
16 void setDecimals(int decimals);
17signals:
18 void valueChanged(double newValue);
19
20private:
21 QDoubleSpinBox* spin;
22};
void setRange(double min, double max)
void setDecimals(int decimals)
void valueChanged(double newValue)
double getValue() const
void setValue(double val)