mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-09-26 17:33:48 +08:00
c635bf8723
* switch theme on the fly
* better chart theme
* Darcula like dark theme
* add TODO
* use theme aware toolbutton in ChartView
* add margin to text title
* lighter activity colors
* fix historylog header
* replace hardcoded color
* improve chart tooltip color
* use macro
* space
* remove function toolbutton
* fix remove all btn
* remove menu arrow
* improve chart::removeIf
* cleanup charts
old-commit-hash: fc90814199
53 lines
955 B
C++
53 lines
955 B
C++
#pragma once
|
|
|
|
#include <QByteArray>
|
|
#include <QComboBox>
|
|
#include <QDialog>
|
|
#include <QSpinBox>
|
|
|
|
#define LIGHT_THEME 1
|
|
#define DARK_THEME 2
|
|
|
|
class Settings : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Settings();
|
|
void save();
|
|
void load();
|
|
|
|
int fps = 10;
|
|
int max_cached_minutes = 30;
|
|
int chart_height = 200;
|
|
int chart_column_count = 1;
|
|
int chart_range = 3 * 60; // 3 minutes
|
|
int chart_series_type = 0;
|
|
int theme = 0;
|
|
int sparkline_range = 15; // 15 seconds
|
|
QString last_dir;
|
|
QString last_route_dir;
|
|
QByteArray geometry;
|
|
QByteArray video_splitter_state;
|
|
QByteArray window_state;
|
|
QStringList recent_files;
|
|
QByteArray message_header_state;
|
|
|
|
signals:
|
|
void changed();
|
|
};
|
|
|
|
class SettingsDlg : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SettingsDlg(QWidget *parent);
|
|
void save();
|
|
QSpinBox *fps;
|
|
QSpinBox *cached_minutes;
|
|
QSpinBox *chart_height;
|
|
QComboBox *chart_series_type;
|
|
QComboBox *theme;
|
|
};
|
|
|
|
extern Settings settings;
|