summaryrefslogtreecommitdiffhomepage
path: root/gui/mapping-dialog.hpp
blob: 3758e7c7a0ad029b0e0a437e0d081961acbc8fa7 (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
#pragma once

#include "export.hpp"

#include "logic/mappings.hpp"
#include "gui/ui_mapping-dialog.h"
#include "spline/spline-widget.hpp"

#include <QWidget>
#include <QDialog>
#include <QtEvents>

class OTR_GUI_EXPORT mapping_dialog final : public QDialog
{
    Q_OBJECT
public:
    mapping_dialog(Mappings& m);
    void refresh_tab();
    inline bool embeddable() noexcept { return false; }
private:
    Ui::mapping_dialog ui;
    Mappings& m;
    main_settings s;

    spline_widget* widgets[6][2];

    void closeEvent(QCloseEvent*) override;

    void load();

    void save_dialog();
    void invalidate_dialog();

private slots:
    void doOK();
    void doCancel();
};