- For now the parent must be a Widget

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=708885
This commit is contained in:
Richard J. Moore 2007-09-05 22:35:54 +00:00
parent 2e506845e9
commit 834a572004
2 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ QStringList UiLoader::availableWidgets() const
return d->widgets;
}
Widget *UiLoader::createWidget( const QString &className, QGraphicsItem *parent, QObject *parentObject )
Widget *UiLoader::createWidget( const QString &className, Widget *parent )
{
if ( className == QString("CheckBox") ) {
return new CheckBox( parent );
@ -85,10 +85,10 @@ Widget *UiLoader::createWidget( const QString &className, QGraphicsItem *parent,
return new Icon( parent );
}
else if ( className == QString("Label") ) {
// return new Label( parent ); // Constructor here requires a Widget
return new Label( parent ); // Constructor here requires a Widget
}
else if ( className == QString("PushButton") ) {
// return new PushButton( parent ); // Constructor here requires a Widget
return new PushButton( parent ); // Constructor here requires a Widget
}
else if ( className == QString("RadioButton") ) {
return new RadioButton( parent );

View File

@ -46,7 +46,7 @@ public:
virtual ~UiLoader();
QStringList availableWidgets() const;
Widget *createWidget( const QString &className, QGraphicsItem *parent=0, QObject *parentObject = 0 );
Widget *createWidget( const QString &className, Widget *parent=0 );
QStringList availableLayouts() const;
Layout *createLayout( const QString &className, LayoutItem *parent );