1 /**************************************************************************/
2 /*  Copyright 2009 Tim Day                                                */
3 /*                                                                        */
4 /*  This file is part of Fracplanet                                       */
5 /*                                                                        */
6 /*  Fracplanet is free software: you can redistribute it and/or modify    */
7 /*  it under the terms of the GNU General Public License as published by  */
8 /*  the Free Software Foundation, either version 3 of the License, or     */
9 /*  (at your option) any later version.                                   */
10 /*                                                                        */
11 /*  Fracplanet is distributed in the hope that it will be useful,         */
12 /*  but WITHOUT ANY WARRANTY; without even the implied warranty of        */
13 /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         */
14 /*  GNU General Public License for more details.                          */
15 /*                                                                        */
16 /*  You should have received a copy of the GNU General Public License     */
17 /*  along with Fracplanet.  If not, see <http://www.gnu.org/licenses/>.   */
18 /**************************************************************************/
19 
20 /*! \file
21   \brief Interface for class ControlRender.
22 */
23 
24 #ifndef _control_render_h_
25 #define _control_render_h_
26 
27 #include "common.h"
28 #include "control.h"
29 #include "parameters_render.h"
30 #include "qtcommon.h"
31 
32 //! Encapsulates GUI elements for controlling OpenGL rendering.
33 class ControlRender : public Control
34 {
35  private:
36 
37   Q_OBJECT;
38 
39  public:
40 
41   ControlRender(ParametersRender* param);
42 
43   ~ControlRender();
44 
45  public slots:
46 
47   void setWireframe(int v);
48   void setDisplayList(int v);
49   void setJoystickMouse(int v);
50   void setAmbient(int v);
51   void setIlluminationAzimuth(int v);
52   void setIlluminationElevation(int v);
53 
54   void pickBackgroundColourLow();
55   void pickBackgroundColourHigh();
56 
57  private:
58 
59   //! The parameter set being controlled.
60   ParametersRender*const parameters;
61 
62   QCheckBox* wireframe;
63   QCheckBox* display_list;
64   QCheckBox* joystick_mouse;
65   QSlider* ambient;
66   QSlider* illumination_azimuth;
67   QSlider* illumination_elevation;
68 
69   QPushButton* background_colour_low_button;
70   QPushButton* background_colour_high_button;
71 };
72 
73 #endif
74