UBZoomPalette::UBZoomPalette(QWidget* parent) : UBFloatingPalette(Qt::BottomRightCorner, parent) , mIsExpanded(1) { mBoardController = UBApplication::boardController; QLayout* layout = new QVBoxLayout(this); mCurrentZoomButton = new QPushButton(parent); mCurrentZoomButton->setStyleSheet(QString("QPushButton { color: white; background-color: transparent; border: none; font-family: Arial; font-weight: bold; font-size: 20px }")); mCurrentZoomButton->setFocusPolicy(Qt::NoFocus); connect(mCurrentZoomButton, SIGNAL(clicked(bool)), this, SLOT(showHideExtraButton())); connect(mBoardController, SIGNAL(zoomChanged(qreal)), this, SLOT(refreshPalette())); connect(mBoardController, SIGNAL(activeSceneChanged()), this, SLOT(refreshPalette())); mHundredButton = new QPushButton(parent); mHundredButton->setStyleSheet(QString("QPushButton { color: white; background-color: transparent; border: none; font-family: Arial; font-weight: bold; font-size: 20px }")); mHundredButton->setFocusPolicy(Qt::NoFocus); mHundredButton->setIcon(QIcon(":/images/stylusPalette/restoreZoom.png")); mHundredButton->setIconSize(QSize(42,42)); connect(mHundredButton, SIGNAL(clicked(bool)), this, SLOT(goHundred())); layout->setContentsMargins(radius() + 15, 4, radius() + 15, 4); layout->addWidget(mHundredButton); layout->addWidget(mCurrentZoomButton); hide(); refreshPalette(); }
UBItem* UBGraphicsMediaItem::deepCopy() const { QUrl url = this->mediaFileUrl(); UBGraphicsMediaItem *copy; copy = new UBGraphicsMediaItem(url, parentItem()); copy->setPos(this->pos()); copy->setTransform(this->transform()); copy->setFlag(QGraphicsItem::ItemIsMovable, true); copy->setFlag(QGraphicsItem::ItemIsSelectable, true); copy->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType)); copy->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked)); copy->setUuid(this->uuid()); // this is OK as long as Videos are imutable copy->setSourceUrl(this->sourceUrl()); copy->resize(this->size()); connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), copy, SLOT(activeSceneChanged())); // TODO UB 4.7 complete all members return copy; }
void UBToolWidget::initialize() { if (!sClosePixmap) sClosePixmap = new QPixmap(":/images/close.svg"); if(!sUnpinPixmap) sUnpinPixmap = new QPixmap(":/images/unpin.svg"); UBGraphicsScene *wscene = dynamic_cast<UBGraphicsScene *>(mToolWidget->scene()); if (wscene) { wscene->removeItemFromDeletion(mToolWidget); wscene->removeItem(mToolWidget); } mWebView = new QWebView(this); QPalette palette = mWebView->page()->palette(); palette.setBrush(QPalette::Base, QBrush(Qt::transparent)); mWebView->page()->setPalette(palette); mWebView->installEventFilter(this); mFrameWidth = UBSettings::settings()->objectFrameWidth; mContentMargin = sClosePixmap->width() / 2 + mFrameWidth; setLayout(new QVBoxLayout()); layout()->setContentsMargins(mContentMargin, mContentMargin, mContentMargin, mContentMargin); layout()->addWidget(mWebView); setFixedSize(mToolWidget->boundingRect().width() + mContentMargin * 2, mToolWidget->boundingRect().height() + mContentMargin * 2); connect(mWebView->page()->mainFrame(), &QWebFrame::javaScriptWindowObjectCleared, this, &UBToolWidget::javaScriptWindowObjectCleared); mWebView->load(mToolWidget->mainHtml()); mWebView->setAcceptDrops(false); mWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); mWebView->setAttribute(Qt::WA_OpaquePaintEvent, false); connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(javaScriptWindowObjectCleared())); }
void UBGraphicsMediaItem::copyItemParameters(UBItem *copy) const { UBGraphicsMediaItem *cp = dynamic_cast<UBGraphicsMediaItem*>(copy); if (cp) { cp->setPos(this->pos()); cp->setTransform(this->transform()); cp->setFlag(QGraphicsItem::ItemIsMovable, true); cp->setFlag(QGraphicsItem::ItemIsSelectable, true); cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType)); cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked)); cp->setSourceUrl(this->sourceUrl()); cp->resize(this->size()); connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), cp, SLOT(activeSceneChanged())); // TODO UB 4.7 complete all members } }
UBTeacherGuideResourceEditionWidget::UBTeacherGuideResourceEditionWidget(QWidget *parent, const char* name): QWidget(parent) { mIsModified = false; setObjectName(name); mpLayout = new QVBoxLayout(this); mpTreeWidget = new QTreeWidget(this); mpTreeWidget->setStyleSheet("selection-background-color:transparent; padding-bottom:5px; padding-top:5px;"); mpLayout->addWidget(mpTreeWidget); mpRootWidgetItem = mpTreeWidget->invisibleRootItem(); mpTreeWidget->setRootIsDecorated(false); mpTreeWidget->setIndentation(0); mpTreeWidget->setDropIndicatorShown(false); mpTreeWidget->header()->close(); mpTreeWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); mpTreeWidget->setColumnCount(2); mpTreeWidget->header()->setStretchLastSection(false); mpTreeWidget->header()->setResizeMode(0, QHeaderView::Stretch); mpTreeWidget->header()->setResizeMode(1, QHeaderView::Fixed); mpTreeWidget->header()->setDefaultSectionSize(18); mpTreeWidget->setSelectionMode(QAbstractItemView::NoSelection); mpTreeWidget->setExpandsOnDoubleClick(false); mpAddAMediaItem = new UBAddItem(tr("Add a media"), eUBTGAddSubItemWidgetType_Media, mpTreeWidget); mpAddAFileItem = new UBAddItem(tr("Add a file"), eUBTGAddSubItemWidgetType_File, mpTreeWidget); //Issue 1716 - ALTI/AOU - 20140128 mpAddALinkItem = new UBAddItem(tr("Add a link"), eUBTGAddSubItemWidgetType_Url, mpTreeWidget); mpRootWidgetItem->addChild(mpAddAMediaItem); mpRootWidgetItem->addChild(mpAddAFileItem); //Issue 1716 - ALTI/AOU - 20140128 mpRootWidgetItem->addChild(mpAddALinkItem); #ifdef Q_WS_MAC // on mac and with the custom qt the widget on the tree are not automatically relocated when using the vertical scrollbar. To relocate them we link the valueChange signal of the vertical scrollbar with a local signal to trig a change and a repaint of the tree widget connect(mpTreeWidget->verticalScrollBar(),SIGNAL(valueChanged(int)),this,SLOT(onSliderMoved(int))); #endif connect(mpTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(onAddItemClicked(QTreeWidgetItem*,int))); connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(onActiveSceneChanged())); UBSvgSubsetAdaptor::addElementToBeStored(QString("resourcesGuide"), this); }
void UBToolWidget::initialize() { mToolWidget->setAcceptDrops(false); if(!sClosePixmap) { sClosePixmap = new QPixmap(":/images/close.svg"); } if(!sUnpinPixmap) { sUnpinPixmap = new QPixmap(":/images/unpin.svg"); } mToolWidget->settings()->setAttribute(QWebSettings::PluginsEnabled, true); mToolWidget->setAttribute(Qt::WA_OpaquePaintEvent, false); QPalette palette = mToolWidget->page()->palette(); palette.setBrush(QPalette::Base, QBrush(Qt::transparent)); mToolWidget->page()->setPalette(palette); connect(mToolWidget->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared())); connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(javaScriptWindowObjectCleared())); setLayout(new QVBoxLayout()); mFrameWidth = UBSettings::settings()->objectFrameWidth; mContentMargin = sClosePixmap->width() / 2 + mFrameWidth; layout()->setContentsMargins(mContentMargin, mContentMargin, mContentMargin, mContentMargin); layout()->addWidget(mToolWidget); setFixedSize(mToolWidget->width() + mContentMargin * 2, mToolWidget->height() + mContentMargin * 2); mToolWidget->installEventFilter(this); }
MainPage::MainPage(QWidget *parent) : QWidget(parent) , m_statusTimer(this) , m_updaterProc(NULL) // Toolboxes , m_leftToolbox(this) , m_rightToolbox(this) , m_topToolbox(this) , m_bottomToolbox(this) , m_pageLayout(this) , m_leftLayout(&m_leftToolbox) , m_rightLayout(&m_rightToolbox) , m_topLayout(&m_topToolbox) , m_bottomLayout(&m_bottomToolbox) // Toolbox bars , m_layersBar( StyleHelper::DarkFg2Color, StyleHelper::DarkBg3Color, StyleHelper::TextShadowColor, tr("Scene layers"), &m_leftToolbox) , m_targetsBar( StyleHelper::DarkFg2Color, StyleHelper::DarkBg3Color, StyleHelper::TextShadowColor, tr("Targets"), &m_rightToolbox) , m_mixerBar( StyleHelper::DarkFg2Color, StyleHelper::DarkBg3Color, StyleHelper::TextShadowColor, tr("Audio mixer"), &m_rightToolbox) , m_scenesBar( StyleHelper::DarkFg2Color, StyleHelper::DarkBg3Color, StyleHelper::TextShadowColor, tr("Scenes"), &m_rightToolbox) // Transition selector bar , m_transitionBar(this) , m_transitionLayout(&m_transitionBar) // Transition popup menu , m_transitionMenuId(0) , m_transitionMenu(this) , m_transitionDurAction(NULL) , m_transitionDurChangeAction(NULL) , m_transitionInstantAction(NULL) , m_transitionFadeAction(NULL) , m_transitionFadeBlackAction(NULL) , m_transitionFadeWhiteAction(NULL) , m_transitionDurDialog(NULL) // Widgets , m_graphicsWidget(this) , m_broadcastButton(StyleHelper::GreenSet, true, this) , m_addGroupButton(StyleHelper::BlueSet, true, this) , m_updatesAvailableButton(StyleHelper::YellowSet, false, this) , m_modifyTargetsButton(StyleHelper::BlueSet, true, this) , m_modifyMixerButton(StyleHelper::BlueSet, true, this) , m_addSceneButton(StyleHelper::BlueSet, true, this) , m_transALeftButton(StyleHelper::ButtonSet, true, this) , m_transARightButton(StyleHelper::ButtonSet, true, this) , m_transBLeftButton(StyleHelper::ButtonSet, true, this) , m_transBRightButton(StyleHelper::ButtonSet, true, this) , m_transCLeftButton(StyleHelper::ButtonSet, true, this) , m_transCRightButton(StyleHelper::ButtonSet, true, this) , m_zoomSlider(&m_bottomToolbox) , m_autoZoomCheckBox(&m_bottomToolbox) , m_statusLbl(&m_bottomToolbox) , m_itemView(NULL) , m_sceneView(NULL) , m_layerProperties(NULL) , m_targetView(NULL) , m_audioView(NULL) { #ifdef Q_OS_WIN // Add the global menu bar if we're on windows. This reparents the menu bar // so we have to unset the parent during our destructor so that it doesn't // get destroyed as well. QMenuBar *menuBar = App->getMenuBar(); m_pageLayout.setMenuBar(menuBar); #endif // We want a different font for the main window QFont font; #ifdef Q_OS_WIN font.setFamily(QStringLiteral("Segoe UI")); setFont(font); #endif // Set the base window colour QPalette pal = palette(); pal.setColor(backgroundRole(), StyleHelper::DarkBg5Color); setPalette(pal); setAutoFillBackground(true); // Remove layout margins so that the child widgets fill the entire space m_pageLayout.setMargin(0); m_pageLayout.setSpacing(0); m_leftLayout.setMargin(0); m_leftLayout.setSpacing(0); m_rightLayout.setMargin(0); m_rightLayout.setSpacing(0); m_topLayout.setMargin(0); m_topLayout.setSpacing(0); m_bottomLayout.setMargin(0); m_bottomLayout.setSpacing(0); m_transitionLayout.setMargin(0); m_transitionLayout.setSpacing(0); //------------------------------------------------------------------------- // Initialize widgets // Main graphics widget m_graphicsWidget.setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding); // Begin/stop broadcasting button m_broadcastButton.setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed); m_broadcastButton.setFixedHeight(40); font = m_broadcastButton.font(); //font.setBold(true); font.setPixelSize(15); #ifdef Q_OS_WIN font.setFamily(QStringLiteral("Calibri")); #endif m_broadcastButton.setFont(font); updateBroadcastButton(); connect(&m_broadcastButton, &StyledButton::clicked, this, &MainPage::broadcastClicked); connect(App, &Application::broadcastingChanged, this, &MainPage::broadcastingChanged); // Add scene layer group button m_addGroupButton.setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed); m_addGroupButton.setFixedHeight(STYLED_BAR_HEIGHT); m_addGroupButton.setIcon(QIcon(":/Resources/white-plus.png")); m_addGroupButton.setText(tr("Group")); font = m_addGroupButton.font(); font.setBold(true); m_addGroupButton.setFont(font); m_addGroupButton.setToolTip(tr("Add a new scene layer group")); QMargins margins = m_addGroupButton.contentsMargins(); margins.setLeft(4); margins.setRight(5); m_addGroupButton.setContentsMargins(margins); m_layersBar.addRightWidget(&m_addGroupButton); connect(&m_addGroupButton, &StyledButton::clicked, this, &MainPage::addGroupClicked); // Updates available button m_updatesAvailableButton.setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Fixed); m_updatesAvailableButton.setFixedHeight(STYLED_BAR_HEIGHT); m_updatesAvailableButton.setText(tr("Updates available")); m_updatesAvailableButton.setFont(font); // Reuse font from above m_updatesAvailableButton.hide(); connect(&m_updatesAvailableButton, &StyledButton::clicked, this, &MainPage::updatesAvailableClicked); // Modify targets button m_modifyTargetsButton.setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Fixed); m_modifyTargetsButton.setFixedHeight(STYLED_BAR_HEIGHT); m_modifyTargetsButton.setText(tr("Modify")); m_modifyTargetsButton.setFont(font); // Reuse font from above m_targetsBar.addRightWidget(&m_modifyTargetsButton); connect(&m_modifyTargetsButton, &StyledButton::clicked, this, &MainPage::modifyTargetsClicked); // Modify audio mixer button m_modifyMixerButton.setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Fixed); m_modifyMixerButton.setFixedHeight(STYLED_BAR_HEIGHT); m_modifyMixerButton.setText(tr("Modify")); m_modifyMixerButton.setFont(font); // Reuse font from above m_mixerBar.addRightWidget(&m_modifyMixerButton); connect(&m_modifyMixerButton, &StyledButton::clicked, this, &MainPage::modifyMixerClicked); // Add scene button m_addSceneButton.setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed); m_addSceneButton.setFixedHeight(STYLED_BAR_HEIGHT); m_addSceneButton.setIcon(QIcon(":/Resources/white-plus.png")); m_addSceneButton.setText(tr("Scene")); m_addSceneButton.setFont(font); // Reuse font from above m_addSceneButton.setToolTip(tr("Add a new scene")); m_addSceneButton.setContentsMargins(margins); // Reuse margins from above m_scenesBar.addRightWidget(&m_addSceneButton); connect(&m_addSceneButton, &StyledButton::clicked, this, &MainPage::addSceneClicked); // Zoom slider m_zoomSlider.setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Fixed); m_zoomSlider.setFixedHeight(STYLED_BAR_HEIGHT); m_zoomSlider.setToolTip(tr("Preview area zoom")); // TODO: Display amount void (ZoomSlider:: *fpfZS)(float) = &ZoomSlider::setZoom; connect(&m_graphicsWidget, &GraphicsWidget::zoomChanged, &m_zoomSlider, fpfZS); connect(&m_zoomSlider, &ZoomSlider::zoomChanged, this, &MainPage::zoomSliderChanged); // Automatic zoom check box App->applyDarkStyle(&m_autoZoomCheckBox); m_autoZoomCheckBox.setFixedHeight(21); // HACK to move the box down 1px m_autoZoomCheckBox.setIcon(QIcon(":/Resources/zoom-fill-screen.png")); m_autoZoomCheckBox.setToolTip(tr("Automatically zoom to fill window")); m_autoZoomCheckBox.setChecked(m_graphicsWidget.isAutoZoomEnabled()); connect(&m_graphicsWidget, &GraphicsWidget::autoZoomEnabledChanged, &m_autoZoomCheckBox, &QCheckBox::setChecked); connect(&m_autoZoomCheckBox, &QCheckBox::clicked, &m_graphicsWidget, &GraphicsWidget::setAutoZoomEnabled); // Status bar message App->applyDarkStyle(&m_statusLbl); m_statusLbl.setFixedHeight(21); // HACK to move the box down 1px m_statusLbl.setAlignment(Qt::AlignCenter); // Scene item list Profile *profile = App->getProfile(); Scene *scene = App->getActiveScene(); m_itemView = new SceneItemView(scene, this); m_itemView->setFrameStyle(QFrame::NoFrame); m_itemView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); m_itemView->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); connect(profile, &Profile::activeSceneChanged, this, &MainPage::activeSceneChanged); // Scene list m_sceneView = new SceneView(profile, this); m_sceneView->setFrameStyle(QFrame::NoFrame); m_sceneView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); m_sceneView->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); // Scene layer properties m_layerProperties = new LayerProperties(profile, this); // Target list m_targetView = new TargetView(this); m_targetView->setFrameStyle(QFrame::NoFrame); m_targetView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_targetView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); m_targetView->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum); // Audio list m_audioView = new AudioView(this); m_audioView->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed); //------------------------------------------------------------------------- // Transition selector bar m_transALeftButton.setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed); m_transALeftButton.setFixedHeight(STYLED_BAR_HEIGHT); m_transALeftButton.setJoin(false, true); margins = m_transALeftButton.contentsMargins(); margins.setLeft(2); margins.setRight(2); m_transALeftButton.setContentsMargins(margins); m_transitionLayout.addWidget(&m_transALeftButton); connect(&m_transALeftButton, &StyledButton::clicked, this, &MainPage::transALeftClicked); m_transARightButton.setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed); m_transARightButton.setFixedSize(15, STYLED_BAR_HEIGHT); m_transARightButton.setToolTip(tr("Change transition")); m_transARightButton.setJoin(true, false); margins = m_transARightButton.contentsMargins(); margins.setLeft(0); margins.setRight(0); m_transARightButton.setContentsMargins(margins); m_transitionLayout.addWidget(&m_transARightButton); connect(&m_transARightButton, &StyledButton::clicked, this, &MainPage::transARightClicked); m_transBLeftButton.setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed); m_transBLeftButton.setFixedHeight(STYLED_BAR_HEIGHT); m_transBLeftButton.setJoin(false, true); margins = m_transBLeftButton.contentsMargins(); margins.setLeft(2); margins.setRight(2); m_transBLeftButton.setContentsMargins(margins); m_transitionLayout.addWidget(&m_transBLeftButton); connect(&m_transBLeftButton, &StyledButton::clicked, this, &MainPage::transBLeftClicked); m_transBRightButton.setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed); m_transBRightButton.setFixedSize(15, STYLED_BAR_HEIGHT); m_transBRightButton.setToolTip(tr("Change transition")); m_transBRightButton.setJoin(true, false); margins = m_transBRightButton.contentsMargins(); margins.setLeft(0); margins.setRight(0); m_transBRightButton.setContentsMargins(margins); m_transitionLayout.addWidget(&m_transBRightButton); connect(&m_transBRightButton, &StyledButton::clicked, this, &MainPage::transBRightClicked); m_transCLeftButton.setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed); m_transCLeftButton.setFixedHeight(STYLED_BAR_HEIGHT); m_transCLeftButton.setJoin(false, true); margins = m_transCLeftButton.contentsMargins(); margins.setLeft(2); margins.setRight(2); m_transCLeftButton.setContentsMargins(margins); m_transitionLayout.addWidget(&m_transCLeftButton); connect(&m_transCLeftButton, &StyledButton::clicked, this, &MainPage::transCLeftClicked); m_transCRightButton.setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed); m_transCRightButton.setFixedSize(15, STYLED_BAR_HEIGHT); m_transCRightButton.setToolTip(tr("Change transition")); m_transCRightButton.setJoin(true, false); margins = m_transCRightButton.contentsMargins(); margins.setLeft(0); margins.setRight(0); m_transCRightButton.setContentsMargins(margins); m_transitionLayout.addWidget(&m_transCRightButton); connect(&m_transCRightButton, &StyledButton::clicked, this, &MainPage::transCRightClicked); // Evenly space buttons m_transitionLayout.setStretch(0, 1); m_transitionLayout.setStretch(2, 1); m_transitionLayout.setStretch(4, 1); // Watch profile for changes and update immediately connect(profile, &Profile::transitionsChanged, this, &MainPage::transitionsChanged); transitionsChanged(); // Populate transition popup menu m_transitionDurAction = m_transitionMenu.addAction(tr( "Current duration: 250 msec")); m_transitionDurAction->setEnabled(false); m_transitionDurChangeAction = m_transitionMenu.addAction(tr( "Change duration...")); m_transitionMenu.addSeparator(); m_transitionInstantAction = m_transitionMenu.addAction(tr( PrflTransitionStrings[PrflInstantTransition])); m_transitionInstantAction->setCheckable(true); m_transitionFadeAction = m_transitionMenu.addAction(tr( PrflTransitionStrings[PrflFadeTransition])); m_transitionFadeAction->setCheckable(true); m_transitionFadeBlackAction = m_transitionMenu.addAction(tr( PrflTransitionStrings[PrflFadeBlackTransition])); m_transitionFadeBlackAction->setCheckable(true); m_transitionFadeWhiteAction = m_transitionMenu.addAction(tr( PrflTransitionStrings[PrflFadeWhiteTransition])); m_transitionFadeWhiteAction->setCheckable(true); connect(&m_transitionMenu, &QMenu::triggered, this, &MainPage::transitionMenuTriggered); //------------------------------------------------------------------------- // Populate toolboxes m_leftLayout.addWidget(&m_layersBar); m_leftLayout.addWidget(new VBorderSpacer(this)); m_leftLayout.addWidget(m_itemView); m_leftLayout.addWidget(new VBorderSpacer(this)); m_leftLayout.addWidget(&m_scenesBar); m_leftLayout.addWidget(new VBorderSpacer(this)); m_leftLayout.addWidget(m_sceneView); m_leftLayout.addWidget(new VBorderSpacer(this)); m_leftLayout.addWidget(&m_transitionBar); m_leftLayout.setStretch(2, 2); m_leftLayout.setStretch(6, 1); m_rightLayout.addWidget(&m_broadcastButton); m_rightLayout.addWidget(new VBorderSpacer(this)); m_rightLayout.addWidget(&m_targetsBar); m_rightLayout.addWidget(new VBorderSpacer(this)); m_rightLayout.addWidget(m_targetView); //m_rightLayout.addWidget(new VBorderSpacer(this)); m_rightLayout.addWidget(&m_mixerBar); m_rightLayout.addWidget(new VBorderSpacer(this)); m_rightLayout.addWidget(m_audioView); m_rightLayout.addStretch(0); m_rightLayout.setStretch(4, 1); m_topLayout.addWidget(new EmbossWidgetSmallDark(&m_topToolbox)); m_topLayout.addWidget(m_layerProperties); m_bottomLayout.addWidget(&m_zoomSlider); HeaderPattern *padding = new HeaderPattern(&m_bottomToolbox); padding->setFixedSize(15, 12); m_bottomLayout.addWidget(padding); m_bottomLayout.addSpacing(6); m_bottomLayout.addWidget(&m_autoZoomCheckBox, 0, Qt::AlignBottom); m_bottomLayout.addWidget(&m_statusLbl, 1); // Stretches m_bottomLayout.addSpacing(6); m_bottomLayout.addWidget(&m_updatesAvailableButton); //------------------------------------------------------------------------- // Set title bar style m_layersBar.setLabelBold(true); m_targetsBar.setLabelBold(true); m_mixerBar.setLabelBold(true); m_scenesBar.setLabelBold(true); // Add toolboxes and the graphics widget to the layout m_pageLayout.addWidget(&m_leftToolbox, 0, 0, 5, 1); m_pageLayout.addWidget(new HBorderSpacer(this), 0, 1, 5, 1); m_pageLayout.addWidget(&m_topToolbox, 0, 2, 1, 1); m_pageLayout.addWidget(new VBorderSpacer(this), 1, 2, 1, 1); m_pageLayout.addWidget(&m_graphicsWidget, 2, 2, 1, 1); m_pageLayout.addWidget(new VBorderSpacer(this), 3, 2, 1, 1); m_pageLayout.addWidget(&m_bottomToolbox, 4, 2, 1, 1); m_pageLayout.addWidget(new HBorderSpacer(this), 0, 3, 5, 1); m_pageLayout.addWidget(&m_rightToolbox, 0, 4, 5, 1); // Make the graphics widget use as much space as possible m_pageLayout.setRowStretch(2, 1); // Setup toolbox sizes m_leftToolbox.setFixedWidth(240); m_rightToolbox.setFixedWidth(200); m_bottomToolbox.setSizePolicy( QSizePolicy::Ignored, QSizePolicy::MinimumExpanding); // Watch scene for changes activeSceneChanged(App->getActiveScene(), NULL); // Connect timer signals connect(&m_statusTimer, &QTimer::timeout, this, &MainPage::statusTimeout); // Check if there's a new update available startUpdaterProcess(); }