Author: gs
Date: Thu Jun 28 10:43:58 2007
New Revision: 39065
URL: http://svn.opensuse.org/viewcvs/yast?rev=39065&view=rev
Log:
add new classes for widget factory
Added:
branches/tmp/sh/mod-ui/ncurses/src/NCApplication.cc
branches/tmp/sh/mod-ui/ncurses/src/NCApplication.h
branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.cc
branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.h
branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc
branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h
Added: branches/tmp/sh/mod-ui/ncurses/src/NCApplication.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCApplication.cc?rev=39065&view=auto
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCApplication.cc (added)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCApplication.cc Thu Jun 28 10:43:58 2007
@@ -0,0 +1,34 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: NCApplication.cc
+
+ Author: Gabriele Mohr
+
+/-*/
+
+
+#include "NCApplication.h"
+
+
+NCApplication::NCApplication()
+{
+
+}
+
+
+NCApplication::~NCApplication()
+{
+
+}
+
+
Added: branches/tmp/sh/mod-ui/ncurses/src/NCApplication.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCApplication.h?rev=39065&view=auto
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCApplication.h (added)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCApplication.h Thu Jun 28 10:43:58 2007
@@ -0,0 +1,47 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: NCApplication.h
+
+ Author: Gabriele Mohr
+
+/-*/
+
+
+#ifndef NCApplication_h
+#define NCApplication_h
+
+#include "YApplication.h"
+
+
+class NCApplication: public YApplication
+{
+
+protected:
+
+ friend class YNCursesUI;
+
+ /**
+ * Constructor.
+ *
+ * Use YUI::app() to get the singleton for this class.
+ **/
+ NCApplication();
+
+ /**
+ * Destructor.
+ **/
+ virtual ~NCApplication();
+};
+
+
+#endif // NCApplication_h
Added: branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.cc?rev=39065&view=auto
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.cc (added)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.cc Thu Jun 28 10:43:58 2007
@@ -0,0 +1,42 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: NCOptionalWidgetFactory.cc
+
+ Author: Gabriele Mohr
+
+/-*/
+
+#include "NCOptionalWidgetFactory.h"
+#include "YUIException.h"
+
+
+#define THROW_UNSUPPORTED( WIDGET_TYPE ) \
+ YUI_THROW( YUIUnsupportedWidgetException( WIDGET_TYPE ) ); \
+ return 0
+
+
+
+NCOptionalWidgetFactory::NCOptionalWidgetFactory()
+ : YOptionalWidgetFactory()
+{
+ // NOP
+}
+
+NCOptionalWidgetFactory::~NCOptionalWidgetFactory()
+{
+ // NOP
+}
+
+
+
+
Added: branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.h?rev=39065&view=auto
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.h (added)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCOptionalWidgetFactory.h Thu Jun 28 10:43:58 2007
@@ -0,0 +1,63 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: NCOptionalWidgetFactory.h
+
+ Author: Gabriele Mohr
+
+/-*/
+
+#ifndef NCOptionalWidgetFactory_h
+#define NCOptionalWidgetFactory_h
+
+
+#include "YOptionalWidgetFactory.h"
+
+
+/**
+ * Widget factory for optional ("special") widgets.
+ *
+ * Remember to always check with the corresponding "has..()" method if the
+ * current UI actually provides the requested widget. Otherwise the
+ * "create...()" method will throw an exception.
+ **/
+class NCOptionalWidgetFactory: public YOptionalWidgetFactory
+{
+public:
+
+ //
+ // Optional Widgets
+ //
+
+ // PkgSpecial()
+
+protected:
+
+ friend class YNCursesUI;
+
+ /**
+ * Constructor.
+ *
+ * Use YUI::optionalWidgetFactory() to get the singleton for this class.
+ **/
+ NCOptionalWidgetFactory();
+
+ /**
+ * Destructor.
+ **/
+ virtual ~NCOptionalWidgetFactory();
+
+}; // class NCOptionalWidgetFactory
+
+
+
+#endif // NCOptionalWidgetFactory_h
Added: branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc?rev=39065&view=auto
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc (added)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc Thu Jun 28 10:43:58 2007
@@ -0,0 +1,395 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: NCWidgetFactory.cc
+
+ Author: Gabriele Mohr
+
+/-*/
+
+#include "NCWidgetFactory.h"
+#include <string>
+#include
+#include
+
+#include "Y2Log.h"
+#include
+#include "YDialog.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "NCDialog.h"
+#include "NCAlignment.h"
+#include "NCCheckBox.h"
+#include "NCEmpty.h"
+#include "NCSpacing.h"
+#include "NCFrame.h"
+#include "NCCheckBoxFrame.h"
+#include "NCImage.h"
+#include "NCLabel.h"
+#include "NCProgressBar.h"
+#include "NCPushButton.h"
+#include "NCMenuButton.h"
+#include "NCRadioButton.h"
+#include "NCRadioButtonGroup.h"
+#include "NCReplacePoint.h"
+#include "NCRichText.h"
+#include "NCSelectionBox.h"
+#include "NCMultiSelectionBox.h"
+#include "NCSplit.h"
+#include "NCSquash.h"
+#include "NCTable.h"
+#include "NCTextEntry.h"
+#include "NCIntField.h"
+#include "NCComboBox.h"
+#include "NCTree.h"
+#include "NCLogView.h"
+#include "NCMultiLineEdit.h"
+#include "NCPackageSelectorPlugin.h"
+#include "NCPackageSelectorStart.h"
+#include "NCAskForDirectory.h"
+#include "NCAskForFile.h"
+#include "NCstring.h"
+
+extern string language2encoding( string lang );
+
+NCWidgetFactory::NCWidgetFactory( )
+ : YWidgetFactory ()
+{
+ // NOP
+}
+
+NCWidgetFactory::~NCWidgetFactory()
+{
+ // NOP
+}
+
+
+///////////////////////////////////////////////////////////////////
+//
+// Widget creation functions - container widgets
+//
+///////////////////////////////////////////////////////////////////
+
+//#define ONCREATE WIDDBG << endl
+#define ONCREATE
+
+YContainerWidget * YNCursesUI::createSplit( YWidget * parent, YWidgetOpt & opt,
+ YUIDimension dimension )
+{
+ ONCREATE;
+ return new NCSplit( dynamic_cast( parent ), opt,
+ dimension );
+}
+
+YSingleChildContainerWidget * YNCursesUI::createReplacePoint( YWidget * parent )
+{
+ ONCREATE;
+ return new NCReplacePoint( dynamic_cast( parent ) );
+}
+
+YSingleChildContainerWidget * YNCursesUI::createAlignment( YWidget * parent,
+ YAlignmentType halign,
+ YAlignmentType valign )
+{
+ ONCREATE;
+ return new NCAlignment( dynamic_cast( parent ),
+ halign, valign );
+}
+
+YSingleChildContainerWidget * YNCursesUI::createSquash( YWidget * parent,
+ bool hsquash,
+ bool vsquash )
+{
+ ONCREATE;
+ return new NCSquash( dynamic_cast( parent ),
+ hsquash, vsquash );
+}
+
+YSingleChildContainerWidget * YNCursesUI::createFrame( YWidget * parent,
+ const string & label )
+{
+ ONCREATE;
+ return new NCFrame( dynamic_cast( parent ), label );
+}
+
+YSingleChildContainerWidget * YNCursesUI::createCheckBoxFrame( YWidget * parent,
+ const string & label, bool checked )
+{
+ ONCREATE;
+ return new NCCheckBoxFrame( dynamic_cast( parent ), label, checked );
+}
+
+///////////////////////////////////////////////////////////////////
+//
+// Widget creation functions - leaf widgets
+//
+///////////////////////////////////////////////////////////////////
+
+YWidget * YNCursesUI::createEmpty( YWidget * parent )
+{
+ ONCREATE;
+ return new NCEmpty( dynamic_cast( parent ) );
+}
+
+
+YWidget * YNCursesUI::createSpacing( YWidget * parent,
+ YUIDimension dim,
+ bool stretchable,
+ YLayoutSize_t layoutUnits )
+{
+ ONCREATE;
+ return new NCSpacing( dynamic_cast( parent ), dim,
+ stretchable, layoutUnits );
+}
+
+YWidget * YNCursesUI::createLabel( YWidget * parent, const string & text,
+ bool isHeading, bool isOutputField )
+{
+ ONCREATE;
+ return new NCLabel( dynamic_cast( parent ), text,
+ isHeading, isOutputField );
+}
+
+YWidget * YNCursesUI::createRichText( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & text )
+{
+ ONCREATE;
+ return new NCRichText( dynamic_cast( parent ), opt,
+ text );
+}
+
+YWidget * YNCursesUI::createLogView( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ int visibleLines,
+ int maxLines )
+{
+ ONCREATE;
+ return new NCLogView( dynamic_cast( parent ), opt,
+ label, visibleLines, maxLines );
+}
+
+YWidget * YNCursesUI::createPushButton( YWidget * parent,
+ const string & label )
+{
+ ONCREATE;
+ return new NCPushButton( dynamic_cast( parent ), label );
+}
+
+YWidget * YNCursesUI::createMenuButton( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label )
+{
+ ONCREATE;
+ return new NCMenuButton( dynamic_cast( parent ), opt,
+ label );
+}
+
+YWidget * YNCursesUI::createRadioButton( YWidget * parent,
+ const string & label )
+{
+ ONCREATE;
+ return new NCRadioButton( dynamic_cast( parent ),
+ label );
+}
+
+YWidget * YNCursesUI::createCheckBox( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ bool checked )
+{
+ ONCREATE;
+ return new NCCheckBox( dynamic_cast( parent ), opt,
+ label, checked );
+}
+
+YWidget * YNCursesUI::createTextEntry( YWidget * parent,
+ const string & label,
+ bool passwordMode )
+{
+ ONCREATE;
+ return new NCTextEntry( dynamic_cast( parent ),
+ label, passwordMode );
+}
+
+YWidget *YNCursesUI::createMultiLineEdit( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ const YCPString & initialText )
+{
+ ONCREATE;
+ return new NCMultiLineEdit( dynamic_cast( parent ), opt,
+ label, initialText );
+}
+
+YWidget * YNCursesUI::createSelectionBox( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label )
+{
+ ONCREATE;
+ return new NCSelectionBox( dynamic_cast( parent ), opt,
+ label );
+}
+
+YWidget * YNCursesUI::createMultiSelectionBox( YWidget *parent, YWidgetOpt & opt,
+ const YCPString & label )
+{
+ ONCREATE;
+ return new NCMultiSelectionBox( dynamic_cast( parent ), opt,
+ label );
+}
+
+YWidget * YNCursesUI::createComboBox( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label )
+{
+ ONCREATE;
+ return new NCComboBox( dynamic_cast( parent ), opt,
+ label );
+}
+
+YWidget * YNCursesUI::createTree( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label )
+{
+ ONCREATE;
+ return new NCTree( dynamic_cast( parent ), opt,
+ label );
+}
+
+YWidget * YNCursesUI::createTable( YWidget * parent, YWidgetOpt & opt,
+ vector<string> header )
+{
+ ONCREATE;
+ return new NCTable( dynamic_cast( parent ), opt,
+ header, true );
+}
+
+YWidget * YNCursesUI::createProgressBar( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ const YCPInteger & maxprogress,
+ const YCPInteger & progress )
+{
+ ONCREATE;
+ return new NCProgressBar( dynamic_cast( parent ), opt,
+ label, maxprogress, progress );
+}
+
+YWidget * YNCursesUI::createImage( YWidget * parent, YWidgetOpt & opt,
+ YCPByteblock /* not used */,
+ YCPString defaulttext )
+{
+ ONCREATE;
+ return new NCImage( dynamic_cast( parent ), opt,
+ defaulttext );
+}
+
+YWidget * YNCursesUI::createImage( YWidget * parent, YWidgetOpt & opt,
+ YCPString /* not used */,
+ YCPString defaulttext )
+{
+ ONCREATE;
+ return new NCImage( dynamic_cast( parent ), opt,
+ defaulttext );
+}
+
+
+YWidget * YNCursesUI::createIntField( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ int minValue, int maxValue,
+ int initialValue )
+{
+ ONCREATE;
+ return new NCIntField( dynamic_cast( parent ), opt,
+ label, minValue, maxValue, initialValue );
+}
+
+///////////////////////////////////////////////////////////////////
+//
+// package selection
+//
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+//
+//
+// METHOD NAME : YNCursesUI::packageSelectorPlugin()
+// METHOD TYPE : NCPackageSelectorPlugin
+//
+// DESCRIPTION : Create the package selector plugin
+//
+NCPackageSelectorPlugin * YNCursesUI::packageSelectorPlugin()
+{
+ static NCPackageSelectorPlugin * plugin = 0;
+
+ if ( ! plugin )
+ {
+ plugin = new NCPackageSelectorPlugin();
+
+ // This is a deliberate memory leak: If an application requires a
+ // PackageSelector, it is a package selection application by
+ // definition. In this case, the ncurses_pkg plugin is intentionally
+ // kept open to avoid repeated start-up cost of the plugin and libzypp.
+ }
+
+ return plugin;
+}
+
+///////////////////////////////////////////////////////////////////
+//
+//
+// METHOD NAME : YNCursesUI::createPackageSelector
+// METHOD TYPE : YWidget
+//
+// DESCRIPTION : Calls NCPackageSelectorPlugin::createPackageSelector
+//
+YWidget * YNCursesUI::createPackageSelector( YWidget * parent,
+ YWidgetOpt & opt,
+ const YCPString & floppyDevice )
+{
+ ONCREATE;
+ YWidget * w = 0;
+
+ NCPackageSelectorPlugin * plugin = packageSelectorPlugin();
+
+ if ( plugin )
+ {
+ w = plugin->createPackageSelector( parent, opt );
+ }
+
+ return w;
+}
+
+///////////////////////////////////////////////////////////////////
+//
+//
+// METHOD NAME : YNCursesUI::createPkgSpecial
+// METHOD TYPE : YWidget
+//
+// DESCRIPTION : creates special widgets used for the package selection
+// dialog (which do not have a corresponding widget in qt-ui)
+//
+YWidget * YNCursesUI::createPkgSpecial( YWidget *parent, YWidgetOpt &opt, const YCPString &subwidget )
+{
+ ONCREATE;
+ YWidget * w = 0;
+
+ NCPackageSelectorPlugin * plugin = packageSelectorPlugin();
+
+ if ( plugin )
+ {
+ w = plugin->createPkgSpecial( parent, opt, subwidget );
+ }
+
+ return w;
+}
+
+
Added: branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h?rev=39065&view=auto
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h (added)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h Thu Jun 28 10:43:58 2007
@@ -0,0 +1,264 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: NCWidgetFactory.h
+
+ Author: Gabriele Mohr <@suse.de>
+
+/-*/
+
+
+#ifndef NCWidgetFactory_h
+#define NCWidgetFactory_h
+
+#include "YWidgetFactory.h"
+
+
+/**
+ * @short YaST2 Component: NCursesUI Widget Factory
+ * Concrete widget factory for mandatory widgets.
+ */
+class NCWidgetFactory : public YWidgetFactory
+{
+ protected:
+
+ friend class NCursesUI;
+
+ /**
+ * Constructor.
+ *
+ * Use YUI::widgetFactory() to get the singleton for this class.
+ **/
+ NCWidgetFactory();
+
+ /**
+ * Destructory.
+ **/
+ virtual ~NCWidgetFactory();
+
+public:
+
+ //
+ // Widget creation functions - container widgets
+ //
+
+ /**
+ * Creates a split
+ */
+ virtual YContainerWidget * createSplit( YWidget * parent, YWidgetOpt & opt,
+ YUIDimension dimension );
+
+ /**
+ * Creates a replace point.
+ */
+ virtual YSingleChildContainerWidget * createReplacePoint( YWidget * parent );
+
+ /**
+ * Creates an alignment widget
+ */
+ virtual YSingleChildContainerWidget * createAlignment( YWidget * parent,
+ YAlignmentType halign,
+ YAlignmentType valign);
+
+ /**
+ * Creates a squash widget
+ */
+ virtual YSingleChildContainerWidget * createSquash( YWidget * parent,
+ bool hsquash,
+ bool vsquash );
+
+ /**
+ * Creates a radio button group.
+ */
+ // virtual YContainerWidget * createRadioButtonGroup( YWidget * parent, YWidgetOpt & opt );
+
+ /**
+ * Creates a frame widget
+ */
+ virtual YSingleChildContainerWidget * createFrame( YWidget * parent,
+ const string & label );
+
+ virtual YSingleChildContainerWidget * createCheckBoxFrame( YWidget * parent,
+ const string & label,
+ bool checked );
+ //
+ // Widget creation functions - leaf widgets
+ //
+
+ /**
+ * Creates an empty widget
+ */
+ virtual YWidget * createEmpty( YWidget * parent );
+
+ /**
+ * Creates a spacing widget
+ */
+ virtual YWidget * createSpacing( YWidget * parent,
+ YUIDimension dim,
+ bool stretchable,
+ YLayoutSize_t layoutUnits );
+
+ /**
+ * Creates a label.
+ * @param text Initial text of the label
+ * @param heading true if the label is a Heading()
+ * @param output_field true if the label should look like an output field (3D look)
+ */
+ virtual YWidget * createLabel( YWidget * parent, const string & text,
+ bool isHeading, bool isOutputField );
+
+ /**
+ * Creates a rich text widget
+ * @param text Initial text of the label
+ */
+ virtual YWidget * createRichText( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & text );
+
+ /**
+ * Creates a log view widget
+ * @param label label above the log view
+ * @param visibleLines default number of vislible lines
+ * @param maxLines number of lines to store (use 0 for "all")
+ */
+ virtual YWidget * createLogView( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ int visibleLines,
+ int maxLines );
+
+ /**
+ * Creates a MultiLineEdit widget
+ * @param label label above the edit field
+ * @param text initial contents of the edit field
+ */
+ virtual YWidget * createMultiLineEdit( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ const YCPString & text);
+
+ /**
+ * Creates a push button.
+ * @param label Label of the button
+ * @param default_button true if the button should be the dialogs default button
+ */
+ virtual YWidget * createPushButton( YWidget * parent,
+ const string & label );
+
+ /**
+ * Creates a menu button.
+ * @param label Label of the button
+ */
+ virtual YWidget * createMenuButton( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label );
+
+ /**
+ * Creates a radio button and inserts it into a radio button group
+ * @param label Label of the radio button
+ * @param rbg the radio button group the new button will belong to
+ */
+ virtual YWidget * createRadioButton( YWidget * parent,
+ const string & label );
+
+ /**
+ * Creates a check box
+ * @param label Label of the checkbox
+ * @param true if it is checked
+ */
+ virtual YWidget * createCheckBox( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ bool checked );
+
+ /**
+ * Creates a text entry or password entry field.
+ */
+ virtual YWidget * createTextEntry( YWidget * parent,
+ const string & label,
+ bool passwordMode );
+
+ /**
+ * Creates a selection box
+ */
+ virtual YWidget * createSelectionBox( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label );
+
+ /**
+ * Creates a multi selection box
+ */
+ virtual YWidget * createMultiSelectionBox( YWidget *parent, YWidgetOpt & opt,
+ const YCPString & label );
+
+ /**
+ * Creates a combo box
+ */
+ virtual YWidget * createComboBox( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label );
+
+ /**
+ * Creates a tree
+ */
+ virtual YWidget * createTree( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label );
+
+ /**
+ * Creates a table widget
+ */
+ virtual YWidget * createTable( YWidget * parent, YWidgetOpt & opt,
+ vector<string> header );
+
+ /**
+ * Creates a progress bar
+ */
+ virtual YWidget * createProgressBar( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ const YCPInteger & maxprogress,
+ const YCPInteger & progress);
+
+ /**
+ * Creates an image widget from a YCP byteblock
+ */
+ virtual YWidget * createImage( YWidget * parent, YWidgetOpt & opt,
+ YCPByteblock imagedata,
+ YCPString defaulttext);
+
+ /**
+ * Creates an image widget from a YCP byteblock
+ */
+ virtual YWidget * createImage( YWidget * parent, YWidgetOpt & opt,
+ YCPString filename,
+ YCPString defaulttext);
+
+ /**
+ * Creates an IntField widget.
+ */
+ virtual YWidget * createIntField( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ int minValue, int maxValue,
+ int initialValue );
+
+ /**
+ * Creates the PackageSelector widget (i.e. a widget tree).
+ */
+ virtual YWidget * createPackageSelector( YWidget *parent,
+ YWidgetOpt &opt,
+ const YCPString & floppyDevice );
+
+
+ /**
+ * Creates a special subwidget used for Package Selection (which doesn't exist in QT-UI).
+ */
+ virtual YWidget * createPkgSpecial( YWidget *parent,
+ YWidgetOpt &opt,
+ const YCPString &subwidget );
+
+
+};
+
+#endif // NCWidgetFactory_h
+
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org