obs-aitum-multistream/output-dialog.hpp

67 lines
2.3 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>
#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 18:41:19 +02:00
class OutputDialog : public QDialog {
Q_OBJECT
private:
2024-07-16 18:41:19 +02:00
QWidget *WizardServicePage();
2024-07-23 09:28:13 +02:00
2024-07-18 01:32:30 +02:00
QToolButton *selectionButton(std::string title, QIcon icon, int selectionStep);
2024-07-23 09:28:13 +02:00
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-23 09:28:13 +02:00
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-23 09:28:13 +02:00
2024-07-18 01:32:30 +02:00
obs_data_array_t *servicesData;
2024-07-23 09:28:13 +02:00
2024-07-18 01:32:30 +02:00
void resetOutputs();
void acceptOutputs();
void validateOutputs(QPushButton *confirmButton);
2024-07-23 09:28:13 +02:00
2024-07-19 21:19:54 +02:00
// Generators
QLineEdit *generateOutputNameField(std::string text, QPushButton *confirmButton, bool edit = false);
QLineEdit *generateOutputServerField(QPushButton *confirmButton, bool locked, bool edit = false);
QComboBox *generateOutputServerCombo(std::string service, QPushButton *confirmButton, bool edit = false);
QLineEdit *generateOutputKeyField(QPushButton *confirmButton, bool edit = false);
QHBoxLayout *generateWizardButtonLayout(QPushButton *confirmButton, QPushButton *serviceButton, bool edit);
QPushButton *generateBackButton();
2024-07-23 09:28:13 +02:00
2024-07-18 01:32:30 +02:00
obs_data_t *getService(std::string serviceName);
2024-07-23 09:28:13 +02:00
2024-07-16 18:41:19 +02:00
QStackedWidget *stackedWidget;
2024-07-31 11:08:09 +02:00
QStringList otherNames;
2024-07-23 09:28:13 +02:00
public:
2024-07-31 11:08:09 +02:00
OutputDialog(QDialog *parent, QStringList otherNames);
OutputDialog(QDialog *parent, QString name, QString server, QString key, QStringList otherNames);
2024-07-23 09:28:13 +02:00
QString outputName;
QString outputServer;
QString outputKey;
};