summaryrefslogtreecommitdiffhomepage
path: root/gui/settings.hpp
blob: ebcaa66c3f2ecd91f11b5069756cdc81f379409b (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
#pragma once

#include "export.hpp"

#include "gui/ui_settings-dialog.h"
#include "logic/shortcuts.h"

#include <functional>

#include <QObject>
#include <QDialog>
#include <QWidget>

class OTR_GUI_EXPORT options_dialog : public QDialog
{
    Q_OBJECT
signals:
    void closing();
public:
    options_dialog(std::function<void(bool)>&& pause_keybindings);
private:
    main_settings main;
    std::function<void(bool)> pause_keybindings;
    Ui::options_dialog ui;
    void closeEvent(QCloseEvent*) override;
    static QString kopts_to_string(const key_opts& opts);
private slots:
    void doOK();
    void doCancel();
    void done(int res) override;
    void bind_key(key_opts &kopts, QLabel* label);
    void set_disable_translation_state(bool value);
};