[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/libs/kgllib/extras/kgllib
From: Rivo Laks <rivolaks () hot ! ee>
Date: 2008-03-03 16:33:52
Message-ID: 1204562032.139456.3175.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 781724 by rivol:
Add some apidox
M +32 -0 glwidget.h
--- trunk/playground/libs/kgllib/extras/kgllib/glwidget.h #781723:781724
@@ -40,6 +40,10 @@
* GLWidget is a QGLWidget subclass which is integrated with the rest of the
* KGLLib and implements some of the common functionality used by many GL
* applications.
+ *
+ * If you are already using QGLWidget then switching to GLWidget is very easy.
+ * All you need to do is changing class name to GLWidget and doing your OpenGL
+ * rendering in @ref render() method instead of @ref paintGL().
**/
class KGLLIB_EXTRAS_EXPORT GLWidget : public QGLWidget
{
@@ -128,10 +132,38 @@
Eigen::Vector4f clearColor() const { return mClearColor; }
bool automaticClear() const { return mAutomaticClear; }
+ /**
+ * Sets error text for this widget.
+ *
+ * If the error text is set, then it is displayed centered in the widget
+ * and @ref render() method isn't called.
+ *
+ * It is handy to use when something goes wrong in your application's
+ * initialization phase (e.g. data files cannot be found) and you want to
+ * abort but let the user know what happened.
+ **/
void setErrorText(const QString& text);
+ /**
+ * @return current error text
+ * @see setErrorText()
+ **/
QString errorText() const { return mErrorText; }
+ /**
+ * @return whether KGLLib keyboard shortcuts are enabled.
+ * @see setShortcutsEnabled()
+ **/
bool shortcutsEnabled() const { return mShortcutsEnabled; }
+ /**
+ * GLWidget provides some keyboard shortcuts to ease application
+ * development. For example Meta+F toggles FPS (frames per second) display
+ * and Meta+W toggles wireframe rendering.
+ *
+ * If you don't want those shortcuts to be available, you can disable them
+ * using this method.
+ *
+ * Shortcuts are enabled by default.
+ **/
virtual void setShortcutsEnabled( bool enabled);
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic