blob: d98cc4d5574742a542bab4e9cec7978346ab5972 (
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
|
#pragma once
#include "ui_options-dialog.h"
#include "logic/shortcuts.h"
#include <QObject>
#include <QWidget>
#include <functional>
class OptionsDialog : public QWidget
{
Q_OBJECT
signals:
void closing();
public:
OptionsDialog(std::function<void(bool)> pause_keybindings);
private:
main_settings main;
std::function<void(bool)> pause_keybindings;
Ui::options_dialog ui;
void closeEvent(QCloseEvent *) override { doCancel(); }
static QString kopts_to_string(const key_opts& opts);
private slots:
void doOK();
void doCancel();
void bind_key(key_opts &kopts, QLabel* label);
};
|