Author: sh-sh-sh Date: Wed Oct 31 22:02:03 2007 New Revision: 41697
URL: http://svn.opensuse.org/viewcvs/yast?rev=41697&view=rev Log: Renamed YTime -> YTimeField Renamed YDate -> YDateField
Added: branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateField1.ycp - copied, changed from r39223, branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateEntry1.ycp branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeField1.ycp - copied, changed from r39223, branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeEntry1.ycp branches/tmp/sh/mod-ui/core/libyui/src/YDateField.cc - copied, changed from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YDate.cc branches/tmp/sh/mod-ui/core/libyui/src/YDateField.h - copied, changed from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YDate.h branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.cc - copied, changed from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YTime.cc branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.h - copied, changed from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YTime.h branches/tmp/sh/mod-ui/qt/src/YQDateField.cc - copied, changed from r41610, branches/tmp/sh/mod-ui/qt/src/YQDate.cc branches/tmp/sh/mod-ui/qt/src/YQDateField.h - copied, changed from r41610, branches/tmp/sh/mod-ui/qt/src/YQDate.h branches/tmp/sh/mod-ui/qt/src/YQTimeField.cc - copied, changed from r41610, branches/tmp/sh/mod-ui/qt/src/YQTime.cc branches/tmp/sh/mod-ui/qt/src/YQTimeField.h - copied, changed from r41610, branches/tmp/sh/mod-ui/qt/src/YQTime.h Removed: branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateEntry1.ycp branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeEntry1.ycp branches/tmp/sh/mod-ui/core/libyui/src/YDate.cc branches/tmp/sh/mod-ui/core/libyui/src/YDate.h branches/tmp/sh/mod-ui/core/libyui/src/YTime.cc branches/tmp/sh/mod-ui/core/libyui/src/YTime.h branches/tmp/sh/mod-ui/qt/src/YQDate.cc branches/tmp/sh/mod-ui/qt/src/YQDate.h branches/tmp/sh/mod-ui/qt/src/YQTime.cc branches/tmp/sh/mod-ui/qt/src/YQTime.h Modified: branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.cc branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.h branches/tmp/sh/mod-ui/core/libyui/src/YUISymbols.h branches/tmp/sh/mod-ui/qt/src/Makefile.am branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.h branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.h
Copied: branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateField1.ycp (from r39223, branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateEntry1.ycp) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/doc/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateEntry1.ycp (original) +++ branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateField1.ycp Wed Oct 31 22:02:03 2007 @@ -1,14 +1,15 @@ +// Simple example for DateField { UI::OpenDialog( - `VBox( - `Date(`id(`datum), "Date:", "2004-10-24"), - `Time(`id(`zeit), "Time:", "10:10:00"), - `PushButton("&OK") - ) - ); + `VBox( + `Left( `DateField(`id(`date), "Date:", "2004-10-24") ), + `Left( `TimeField(`id(`time), "Time:", "10:10:00" ) ), + `PushButton("&OK") + ) + ); UI::UserInput(); - y2milestone("Returns %1", UI::QueryWidget(`id(`datum), `Value) ); - UI::ChangeWidget(`id(`datum),`Value, "2004-01-01"); + y2milestone("Returns %1", UI::QueryWidget(`id(`date), `Value) ); + UI::ChangeWidget(`id(`date),`Value, "2004-01-01"); UI::UserInput(); UI::CloseDialog(); }
Copied: branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeField1.ycp (from r39223, branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeEntry1.ycp) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/doc/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeEntry1.ycp (original) +++ branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeField1.ycp Wed Oct 31 22:02:03 2007 @@ -1,12 +1,13 @@ +// Simple example for TimeField { UI::OpenDialog( - `VBox( - `Time(`id(`zeit), "Time:", "10:10:00"), - `PushButton("&OK") - ) - ); + `VBox( + `TimeField(`id(`time), "Time:", "10:10:00"), + `PushButton("&OK") + ) + ); UI::UserInput(); - UI::ChangeWidget(`id(`zeit),`Value, "10:10:00"); + UI::ChangeWidget(`id(`time),`Value, "10:10:00"); UI::UserInput(); UI::CloseDialog(); }
Modified: branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog Wed Oct 31 22:02:03 2007 @@ -399,3 +399,8 @@ * Moved opaque 'data' void pointer from YTreeItem / YTableItem to YItem base class
+ +2007-10-31 sh@suse.de + +* Renamed YTime -> YTimeField +* Renamed YDate -> YDateField
Modified: branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am Wed Oct 31 22:02:03 2007 @@ -47,7 +47,7 @@ YCheckBoxFrame.cc \ YComboBox.cc \ YContainerWidget.cc \ - YDate.cc \ + YDateField.cc \ YDialog.cc \ YDownloadProgress.cc \ YDumbTab.cc \ @@ -84,7 +84,7 @@ YSpacing.cc \ YSquash.cc \ YTable.cc \ - YTime.cc \ + YTimeField.cc \ YTree.cc \ YWizard.cc
@@ -141,7 +141,7 @@ YCheckBoxFrame.h \ YComboBox.h \ YContainerWidget.h \ - YDate.h \ + YDateField.h \ YDialog.h \ YDownloadProgress.h \ YDumbTab.h \ @@ -178,7 +178,7 @@ YSpacing.h \ YSquash.h \ YTable.h \ - YTime.h \ + YTimeField.h \ YTransText.h \ YTree.h \ YWizard.h \
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.cc (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.cc Wed Oct 31 22:02:03 2007 @@ -261,7 +261,8 @@ // Special widgets - may or may not be supported by the specific UI. // The YCP application should ask for presence of such a widget with Has???Widget() prior to creating one.
- else if ( s == YUISpecialWidget_Date ) w = parseDate ( p, opt, term, ol, n ); + else if ( s == YUISpecialWidget_Date ) w = parseDateField ( p, opt, term, ol, n ); + else if ( s == YUISpecialWidget_DateField ) w = parseDateField ( p, opt, term, ol, n ); else if ( s == YUISpecialWidget_DummySpecialWidget ) w = parseDummySpecialWidget ( p, opt, term, ol, n ); else if ( s == YUISpecialWidget_DownloadProgress ) w = parseDownloadProgress ( p, opt, term, ol, n ); else if ( s == YUISpecialWidget_BarGraph ) w = parseBarGraph ( p, opt, term, ol, n ); @@ -272,7 +273,8 @@ else if ( s == YUISpecialWidget_PatternSelector ) w = parsePatternSelector ( p, opt, term, ol, n ); else if ( s == YUISpecialWidget_SimplePatchSelector ) w = parseSimplePatchSelector ( p, opt, term, ol, n ); else if ( s == YUISpecialWidget_Slider ) w = parseSlider ( p, opt, term, ol, n ); - else if ( s == YUISpecialWidget_Time ) w = parseTime ( p, opt, term, ol, n ); + else if ( s == YUISpecialWidget_Time ) w = parseTimeField ( p, opt, term, ol, n ); + else if ( s == YUISpecialWidget_TimeField ) w = parseTimeField ( p, opt, term, ol, n ); else if ( s == YUISpecialWidget_Wizard ) w = parseWizard ( p, opt, term, ol, n ); else { @@ -3184,20 +3186,24 @@
/** - * @widgets Date + * @widgets DateField * @short Date input field - * @class YDate + * @class YDateField * @arg string label - * @usage `Date( "Date:", "2004-10-12" ) + * @optarg string initialDate + * @usage if ( HasSpecialWidget( `DateField ) {... + * `DateField( "Date:", "2004-10-12" ) * * @description - * A Date input widget for entering dates. - * This widget is available in the Qt interface only + * An input field for entering a date. + * + * @note This is a "special" widget, i.e. not all UIs necessarily support it. Check + * for availability with <tt>HasSpecialWidget( `TimeField)</tt> before using it. **/
YWidget * -YCPDialogParser::parseDate( YWidget * parent, YWidgetOpt & opt, - const YCPTerm & term, const YCPList & optList, int argnr ) +YCPDialogParser::parseDateField( YWidget * parent, YWidgetOpt & opt, + const YCPTerm & term, const YCPList & optList, int argnr ) {
if ( term->size() - argnr < 1 || term->size() - argnr > 2 @@ -3228,19 +3234,23 @@
/** - * @widgets Time + * @widgets TimeField * @short Time input field - * @class YTime + * @class YTimeField * @arg string label - * @usage `Time( "Time:" , "20:20:20" ) + * @optarg string initialTime + * @usage if ( HasSpecialWidget( `TimeField ) {... + * `TimeField( "Time:" , "20:20:20" ) * * @description - * A Time input widget for entering time. - * This widget is available in the Qt interface only + * An input field for entering a time of day in 24 hour format. + * + * @note This is a "special" widget, i.e. not all UIs necessarily support it. Check + * for availability with <tt>HasSpecialWidget( `TimeField)</tt> before using it. **/ YWidget * -YCPDialogParser::parseTime( YWidget * parent, YWidgetOpt & opt, - const YCPTerm & term, const YCPList & optList, int argnr ) +YCPDialogParser::parseTimeField( YWidget * parent, YWidgetOpt & opt, + const YCPTerm & term, const YCPList & optList, int argnr ) {
if ( term->size() - argnr < 1 || term->size() - argnr > 2 @@ -3314,7 +3324,7 @@ * The ID of the single replace point within the wizard is always `contents. * * @note This is a "special" widget, i.e. not all UIs necessarily support it. Check - * for availability with <tt>HasSpecialWidget( `PartitionSplitter )</tt> before using it. + * for availability with <tt>HasSpecialWidget( `Wizard)</tt> before using it. **/
YWidget *
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.h (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.h Wed Oct 31 22:02:03 2007 @@ -161,11 +161,11 @@ const YCPTerm & term, const YCPList & optList, int argnr, bool heading );
- static YWidget * parseDate( YWidget *parent, YWidgetOpt & opt, - const YCPTerm & term, const YCPList & optList, int argnr); + static YWidget * parseDateField( YWidget *parent, YWidgetOpt & opt, + const YCPTerm & term, const YCPList & optList, int argnr);
- static YWidget * parseTime( YWidget *parent, YWidgetOpt & opt, - const YCPTerm & term, const YCPList & optList, int argnr); + static YWidget * parseTimeField( YWidget *parent, YWidgetOpt & opt, + const YCPTerm & term, const YCPList & optList, int argnr);
static YWidget * parseRichText( YWidget *parent, YWidgetOpt & opt, const YCPTerm & term, const YCPList & optList, int argnr );
Copied: branches/tmp/sh/mod-ui/core/libyui/src/YDateField.cc (from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YDate.cc) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YDate.cc (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YDateField.cc Wed Oct 31 22:02:03 2007 @@ -10,9 +10,9 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YDate.cc + File: YDateField.cc
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
@@ -23,19 +23,19 @@ #include <ycp/y2log.h>
#include "YUISymbols.h" -#include "YDate.h" +#include "YDateField.h"
-YDate::YDate( const YWidgetOpt & opt, +YDateField::YDateField( const YWidgetOpt & opt, const YCPString & label) : YWidget( opt ) , label ( label ) { - y2debug( "YDate( %s )", label->value_cstr() ); + y2debug( "YDateField( %s )", label->value_cstr() ); }
-YCPValue YDate::changeWidget( const YCPSymbol & property, const YCPValue & newValue ) +YCPValue YDateField::changeWidget( const YCPSymbol & property, const YCPValue & newValue ) { string s = property->symbol();
@@ -60,14 +60,14 @@ }
-void YDate::setLabel( const YCPString & label ) +void YDateField::setLabel( const YCPString & label ) { this->label = label; }
-YCPValue YDate::queryWidget( const YCPSymbol & property ) +YCPValue YDateField::queryWidget( const YCPSymbol & property ) { string s = property->symbol(); if ( s == YUIProperty_Value ) return getDate();
Copied: branches/tmp/sh/mod-ui/core/libyui/src/YDateField.h (from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YDate.h) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YDate.h (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YDateField.h Wed Oct 31 22:02:03 2007 @@ -10,34 +10,33 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YDate.h + File: YDateField.h
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
-#ifndef YDate_h -#define YDate_h +#ifndef YDateField_h +#define YDateField_h
#include "YWidget.h" #include <ycp/YCPString.h>
-class YDate : public YWidget +class YDateField : public YWidget { protected: /** - * Creates a new date - * @param text the initial text of the date + * Constructor. **/ - YDate( const YWidgetOpt & opt, const YCPString & label ); + YDateField( const YWidgetOpt & opt, const YCPString & label );
public: /** * Returns a descriptive name of this widget class for logging, * debugging etc. **/ - virtual const char * widgetClass() const { return "YDate"; } + virtual const char * widgetClass() const { return "YDateField"; }
/** * Implements the ui command changeWidget. @@ -62,7 +61,7 @@
/** * change the label of the Date entry. Overload this, but call - * YDate::setLabel at the end of your own function. + * YDateField::setLabel at the end of your own function. **/ virtual void setLabel( const YCPString & label );
@@ -77,4 +76,4 @@ };
-#endif // YDate_h +#endif // YDateField_h
Copied: branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.cc (from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YTime.cc) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YTime.cc (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.cc Wed Oct 31 22:02:03 2007 @@ -10,9 +10,9 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YTime.cc + File: YTimeField.cc
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
@@ -23,10 +23,10 @@ #include <ycp/y2log.h>
#include "YUISymbols.h" -#include "YTime.h" +#include "YTimeField.h"
-YTime::YTime( const YWidgetOpt & opt, +YTimeField::YTimeField( const YWidgetOpt & opt, const YCPString & label) : YWidget( opt ) , label ( label ) @@ -35,11 +35,11 @@
if ( opt.autoAdvance.value() ) autoAdvance = true; - y2debug( "YTime( %s )", label->value_cstr() ); + y2debug( "YTimeField( %s )", label->value_cstr() ); }
-YCPValue YTime::changeWidget( const YCPSymbol & property, const YCPValue & newValue ) +YCPValue YTimeField::changeWidget( const YCPSymbol & property, const YCPValue & newValue ) { string s = property->symbol();
@@ -64,14 +64,14 @@ }
-void YTime::setLabel( const YCPString & label ) +void YTimeField::setLabel( const YCPString & label ) { this->label = label; }
-YCPValue YTime::queryWidget( const YCPSymbol & property ) +YCPValue YTimeField::queryWidget( const YCPSymbol & property ) { string s = property->symbol(); if ( s == YUIProperty_Value ) return getTime();
Copied: branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.h (from r41610, branches/tmp/sh/mod-ui/core/libyui/src/YTime.h) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YTime.h (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.h Wed Oct 31 22:02:03 2007 @@ -10,34 +10,34 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YTime.h + File: YTimeField.h
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
-#ifndef YTime_h -#define YTime_h +#ifndef YTimeField_h +#define YTimeField_h
#include "YWidget.h" #include <ycp/YCPString.h>
-class YTime : public YWidget +class YTimeField : public YWidget { protected: /** * Creates a new date * @param text the initial text of the date **/ - YTime( const YWidgetOpt & opt, const YCPString & label ); + YTimeField( const YWidgetOpt & opt, const YCPString & label );
public: /** * Returns a descriptive name of this widget class for logging, * debugging etc. **/ - virtual const char * widgetClass() const { return "YTime"; } + virtual const char * widgetClass() const { return "YTimeField"; }
/** * Implements the ui command changeWidget. @@ -62,7 +62,7 @@
/** * change the label of the Time entry. Overload this, but call - * YTime::setLabel at the end of your own function. + * YTimeField::setLabel at the end of your own function. **/ virtual void setLabel( const YCPString & label );
@@ -81,4 +81,4 @@ };
-#endif // YTime_h +#endif // YTimeField_h
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUISymbols.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/... ============================================================================== --- branches/tmp/sh/mod-ui/core/libyui/src/YUISymbols.h (original) +++ branches/tmp/sh/mod-ui/core/libyui/src/YUISymbols.h Wed Oct 31 22:02:03 2007 @@ -130,6 +130,7 @@
#define YUISpecialWidget_BarGraph "BarGraph" #define YUISpecialWidget_Date "Date" +#define YUISpecialWidget_DateField "DateField" #define YUISpecialWidget_DownloadProgress "DownloadProgress" #define YUISpecialWidget_DumbTab "DumbTab" #define YUISpecialWidget_DummySpecialWidget "DummySpecialWidget" @@ -140,6 +141,7 @@ #define YUISpecialWidget_SimplePatchSelector "SimplePatchSelector" #define YUISpecialWidget_Slider "Slider" #define YUISpecialWidget_Time "Time" +#define YUISpecialWidget_TimeField "TimeField" #define YUISpecialWidget_Wizard "Wizard"
Modified: branches/tmp/sh/mod-ui/qt/src/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/Makefile.... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/Makefile.am (original) +++ branches/tmp/sh/mod-ui/qt/src/Makefile.am Wed Oct 31 22:02:03 2007 @@ -67,7 +67,7 @@ YQCheckBox.cc \ YQCheckBoxFrame.cc \ YQComboBox.cc \ - YQDate.cc \ + YQDateField.cc \ YQDialog.cc \ YQDownloadProgress.cc \ YQDumbTab.cc \ @@ -97,7 +97,7 @@ YQSpacing.cc \ YQSquash.cc \ YQTable.cc \ - YQTime.cc \ + YQTimeField.cc \ YQTree.cc \ YQWizard.cc \ YQWizardButton.cc \ @@ -185,7 +185,7 @@ YQCheckBox.o YQCheckBox.lo: YQCheckBox.moc YQCheckBoxFrame.o YQCheckBoxFrame.lo: YQCheckBoxFrame.moc YQComboBox.o YQComboBox.lo: YQComboBox.moc -YQDate.o YQDate.lo: YQDate.moc +YQDateField.o YQDateField.lo: YQDateField.moc YQDialog.o YQDialog.lo: YQDialog.moc YQDownloadProgress.o YQDownloadProgress.lo: YQDownloadProgress.moc YQDumbTab.o YQDumbTab.lo: YQDumbTab.moc @@ -214,7 +214,7 @@ YQSpacing.o YQSpacing.lo: YQSpacing.moc YQSquash.o YQSquash.lo: YQSquash.moc YQTable.o YQTable.lo: YQTable.moc -YQTime.o YQTime.lo: YQTime.moc +YQTimeField.o YQTimeField.lo: YQTimeField.moc YQTree.o YQTree.lo: YQTree.moc YQWizard.o YQWizard.lo: YQWizard.moc YQWizardButton.o YQWizardButton.lo: YQWizardButton.moc
Copied: branches/tmp/sh/mod-ui/qt/src/YQDateField.cc (from r41610, branches/tmp/sh/mod-ui/qt/src/YQDate.cc) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDateFie... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQDate.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQDateField.cc Wed Oct 31 22:02:03 2007 @@ -10,9 +10,9 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YQDate.cc + File: YQDateField.cc
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
@@ -22,17 +22,17 @@
#include "utf8.h" #include "YQUI.h" -#include "YQDate.h" +#include "YQDateField.h" #include "YQWidgetCaption.h"
-YQDate::YQDate( QWidget * parent, +YQDateField::YQDateField( QWidget * parent, const YWidgetOpt & opt, const YCPString & label, const YCPString & date ) //: QDateEdit ( parent ) : QVBox( parent ) - , YDate( opt, label ) + , YDateField( opt, label ) { setWidgetRep( this ); setSpacing( YQWidgetSpacing ); @@ -51,46 +51,46 @@ }
-YCPString YQDate::getDate() +YCPString YQDateField::getDate() { return YCPString( toUTF8(_qt_dateedit->date().toString(Qt::ISODate) ) ); }
-void YQDate::setLabel( const YCPString & label ) +void YQDateField::setLabel( const YCPString & label ) { _caption->setText( label->value() ); - YDate::setLabel( label ); + YDateField::setLabel( label ); }
-void YQDate::setEnabled( bool enabled ) +void YQDateField::setEnabled( bool enabled ) { QVBox::setEnabled( enabled ); YWidget::setEnabled( enabled ); }
-int YQDate::preferredWidth() +int YQDateField::preferredWidth() { return sizeHint().width(); }
-int YQDate::preferredHeight() +int YQDateField::preferredHeight() { return sizeHint().height(); }
-void YQDate::setSize( int newWidth, int newHeight ) +void YQDateField::setSize( int newWidth, int newHeight ) { resize( newWidth, newHeight ); }
-void YQDate::setNewDate( const YCPString & date ) +void YQDateField::setNewDate( const YCPString & date ) { _qt_dateedit->setDate( QDate::fromString(date->value(), Qt::ISODate ));
@@ -98,4 +98,4 @@
-#include "YQDate.moc" +#include "YQDateField.moc"
Copied: branches/tmp/sh/mod-ui/qt/src/YQDateField.h (from r41610, branches/tmp/sh/mod-ui/qt/src/YQDate.h) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDateFie... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQDate.h (original) +++ branches/tmp/sh/mod-ui/qt/src/YQDateField.h Wed Oct 31 22:02:03 2007 @@ -10,27 +10,27 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YQDate.h + File: YQDateField.h
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
-#ifndef YQDate_h -#define YQDate_h +#ifndef YQDateField_h +#define YQDateField_h
#include <qdatetimeedit.h> #include <qvbox.h> #include <ycp/YCPString.h> #include <ycp/YCPInteger.h>
-#include "YDate.h" +#include "YDateField.h"
class YQWidgetCaption;
-class YQDate : public QVBox, public YDate +class YQDateField : public QVBox, public YDateField { Q_OBJECT
@@ -39,10 +39,10 @@ /** * Constructor. **/ - YQDate( QWidget * parent, - const YWidgetOpt & opt, - const YCPString & label, - const YCPString & date ); + YQDateField( QWidget * parent, + const YWidgetOpt & opt, + const YCPString & label, + const YCPString & initialDate );
/** * Inherited from YWidget: Sets the enabled state of the @@ -99,4 +99,4 @@ };
-#endif // YQDate_h +#endif // YQDateField_h
Modified: branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQOptiona... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.h (original) +++ branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.h Wed Oct 31 22:02:03 2007 @@ -23,6 +23,7 @@ #include "YOptionalWidgetFactory.h"
#include "YQBarGraph.h" +#include "YQDateField.h" #include "YQDownloadProgress.h" #include "YQDumbTab.h" #include "YQMultiProgressMeter.h" @@ -30,15 +31,8 @@ #include "YQPatternSelector.h" #include "YQSimplePatchSelector.h" #include "YQSlider.h" -#include "YQWizard.h" - -#if 0 -#include "YQDateField.h" #include "YQTimeField.h" -#else -#define YQDateField YDateField -#define YQTimeField YTimeField -#endif +#include "YQWizard.h"
using std::string; using std::vector;
Copied: branches/tmp/sh/mod-ui/qt/src/YQTimeField.cc (from r41610, branches/tmp/sh/mod-ui/qt/src/YQTime.cc) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTimeFie... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQTime.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQTimeField.cc Wed Oct 31 22:02:03 2007 @@ -10,9 +10,9 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YQTime.cc + File: YQTimeField.cc
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
@@ -22,17 +22,17 @@
#include "utf8.h" #include "YQUI.h" -#include "YQTime.h" +#include "YQTimeField.h" #include "YQWidgetCaption.h"
-YQTime::YQTime( QWidget * parent, +YQTimeField::YQTimeField( QWidget * parent, const YWidgetOpt & opt, const YCPString & label, const YCPString & time ) //: QTimeEdit ( parent ) : QVBox( parent ) - , YTime( opt, label ) + , YTimeField( opt, label ) { setWidgetRep( this ); setSpacing( YQWidgetSpacing ); @@ -40,60 +40,60 @@
_caption = new YQWidgetCaption( this, label->value() ); YUI_CHECK_NEW( _caption ); - + _qt_timeedit = new QTimeEdit( this ); YUI_CHECK_NEW( _qt_timeedit ); - + _qt_timeedit->setTime( QTime::fromString(time->value(), Qt::ISODate ));
_caption->setBuddy( _qt_timeedit ); }
-YCPString YQTime::getTime() +YCPString YQTimeField::getTime() { return YCPString( toUTF8(_qt_timeedit->time().toString(Qt::ISODate) ) ); }
-void YQTime::setLabel( const YCPString & label ) +void YQTimeField::setLabel( const YCPString & label ) { _caption->setText( label->value() ); - YTime::setLabel( label ); + YTimeField::setLabel( label ); }
-void YQTime::setEnabled( bool enabled ) +void YQTimeField::setEnabled( bool enabled ) { QVBox::setEnabled( enabled ); YWidget::setEnabled( enabled ); }
-int YQTime::preferredWidth() +int YQTimeField::preferredWidth() { return sizeHint().width(); }
-int YQTime::preferredHeight() +int YQTimeField::preferredHeight() { return sizeHint().height(); }
-void YQTime::setSize( int newWidth, int newHeight ) +void YQTimeField::setSize( int newWidth, int newHeight ) { resize( newWidth, newHeight ); }
-void YQTime::setNewTime( const YCPString & time ) +void YQTimeField::setNewTime( const YCPString & time ) { - _qt_timeedit->setTime( QTime::fromString(time->value(), Qt::ISODate )); - + _qt_timeedit->setTime( QTime::fromString(time->value(), Qt::ISODate )); + }
-#include "YQTime.moc" +#include "YQTimeField.moc"
Copied: branches/tmp/sh/mod-ui/qt/src/YQTimeField.h (from r41610, branches/tmp/sh/mod-ui/qt/src/YQTime.h) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTimeFie... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQTime.h (original) +++ branches/tmp/sh/mod-ui/qt/src/YQTimeField.h Wed Oct 31 22:02:03 2007 @@ -10,15 +10,15 @@ | (C) SuSE GmbH | ----------------------------------------------------------------------/
- File: YQTime.h + File: YQTimeField.h
- Author: Anas Nashif nashif@suse.de + Author: Stefan Hundhammer sh@suse.de
/-*/
-#ifndef YQTime_h -#define YQTime_h +#ifndef YQTimeField_h +#define YQTimeField_h
#include <qdatetimeedit.h> #include <qvbox.h> @@ -26,12 +26,12 @@ #include <ycp/YCPString.h> #include <ycp/YCPInteger.h>
-#include "YTime.h" +#include "YTimeField.h"
class YQWidgetCaption;
-class YQTime : public QVBox, public YTime +class YQTimeField : public QVBox, public YTimeField { Q_OBJECT
@@ -40,10 +40,10 @@ /** * Constructor. **/ - YQTime( QWidget * parent, - const YWidgetOpt & opt, - const YCPString & label, - const YCPString & time ); + YQTimeField( QWidget * parent, + const YWidgetOpt & opt, + const YCPString & label, + const YCPString & initialTime );
/** * Inherited from YWidget: Sets the enabled state of the @@ -87,17 +87,17 @@ * Changes the label of the time entry. **/ void setLabel( const YCPString & label ); - + /** * Change the label text. **/ //void setTime( const YCPString & label ); - + protected: - + YQWidgetCaption * _caption; QTimeEdit * _qt_timeedit; };
-#endif // YQTime_h +#endif // YQTimeField_h
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_widg... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc Wed Oct 31 22:02:03 2007 @@ -22,7 +22,7 @@ #include "YQUI.h"
#include "YQBarGraph.h" -#include "YQDate.h" +#include "YQDateField.h" #include "YQDialog.h" #include "YQDownloadProgress.h" #include "YQDumbTab.h" @@ -31,7 +31,7 @@ #include "YQPackageSelectorPlugin.h" #include "YQPartitionSplitter.h" #include "YQSlider.h" -#include "YQTime.h" +#include "YQTimeField.h"
@@ -165,7 +165,7 @@ const YCPString & label, const YCPString & date ) { - return new YQDate( (QWidget *) ( parent->widgetRep() ), opt, label, date); + return new YQDateField( (QWidget *) ( parent->widgetRep() ), opt, label, date); }
@@ -180,7 +180,7 @@ const YCPString & label, const YCPString & time ) { - return new YQTime( (QWidget *) ( parent->widgetRep() ), opt, label, time); + return new YQTimeField( (QWidget *) ( parent->widgetRep() ), opt, label, time); }
Modified: branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQWidgetF... ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.h (original) +++ branches/tmp/sh/mod-ui/qt/src/YQWidgetFactory.h Wed Oct 31 22:02:03 2007 @@ -49,7 +49,7 @@ #include "YQSpacing.h" #include "YQSquash.h" #include "YQTable.h" -#include "YQTime.h" +#include "YQTimeField.h" #include "YQTree.h"
using std::string;
yast-commit@lists.opensuse.org