- For now the parent must be a Widget
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=708885
This commit is contained in:
parent
2e506845e9
commit
834a572004
@ -73,7 +73,7 @@ QStringList UiLoader::availableWidgets() const
|
|||||||
return d->widgets;
|
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") ) {
|
if ( className == QString("CheckBox") ) {
|
||||||
return new CheckBox( parent );
|
return new CheckBox( parent );
|
||||||
@ -85,10 +85,10 @@ Widget *UiLoader::createWidget( const QString &className, QGraphicsItem *parent,
|
|||||||
return new Icon( parent );
|
return new Icon( parent );
|
||||||
}
|
}
|
||||||
else if ( className == QString("Label") ) {
|
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") ) {
|
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") ) {
|
else if ( className == QString("RadioButton") ) {
|
||||||
return new RadioButton( parent );
|
return new RadioButton( parent );
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
virtual ~UiLoader();
|
virtual ~UiLoader();
|
||||||
|
|
||||||
QStringList availableWidgets() const;
|
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;
|
QStringList availableLayouts() const;
|
||||||
Layout *createLayout( const QString &className, LayoutItem *parent );
|
Layout *createLayout( const QString &className, LayoutItem *parent );
|
||||||
|
Loading…
Reference in New Issue
Block a user