looper/backends/ui/qt/preferences.h

43 lines
1.1 KiB
C
Raw Normal View History

2024-11-20 08:15:45 -08:00
#pragma once
#include <QWindow>
#include <QPushButton>
#include <QCheckBox>
#include <QRadioButton>
#include <QBoxLayout>
#include <QLabel>
#include <vector>
#include <string>
#include <map>
class PrefsWindow : public QWidget {
Q_OBJECT;
std::vector<std::string> backend_ids;
int cur_option = 0;
QLabel *restart_warning;
std::string new_label_setting;
std::string new_frontend;
QPushButton *frontend_btn;
QMenu *frontend_menu;
std::vector<QAction*> frontend_options;
2024-12-21 14:23:00 -08:00
std::map<std::string, QPixmap> cats;
std::map<std::string, QRadioButton*> cat_btns;
2024-11-20 08:15:45 -08:00
QCheckBox *menu_icons;
QRadioButton *labels_only;
QRadioButton *icons_only;
QRadioButton *both_labels_icons;
QPushButton *revert_btn;
QPushButton *apply_btn;
2024-12-21 14:23:00 -08:00
QCheckBox *cat_enable;
bool enable_cat;
std::string cat_setting;
2024-11-20 08:15:45 -08:00
void update_label_setting();
void set_options_changed(bool changed);
void revert();
void apply();
public:
PrefsWindow();
Q_SIGNALS:
2024-12-21 14:23:00 -08:00
void cat_set(QPixmap &img);
void cat_unset();
2024-11-20 08:15:45 -08:00
void settings_changed(bool use_labels, bool use_icons);
2024-12-21 14:23:00 -08:00
};