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

Plasma

declarativewidget.h
Go to the documentation of this file.
00001 /*
00002  *   Copyright 2010 Marco Martin <mart@kde.org>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #ifndef PLASMA_DECLARATIVEWIDGET_H
00021 #define PLASMA_DECLARATIVEWIDGET_H
00022 
00023 #include <QtGui/QGraphicsWidget>
00024 
00025 #include <plasma/plasma_export.h>
00026 
00027 class QDeclarativeEngine;
00028 class QDeclarativeComponent;
00029 class QScriptEngine;
00030 
00031 namespace Plasma
00032 {
00033 
00034 class DeclarativeWidgetPrivate;
00035 
00049 class PLASMA_EXPORT DeclarativeWidget : public QGraphicsWidget
00050 {
00051     Q_OBJECT
00052 
00053     Q_PROPERTY(QString qmlPath READ qmlPath WRITE setQmlPath)
00054     Q_PROPERTY(bool initializationDelayed READ isInitializationDelayed WRITE setInitializationDelayed)
00055     Q_PROPERTY(QObject * rootObject READ rootObject)
00056 
00057 public:
00058 
00064     explicit DeclarativeWidget(QGraphicsWidget *parent = 0);
00065     ~DeclarativeWidget();
00066 
00072     void setQmlPath(const QString &path);
00073 
00077     QString qmlPath() const;
00078 
00088     void setInitializationDelayed(const bool delay);
00089 
00094     bool isInitializationDelayed() const;
00095 
00099     QDeclarativeEngine* engine();
00100 
00105     QScriptEngine *scriptEngine() const;
00106 
00110     QObject *rootObject() const;
00111 
00115     QDeclarativeComponent *mainComponent() const;
00116 
00117 protected:
00118     void resizeEvent(QGraphicsSceneResizeEvent *event);
00119 
00120 Q_SIGNALS:
00124     void finished();
00125 
00126 private:
00127     friend class DeclarativeWidgetPrivate;
00128     DeclarativeWidgetPrivate * const d;
00129 
00130     Q_PRIVATE_SLOT(d, void finishExecute())
00131     Q_PRIVATE_SLOT(d, void scheduleExecutionEnd())
00132     Q_PRIVATE_SLOT(d, void minimumWidthChanged())
00133     Q_PRIVATE_SLOT(d, void minimumHeightChanged())
00134 };
00135 
00136 } // namespace Plasma
00137 
00138 #endif // multiple inclusion guard

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

Skip menu "kdelibs"
  • 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.5
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