mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-05 22:05:42 +08:00
e675648a16
* add slider to set chart range
* set minumu to 1 sec
* make chart work in any range
* cleanup
* rename to max_cached_minitues
* more
* dont draw out of plotarea
* cleanup
* updateLayout after chart removed
* cleanup
* fix clamp
* usea same cur_sec to update all charts
old-commit-hash: f0d22f88e1
42 lines
681 B
C++
42 lines
681 B
C++
#pragma once
|
|
|
|
#include <QByteArray>
|
|
#include <QComboBox>
|
|
#include <QDialog>
|
|
#include <QSpinBox>
|
|
|
|
class Settings : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Settings();
|
|
void save();
|
|
void load();
|
|
|
|
int fps = 10;
|
|
int max_cached_minutes = 5;
|
|
int chart_height = 200;
|
|
int chart_column_count = 1;
|
|
int chart_range = 3 * 60; // e minutes
|
|
QString last_dir;
|
|
QByteArray geometry;
|
|
QByteArray video_splitter_state;
|
|
QByteArray window_state;
|
|
|
|
signals:
|
|
void changed();
|
|
};
|
|
|
|
class SettingsDlg : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SettingsDlg(QWidget *parent);
|
|
void save();
|
|
QSpinBox *fps;
|
|
QSpinBox *cached_minutes;
|
|
QSpinBox *chart_height;
|
|
};
|
|
|
|
extern Settings settings;
|