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 "output-dialog.hpp"
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QWizard>
|
#include <QVBoxLayout>
|
||||||
#include <QWizardPage>
|
#include <QLabel>
|
||||||
|
#include <QStackedWidget>
|
||||||
|
|
||||||
OutputDialog::OutputDialog(QDialog *parent) : QWizard(parent) {
|
OutputDialog::OutputDialog(QDialog *parent) : QDialog(parent) {
|
||||||
setWindowTitle("this is my wizard title!!");
|
stackedWidget = new QStackedWidget;
|
||||||
|
|
||||||
addPage(WizardPage1());
|
// Service selection page
|
||||||
addPage(WizardPage2());
|
stackedWidget->addWidget(WizardServicePage());
|
||||||
addPage(WizardPage3());
|
|
||||||
|
|
||||||
|
// 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();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
QWizardPage *OutputDialog::WizardPage1() {
|
QWidget *OutputDialog::WizardServicePage() {
|
||||||
auto page = new QWizardPage(this);
|
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;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
QWizardPage *OutputDialog::WizardPage2() {
|
QWidget *OutputDialog::WizardInfoKick() {
|
||||||
auto page = new QWizardPage(this);
|
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;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
QWizardPage *OutputDialog::WizardPage3() {
|
QWidget *OutputDialog::WizardInfoYouTube() {
|
||||||
auto page = new QWizardPage(this);
|
auto page = new QWidget(this);
|
||||||
|
|
||||||
|
auto pageLayout = new QVBoxLayout;
|
||||||
|
|
||||||
page->setTitle(QString("page 3"));
|
auto title = new QLabel(QString("YouTube Service page"));
|
||||||
page->setFinalPage(true);
|
pageLayout->addWidget(title);
|
||||||
|
|
||||||
|
page->setLayout(pageLayout);
|
||||||
|
|
||||||
return page;
|
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
|
#pragma once
|
||||||
|
|
||||||
#include <QWizard>
|
|
||||||
#include <QWizardPage>
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QStackedWidget>
|
||||||
|
|
||||||
class OutputDialog : public QWizard {
|
class OutputDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
QWizardPage *WizardPage1();
|
QWidget *WizardServicePage();
|
||||||
QWizardPage *WizardPage2();
|
|
||||||
QWizardPage *WizardPage3();
|
|
||||||
|
|
||||||
|
QWidget *WizardInfoKick();
|
||||||
|
QWidget *WizardInfoYouTube();
|
||||||
|
QWidget *WizardInfoTwitter();
|
||||||
|
QWidget *WizardInfoUnknown();
|
||||||
|
QWidget *WizardInfoTwitch();
|
||||||
|
QWidget *WizardInfoTrovo();
|
||||||
|
QWidget *WizardInfoTikTok();
|
||||||
|
QWidget *WizardInfoFacebook();
|
||||||
|
|
||||||
|
QStackedWidget *stackedWidget;
|
||||||
public:
|
public:
|
||||||
OutputDialog(QDialog *parent);
|
OutputDialog(QDialog *parent);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user