summaryrefslogtreecommitdiffhomepage
path: root/gui/options-dialog.hpp
blob: 8fc166111a3202063ea85d9f4873c03273027a1f (plain)
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
38
39
40
41
42
43
44
45
46
#pragma once

#include <QObject>
#include <QWidget>
#include <QTimer>
#include "ui_settings.h"
#include "opentrack/state.hpp"
#include "opentrack/shortcuts.h"
#include "tracker-pt/ftnoir_tracker_pt_settings.h"
#include "trans_calib.h"
#include "tracker-pt/ftnoir_tracker_pt.h"
#include "filter-accela/ftnoir_filter_accela.h"

class OptionsDialog: public QWidget
{
    Q_OBJECT
signals:
    void reload();
public:
    OptionsDialog(State &state);
private:
    Ui::UI_Settings ui;
    Shortcuts::settings s;
    settings_pt pt;
    settings_accela acc;
    QTimer timer;
    State& state;
    TranslationCalibrator trans_calib;
    bool trans_calib_running;

    Tracker_PT* get_pt();
    void closeEvent(QCloseEvent *) override { doCancel(); }
private slots:
    void update_ewma_display(int value);
    void update_rot_display(int value);
    void update_trans_display(int value);
    void update_rot_dz_display(int value);
    void update_trans_dz_display(int value);

    void doOK();
    void doCancel();
    void startstop_trans_calib(bool start);
    void poll_tracker_info();
    void trans_calib_step();
    void bind_key(value<QString>& ret, QLabel* label);
};