summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-25 10:13:32 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-25 10:13:32 (GMT)
commit03686225036ebfc5cf78e3fcc66f5810a140c7d2 (patch)
treee35bcaf151edb27b5e48fc989c6727039c397f5b /doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
parent194013d9db1b3e4ba6f56a864f3b64f523202948 (diff)
parent72599ca45c416f2f0a9654412c14a148ca3d728c (diff)
downloadQt-03686225036ebfc5cf78e3fcc66f5810a140c7d2.zip
Qt-03686225036ebfc5cf78e3fcc66f5810a140c7d2.tar.gz
Qt-03686225036ebfc5cf78e3fcc66f5810a140c7d2.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (47 commits) Optimize QML "parent" property access Begin dragging PathView up to the level (quality and functionality) of other views. Rename qdeclarativetime -> qmltime Auto-test fix. Build Fix and port to new width and height properties Port Flickable and Flipable to support QGraphicsObject. Protect the QDeclarativeListProperty used in QGraphicsItem with ifdef Fix the build due to new properties in QGraphicsObject. Remove the children property from QDeclarativeItem. Rename qdeclarativetime -> qmltime Update AnchorChanges to use more natural form for setting anchors. Pen is not a creatable type. Begin dragging PathView up to the level (quality and functionality) of other views. Fix error reporting when symbian file copy fails. Stabilize QGraphicsEffect test on X11 QIODevice::read() and QFile::atEnd() performance improvements Clarified pkg_prerules usage documentation. Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( aa40cdb9595eb15a68e7be03322f973aa613a8f9 ) Made it possible to define more than one language using pkg_prerules Symbian QAudioOutput::suspend() was resetting processedUSecs() to zero ...
Diffstat (limited to 'doc/src/snippets/code/src_opengl_qglshaderprogram.cpp')
0 files changed, 0 insertions, 0 deletions
undation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain ** additional rights. These rights are described in the Nokia Qt LGPL ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this ** package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef ENVIRONMENT_H #define ENVIRONMENT_H #include <qobject.h> #include <qlist.h> #include <qhash.h> #include <QTimerEvent> #include <QMouseEvent> #include <QKeyEvent> #include <QScriptEngine> #include <QScriptable> class QContext2DCanvas; //! [0] class Environment : public QObject { Q_OBJECT Q_PROPERTY(QScriptValue document READ document) public: Environment(QObject *parent = 0); ~Environment(); QScriptValue document() const; void addCanvas(QContext2DCanvas *canvas); QContext2DCanvas *canvasByName(const QString &name) const; QList<QContext2DCanvas*> canvases() const; QScriptValue evaluate(const QString &code, const QString &fileName = QString()); QScriptValue toWrapper(QObject *object); void handleEvent(QContext2DCanvas *canvas, QMouseEvent *e); void handleEvent(QContext2DCanvas *canvas, QKeyEvent *e); void reset(); //! [0] QScriptEngine *engine() const; //! [1] public slots: int setInterval(const QScriptValue &expression, int delay); void clearInterval(int timerId); int setTimeout(const QScriptValue &expression, int delay); void clearTimeout(int timerId); //! [1] //! [2] signals: void scriptError(const QScriptValue &error); //! [2] protected: void timerEvent(QTimerEvent *event); private: QScriptValue eventHandler(QContext2DCanvas *canvas, const QString &type, QScriptValue *who); QScriptValue newFakeDomEvent(const QString &type, const QScriptValue &target); void maybeEmitScriptError(); QScriptEngine *m_engine; QScriptValue m_originalGlobalObject; QScriptValue m_document; QList<QContext2DCanvas*> m_canvases; QHash<int, QScriptValue> m_intervalHash; QHash<int, QScriptValue> m_timeoutHash; }; //! [3] class Document : public QObject { Q_OBJECT public: Document(Environment *env); ~Document(); public slots: QScriptValue getElementById(const QString &id) const; QScriptValue getElementsByTagName(const QString &name) const; // EventTarget void addEventListener(const QString &type, const QScriptValue &listener, bool useCapture); }; //! [3] class CanvasGradientPrototype : public QObject, public QScriptable { Q_OBJECT protected: CanvasGradientPrototype(QObject *parent = 0); public: static void setup(QScriptEngine *engine); public slots: void addColorStop(qreal offset, const QString &color); }; #endif