add more spacing
[personal-kdebase.git] / workspace / plasma / scriptengines / javascript / uiloader.h
blob396890a2540ccb5e298191e9077c9e018bb2b514
1 /*
2 * Copyright 2007 Richard J. Moore <rich@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef PLASMA_UILOADER_H
21 #define PLASMA_UILOADER_H
23 #include <KSharedPtr>
25 #include <plasma/applet.h>
27 class QGraphicsWidget;
29 class UiLoader : public QSharedData
31 public:
32 UiLoader();
33 virtual ~UiLoader();
35 QStringList availableWidgets() const;
36 QGraphicsWidget *createWidget(const QString &className, QGraphicsWidget *parent = 0);
38 private:
39 typedef QGraphicsWidget *(*widgetCreator)(QGraphicsWidget*);
40 QHash<QString, widgetCreator> m_widgetCtors;
44 #endif // PLASMA_UILOADER_H