mirror of
https://github.com/overte-org/overte.git
synced 2025-08-16 10:52:18 +02:00
OverlayWindow and OverlayWebWindow API JSDoc stubs
This commit is contained in:
parent
7cef329939
commit
9fdce4df65
2 changed files with 175 additions and 0 deletions
|
@ -11,6 +11,17 @@
|
|||
|
||||
#include "QmlWindowClass.h"
|
||||
|
||||
/**jsdoc
|
||||
* @class OverlayWebWindow
|
||||
* @augments OverlayWindow
|
||||
* @param {object} [properties=null]
|
||||
*
|
||||
* @hifi-interface
|
||||
* @hifi-client-en
|
||||
*
|
||||
* @property {string} url - <em>Read-only.</em>
|
||||
*/
|
||||
|
||||
// FIXME refactor this class to be a QQuickItem derived type and eliminate the needless wrapping
|
||||
class QmlWebWindowClass : public QmlWindowClass {
|
||||
Q_OBJECT
|
||||
|
@ -20,11 +31,29 @@ public:
|
|||
static QScriptValue constructor(QScriptContext* context, QScriptEngine* engine);
|
||||
|
||||
public slots:
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWebWindow.getURL
|
||||
* @returns {string}
|
||||
*/
|
||||
QString getURL();
|
||||
/**jsdoc
|
||||
* @function OverlayWebWindow.setURL
|
||||
* @param {string} url
|
||||
*/
|
||||
void setURL(const QString& url);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWebWindow.getURL
|
||||
* @param {string} script
|
||||
*/
|
||||
void setScriptURL(const QString& script);
|
||||
|
||||
signals:
|
||||
/**jsdoc
|
||||
* @function OverlayWebWindow.getURL
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void urlChanged();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -19,6 +19,18 @@
|
|||
class QScriptEngine;
|
||||
class QScriptContext;
|
||||
|
||||
/**jsdoc
|
||||
* @class OverlayWindow
|
||||
* @param {object} [properties=null]
|
||||
*
|
||||
* @hifi-interface
|
||||
* @hifi-client-en
|
||||
*
|
||||
* @property {Vec2} position
|
||||
* @property {Vec2} size
|
||||
* @property {boolean} visible
|
||||
*/
|
||||
|
||||
// FIXME refactor this class to be a QQuickItem derived type and eliminate the needless wrapping
|
||||
class QmlWindowClass : public QObject {
|
||||
Q_OBJECT
|
||||
|
@ -31,46 +43,180 @@ public:
|
|||
QmlWindowClass();
|
||||
~QmlWindowClass();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.initQml
|
||||
* @param {object} properties
|
||||
*/
|
||||
Q_INVOKABLE virtual void initQml(QVariantMap properties);
|
||||
|
||||
QQuickItem* asQuickItem() const;
|
||||
|
||||
public slots:
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.isVisible
|
||||
* @returns {boolean}
|
||||
*/
|
||||
bool isVisible();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.setVisible
|
||||
* @param {boolean} visible
|
||||
*/
|
||||
void setVisible(bool visible);
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.getPosition
|
||||
* @returns {Vec2}
|
||||
*/
|
||||
glm::vec2 getPosition();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.setPosition
|
||||
* @param {Vec2} position
|
||||
*/
|
||||
void setPosition(const glm::vec2& position);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.setPosition
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
*/
|
||||
void setPosition(int x, int y);
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.getSize
|
||||
* @returns {Vec2}
|
||||
*/
|
||||
glm::vec2 getSize();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.setSize
|
||||
* @param {Vec2} size
|
||||
*/
|
||||
void setSize(const glm::vec2& size);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.setSize
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
*/
|
||||
void setSize(int width, int height);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.setTitle
|
||||
* @param {string} title
|
||||
*/
|
||||
void setTitle(const QString& title);
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.raise
|
||||
*/
|
||||
Q_INVOKABLE void raise();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.close
|
||||
*/
|
||||
Q_INVOKABLE void close();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.getEventBridge
|
||||
* @returns {object}
|
||||
*/
|
||||
Q_INVOKABLE QObject* getEventBridge() { return this; };
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.sendToQml
|
||||
* @param {object} message
|
||||
*/
|
||||
// Scripts can use this to send a message to the QML object
|
||||
void sendToQml(const QVariant& message);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.clearDebugWindow
|
||||
*/
|
||||
void clearDebugWindow();
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.emitScriptEvent
|
||||
* @param {object} message
|
||||
*/
|
||||
// QmlWindow content may include WebView requiring EventBridge.
|
||||
void emitScriptEvent(const QVariant& scriptMessage);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.emitWebEvent
|
||||
* @param {object} message
|
||||
*/
|
||||
void emitWebEvent(const QVariant& webMessage);
|
||||
|
||||
signals:
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.visibleChanged
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void visibleChanged();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.positionChanged
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void positionChanged();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.sizeChanged
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void sizeChanged();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.moved
|
||||
* @param {Vec2} position
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void moved(glm::vec2 position);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.resized
|
||||
* @param {Size} size
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void resized(QSizeF size);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.closed
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void closed();
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.fromQml
|
||||
* @param {object} message
|
||||
* @returns {Signal}
|
||||
*/
|
||||
// Scripts can connect to this signal to receive messages from the QML object
|
||||
void fromQml(const QVariant& message);
|
||||
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.scriptEventReceived
|
||||
* @param {object} message
|
||||
* @returns {Signal}
|
||||
*/
|
||||
// QmlWindow content may include WebView requiring EventBridge.
|
||||
void scriptEventReceived(const QVariant& message);
|
||||
|
||||
/**jsdoc
|
||||
* @function OverlayWindow.webEventReceived
|
||||
* @param {object} message
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void webEventReceived(const QVariant& message);
|
||||
|
||||
protected slots:
|
||||
|
|
Loading…
Reference in a new issue