port ++ layout -- richardwork++

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796607
This commit is contained in:
Alexis Ménard 2008-04-13 21:20:07 +00:00
parent 1ac668a250
commit ba0b04412c
2 changed files with 7 additions and 16 deletions

View File

@ -21,18 +21,6 @@
#include <QStringList> #include <QStringList>
#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 namespace Plasma
{ {
@ -71,8 +59,9 @@ QStringList UiLoader::availableWidgets() const
return d->widgets; 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")) { if (className == QString("CheckBox")) {
return new CheckBox( parent ); return new CheckBox( parent );
} }
@ -94,7 +83,7 @@ Widget *UiLoader::createWidget( const QString &className, Widget *parent )
else if (className == QString("Meter")) { else if (className == QString("Meter")) {
return new Meter( parent ); return new Meter( parent );
} }
#endif
return 0; return 0;
} }
@ -105,6 +94,7 @@ QStringList UiLoader::availableLayouts() const
Layout *UiLoader::createLayout( const QString &className, LayoutItem *parent ) Layout *UiLoader::createLayout( const QString &className, LayoutItem *parent )
{ {
#ifdef RICHARD_WORK
if (className == QString("HBoxLayout")) { if (className == QString("HBoxLayout")) {
return new HBoxLayout( parent ); return new HBoxLayout( parent );
} }
@ -114,7 +104,7 @@ Layout *UiLoader::createLayout( const QString &className, LayoutItem *parent )
else if (className == QString("FlowLayout")) { else if (className == QString("FlowLayout")) {
return new FlowLayout( parent ); return new FlowLayout( parent );
} }
#endif
return 0; return 0;
} }

View File

@ -23,6 +23,7 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <plasma/plasma_export.h> #include <plasma/plasma_export.h>
#include <plasma/applet.h>
class QGraphicsItem; class QGraphicsItem;
@ -47,7 +48,7 @@ public:
virtual ~UiLoader(); virtual ~UiLoader();
QStringList availableWidgets() const; QStringList availableWidgets() const;
Widget *createWidget(const QString &className, Widget *parent = 0); Applet *createWidget(const QString &className, Applet *parent = 0);
QStringList availableLayouts() const; QStringList availableLayouts() const;
Layout *createLayout(const QString &className, LayoutItem *parent); Layout *createLayout(const QString &className, LayoutItem *parent);