From 005c24fa85ec28764c145babcb3681e9cd67703d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Mon, 14 Sep 2015 00:48:55 +0200 Subject: [PATCH] Tweaked window and render sizes to keep full hd ratio Also added medium render size --- src/definition/CameraDefinition.h | 12 ++++++------ .../modeler/quickapp/MainModelerWindow.cpp | 6 +++++- .../modeler/quickapp/RenderProcess.cpp | 12 +++++++++++- .../modeler/quickapp/RenderProcess.h | 5 +++++ src/interface/modeler/quickapp/qml/app.qrc | 2 ++ .../quickapp/qml/images/icon_render_final.png | Bin 0 -> 1108 bytes .../qml/images/icon_render_medium.png | Bin 0 -> 1091 bytes .../quickapp/qml/images/icon_render_quick.png | Bin 2284 -> 1040 bytes src/interface/modeler/quickapp/qml/main.qml | 16 ++++++++++++---- 9 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 src/interface/modeler/quickapp/qml/images/icon_render_final.png create mode 100644 src/interface/modeler/quickapp/qml/images/icon_render_medium.png diff --git a/src/definition/CameraDefinition.h b/src/definition/CameraDefinition.h index 2daddf6..9e2c1d3 100644 --- a/src/definition/CameraDefinition.h +++ b/src/definition/CameraDefinition.h @@ -30,15 +30,15 @@ public: virtual void copy(DefinitionNode* destination) const override; virtual void validate() override; - inline Vector3 getLocation() const {return location;} - inline Vector3 getTarget() const {return target;} - inline Vector3 getUpVector() const {return up;} + inline const Vector3 &getLocation() const {return location;} + inline const Vector3 &getTarget() const {return target;} + inline const Vector3 &getUpVector() const {return up;} inline double getRoll() const {return roll;} inline Vector3 getDirection() const {return Vector3(direction);} - inline Vector3 getDirectionNormalized() const {return forward;} + inline const Vector3 &getDirectionNormalized() const {return forward;} inline const Matrix4 &getTransformationMatrix() const {return projector;} - inline VectorSpherical getDirectionSpherical() const {return direction;} - inline CameraPerspective getPerspective() const {return perspective;} + inline const VectorSpherical &getDirectionSpherical() const {return direction;} + inline const CameraPerspective &getPerspective() const {return perspective;} inline double getWidth() const {return width;} inline double getHeight() const {return height;} diff --git a/src/interface/modeler/quickapp/MainModelerWindow.cpp b/src/interface/modeler/quickapp/MainModelerWindow.cpp index 49d4a2c..6f0b9aa 100644 --- a/src/interface/modeler/quickapp/MainModelerWindow.cpp +++ b/src/interface/modeler/quickapp/MainModelerWindow.cpp @@ -140,10 +140,14 @@ void MainModelerWindow::keyReleaseEvent(QKeyEvent *event) if (event->key() == Qt::Key_F5) { // Start render in a thread - if (event->modifiers() & Qt::ControlModifier) + if ((event->modifiers() & Qt::ControlModifier) and (event->modifiers() & Qt::ShiftModifier)) { render_process->startFinalRender(); } + else if (event->modifiers() & Qt::ControlModifier) + { + render_process->startMediumRender(); + } else { render_process->startQuickRender(); diff --git a/src/interface/modeler/quickapp/RenderProcess.cpp b/src/interface/modeler/quickapp/RenderProcess.cpp index cdc7020..ce2958b 100644 --- a/src/interface/modeler/quickapp/RenderProcess.cpp +++ b/src/interface/modeler/quickapp/RenderProcess.cpp @@ -39,6 +39,11 @@ RenderProcess::RenderProcess(MainModelerWindow *window, RenderPreviewProvider *d connect(button_quick, SIGNAL(clicked()), this, SLOT(startQuickRender())); } + QObject *button_medium = window->findQmlObject("tool_render_medium"); + if (button_medium) { + connect(button_medium, SIGNAL(clicked()), this, SLOT(startMediumRender())); + } + QObject *button_final = window->findQmlObject("tool_render_final"); if (button_final) { connect(button_final, SIGNAL(clicked()), this, SLOT(startFinalRender())); @@ -121,7 +126,12 @@ void RenderProcess::startRender(Scenery *scenery, const RenderConfig &config) void RenderProcess::startQuickRender() { - startRender(window->getScenery(), RenderConfig(400, 300, 1, 3)); + startRender(window->getScenery(), RenderConfig(480, 270, 1, 3)); +} + +void RenderProcess::startMediumRender() +{ + startRender(window->getScenery(), RenderConfig(800, 450, 1, 5)); } void RenderProcess::startFinalRender() diff --git a/src/interface/modeler/quickapp/RenderProcess.h b/src/interface/modeler/quickapp/RenderProcess.h index 32829a0..273f6ca 100644 --- a/src/interface/modeler/quickapp/RenderProcess.h +++ b/src/interface/modeler/quickapp/RenderProcess.h @@ -39,6 +39,11 @@ public slots: */ void startQuickRender(); + /** + * Start a medium render. + */ + void startMediumRender(); + /** * Start a final render. */ diff --git a/src/interface/modeler/quickapp/qml/app.qrc b/src/interface/modeler/quickapp/qml/app.qrc index 4f4a4b5..b4b14f1 100644 --- a/src/interface/modeler/quickapp/qml/app.qrc +++ b/src/interface/modeler/quickapp/qml/app.qrc @@ -49,5 +49,7 @@ images/preset_water_lake.jpg images/preset_water_sea.jpg images/icon_preset.png + images/icon_render_medium.png + images/icon_render_final.png diff --git a/src/interface/modeler/quickapp/qml/images/icon_render_final.png b/src/interface/modeler/quickapp/qml/images/icon_render_final.png new file mode 100644 index 0000000000000000000000000000000000000000..ec680969d5ba7e06c0553431183cd23d37e6e284 GIT binary patch literal 1108 zcmV-a1grarP)d( z9@hL)$Mbmx?ZEq=DX|gIryB5i-5wzO#7CbvP8@$z0OV(B81BqKP7lVg3prER`MQe> zUmBNeysn8zEo__#&C=Pu@jX zTJ(TAOf{t$BLw;`UW}3>x%aT$ZbykZ@l~IEKpKf9Ztfpx_Xj&3I+!U z!$}yf2kzc+kZCrl6_NAy$4w&Z?NhXU{SD@fBHXf<8&e*NH|26`I>6M73tupV-=m=T zJp?>%9?voH*8XP~je_6rN3Yk5J^NpiI?uMwN|0$b#U$&Gh1&pV`S1fI?3i>03fAel zesz@K-6>?Bn~>K>NO6!Z928{um*gCvzP=uS&a!w3lfA)0 zd1(m&B|tC~M59Y#+m?qDzTNS3^+L{BN>!ZDwr{Vdu6{QoSBJ4!9wa0L&F>vgSXWU| z!N9=4Vt&IBh$m19xR-dU3g@uh07ik$3w&n)F3(3Gb(J1P?_30yd9OzmoRY+U(!_mu ax&8&ETnbt~Dy1I)0000&O$@LOSjuqlT;OK#C6<5(@a);wD*Af55_<30v6HN&FdGpMrq02Py-bH1333u-<()RR6Wq{b<@$Afn3w=^-mSam$3^;)EfLrY^4V=z- z0$|q(=cN?bXzSs&=C00DCcvJo1i`U8T~JdFY^~E!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