obs-aitum-multistream/output-dialog.hpp

62 lines
2.0 KiB
C++
Raw Normal View History

#pragma once
#include <QDialog>
2024-07-16 18:41:19 +02:00
#include <QWidget>
#include <QStackedWidget>
2024-07-18 01:32:30 +02:00
#include <QToolButton>
2024-07-19 21:19:54 +02:00
#include <QComboBox>
#include <QPushButton>
2024-07-19 21:19:54 +02:00
#include <QLineEdit>
2024-07-18 01:32:30 +02:00
#include <QString>
#include "obs-data.h"
2024-07-16 18:41:19 +02:00
class OutputDialog : public QDialog {
Q_OBJECT
private:
2024-07-16 18:41:19 +02:00
QWidget *WizardServicePage();
2024-07-18 01:32:30 +02:00
QToolButton *selectionButton(std::string title, QIcon icon, int selectionStep);
2024-07-19 21:19:54 +02:00
QWidget *WizardInfoKick(bool edit = false);
QWidget *WizardInfoYouTube(bool edit = false);
QWidget *WizardInfoTwitter(bool edit = false);
QWidget *WizardInfoUnknown(bool edit = false);
QWidget *WizardInfoTwitch(bool edit = false);
QWidget *WizardInfoTrovo(bool edit = false);
QWidget *WizardInfoTikTok(bool edit = false);
QWidget *WizardInfoFacebook(bool edit = false);
2024-07-16 23:00:33 +02:00
// Platform icons
QIcon platformIconTwitch = QIcon(":/aitum/media/twitch.png");
QIcon platformIconYouTube = QIcon(":/aitum/media/youtube.png");
QIcon platformIconKick = QIcon(":/aitum/media/kick.png");
QIcon platformIconTikTok = QIcon(":/aitum/media/tiktok.png");
QIcon platformIconTwitter = QIcon(":/aitum/media/twitter.png");
QIcon platformIconTrovo = QIcon(":/aitum/media/trovo.png");
QIcon platformIconFacebook = QIcon(":/aitum/media/facebook.png");
QIcon platformIconUnknown = QIcon(":/aitum/media/unknown.png");
2024-07-18 01:32:30 +02:00
obs_data_array_t *servicesData;
2024-07-18 01:32:30 +02:00
void resetOutputs();
void acceptOutputs();
void validateOutputs(QPushButton *confirmButton);
2024-07-19 21:19:54 +02:00
// Generators
QLineEdit *generateOutputNameField(std::string text, QPushButton *confirmButton);
QLineEdit *generateOutputServerField(QPushButton *confirmButton, bool locked);
QComboBox *generateOutputServerCombo(std::string service, QPushButton *confirmButton);
QLineEdit *generateOutputKeyField(QPushButton *confirmButton);
2024-07-18 01:32:30 +02:00
obs_data_t *getService(std::string serviceName);
2024-07-16 18:41:19 +02:00
QStackedWidget *stackedWidget;
public:
OutputDialog(QDialog *parent);
2024-07-19 21:19:54 +02:00
OutputDialog(QDialog *parent, QString name, QString server, QString key);
QString outputName;
QString outputServer;
QString outputKey;
};