2024-06-13 11:58:07 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QTextEdit>
|
|
|
|
#include <obs-frontend-api.h>
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QListWidget>
|
|
|
|
#include <QSpinBox>
|
|
|
|
#include <QFormLayout>
|
|
|
|
#include <QRadioButton>
|
2024-06-18 08:34:29 +02:00
|
|
|
#include <QLabel>
|
2024-07-22 21:26:19 +02:00
|
|
|
#include <QIcon>
|
|
|
|
#include <QString>
|
2024-07-29 13:56:00 +02:00
|
|
|
#include <QToolButton>
|
2024-06-13 11:58:07 +02:00
|
|
|
|
|
|
|
class OBSBasicSettings : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(QIcon generalIcon READ GetGeneralIcon WRITE SetGeneralIcon DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon streamIcon READ GetStreamIcon WRITE SetStreamIcon DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon outputIcon READ GetOutputIcon WRITE SetOutputIcon DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon audioIcon READ GetAudioIcon WRITE SetAudioIcon DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon videoIcon READ GetVideoIcon WRITE SetVideoIcon DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon hotkeysIcon READ GetHotkeysIcon WRITE SetHotkeysIcon DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon accessibilityIcon READ GetAccessibilityIcon WRITE SetAccessibilityIcon DESIGNABLE true)
|
|
|
|
Q_PROPERTY(QIcon advancedIcon READ GetAdvancedIcon WRITE SetAdvancedIcon DESIGNABLE true)
|
|
|
|
private:
|
|
|
|
QListWidget *listWidget;
|
|
|
|
|
|
|
|
QIcon GetGeneralIcon() const;
|
|
|
|
QIcon GetStreamIcon() const;
|
|
|
|
QIcon GetOutputIcon() const;
|
|
|
|
QIcon GetAudioIcon() const;
|
|
|
|
QIcon GetVideoIcon() const;
|
|
|
|
QIcon GetHotkeysIcon() const;
|
|
|
|
QIcon GetAccessibilityIcon() const;
|
|
|
|
QIcon GetAdvancedIcon() const;
|
|
|
|
|
2024-07-18 19:32:31 +02:00
|
|
|
void AddServer(QFormLayout *outputsLayout, obs_data_t *settings, obs_data_array_t *outputs);
|
2024-06-14 17:37:45 +02:00
|
|
|
void AddProperty(obs_properties_t *properties, obs_property_t *property, obs_data_t *settings, QFormLayout *layout);
|
|
|
|
void RefreshProperties(obs_properties_t *properties, QFormLayout *layout);
|
2024-06-13 11:58:07 +02:00
|
|
|
|
2024-08-02 08:01:36 +02:00
|
|
|
obs_data_t *main_settings = nullptr;
|
2024-07-11 13:54:58 +02:00
|
|
|
obs_data_array_t *vertical_outputs = nullptr;
|
2024-06-13 11:58:07 +02:00
|
|
|
|
|
|
|
std::map<obs_property_t *, QWidget *> encoder_property_widgets;
|
2024-07-30 21:10:13 +02:00
|
|
|
std::map<QWidget *, obs_properties_t *> video_encoder_properties;
|
|
|
|
std::map<QWidget *, obs_properties_t *> audio_encoder_properties;
|
2024-06-13 11:58:07 +02:00
|
|
|
|
|
|
|
QFormLayout *mainOutputsLayout;
|
|
|
|
QFormLayout *verticalOutputsLayout;
|
2024-06-18 08:34:29 +02:00
|
|
|
QLabel *newVersion;
|
2024-06-13 11:58:07 +02:00
|
|
|
|
2024-06-17 14:24:45 +02:00
|
|
|
QTextEdit *troubleshooterText;
|
|
|
|
|
2024-07-18 19:32:31 +02:00
|
|
|
QPushButton *verticalAddButton;
|
2024-07-29 13:21:27 +02:00
|
|
|
QToolButton *generalMainButton;
|
|
|
|
QToolButton *generalVerticalButton;
|
|
|
|
QToolButton *generalHelpButton;
|
2024-07-29 16:00:01 +02:00
|
|
|
QToolButton *generalSupportAitumButton;
|
2024-07-23 09:28:13 +02:00
|
|
|
|
2024-06-13 11:58:07 +02:00
|
|
|
private slots:
|
|
|
|
void SetGeneralIcon(const QIcon &icon);
|
|
|
|
void SetStreamIcon(const QIcon &icon);
|
|
|
|
void SetOutputIcon(const QIcon &icon);
|
|
|
|
void SetAudioIcon(const QIcon &icon);
|
|
|
|
void SetVideoIcon(const QIcon &icon);
|
|
|
|
void SetHotkeysIcon(const QIcon &icon);
|
|
|
|
void SetAccessibilityIcon(const QIcon &icon);
|
|
|
|
void SetAdvancedIcon(const QIcon &icon);
|
|
|
|
|
|
|
|
public:
|
|
|
|
OBSBasicSettings(QMainWindow *parent = nullptr);
|
|
|
|
~OBSBasicSettings();
|
|
|
|
|
2024-06-14 17:37:45 +02:00
|
|
|
void LoadSettings(obs_data_t *settings);
|
2024-07-29 16:44:28 +02:00
|
|
|
void LoadVerticalSettings(bool load);
|
2024-07-11 13:54:58 +02:00
|
|
|
void SaveVerticalSettings();
|
2024-07-23 09:28:13 +02:00
|
|
|
void LoadOutputStats(std::vector<video_t *> *oldVideos);
|
2024-06-18 08:34:29 +02:00
|
|
|
void SetNewerVersion(QString newer_version_available);
|
2024-07-26 10:25:38 +02:00
|
|
|
|
2024-06-13 11:58:07 +02:00
|
|
|
public slots:
|
|
|
|
};
|