#include <declarativewidget.h>

Signals | |
| void | finished () |
Public Member Functions | |
| DeclarativeWidget (QGraphicsWidget *parent=0) | |
| ~DeclarativeWidget () | |
| QDeclarativeEngine * | engine () |
| bool | isInitializationDelayed () const |
| QDeclarativeComponent * | mainComponent () const |
| QString | qmlPath () const |
| QObject * | rootObject () const |
| QScriptEngine * | scriptEngine () const |
| void | setInitializationDelayed (const bool delay) |
| void | setQmlPath (const QString &path) |
Protected Member Functions | |
| void | resizeEvent (QGraphicsSceneResizeEvent *event) |
Properties | |
| bool | initializationDelayed |
| QString | qmlPath |
| QObject | rootObject |
Detailed Description
A widget that contains an entire QML context, with its own declarative engine.
Plasma::DeclarativeWidget provides a class for conveniently use QML based declarative user interfaces inside Plasma widgets. To one DeclarativeWidget corresponds one QML file (that can eventually include others) tere will be its own QDeclarativeEngine with a single root object, described in the QML file.
Definition at line 34 of file declarativewidget.h.
Constructor & Destructor Documentation
| Plasma::DeclarativeWidget::DeclarativeWidget | ( | QGraphicsWidget * | parent = 0 | ) | [explicit] |
Constructs a new DeclarativeWidget.
- Parameters:
-
parent the parent of this widget
Definition at line 189 of file declarativewidget.cpp.
| Plasma::DeclarativeWidget::~DeclarativeWidget | ( | ) |
Definition at line 204 of file declarativewidget.cpp.
Member Function Documentation
| QDeclarativeEngine * Plasma::DeclarativeWidget::engine | ( | ) |
- Returns:
- the declarative engine that runs the qml file assigned to this widget.
Definition at line 233 of file declarativewidget.cpp.
| void Plasma::DeclarativeWidget::finished | ( | ) | [signal] |
Emitted when the parsing and execution of the QML file is terminated.
| bool Plasma::DeclarativeWidget::isInitializationDelayed | ( | ) | const |
- Returns:
- true if the initilization of the QML file will be delayed at the end of the event loop
Definition at line 228 of file declarativewidget.cpp.
| QDeclarativeComponent * Plasma::DeclarativeWidget::mainComponent | ( | ) | const |
- Returns:
- the main QDeclarativeComponent of the engine
Definition at line 248 of file declarativewidget.cpp.
| QString Plasma::DeclarativeWidget::qmlPath | ( | ) | const |
- Returns:
- the absolute path of the current QML file
| void Plasma::DeclarativeWidget::resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | [protected] |
Definition at line 253 of file declarativewidget.cpp.
| QObject* Plasma::DeclarativeWidget::rootObject | ( | ) | const |
- Returns:
- the root object of the declarative object tree
| QScriptEngine * Plasma::DeclarativeWidget::scriptEngine | ( | ) | const |
- Returns:
- the script engine used by the declarative engine
- Since:
- 4.7
Definition at line 238 of file declarativewidget.cpp.
| void Plasma::DeclarativeWidget::setInitializationDelayed | ( | const bool | delay | ) |
Sets whether the execution of the QML file has to be delayed later in the event loop.
It has to be called before setQmlPath(). In this case will be possible to assign new objects in the main engine context before the main component gets initialized. So it will be possible to access it immediately from the QML code.
- Parameters:
-
delay if true the initilization of the QML file will be delayed at the end of the event loop
Definition at line 223 of file declarativewidget.cpp.
| void Plasma::DeclarativeWidget::setQmlPath | ( | const QString & | path | ) |
Sets the path of the QML file to parse and execute.
- Parameters:
-
path the absolute path of a QML file
Definition at line 212 of file declarativewidget.cpp.
Property Documentation
bool Plasma::DeclarativeWidget::initializationDelayed [read, write] |
Definition at line 54 of file declarativewidget.h.
QString Plasma::DeclarativeWidget::qmlPath [read, write] |
Definition at line 53 of file declarativewidget.h.
QObject * Plasma::DeclarativeWidget::rootObject [read] |
Definition at line 55 of file declarativewidget.h.
The documentation for this class was generated from the following files:
KDE 4.7 API Reference