• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • DeclarativeWidget
Signals | Public Member Functions | Protected Member Functions | Properties

Plasma::DeclarativeWidget Class Reference

A widget that contains an entire QML context, with its own declarative engine. More...

#include <declarativewidget.h>

Inheritance diagram for Plasma::DeclarativeWidget:
Inheritance graph
[legend]

List of all members.

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
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.

Author:
Marco Martin <mart@kde.org>

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 48 of file declarativewidget.h.


Constructor & Destructor Documentation

Plasma::DeclarativeWidget::DeclarativeWidget ( QGraphicsWidget *  parent = 0) [explicit]

Constructs a new DeclarativeWidget.

Parameters:
parentthe parent of this widget

Definition at line 164 of file declarativewidget.cpp.

Plasma::DeclarativeWidget::~DeclarativeWidget ( )

Definition at line 179 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 205 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 200 of file declarativewidget.cpp.

QDeclarativeComponent * Plasma::DeclarativeWidget::mainComponent ( ) const
Returns:
the main QDeclarativeComponent of the engine

Definition at line 215 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 220 of file declarativewidget.cpp.

QObject* Plasma::DeclarativeWidget::rootObject ( ) const
Returns:
the root object of the declarative object tree
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:
delayif true the initilization of the QML file will be delayed at the end of the event loop

Definition at line 195 of file declarativewidget.cpp.

void Plasma::DeclarativeWidget::setQmlPath ( const QString &  path)

Sets the path of the QML file to parse and execute.

Parameters:
paththe absolute path of a QML file

Definition at line 184 of file declarativewidget.cpp.


Property Documentation

bool Plasma::DeclarativeWidget::initializationDelayed [read, write]

Definition at line 53 of file declarativewidget.h.

QString Plasma::DeclarativeWidget::qmlPath [read, write]

Definition at line 52 of file declarativewidget.h.

QObject * Plasma::DeclarativeWidget::rootObject [read]

Definition at line 54 of file declarativewidget.h.


The documentation for this class was generated from the following files:
  • declarativewidget.h
  • declarativewidget.cpp

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal