Skip to content

Commit

Permalink
Render widget minor
Browse files Browse the repository at this point in the history
Added "add to queue" button.
  • Loading branch information
rodlie committed Nov 8, 2023
1 parent 2b3cdbf commit 01a8dcb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/app/GUI/RenderWidgets/renderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
#include "renderhandler.h"
#include "videoencoder.h"
#include "appsupport.h"
#include "../mainwindow.h"

RenderWidget::RenderWidget(QWidget *parent)
: QWidget(parent)
, mMainLayout(nullptr)
, mRenderProgressBar(nullptr)
, mStartRenderButton(nullptr)
, mStopRenderButton(nullptr)
, mAddRenderButton(nullptr)
, mContWidget(nullptr)
, mContLayout(nullptr)
, mScrollArea(nullptr)
Expand Down Expand Up @@ -84,6 +86,18 @@ RenderWidget::RenderWidget(QWidget *parent)
connect(mStopRenderButton, &QPushButton::pressed,
this, &RenderWidget::stopRendering);

mAddRenderButton = new QPushButton(QIcon::fromTheme("plus"),
QString(),
this);
mAddRenderButton->setToolTip(tr("Add current scene to queue"));
mAddRenderButton->setFocusPolicy(Qt::NoFocus);
mAddRenderButton->setSizePolicy(QSizePolicy::Preferred,
QSizePolicy::Preferred);
connect(mAddRenderButton, &QPushButton::pressed,
this, []() {
MainWindow::sGetInstance()->addCanvasToRenderQue();
});

const auto mClearQueueButton = new QPushButton(QIcon::fromTheme("trash"),
QString(),
this);
Expand All @@ -109,6 +123,7 @@ RenderWidget::RenderWidget(QWidget *parent)
bottomLayout->addWidget(mRenderProgressBar);
bottomLayout->addWidget(mStartRenderButton);
bottomLayout->addWidget(mStopRenderButton);
bottomLayout->addWidget(mAddRenderButton);
bottomLayout->addWidget(mClearQueueButton);

mMainLayout->addWidget(mScrollArea);
Expand Down
1 change: 1 addition & 0 deletions src/app/GUI/RenderWidgets/renderwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class RenderWidget : public QWidget
QProgressBar *mRenderProgressBar;
QPushButton *mStartRenderButton;
QPushButton *mStopRenderButton;
QPushButton *mAddRenderButton;
QWidget *mContWidget;
QVBoxLayout *mContLayout;
ScrollArea *mScrollArea;
Expand Down

0 comments on commit 01a8dcb

Please sign in to comment.