Author: sh-sh-sh
Date: Mon Jun 18 14:52:18 2007
New Revision: 38505
URL: http://svn.opensuse.org/viewcvs/yast?rev=38505&view=rev
Log:
migrated ReplacePoint
Modified:
branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.cc
branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h
branches/tmp/sh/mod-ui/qt/src/YQUI.h
branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc
branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.cc
branches/tmp/sh/mod-ui/qt/src/YQWizard.cc
Modified: branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.cc?rev=38505&r1=38504&r2=38505&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.cc Mon Jun 18 14:52:18 2007
@@ -24,18 +24,23 @@
#include "YQReplacePoint.h"
-YQReplacePoint::YQReplacePoint( QWidget * parent,
- const YWidgetOpt & opt )
- : QWidget( parent )
- , YReplacePoint( opt )
+YQReplacePoint::YQReplacePoint( YWidget * parent )
+ : QWidget( (QWidget *) parent->widgetRep() )
+ , YReplacePoint( parent )
{
setWidgetRep( this );
}
-void YQReplacePoint::childAdded( YWidget * child )
+void YQReplacePoint::addChild( YWidget * child )
{
- ( (QWidget *)( child->widgetRep() ) )->show();
+ if ( child )
+ {
+ QWidget * qChild = (QWidget *) child->widgetRep();
+ qChild->show();
+ }
+
+ YWidget::addChild( child );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h?rev=38505&r1=38504&r2=38505&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h Mon Jun 18 14:52:18 2007
@@ -36,25 +36,26 @@
/**
* Constructor.
*/
- YQReplacePoint( QWidget * parent, const YWidgetOpt & opt );
+ YQReplacePoint( YWidget * parent );
/**
- * Inherited from YContainerWidget. Called when a child
- * has been added. We call show() for the new widget.
+ * Add a new child.
+ *
+ * Reimplemented from YSingleChildContainer.
*/
- void childAdded( YWidget * child );
+ virtual void addChild( YWidget * child );
/**
* Inherited from YWidget: Sets the enabled state of the
* widget. All new widgets are enabled per definition. Only
* enabled widgets can take user input.
*/
- void setEnabled( bool enabled );
+ virtual void setEnabled( bool enabled );
/**
* Sets the size
*/
- void setSize( long newWidth, long newHeight );
+ virtual void setSize( long newWidth, long newHeight );
};
Modified: branches/tmp/sh/mod-ui/qt/src/YQUI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQUI.h?rev=38505&r1=38504&r2=38505&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQUI.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQUI.h Mon Jun 18 14:52:18 2007
@@ -441,7 +441,6 @@
YContainerWidget * createFrame ( YWidget * parent, YWidgetOpt & opt, const YCPString & label );
YContainerWidget * createCheckBoxFrame ( YWidget * parent, YWidgetOpt & opt, const YCPString & label, bool checked );
YContainerWidget * createRadioButtonGroup ( YWidget * parent, YWidgetOpt & opt);
- YContainerWidget * createReplacePoint ( YWidget * parent, YWidgetOpt & opt);
YContainerWidget * createSquash ( YWidget * parent, YWidgetOpt & opt, bool horSquash, bool vertSquash);
YContainerWidget * createWeight ( YWidget * parent, YWidgetOpt & opt, YUIDimension dim, long weight);
Modified: branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc?rev=38505&r1=38504&r2=38505&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc Mon Jun 18 14:52:18 2007
@@ -65,12 +65,6 @@
-YContainerWidget * YQUI::createReplacePoint( YWidget * parent,
- YWidgetOpt & opt )
-{
- return new YQReplacePoint( ( (QWidget *)parent->widgetRep() ), opt );
-}
-
YWidget * YQUI::createEmpty ( YWidget * parent,
YWidgetOpt & opt )
{
Modified: branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.cc?rev=38505&r1=38504&r2=38505&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.cc Mon Jun 18 14:52:18 2007
@@ -372,7 +372,10 @@
YQReplacePoint *
YQWidgetFactory::createReplacePoint( YWidget * parent )
{
- return 0; // FIXME: TO DO
+ YQReplacePoint * replacePoint = new YQReplacePoint( parent );
+ YUI_CHECK_NEW( replacePoint );
+
+ return replacePoint;
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQWizard.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQWizard.cc?rev=38505&r1=38504&r2=38505&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQWizard.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQWizard.cc Mon Jun 18 14:52:18 2007
@@ -25,6 +25,8 @@
// For the command parser
+#include <string>
+
#include