From edc60113d9b100b93c320ea33e74137e5062f441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Fri, 21 Aug 2015 00:41:14 +0200 Subject: [PATCH] Added render buttons --- .../modeler/quickapp/RenderProcess.cpp | 17 +++++++++++++++++ .../modeler/quickapp/qml/ToolbarButton.qml | 7 +++++++ src/interface/modeler/quickapp/qml/app.qrc | 2 ++ .../quickapp/qml/images/icon_render_quick.png | Bin 0 -> 2284 bytes .../quickapp/qml/images/icon_render_show.png | Bin 0 -> 1247 bytes src/interface/modeler/quickapp/qml/main.qml | 16 +++++++++++++++- 6 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/interface/modeler/quickapp/qml/images/icon_render_quick.png create mode 100644 src/interface/modeler/quickapp/qml/images/icon_render_show.png diff --git a/src/interface/modeler/quickapp/RenderProcess.cpp b/src/interface/modeler/quickapp/RenderProcess.cpp index 2dcc0d1..d9555f4 100644 --- a/src/interface/modeler/quickapp/RenderProcess.cpp +++ b/src/interface/modeler/quickapp/RenderProcess.cpp @@ -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; diff --git a/src/interface/modeler/quickapp/qml/ToolbarButton.qml b/src/interface/modeler/quickapp/qml/ToolbarButton.qml index 5694866..9d92bb3 100644 --- a/src/interface/modeler/quickapp/qml/ToolbarButton.qml +++ b/src/interface/modeler/quickapp/qml/ToolbarButton.qml @@ -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 diff --git a/src/interface/modeler/quickapp/qml/app.qrc b/src/interface/modeler/quickapp/qml/app.qrc index 313a7f2..24dc562 100644 --- a/src/interface/modeler/quickapp/qml/app.qrc +++ b/src/interface/modeler/quickapp/qml/app.qrc @@ -38,5 +38,7 @@ images/arrow_up.png ClickableImage.qml images/toggle_water.png + images/icon_render_quick.png + images/icon_render_show.png diff --git a/src/interface/modeler/quickapp/qml/images/icon_render_quick.png b/src/interface/modeler/quickapp/qml/images/icon_render_quick.png new file mode 100644 index 0000000000000000000000000000000000000000..c97c0621f978ff79d2ee2cd5e2f110f063780018 GIT binary patch literal 2284 zcmV+|I_I9pO#iqFB~@wCCdQDppc; z$6%HZ=3GB-?lrT%eaHEezOwco>(^!guDo&<9Ubrd+kWB{0wXiNbzN0Doszx1$J8x9 zXq#GHRW&J}&sR8(+qrXR`)`BcXh}%BOJj5$=;;06z@eLO zpWn6$;KsK3Jic`CCkPM*CzWuFr^X9cp0}4xi{TL#fvxr85{PI_i zF1YxTDT|Ku4HGXb5&2vmrywyc$eK{F6;k<7$|VrcC@U|=uZK|5LkPuSs-Iv$5RL>H z8X82?{S*okzb-iMta?h~VFICu%4GB6&(AD>>_X)acPo z+ECvB{y+r7AK_3>4^o8j8xe%k$mVloO$S$cgoFZ3APgO)1xV){lF1~FXA=xd9LFVX z+k9}el6cx95HN*i1UbFAwROV8iIMglJ97G-^}k0cM_>BXD=kPv>rI*@lPNqmN#2G` z&cSlij2bnHzWyWFg&{_dtf65 z84VRA!jd3aDiaBEmP2iIIRmLQ*1^?GwH`oNAkXk122_1WSPC3p6YZ?PQ-WBcjN<~r zZb4gp>n%`DOjF~NPN zNOepV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c5bh%su zE|=@3Ga+SVPtwxTOy#prQ&Lif$&`j92!jKEG454RL<e6&pT5|~~0fM0*33?r??=x=! z_5fFaB;bXIA6e6MgW$LPF;N+azKV<2P*%Q)lc%~!PrsXx2ygCsr2_ac99)21t5&T# z*xA{6vzQSKL<1-UCT<6LYinz9Nl8hqh)ilU8huw+S8ZWo;bFhue=99b27bKJSbp2> zX1CjAWMo8!hK8iFvhts{YwTl}h@^?gXCkusKl`&45lyUn{0*6Jde;GidEx*7002ov JPDHLkV1hg)PTK$g literal 0 HcmV?d00001 diff --git a/src/interface/modeler/quickapp/qml/main.qml b/src/interface/modeler/quickapp/qml/main.qml index 337a7b1..7861fc9 100644 --- a/src/interface/modeler/quickapp/qml/main.qml +++ b/src/interface/modeler/quickapp/qml/main.qml @@ -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 {