From 1884106cfa23f1d50a2ebb4f74ff82f9cab1afd9 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 5 Jan 2009 08:27:53 +0000 Subject: [PATCH] no point in having a class in the main lib for just one consumer (esp now that we require BC) svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=905827 --- scriptengines/javascript/uiloader.h | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 scriptengines/javascript/uiloader.h diff --git a/scriptengines/javascript/uiloader.h b/scriptengines/javascript/uiloader.h new file mode 100644 index 000000000..b211f15d1 --- /dev/null +++ b/scriptengines/javascript/uiloader.h @@ -0,0 +1,63 @@ +/* + * Copyright 2007 Richard J. Moore + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef PLASMA_UILOADER_H +#define PLASMA_UILOADER_H + +#include + +#include +#include + +class QGraphicsWidget; +class QGraphicsProxyWidget; + +namespace Plasma +{ + +class UiLoaderPrivate; + +/** + * @class UiLoader plasma/uiloader.h + * + * Dynamically create plasma Widgets and Layouts. + * + * @author Richard J. Moore, + */ +class PLASMA_EXPORT UiLoader : public QObject +{ + Q_OBJECT + +public: + UiLoader(QObject *parent = 0); + virtual ~UiLoader(); + + QStringList availableWidgets() const; + QGraphicsWidget *createWidget(const QString &className, QGraphicsWidget *parent = 0); + + QStringList availableLayouts() const; + QGraphicsLayout *createLayout(const QString &className, QGraphicsLayoutItem *parent); + +private: + UiLoaderPrivate *const d; +}; + +} + +#endif // PLASMA_UILOADER_H