diff --git a/uiloader.cpp b/uiloader.cpp index 9a5b7aca9..85a85fef8 100644 --- a/uiloader.cpp +++ b/uiloader.cpp @@ -21,18 +21,6 @@ #include -#include "plasma/widgets/checkbox.h" -#include "plasma/widgets/flash.h" -#include "plasma/widgets/icon.h" -#include "plasma/widgets/label.h" -#include "plasma/widgets/pushbutton.h" -#include "plasma/widgets/radiobutton.h" -#include "plasma/widgets/meter.h" - -#include "plasma/layouts/hboxlayout.h" -#include "plasma/layouts/vboxlayout.h" -#include "plasma/layouts/flowlayout.h" - namespace Plasma { @@ -71,8 +59,9 @@ QStringList UiLoader::availableWidgets() const return d->widgets; } -Widget *UiLoader::createWidget( const QString &className, Widget *parent ) +Applet *UiLoader::createWidget( const QString &className, Applet *parent ) { + #ifdef RICHARD_WORK if (className == QString("CheckBox")) { return new CheckBox( parent ); } @@ -94,7 +83,7 @@ Widget *UiLoader::createWidget( const QString &className, Widget *parent ) else if (className == QString("Meter")) { return new Meter( parent ); } - + #endif return 0; } @@ -105,6 +94,7 @@ QStringList UiLoader::availableLayouts() const Layout *UiLoader::createLayout( const QString &className, LayoutItem *parent ) { + #ifdef RICHARD_WORK if (className == QString("HBoxLayout")) { return new HBoxLayout( parent ); } @@ -114,7 +104,7 @@ Layout *UiLoader::createLayout( const QString &className, LayoutItem *parent ) else if (className == QString("FlowLayout")) { return new FlowLayout( parent ); } - + #endif return 0; } diff --git a/uiloader.h b/uiloader.h index e763703cb..d7750906c 100644 --- a/uiloader.h +++ b/uiloader.h @@ -23,6 +23,7 @@ #include #include +#include class QGraphicsItem; @@ -47,7 +48,7 @@ public: virtual ~UiLoader(); QStringList availableWidgets() const; - Widget *createWidget(const QString &className, Widget *parent = 0); + Applet *createWidget(const QString &className, Applet *parent = 0); QStringList availableLayouts() const; Layout *createLayout(const QString &className, LayoutItem *parent);