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

Plasma

  • Plasma
  • DeclarativeWidget
Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
Plasma::DeclarativeWidget Class Reference

#include <declarativewidget.h>

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

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.

Author
Marco Martin mart@.nosp@m.kde..nosp@m.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 49 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 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.

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 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
void Plasma::DeclarativeWidget::resizeEvent ( QGraphicsSceneResizeEvent *  event)
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
delayif 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
paththe absolute path of a QML file

Definition at line 275 of file declarativewidget.cpp.

Property Documentation

bool Plasma::DeclarativeWidget::initializationDelayed
readwrite

Definition at line 54 of file declarativewidget.h.

QString Plasma::DeclarativeWidget::qmlPath
readwrite

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:
  • declarativewidget.h
  • declarativewidget.cpp
This file is part of the KDE documentation.
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.

Plasma

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal