Widget for rendering an OpenGL scene.
More...
#include <OpenGLWidget.h>
|
| void | initializeGL () override |
| | Overridden from base class to set up OpenGL context.
|
| |
| void | resizeGL (int width, int height) override |
| | Overridden from base class to handle resizing.
|
| |
| void | paintGL () override |
| | Overridden from base class to render the scene.
|
| |
| void | resizeEvent (QResizeEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| void | keyPressEvent (QKeyEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| void | mousePressEvent (QMouseEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| void | mouseMoveEvent (QMouseEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| void | wheelEvent (QWheelEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| void | focusInEvent (QFocusEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| void | focusOutEvent (QFocusEvent *event) override |
| | Overridden from base class to render the scene.
|
| |
| | ObjectExtension (QObject *object) |
| | Protected constructor only. Inlined so no external libs are need for designer.
|
| |
| virtual | ~ObjectExtension ()=default |
| | Virtual destructor.
|
| |
|
| static bool | inDesigner () |
| | Gets the designer status.
|
| |
| static QObject * | getExtensionParent (QObject *obj, bool first=true) |
| | Return if the passed object has this type as parent. It starts by testing the passed object itself.
|
| |
Widget for rendering an OpenGL scene.
◆ OpenGLWidget()
| sf::OpenGLWidget::OpenGLWidget |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Qt Widget constructor passing parent widget.
◆ ~OpenGLWidget()
| sf::OpenGLWidget::~OpenGLWidget |
( |
| ) |
|
|
override |
Virtual overridden destructor.
◆ addPropertyPages()
◆ focusInEvent()
| void sf::OpenGLWidget::focusInEvent |
( |
QFocusEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ focusOutEvent()
| void sf::OpenGLWidget::focusOutEvent |
( |
QFocusEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ getClearColor()
| const QColor & sf::OpenGLWidget::getClearColor |
( |
| ) |
const |
Gets the reference to the clear color wanted for the scene. This is initially set to 'QPalette::ColorRole::Window' color value.
- Returns
- QColor reference value.
◆ getMatrix() [1/2]
| QMatrix4x4 & sf::OpenGLWidget::getMatrix |
( |
OrbitMode |
mode | ) |
|
Gets the constant matrix reference of the passed orbit mode.
- Parameters
-
- Returns
- Orbit matrix.
◆ getMatrix() [2/2]
| const QMatrix4x4 & sf::OpenGLWidget::getMatrix |
( |
OrbitMode |
mode | ) |
const |
Gets the constant matrix reference of the passed orbit mode.
- Parameters
-
- Returns
- Orbit matrix.
◆ getProjectionMatrix()
| const QMatrix4x4 & sf::OpenGLWidget::getProjectionMatrix |
( |
| ) |
const |
Gets the default projection matrix set when method resizeGL() is called.
- Returns
- Const referenced matrix.
◆ getRenderer()
Gets render instances attached to this widget.
◆ getSceneOptions()
| SceneOptions sf::OpenGLWidget::getSceneOptions |
( |
| ) |
const |
Property read handler for scene options.
◆ initializeGL()
| void sf::OpenGLWidget::initializeGL |
( |
| ) |
|
|
overrideprotected |
Overridden from base class to set up OpenGL context.
◆ isRequiredProperty()
| bool sf::OpenGLWidget::isRequiredProperty |
( |
const QString & |
name | ) |
|
|
overridevirtual |
◆ keyPressEvent()
| void sf::OpenGLWidget::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ minimumSizeHint()
| QSize sf::OpenGLWidget::minimumSizeHint |
( |
| ) |
const |
|
override |
Prevent the widget from getting too small.
◆ mouseMoveEvent()
| void sf::OpenGLWidget::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ mousePressEvent()
| void sf::OpenGLWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ mouseReleaseEvent()
| void sf::OpenGLWidget::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ paintGL()
| void sf::OpenGLWidget::paintGL |
( |
| ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ rendererChanged()
| Q_SIGNAL void sf::OpenGLWidget::rendererChanged |
( |
| ) |
|
Signal called when the renderer instance changes. Allows for adding objects to be rendered.
◆ resizeEvent()
| void sf::OpenGLWidget::resizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ resizeGL()
| void sf::OpenGLWidget::resizeGL |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
overrideprotected |
Overridden from base class to handle resizing.
◆ setClearColor()
| void sf::OpenGLWidget::setClearColor |
( |
const QColor & |
color | ) |
|
Sets the clear color for the scene.
- Parameters
-
◆ setRenderer()
Adds a renderer to the list.
◆ setSceneOptions()
| void sf::OpenGLWidget::setSceneOptions |
( |
SceneOptions |
flags | ) |
|
Property write handler for scene options.
◆ storeSettings()
| void sf::OpenGLWidget::storeSettings |
( |
QSettings & |
settings, |
|
|
bool |
read |
|
) |
| |
Stores or restores the matrices from or to the give settings.
- Parameters
-
| settings | |
| read | Flag to read when true and write when false. |
◆ wheelEvent()
| void sf::OpenGLWidget::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
overrideprotected |
Overridden from base class to render the scene.
◆ camera
| QString sf::OpenGLWidget::camera |
|
readwrite |
◆ clearColor
| QColor sf::OpenGLWidget::clearColor |
|
readwrite |
◆ lightDirection
| QString sf::OpenGLWidget::lightDirection |
|
readwrite |
◆ lightPositon
| QString sf::OpenGLWidget::lightPositon |
|
readwrite |
◆ model
| QString sf::OpenGLWidget::model |
|
readwrite |
◆ sceneOptions
| sf::SceneOptions sf::OpenGLWidget::sceneOptions |
|
readwrite |
◆ sceneServer
| QStringList sf::OpenGLWidget::sceneServer |
|
readwrite |
The documentation for this class was generated from the following file: