Added render buttons
This commit is contained in:
parent
28c9c08d74
commit
edc60113d9
6 changed files with 41 additions and 1 deletions
|
@ -37,6 +37,17 @@ RenderProcess::RenderProcess(MainModelerWindow *window, RenderPreviewProvider *d
|
|||
connect(button_quick, SIGNAL(clicked()), this, SLOT(startQuickRender()));
|
||||
}
|
||||
|
||||
QObject *button_final = window->findQmlObject("tool_render_final");
|
||||
if (button_final) {
|
||||
connect(button_final, SIGNAL(clicked()), this, SLOT(startFinalRender()));
|
||||
}
|
||||
|
||||
QObject *button_show = window->findQmlObject("tool_render_show");
|
||||
if (button_show) {
|
||||
button_show->setProperty("enabled", false);
|
||||
connect(button_show, SIGNAL(clicked()), this, SLOT(showPreviousRender()));
|
||||
}
|
||||
|
||||
startTimer(100);
|
||||
}
|
||||
|
||||
|
@ -68,6 +79,12 @@ void RenderProcess::startRender(Scenery *scenery, const RenderConfig &config)
|
|||
return;
|
||||
}
|
||||
|
||||
// Enable "show last render" button
|
||||
QObject *button_show = window->findQmlObject("tool_render_show");
|
||||
if (button_show) {
|
||||
button_show->setProperty("enabled", true);
|
||||
}
|
||||
|
||||
has_render = true;
|
||||
rendering = true;
|
||||
|
||||
|
|
|
@ -14,9 +14,16 @@ Item {
|
|||
|
||||
width: image.width + 10
|
||||
height: image.height + 10
|
||||
opacity: enabled ? 1.0 : 0.1
|
||||
|
||||
onSelectedChanged: changed(selected)
|
||||
|
||||
Behavior on opacity {
|
||||
PropertyAnimation {
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: glow
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -38,5 +38,7 @@
|
|||
<file>images/arrow_up.png</file>
|
||||
<file>ClickableImage.qml</file>
|
||||
<file>images/toggle_water.png</file>
|
||||
<file>images/icon_render_quick.png</file>
|
||||
<file>images/icon_render_show.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
src/interface/modeler/quickapp/qml/images/icon_render_quick.png
Normal file
BIN
src/interface/modeler/quickapp/qml/images/icon_render_quick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
src/interface/modeler/quickapp/qml/images/icon_render_show.png
Normal file
BIN
src/interface/modeler/quickapp/qml/images/icon_render_show.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -87,9 +87,23 @@ OpenGLView {
|
|||
ToolbarButton {
|
||||
id: tool_render_quick
|
||||
objectName: "tool_render_quick"
|
||||
picture: "images/tab_render.png"
|
||||
picture: "images/icon_render_quick.png"
|
||||
hovertext: qsTr("Start a quick render")
|
||||
}
|
||||
|
||||
ToolbarButton {
|
||||
id: tool_render_final
|
||||
objectName: "tool_render_final"
|
||||
picture: "images/tab_render.png"
|
||||
hovertext: qsTr("Start a final render")
|
||||
}
|
||||
|
||||
ToolbarButton {
|
||||
id: tool_render_show
|
||||
objectName: "tool_render_show"
|
||||
picture: "images/icon_render_show.png"
|
||||
hovertext: qsTr("Show last rendered image")
|
||||
}
|
||||
}
|
||||
|
||||
BaseSecondaryToolbar {
|
||||
|
|
Loading…
Reference in a new issue