mirror of
https://github.com/Aitum/obs-aitum-multistream.git
synced 2024-11-21 18:02:33 +01:00
move from qwizard -> qdialog
This commit is contained in:
parent
b1ad248ad0
commit
f23729f109
@ -1,41 +1,153 @@
|
||||
#include "output-dialog.hpp"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QWizard>
|
||||
#include <QWizardPage>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QStackedWidget>
|
||||
|
||||
OutputDialog::OutputDialog(QDialog *parent) : QWizard(parent) {
|
||||
setWindowTitle("this is my wizard title!!");
|
||||
OutputDialog::OutputDialog(QDialog *parent) : QDialog(parent) {
|
||||
stackedWidget = new QStackedWidget;
|
||||
|
||||
addPage(WizardPage1());
|
||||
addPage(WizardPage2());
|
||||
addPage(WizardPage3());
|
||||
// Service selection page
|
||||
stackedWidget->addWidget(WizardServicePage());
|
||||
|
||||
// Pages for each service
|
||||
stackedWidget->addWidget(WizardInfoKick());
|
||||
stackedWidget->addWidget(WizardInfoYouTube());
|
||||
stackedWidget->addWidget(WizardInfoTwitter());
|
||||
stackedWidget->addWidget(WizardInfoUnknown());
|
||||
stackedWidget->addWidget(WizardInfoTwitch());
|
||||
stackedWidget->addWidget(WizardInfoTrovo());
|
||||
stackedWidget->addWidget(WizardInfoTikTok());
|
||||
stackedWidget->addWidget(WizardInfoFacebook());
|
||||
|
||||
stackedWidget->setCurrentIndex(0);
|
||||
|
||||
|
||||
auto stackedLayout = new QVBoxLayout;
|
||||
stackedLayout->addWidget(stackedWidget);
|
||||
stackedLayout->setAlignment(stackedWidget, Qt::AlignTop);
|
||||
stackedLayout->setContentsMargins(4, 4, 4, 4);
|
||||
|
||||
setMinimumSize(650, 400);
|
||||
|
||||
setLayout(stackedLayout);
|
||||
show();
|
||||
}
|
||||
|
||||
QWizardPage *OutputDialog::WizardPage1() {
|
||||
auto page = new QWizardPage(this);
|
||||
QWidget *OutputDialog::WizardServicePage() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
page->setTitle(QString("page 1"));
|
||||
auto title = new QLabel(QString("This is my title"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWizardPage *OutputDialog::WizardPage2() {
|
||||
auto page = new QWizardPage(this);
|
||||
QWidget *OutputDialog::WizardInfoKick() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
page->setTitle(QString("page 2"));
|
||||
auto title = new QLabel(QString("Kick Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWizardPage *OutputDialog::WizardPage3() {
|
||||
auto page = new QWizardPage(this);
|
||||
QWidget *OutputDialog::WizardInfoYouTube() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
page->setTitle(QString("page 3"));
|
||||
page->setFinalPage(true);
|
||||
auto title = new QLabel(QString("YouTube Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWidget *OutputDialog::WizardInfoTwitter() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
auto title = new QLabel(QString("Twitter Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWidget *OutputDialog::WizardInfoUnknown() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
auto title = new QLabel(QString("Unknown Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWidget *OutputDialog::WizardInfoTwitch() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
auto title = new QLabel(QString("Twitch Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWidget *OutputDialog::WizardInfoTrovo() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
auto title = new QLabel(QString("Trovo Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWidget *OutputDialog::WizardInfoTikTok() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
auto title = new QLabel(QString("Tiktok Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
QWidget *OutputDialog::WizardInfoFacebook() {
|
||||
auto page = new QWidget(this);
|
||||
|
||||
auto pageLayout = new QVBoxLayout;
|
||||
|
||||
auto title = new QLabel(QString("Facebook Service page"));
|
||||
pageLayout->addWidget(title);
|
||||
|
||||
page->setLayout(pageLayout);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
@ -1,16 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWizard>
|
||||
#include <QWizardPage>
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
#include <QStackedWidget>
|
||||
|
||||
class OutputDialog : public QWizard {
|
||||
class OutputDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QWizardPage *WizardPage1();
|
||||
QWizardPage *WizardPage2();
|
||||
QWizardPage *WizardPage3();
|
||||
QWidget *WizardServicePage();
|
||||
|
||||
QWidget *WizardInfoKick();
|
||||
QWidget *WizardInfoYouTube();
|
||||
QWidget *WizardInfoTwitter();
|
||||
QWidget *WizardInfoUnknown();
|
||||
QWidget *WizardInfoTwitch();
|
||||
QWidget *WizardInfoTrovo();
|
||||
QWidget *WizardInfoTikTok();
|
||||
QWidget *WizardInfoFacebook();
|
||||
|
||||
QStackedWidget *stackedWidget;
|
||||
public:
|
||||
OutputDialog(QDialog *parent);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user