Plasma
#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 49 of file declarativewidget.h.
Constructor & Destructor Documentation
|
explicit |
Constructs a new DeclarativeWidget.
- Parameters
-
parent the parent of this widget
Definition at line 255 of file declarativewidget.cpp.
Plasma::DeclarativeWidget::~DeclarativeWidget | ( | ) |
Definition at line 267 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 296 of file declarativewidget.cpp.
|
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 291 of file declarativewidget.cpp.
QDeclarativeComponent * Plasma::DeclarativeWidget::mainComponent | ( | ) | const |
- Returns
- the main QDeclarativeComponent of the engine
Definition at line 311 of file declarativewidget.cpp.
QString Plasma::DeclarativeWidget::qmlPath | ( | ) | const |
- Returns
- the absolute path of the current QML file
|
protected |
Definition at line 316 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 301 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 286 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 275 of file declarativewidget.cpp.
Property Documentation
|
readwrite |
Definition at line 54 of file declarativewidget.h.
|
readwrite |
Definition at line 53 of file declarativewidget.h.
|
read |
Definition at line 55 of file declarativewidget.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.