2024-07-16 15:16:40 +02:00
|
|
|
#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>
|
2024-07-18 16:18:56 +02:00
|
|
|
#include <QPushButton>
|
2024-07-22 16:44:28 +02:00
|
|
|
#include <QHBoxLayout>
|
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 15:16:40 +02:00
|
|
|
|
2024-07-16 18:41:19 +02:00
|
|
|
class OutputDialog : public QDialog {
|
2024-07-16 15:16:40 +02:00
|
|
|
Q_OBJECT
|
|
|
|
private:
|
2024-07-16 18:41:19 +02:00
|
|
|
QWidget *WizardServicePage();
|
2024-07-16 15:16:40 +02:00
|
|
|
|
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 16:18:56 +02:00
|
|
|
|
2024-07-18 01:32:30 +02:00
|
|
|
void resetOutputs();
|
2024-07-18 16:18:56 +02:00
|
|
|
void acceptOutputs();
|
|
|
|
void validateOutputs(QPushButton *confirmButton);
|
2024-07-19 21:19:54 +02:00
|
|
|
|
|
|
|
// Generators
|
2024-07-22 16:44:28 +02:00
|
|
|
QLineEdit *generateOutputNameField(std::string text, QPushButton *confirmButton, bool edit = false);
|
|
|
|
QLineEdit *generateOutputServerField(QPushButton *confirmButton, bool locked, bool edit = false);
|
2024-07-22 14:30:21 +02:00
|
|
|
QComboBox *generateOutputServerCombo(std::string service, QPushButton *confirmButton, bool edit = false);
|
2024-07-22 16:44:28 +02:00
|
|
|
QLineEdit *generateOutputKeyField(QPushButton *confirmButton, bool edit = false);
|
|
|
|
QHBoxLayout *generateWizardButtonLayout(QPushButton *confirmButton, QPushButton *serviceButton, bool edit);
|
|
|
|
QPushButton *generateBackButton();
|
|
|
|
|
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;
|
2024-07-16 15:16:40 +02:00
|
|
|
public:
|
|
|
|
OutputDialog(QDialog *parent);
|
2024-07-19 21:19:54 +02:00
|
|
|
OutputDialog(QDialog *parent, QString name, QString server, QString key);
|
|
|
|
|
2024-07-18 16:18:56 +02:00
|
|
|
QString outputName;
|
|
|
|
QString outputServer;
|
|
|
|
QString outputKey;
|
2024-07-16 15:16:40 +02:00
|
|
|
};
|