#include "../headers/linbogui.h" linboGui::linboGui() { // fill whole screen Qt::WindowFlags flags; flags = Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint; setWindowFlags( flags ); setAttribute( Qt::WA_AlwaysShowToolTips ); this->setGeometry(QApplication::desktop()->screenGeometry()); this->setFixedHeight(QApplication::desktop()->screenGeometry().height()); this->setFixedWidth(QApplication::desktop()->screenGeometry().width()); // black bakground this->setStyleSheet( "QDialog { background: white }"); linboGUIImpl* legacyGui = new linboGUIImpl(this); legacyGui->setStyleSheet( "QDialog { background: white }"); //legacyGui->show(); // create the main layout // OS Buttons LinboOsSelectButton* osButton = new LinboOsSelectButton(":/svgIcons/ubuntu.svg", this); osButton->setFixedHeight(250); osButton->setFixedWidth(250); osButton->setChecked(true); LinboOsSelectButton* osButton_1 = new LinboOsSelectButton(":/svgIcons/windows.svg", this); osButton_1->setFixedHeight(250); osButton_1->setFixedWidth(250); QButtonGroup* group = new QButtonGroup(); group->setExclusive(true); group->addButton(osButton); group->addButton(osButton_1); // OS Button Layout QHBoxLayout* osButtonRow = new QHBoxLayout(); osButtonRow->addWidget(osButton); osButtonRow->addWidget(osButton_1); // action buttons QModernPushButton* defaultActionButton = new QModernPushButton(":/svgIcons/startAction.svg"); defaultActionButton->setFixedHeight(110); defaultActionButton->setFixedWidth(110); QModernPushButton* secondActionButton = new QModernPushButton(":/svgIcons/syncAction.svg"); secondActionButton->setFixedHeight(50); secondActionButton->setFixedWidth(50); QModernPushButton* thirdActionButton = new QModernPushButton(":/svgIcons/resetAction.svg"); thirdActionButton->setFixedHeight(50); thirdActionButton->setFixedWidth(50); QHBoxLayout* actionButtonLayout = new QHBoxLayout(); actionButtonLayout->addItem(new QSpacerItem(10,10, QSizePolicy::Expanding, QSizePolicy::Minimum)); actionButtonLayout->addWidget(secondActionButton); actionButtonLayout->addWidget(thirdActionButton); actionButtonLayout->addItem(new QSpacerItem(10,10, QSizePolicy::Expanding, QSizePolicy::Minimum)); // main layout QVBoxLayout* mainLayout = new QVBoxLayout(this); mainLayout->addItem(new QSpacerItem(10,10, QSizePolicy::Minimum, QSizePolicy::Expanding)); mainLayout->addLayout(osButtonRow); mainLayout->addItem(new QSpacerItem(10,10, QSizePolicy::Minimum, QSizePolicy::Expanding)); mainLayout->addWidget(defaultActionButton); mainLayout->setAlignment(defaultActionButton, Qt::AlignHCenter); mainLayout->addLayout(actionButtonLayout); mainLayout->addItem(new QSpacerItem(10,10, QSizePolicy::Minimum, QSizePolicy::Expanding)); } // prevent closing (eg. by pressing escape key) void linboGui::done(int r) { Q_UNUSED(r) }