YaST Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
October 2007
- 25 participants
- 535 discussions
[yast-commit] r41702 - /branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.cc
by sh-sh-sh@svn.opensuse.org 31 Oct '07
by sh-sh-sh@svn.opensuse.org 31 Oct '07
31 Oct '07
Author: sh-sh-sh
Date: Thu Nov 1 00:10:03 2007
New Revision: 41702
URL: http://svn.opensuse.org/viewcvs/yast?rev=41702&view=rev
Log:
cruft
Modified:
branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.cc
Modified: branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQRadioB…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.cc Thu Nov 1 00:10:03 2007
@@ -20,7 +20,6 @@
#include <qradiobutton.h>
#include <qbuttongroup.h>
#define y2log_component "qt-ui"
-#include <ycp/YCPBoolean.h>
#include <ycp/y2log.h>
#include "YQRadioButtonGroup.h"
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r41701 - in /branches/tmp/sh/mod-ui/qt/src: YQIntField.cc YQIntField.h YQMenuButton.h
by sh-sh-sh@svn.opensuse.org 31 Oct '07
by sh-sh-sh@svn.opensuse.org 31 Oct '07
31 Oct '07
Author: sh-sh-sh
Date: Thu Nov 1 00:08:45 2007
New Revision: 41701
URL: http://svn.opensuse.org/viewcvs/yast?rev=41701&view=rev
Log:
cruft
Modified:
branches/tmp/sh/mod-ui/qt/src/YQIntField.cc
branches/tmp/sh/mod-ui/qt/src/YQIntField.h
branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h
Modified: branches/tmp/sh/mod-ui/qt/src/YQIntField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQIntFie…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQIntField.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQIntField.cc Thu Nov 1 00:08:45 2007
@@ -17,6 +17,8 @@
/-*/
+#include <qspinbox.h>
+
#define y2log_component "qt-ui"
#include <ycp/y2log.h>
Modified: branches/tmp/sh/mod-ui/qt/src/YQIntField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQIntFie…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQIntField.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQIntField.h Thu Nov 1 00:08:45 2007
@@ -20,17 +20,15 @@
#ifndef YQIntField_h
#define YQIntField_h
-#include <qspinbox.h>
#include <qlabel.h>
#include <qvbox.h>
-#include <ycp/YCPString.h>
#include "YIntField.h"
-class QString;
class YQWidgetCaption;
-class QIntField;
+class QSpinBox;
+
class YQIntField : public QVBox, public YIntField
{
Modified: branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQMenuBu…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h Thu Nov 1 00:08:45 2007
@@ -21,8 +21,6 @@
#define YQMenuButton_h
#include <qwidget.h>
-#include <ycp/YCPString.h>
-
#include "YMenuButton.h"
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r41700 - in /branches/tmp/sh/mod-ui/qt/src: YQCheckBox.h YQInputField.h
by sh-sh-sh@svn.opensuse.org 31 Oct '07
by sh-sh-sh@svn.opensuse.org 31 Oct '07
31 Oct '07
Author: sh-sh-sh
Date: Thu Nov 1 00:04:47 2007
New Revision: 41700
URL: http://svn.opensuse.org/viewcvs/yast?rev=41700&view=rev
Log:
cruft
Modified:
branches/tmp/sh/mod-ui/qt/src/YQCheckBox.h
branches/tmp/sh/mod-ui/qt/src/YQInputField.h
Modified: branches/tmp/sh/mod-ui/qt/src/YQCheckBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQCheckB…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQCheckBox.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQCheckBox.h Thu Nov 1 00:04:47 2007
@@ -21,8 +21,6 @@
#define YQCheckBox_h
#include <qgroupbox.h>
-#include <ycp/YCPString.h>
-
#include "YCheckBox.h"
Modified: branches/tmp/sh/mod-ui/qt/src/YQInputField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQInputF…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQInputField.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQInputField.h Thu Nov 1 00:04:47 2007
@@ -22,7 +22,6 @@
#include <qvbox.h>
#include <qlineedit.h>
-#include <ycp/YCPString.h>
#include "YInputField.h"
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r41699 - /branches/tmp/sh/mod-ui/qt/src/YQPushButton.h
by sh-sh-sh@svn.opensuse.org 31 Oct '07
by sh-sh-sh@svn.opensuse.org 31 Oct '07
31 Oct '07
Author: sh-sh-sh
Date: Thu Nov 1 00:03:38 2007
New Revision: 41699
URL: http://svn.opensuse.org/viewcvs/yast?rev=41699&view=rev
Log:
cruft
Modified:
branches/tmp/sh/mod-ui/qt/src/YQPushButton.h
Modified: branches/tmp/sh/mod-ui/qt/src/YQPushButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQPushBu…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQPushButton.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQPushButton.h Thu Nov 1 00:03:38 2007
@@ -20,8 +20,6 @@
#ifndef YQPushButton_h
#define YQPushButton_h
-#include <ycp/YCPString.h>
-
#include "YQGenericButton.h"
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r41698 - in /branches/tmp/sh/mod-ui: core/libyui/doc/examples/ core/libyui/src/ qt/src/
by sh-sh-sh@svn.opensuse.org 31 Oct '07
by sh-sh-sh@svn.opensuse.org 31 Oct '07
31 Oct '07
Author: sh-sh-sh
Date: Thu Nov 1 00:01:26 2007
New Revision: 41698
URL: http://svn.opensuse.org/viewcvs/yast?rev=41698&view=rev
Log:
Ported YTimeField + YDateField
(used only once all over YaST2...)
Added:
branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.cc
branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.h
Modified:
branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateField1.ycp
branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeField1.ycp
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/YDateField.cc
branches/tmp/sh/mod-ui/core/libyui/src/YDateField.h
branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.cc
branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.h
branches/tmp/sh/mod-ui/core/libyui/src/YUI.h
branches/tmp/sh/mod-ui/core/libyui/src/YUISymbols.h
branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc
branches/tmp/sh/mod-ui/core/libyui/src/YUI_special_widgets.cc
branches/tmp/sh/mod-ui/qt/src/YQBarGraph.h
branches/tmp/sh/mod-ui/qt/src/YQDateField.cc
branches/tmp/sh/mod-ui/qt/src/YQDateField.h
branches/tmp/sh/mod-ui/qt/src/YQDialog.h
branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h
branches/tmp/sh/mod-ui/qt/src/YQDumbTab.h
branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h
branches/tmp/sh/mod-ui/qt/src/YQInputField.h
branches/tmp/sh/mod-ui/qt/src/YQLayoutBox.h
branches/tmp/sh/mod-ui/qt/src/YQLogView.h
branches/tmp/sh/mod-ui/qt/src/YQMultiProgressMeter.h
branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.cc
branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.h
branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.h
branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h
branches/tmp/sh/mod-ui/qt/src/YQSlider.h
branches/tmp/sh/mod-ui/qt/src/YQTimeField.cc
branches/tmp/sh/mod-ui/qt/src/YQTimeField.h
branches/tmp/sh/mod-ui/qt/src/YQUI.h
branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc
Modified: branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateField1.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/DateField1.ycp (original)
+++ branches/tmp/sh/mod-ui/core/libyui/doc/examples/DateField1.ycp Thu Nov 1 00:01:26 2007
@@ -2,14 +2,15 @@
{
UI::OpenDialog(
`VBox(
- `Left( `DateField(`id(`date), "Date:", "2004-10-24") ),
- `Left( `TimeField(`id(`time), "Time:", "10:10:00" ) ),
+ `Left( `DateField(`id(`date), `opt(`hstretch), "Date:", "1989-11-09") ),
+ `Left( `TimeField(`id(`time), `opt(`hstretch), "Time:", "20:15:00" ) ),
`PushButton("&OK")
)
);
UI::UserInput();
- y2milestone("Returns %1", UI::QueryWidget(`id(`date), `Value) );
- UI::ChangeWidget(`id(`date),`Value, "2004-01-01");
- UI::UserInput();
+
+ y2milestone( "Date: %1", UI::QueryWidget(`id(`date), `Value) );
+ y2milestone( "Time: %1", UI::QueryWidget(`id(`time), `Value) );
+
UI::CloseDialog();
}
Modified: branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeField1.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/TimeField1.ycp (original)
+++ branches/tmp/sh/mod-ui/core/libyui/doc/examples/TimeField1.ycp Thu Nov 1 00:01:26 2007
@@ -2,12 +2,10 @@
{
UI::OpenDialog(
`VBox(
- `TimeField(`id(`time), "Time:", "10:10:00"),
+ `TimeField(`id(`time), "Time:", "13:15:00"),
`PushButton("&OK")
)
);
UI::UserInput();
- UI::ChangeWidget(`id(`time),`Value, "10:10:00");
- UI::UserInput();
UI::CloseDialog();
}
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 Thu Nov 1 00:01:26 2007
@@ -79,6 +79,7 @@
YShortcut.cc \
YShortcutManager.cc \
YSimpleEventHandler.cc \
+ YSimpleInputField.cc \
YSingleChildContainerWidget.cc \
YSlider.cc \
YSpacing.cc \
@@ -174,6 +175,7 @@
YShortcutManager.h \
YSimpleEventHandler.h \
YSingleChildContainerWidget.h \
+ YSimpleInputField.h \
YSlider.h \
YSpacing.h \
YSquash.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 Thu Nov 1 00:01:26 2007
@@ -48,6 +48,7 @@
#include "YCheckBox.h"
#include "YCheckBoxFrame.h"
#include "YComboBox.h"
+#include "YDateField.h"
#include "YDumbTab.h"
#include "YEmpty.h"
#include "YFrame.h"
@@ -55,8 +56,8 @@
#include "YInputField.h"
#include "YIntField.h"
#include "YLabel.h"
-#include "YLogView.h"
#include "YLayoutBox.h"
+#include "YLogView.h"
#include "YMenuButton.h"
#include "YMultiLineEdit.h"
#include "YMultiProgressMeter.h"
@@ -72,6 +73,7 @@
#include "YSpacing.h"
#include "YSquash.h"
#include "YTable.h"
+#include "YTimeField.h"
#include "YTree.h"
#include "YWizard.h"
@@ -2900,6 +2902,7 @@
}
rejectAllOptions( term,optList );
+
return YUI::optionalWidgetFactory()->createMultiProgressMeter( parent, dim, maxValues );
}
@@ -3210,25 +3213,25 @@
|| !term->value(argnr)->isString()
|| (term->size() == argnr+2 && !term->value(argnr+1)->isString()))
{
- y2error( "Invalid arguments for the Date widget: %s",
+ y2error( "Invalid arguments for the DateField widget: %s",
term->toString().c_str() );
return 0;
}
- YCPString initial_date( "2000-01-01" );
- if ( term->size() >= argnr + 2 ) initial_date = term->value( argnr+1 )->asString();
- YWidget *_date;
- if ( YUI::ui()->hasDate() )
- {
- _date = YUI::ui()->createDate( parent, opt, term->value( argnr )->asString(), initial_date );
- }
- else
+
+ rejectAllOptions( term,optList );
+
+ string label = term->value( argnr )->asString()->value();
+
+ YDateField * dateField = YUI::optionalWidgetFactory()->createDateField( parent, label );
+
+ if ( term->size() >= argnr + 2 )
{
- y2error( "This UI does not support the Date widget." );
- return 0;
+ string initialValue = term->value( argnr+1 )->asString()->value();
+ dateField->setValue( initialValue );
}
- return _date;
+ return dateField;
}
@@ -3257,39 +3260,24 @@
|| !term->value(argnr)->isString()
|| (term->size() == argnr+2 && !term->value(argnr+1)->isString()))
{
- y2error( "Invalid arguments for the Time widget: %s",
+ y2error( "Invalid arguments for the TimeField widget: %s",
term->toString().c_str() );
return 0;
}
- YWidget *_time;
- YCPString initial_time( "2000-01-01" );
-
-
- if ( YUI::ui()->hasTime() )
- {
- if ( term->size() >= argnr + 2 ) initial_time = term->value( argnr+1 )->asString();
-
- for ( int o=0; o < optList->size(); o++ )
- {
- if ( optList->value(o)->isSymbol() )
- {
- string sym = optList->value(o)->asSymbol()->symbol();
-
- if ( sym == YUIOpt_autoAdvance ) opt.autoAdvance.setValue( true );
- else logUnknownOption( term, optList->value(o) );
- }
- else logUnknownOption( term, optList->value(o) );
- }
-
- _time = YUI::ui()->createTime( parent, opt, term->value( argnr )->asString(), initial_time );
- }
- else
+
+ rejectAllOptions( term,optList );
+
+ string label = term->value( argnr )->asString()->value();
+
+ YTimeField * timeField = YUI::optionalWidgetFactory()->createTimeField( parent, label );
+
+ if ( term->size() >= argnr + 2 )
{
- y2error( "This UI does not support the Time widget." );
- return 0;
+ string initialValue = term->value( argnr+1 )->asString()->value();
+ timeField->setValue( initialValue );
}
- return _time;
+ return timeField;
}
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YDateField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YDateField.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YDateField.cc Thu Nov 1 00:01:26 2007
@@ -17,62 +17,42 @@
/-*/
-#include <ycp/YCPSymbol.h>
-#include <ycp/YCPBoolean.h>
#define y2log_component "ui"
#include <ycp/y2log.h>
-#include "YUISymbols.h"
#include "YDateField.h"
-YDateField::YDateField( const YWidgetOpt & opt,
- const YCPString & label)
- : YWidget( opt )
- , label ( label )
+
+struct YDateFieldPrivate
{
- y2debug( "YDateField( %s )", label->value_cstr() );
-}
+ YDateFieldPrivate()
+ {}
+ bool dummy;
+};
-YCPValue YDateField::changeWidget( const YCPSymbol & property, const YCPValue & newValue )
-{
- string s = property->symbol();
- /**
- * @property string Value the date
- */
- if ( s == YUIProperty_Value )
- {
- if ( newValue->isString() )
- {
- setNewDate( newValue->asString() );
- return YCPBoolean( true );
- }
- else
- {
- y2error( "Label: Invalid parameter %s for Value property. Must be string",
- newValue->toString().c_str() );
- return YCPBoolean( false );
- }
- }
- else return YWidget::changeWidget( property, newValue );
-}
-void YDateField::setLabel( const YCPString & label )
+YDateField::YDateField( YWidget * parent, const string & label )
+ : YSimpleInputField( parent, label )
+ , priv( new YDateFieldPrivate() )
{
- this->label = label;
+ YUI_CHECK_NEW( priv );
}
-
-YCPValue YDateField::queryWidget( const YCPSymbol & property )
+YDateField::~YDateField()
{
- string s = property->symbol();
- if ( s == YUIProperty_Value ) return getDate();
- else return YWidget::queryWidget( property );
+ // NOP
}
+/*
+ * Properties (all handled in YSimpleInputField):
+ *
+ * @property string Value the date (the field's contents) as "YYYY-MM-DD"
+ * @property string Label caption above the input field
+ */
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YDateField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YDateField.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YDateField.h Thu Nov 1 00:01:26 2007
@@ -19,60 +19,44 @@
#ifndef YDateField_h
#define YDateField_h
-#include "YWidget.h"
-#include <ycp/YCPString.h>
+#include "YSimpleInputField.h"
+class YDateFieldPrivate;
-class YDateField : public YWidget
+/**
+ * Input field for entering a date.
+ *
+ * Derived classes are required to implement:
+ * value()
+ * setValue()
+ *
+ * For both methods the date is formatted as "YYYY-MM-DD".
+ * See YSimpleInputField.h for more details.
+ **/
+class YDateField : public YSimpleInputField
{
protected:
/**
* Constructor.
**/
- YDateField( const YWidgetOpt & opt, const YCPString & label );
+ YDateField( YWidget * parent, const string & label );
public:
/**
- * Returns a descriptive name of this widget class for logging,
- * debugging etc.
- **/
- virtual const char * widgetClass() const { return "YDateField"; }
-
- /**
- * Implements the ui command changeWidget.
+ * Destructor.
**/
- YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue );
+ virtual ~YDateField();
/**
- * Implements the ui command queryWidget
- **/
- YCPValue queryWidget( const YCPSymbol & property );
-
-
- /**
- * Set the date in the entry to a new value
- **/
- virtual void setNewDate( const YCPString & text ) = 0;
-
- /**
- * get the date currently entered in the Date entry
- **/
- virtual YCPString getDate() = 0;
-
- /**
- * change the label of the Date entry. Overload this, but call
- * YDateField::setLabel at the end of your own function.
+ * Returns a descriptive name of this widget class for logging,
+ * debugging etc.
**/
- virtual void setLabel( const YCPString & label );
+ virtual const char * widgetClass() const { return "YDateField"; }
-protected:
- /**
- * Current label
- **/
- YCPString label;
-
+private:
+ ImplPtr<YDateFieldPrivate> priv;
};
Added: branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.cc (added)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.cc Thu Nov 1 00:01:26 2007
@@ -0,0 +1,124 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YSimpleInputField.cc
+
+ Author: Stefan Hundhammer <sh(a)suse.de>
+
+/-*/
+
+
+#define y2log_component "ui"
+#include <ycp/y2log.h>
+
+#include "YUISymbols.h"
+#include "YMacroRecorder.h"
+#include "YSimpleInputField.h"
+
+
+struct YSimpleInputFieldPrivate
+{
+ YSimpleInputFieldPrivate( const string & label )
+ : label( label )
+ {}
+
+ string label;
+};
+
+
+
+
+YSimpleInputField::YSimpleInputField( YWidget * parent, const string & label )
+ : YWidget( parent )
+ , priv( new YSimpleInputFieldPrivate( label ) )
+{
+ YUI_CHECK_NEW( priv );
+
+ setDefaultStretchable( YD_HORIZ, false );
+ setDefaultStretchable( YD_VERT, false );
+}
+
+
+YSimpleInputField::~YSimpleInputField()
+{
+ // NOP
+}
+
+
+string YSimpleInputField::label()
+{
+ return priv->label;
+}
+
+
+void YSimpleInputField::setLabel( const string & label )
+{
+ priv->label = label;
+}
+
+
+
+const YPropertySet &
+YSimpleInputField::propertySet()
+{
+ static YPropertySet propSet;
+
+ if ( propSet.isEmpty() )
+ {
+ /*
+ * @property string Value the text the user entered
+ * @property string Label caption above the input field
+ */
+ propSet.add( YProperty( YUIProperty_Value, YStringProperty ) );
+ propSet.add( YProperty( YUIProperty_Label, YStringProperty ) );
+ propSet.add( YWidget::propertySet() );
+ }
+
+ return propSet;
+}
+
+
+bool
+YSimpleInputField::setProperty( const string & propertyName, const YPropertyValue & val )
+{
+ propertySet().check( propertyName, val.type() ); // throws exceptions if not found or type mismatch
+
+ if ( propertyName == YUIProperty_Value ) setValue( val.stringVal() );
+ else if ( propertyName == YUIProperty_Label ) setLabel( val.stringVal() );
+ else
+ {
+ return YWidget::setProperty( propertyName, val );
+ }
+
+ return true; // success -- no special processing necessary
+}
+
+
+YPropertyValue
+YSimpleInputField::getProperty( const string & propertyName )
+{
+ propertySet().check( propertyName ); // throws exceptions if not found
+
+ if ( propertyName == YUIProperty_Value ) return YPropertyValue( value() );
+ else if ( propertyName == YUIProperty_Label ) return YPropertyValue( label() );
+ else
+ {
+ return YWidget::getProperty( propertyName );
+ }
+}
+
+
+void
+YSimpleInputField::saveUserInput( YMacroRecorder *macroRecorder )
+{
+ macroRecorder->recordWidgetProperty( this, YUIProperty_Value );
+}
Added: branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.h (added)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YSimpleInputField.h Thu Nov 1 00:01:26 2007
@@ -0,0 +1,141 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YSimpleInputField.h
+
+ Author: Stefan Hundhammer <sh(a)suse.de>
+
+/-*/
+
+#ifndef YSimpleInputField_h
+#define YSimpleInputField_h
+
+#include "YWidget.h"
+
+class YSimpleInputFieldPrivate;
+
+
+/**
+ * Abstract base class for simple input fields with a label above the field and
+ * a text value.
+ **/
+class YSimpleInputField : public YWidget
+{
+protected:
+ /**
+ * Constructor.
+ **/
+ YSimpleInputField( YWidget * parent, const string & label );
+
+public:
+ /**
+ * Destructor.
+ **/
+ virtual ~YSimpleInputField();
+
+ /**
+ * Get the current value (the text entered by the user or set from the
+ * outside) of this input field.
+ *
+ * Derived classes are required to implement this.
+ **/
+ virtual string value() = 0;
+
+ /**
+ * Set the current value (the text entered by the user or set from the
+ * outside) of this input field.
+ *
+ * Derived classes are required to implement this.
+ **/
+ virtual void setValue( const string & text ) = 0;
+
+ /**
+ * Get the label (the caption above the input field).
+ **/
+ string label();
+
+ /**
+ * Set the label (the caption above the input field).
+ *
+ * Derived classes are free to reimplement this, but they should call this
+ * base class method at the end of the overloaded function.
+ **/
+ virtual void setLabel( const string & label );
+
+ /**
+ * Set a property.
+ * Reimplemented from YWidget.
+ *
+ * This function may throw YUIPropertyExceptions.
+ *
+ * This function returns 'true' if the value was successfully set and
+ * 'false' if that value requires special handling (not in error cases:
+ * those are covered by exceptions).
+ **/
+ virtual bool setProperty( const string & propertyName,
+ const YPropertyValue & val );
+
+ /**
+ * Get a property.
+ * Reimplemented from YWidget.
+ *
+ * This method may throw YUIPropertyExceptions.
+ **/
+ virtual YPropertyValue getProperty( const string & propertyName );
+
+ /**
+ * Return this class's property set.
+ * This also initializes the property upon the first call.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual const YPropertySet & propertySet();
+
+ /**
+ * Get the string of this widget that holds the keyboard shortcut.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual string shortcutString() { return label(); }
+
+ /**
+ * Set the string of this widget that holds the keyboard shortcut.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setShortcutString( const string & str )
+ { setLabel( str ); }
+
+ /**
+ * The name of the widget property that will return user input.
+ * Inherited from YWidget.
+ **/
+ const char * userInputProperty() { return YUIProperty_Value; }
+
+
+protected:
+ /**
+ * Save the widget's user input to a macro recorder.
+ *
+ * This sample implementation saves value(). This can be reimplemented in
+ * derived classes. Typically it does not make sense to call this base
+ * class method in new implementations.
+ **/
+ virtual void saveUserInput( YMacroRecorder *macroRecorder );
+
+private:
+
+ ImplPtr<YSimpleInputFieldPrivate> priv;
+};
+
+
+#endif // YSimpleInputField_h
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.cc Thu Nov 1 00:01:26 2007
@@ -17,66 +17,40 @@
/-*/
-#include <ycp/YCPSymbol.h>
-#include <ycp/YCPBoolean.h>
#define y2log_component "ui"
#include <ycp/y2log.h>
-#include "YUISymbols.h"
#include "YTimeField.h"
-YTimeField::YTimeField( const YWidgetOpt & opt,
- const YCPString & label)
- : YWidget( opt )
- , label ( label )
- , autoAdvance ( false)
+struct YTimeFieldPrivate
{
+ YTimeFieldPrivate()
+ {}
- if ( opt.autoAdvance.value() )
- autoAdvance = true;
- y2debug( "YTimeField( %s )", label->value_cstr() );
-}
-
+ bool dummy;
+};
-YCPValue YTimeField::changeWidget( const YCPSymbol & property, const YCPValue & newValue )
-{
- string s = property->symbol();
- /**
- * @property string Value the date
- */
- if ( s == YUIProperty_Value )
- {
- if ( newValue->isString() )
- {
- setNewTime( newValue->asString() );
- return YCPBoolean( true );
- }
- else
- {
- y2error( "Label: Invalid parameter %s for Value property. Must be string",
- newValue->toString().c_str() );
- return YCPBoolean( false );
- }
- }
- else return YWidget::changeWidget( property, newValue );
-}
-void YTimeField::setLabel( const YCPString & label )
+YTimeField::YTimeField( YWidget * parent, const string & label )
+ : YSimpleInputField( parent, label )
+ , priv( new YTimeFieldPrivate() )
{
- this->label = label;
+ YUI_CHECK_NEW( priv );
}
-
-YCPValue YTimeField::queryWidget( const YCPSymbol & property )
+YTimeField::~YTimeField()
{
- string s = property->symbol();
- if ( s == YUIProperty_Value ) return getTime();
- else return YWidget::queryWidget( property );
+ // NOP
}
-
+/*
+ * Properties (all handled in YSimpleInputField):
+ *
+ * @property string Value the time (the field's contents) as "hh:mm:ss"
+ * @property string Label caption above the input field
+ */
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YTimeField.h Thu Nov 1 00:01:26 2007
@@ -19,65 +19,42 @@
#ifndef YTimeField_h
#define YTimeField_h
-#include "YWidget.h"
-#include <ycp/YCPString.h>
+#include "YSimpleInputField.h"
+class YTimeFieldPrivate;
-class YTimeField : public YWidget
+
+/**
+ * Input field for entering a time in "hh:mm:ss" format.
+ *
+ * Derived classes are required to implement:
+ * value()
+ * setValue()
+ * See YSimpleInputField.h for details.
+ **/
+class YTimeField : public YSimpleInputField
{
protected:
/**
- * Creates a new date
- * @param text the initial text of the date
+ * Constructor.
**/
- YTimeField( const YWidgetOpt & opt, const YCPString & label );
+ YTimeField( YWidget * parent, const string & label );
public:
/**
- * Returns a descriptive name of this widget class for logging,
- * debugging etc.
- **/
- virtual const char * widgetClass() const { return "YTimeField"; }
-
- /**
- * Implements the ui command changeWidget.
- **/
- YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue );
-
- /**
- * Implements the ui command queryWidget
- **/
- YCPValue queryWidget( const YCPSymbol & property );
-
-
- /**
- * Set the date in the entry to a new value
+ * Destructor.
**/
- virtual void setNewTime( const YCPString & text ) = 0;
+ virtual ~YTimeField();
/**
- * get the date currently entered in the Time entry
- **/
- virtual YCPString getTime() = 0;
-
- /**
- * change the label of the Time entry. Overload this, but call
- * YTimeField::setLabel at the end of your own function.
+ * Returns a descriptive name of this widget class for logging,
+ * debugging etc.
**/
- virtual void setLabel( const YCPString & label );
-
+ virtual const char * widgetClass() const { return "YTimeField"; }
-protected:
- /**
- * Current label
- **/
- YCPString label;
+private:
- /**
- * Flag: This property holds whether the editor automatically advances to the next section.
- **/
- bool autoAdvance;
-
+ ImplPtr<YTimeFieldPrivate> priv;
};
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUI.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUI.h Thu Nov 1 00:01:26 2007
@@ -481,27 +481,6 @@
virtual YWidget * createBarGraph( YWidget *parent, YWidgetOpt & opt );
virtual bool hasBarGraph() { return false; }
-
- /**
- * Creates a Date input filed
- **/
- virtual YWidget * createDate( YWidget *parent,
- YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & date );
- virtual bool hasDate() { return false; }
-
-
- /**
- * Creates a Time input filed
- **/
- virtual YWidget * createTime( YWidget *parent,
- YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & time );
- virtual bool hasTime() { return false; }
-
-
/**
* Creates a DumbTab.
*
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 Thu Nov 1 00:01:26 2007
@@ -181,7 +181,6 @@
// Widget and dialog options
#define YUIOpt_animated "animated"
-#define YUIOpt_autoAdvance "autoAdvance"
#define YUIOpt_autoScrollDown "autoScrollDown"
#define YUIOpt_autoShortcut "autoShortcut"
#define YUIOpt_boldFont "boldFont"
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc Thu Nov 1 00:01:26 2007
@@ -94,8 +94,8 @@
else if ( symbol == YUISpecialWidget_PartitionSplitter ) hasWidget = hasPartitionSplitter();
else if ( symbol == YUISpecialWidget_SimplePatchSelector ) hasWidget = fact->hasSimplePatchSelector();
else if ( symbol == YUISpecialWidget_Wizard ) hasWidget = fact->hasWizard();
- else if ( symbol == YUISpecialWidget_Date ) hasWidget = hasDate();
- else if ( symbol == YUISpecialWidget_Time ) hasWidget = hasTime();
+ else if ( symbol == YUISpecialWidget_Date ) hasWidget = fact->hasDateField();
+ else if ( symbol == YUISpecialWidget_Time ) hasWidget = fact->hasTimeField();
else
{
y2error( "HasSpecialWidget(): Unknown special widget: %s", symbol.c_str() );
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUI_special_widgets.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUI_special_widgets.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUI_special_widgets.cc Thu Nov 1 00:01:26 2007
@@ -54,30 +54,6 @@
}
-
-YWidget * YUI::createDate( YWidget *parent, YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & date)
-{
- y2error( "Default Date() method called - "
- "forgot to call HasSpecialWidget()?" );
-
- return 0;
-}
-
-
-YWidget * YUI::createTime( YWidget *parent, YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & time)
-{
- y2error( "Default Time() method called - "
- "forgot to call HasSpecialWidget()?" );
-
- return 0;
-}
-
-
-
/**
* Default low level specific UI implementations for optional widgets.
*
Modified: branches/tmp/sh/mod-ui/qt/src/YQBarGraph.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQBarGra…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQBarGraph.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQBarGraph.h Thu Nov 1 00:01:26 2007
@@ -38,11 +38,11 @@
YQBarGraph( QWidget * parent, const YWidgetOpt & opt );
/**
- * Inherited from YWidget: Sets the enabled state of the
- * widget. All new widgets are enabled per definition. Only
- * enabled widgets can take user input.
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
+ virtual void setEnabled( bool enabled );
/**
* Preferred width of the widget.
Modified: branches/tmp/sh/mod-ui/qt/src/YQDateField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDateFi…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDateField.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDateField.cc Thu Nov 1 00:01:26 2007
@@ -20,47 +20,57 @@
#define y2log_component "qt-ui"
#include <ycp/y2log.h>
+#include <qdatetimeedit.h>
+
#include "utf8.h"
#include "YQUI.h"
#include "YQDateField.h"
#include "YQWidgetCaption.h"
-YQDateField::YQDateField( QWidget * parent,
- const YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & date )
- //: QDateEdit ( parent )
- : QVBox( parent )
- , YDateField( opt, label )
+YQDateField::YQDateField( YWidget * parent, const string & label )
+ : QVBox( (QWidget *) parent->widgetRep() )
+ , YDateField( parent, label )
{
setWidgetRep( this );
setSpacing( YQWidgetSpacing );
- setMargin( YQWidgetMargin );
+ setMargin ( YQWidgetMargin );
- _caption = new YQWidgetCaption( this, label->value() );
+ _caption = new YQWidgetCaption( this, fromUTF8( label ) );
YUI_CHECK_NEW( _caption );
-
- _qt_dateedit = new QDateEdit( this );
- YUI_CHECK_NEW( _qt_dateedit );
-
- _qt_dateedit->setOrder( QDateEdit::DMY );
- _qt_dateedit->setDate( QDate::fromString(date->value(), Qt::ISODate ));
- _caption->setBuddy( _qt_dateedit );
+ _qt_dateEdit = new QDateEdit( this );
+ YUI_CHECK_NEW( _qt_dateEdit );
+
+ _qt_dateEdit->setAutoAdvance( true );
+ _qt_dateEdit->setOrder( QDateEdit::DMY );
+ _caption->setBuddy( _qt_dateEdit );
}
-YCPString YQDateField::getDate()
+YQDateField::~YQDateField()
{
- return YCPString( toUTF8(_qt_dateedit->date().toString(Qt::ISODate) ) );
+ // NOP
}
-void YQDateField::setLabel( const YCPString & label )
+string YQDateField::value()
{
- _caption->setText( label->value() );
- YDateField::setLabel( label );
+ return toUTF8( _qt_dateEdit->date().toString( Qt::ISODate ) );
+}
+
+
+void YQDateField::setValue( const string & newValue )
+{
+ _qt_dateEdit->setDate( QDate::fromString( fromUTF8( newValue ), Qt::ISODate ) );
+
+}
+
+
+void YQDateField::setLabel( const string & newLabel )
+{
+ _caption->setText( fromUTF8( newLabel ) );
+ YDateField::setLabel( newLabel );
}
@@ -89,11 +99,11 @@
}
-
-void YQDateField::setNewDate( const YCPString & date )
+bool YQDateField::setKeyboardFocus()
{
- _qt_dateedit->setDate( QDate::fromString(date->value(), Qt::ISODate ));
-
+ _qt_dateEdit->setFocus();
+
+ return true;
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQDateField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDateFi…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDateField.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDateField.h Thu Nov 1 00:01:26 2007
@@ -20,13 +20,10 @@
#ifndef YQDateField_h
#define YQDateField_h
-#include <qdatetimeedit.h>
#include <qvbox.h>
-#include <ycp/YCPString.h>
-#include <ycp/YCPInteger.h>
-
#include "YDateField.h"
+class QDateEdit;
class YQWidgetCaption;
@@ -39,17 +36,43 @@
/**
* Constructor.
**/
- YQDateField( QWidget * parent,
- const YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & initialDate );
+ YQDateField( YWidget * parent,
+ const string & label );
+
+ /**
+ * Destructor.
+ **/
+ virtual ~YQDateField();
+
+ /**
+ * Get the current value (the text entered by the user or set from the
+ * outside) of this input field.
+ *
+ * Implemented from YSimpleInputField.
+ **/
+ virtual string value();
+
+ /**
+ * Set the current value (the text entered by the user or set from the
+ * outside) of this input field.
+ *
+ * Implemented from YSimpleInputField.
+ **/
+ virtual void setValue( const string & newValue );
+
+ /**
+ * Set the label (the caption above the input field).
+ *
+ * Reimplemented from YSimpleInputField.
+ **/
+ virtual void setLabel( const string & label );
/**
- * Inherited from YWidget: Sets the enabled state of the
- * widget. All new widgets are enabled per definition. Only
- * enabled widgets can take user input.
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
+ virtual void setEnabled( bool enabled );
/**
* Preferred width of the widget.
@@ -64,7 +87,7 @@
* Reimplemented from YWidget.
**/
virtual int preferredHeight();
-
+
/**
* Set the new size of the widget.
*
@@ -73,29 +96,17 @@
virtual void setSize( int newWidth, int newHeight );
/**
- * Set the date in the entry to a new value
+ * Accept the keyboard focus.
+ *
+ * Reimplemented from YWidget.
**/
- void setNewDate( const YCPString & text );
+ virtual bool setKeyboardFocus();
- /**
- * Gets the date currently entered in the Date entry
- **/
- YCPString getDate();
- /**
- * Changes the label of the date entry.
- **/
- void setLabel( const YCPString & label );
-
- /**
- * Change the label text.
- **/
- //void setDate( const YCPString & label );
-
protected:
-
+
YQWidgetCaption * _caption;
- QDateEdit * _qt_dateedit;
+ QDateEdit * _qt_dateEdit;
};
Modified: branches/tmp/sh/mod-ui/qt/src/YQDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDialog…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDialog.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDialog.h Thu Nov 1 00:01:26 2007
@@ -58,6 +58,13 @@
void closeEvent( QCloseEvent * ev );
/**
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setEnabled( bool enabled );
+
+ /**
* Preferred width of the widget.
*
* Reimplemented from YWidget.
@@ -90,13 +97,6 @@
YQGenericButton * findDefaultButton();
/**
- * 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 );
-
- /**
* Returns whether or not the user has resized this dialog.
**/
bool userResized() { return _userResized; }
Modified: branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDownlo…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h Thu Nov 1 00:01:26 2007
@@ -44,10 +44,11 @@
int expectedSize );
/**
- * Sets the widget's enabled state.
- * Inherited from YWidget.
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
+ virtual void setEnabled( bool enabled );
/**
* Preferred width of the widget.
Modified: branches/tmp/sh/mod-ui/qt/src/YQDumbTab.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDumbTa…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDumbTab.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDumbTab.h Thu Nov 1 00:01:26 2007
@@ -41,11 +41,11 @@
const YWidgetOpt & opt );
/**
- * Inherited from YWidget: Sets the enabled state of the
- * widget. All new widgets are enabled per definition. Only
- * enabled widgets can take user input.
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
+ virtual void setEnabled( bool enabled );
/**
* Preferred width of the widget.
Modified: branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQGeneri…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h Thu Nov 1 00:01:26 2007
@@ -55,7 +55,7 @@
virtual ~YQGenericButton();
/**
- * Set enabled/disabled status.
+ * Set enabled/disabled state.
*
* Reimplemented from YWidget.
**/
Modified: branches/tmp/sh/mod-ui/qt/src/YQInputField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQInputF…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQInputField.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQInputField.h Thu Nov 1 00:01:26 2007
@@ -67,7 +67,7 @@
*
* Reimplemented from YInputField.
**/
- void setLabel( const string & label );
+ virtual void setLabel( const string & label );
/**
* Set the valid input characters. No input validation is performed (i.e.,
@@ -75,14 +75,14 @@
*
* Reimplemented from YInputField.
**/
- void setValidChars( const string & validChars );
+ virtual void setValidChars( const string & validChars );
/**
* Specify the amount of characters which can be inserted.
*
* Reimplemented from YInputField.
**/
- void setInputMaxLength( int numberOfChars );
+ virtual void setInputMaxLength( int numberOfChars );
/**
* Returns 'true' if a given text is valid according to ValidChars.
@@ -90,11 +90,11 @@
bool isValidText( const QString & text ) const;
/**
- * Set enabled/disabled status.
+ * Set enabled/disabled state.
*
* Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
+ virtual void setEnabled( bool enabled );
/**
* Preferred width of the widget.
Modified: branches/tmp/sh/mod-ui/qt/src/YQLayoutBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQLayout…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQLayoutBox.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQLayoutBox.h Thu Nov 1 00:01:26 2007
@@ -39,15 +39,11 @@
YQLayoutBox( YWidget * parent, YUIDimension dim );
/**
- * 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 );
-
- /**
- * Inherited from YWidget. Sets the new size of the widget.
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
**/
+ virtual void setEnabled( bool enabled );
/**
* Set the new size of the widget.
@@ -61,7 +57,7 @@
*
* Reimplemented from YLayoutBox.
**/
- void moveChild( YWidget * child, int newX, int newY );
+ virtual void moveChild( YWidget * child, int newX, int newY );
};
Modified: branches/tmp/sh/mod-ui/qt/src/YQLogView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQLogVie…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQLogView.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQLogView.h Thu Nov 1 00:01:26 2007
@@ -68,12 +68,12 @@
virtual void setLabel( const string & label );
/**
- * Inherited from YWidget: Sets the enabled state of the
- * widget. All new widgets are enabled per definition. Only
- * enabled widgets can take user input.
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
-
+ virtual void setEnabled( bool enabled );
+
/**
* Preferred width of the widget.
*
Modified: branches/tmp/sh/mod-ui/qt/src/YQMultiProgressMeter.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQMultiP…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMultiProgressMeter.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMultiProgressMeter.h Thu Nov 1 00:01:26 2007
@@ -133,12 +133,12 @@
void setTriangularShaped( bool triangular = true );
/**
- * Handle enabled/disabled state.
+ * Set enabled/disabled state.
*
* Reimplemented from YWidget.
**/
virtual void setEnabled( bool enabled );
-
+
/**
* Preferred width of the widget.
*
Modified: branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQOption…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQOptionalWidgetFactory.cc Thu Nov 1 00:01:26 2007
@@ -97,26 +97,32 @@
bool YQOptionalWidgetFactory::hasDateField()
{
- return false;
+ return true;
}
YQDateField *
YQOptionalWidgetFactory::createDateField( YWidget * parent, const string & label )
{
- THROW_UNSUPPORTED( "YQDateField" );
+ YQDateField * dateField = new YQDateField( parent, label );
+ YUI_CHECK_NEW( dateField );
+
+ return dateField;
}
bool YQOptionalWidgetFactory::hasTimeField()
{
- return false;
+ return true;
}
YQTimeField *
YQOptionalWidgetFactory::createTimeField( YWidget * parent, const string & label )
{
- THROW_UNSUPPORTED( "YQTimeField" );
+ YQTimeField * timeField = new YQTimeField( parent, label );
+ YUI_CHECK_NEW( timeField );
+
+ return timeField;
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQPartit…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.h Thu Nov 1 00:01:26 2007
@@ -54,11 +54,12 @@
const YCPString & newPartFieldLabel );
/**
- * Sets the widget's enabled state.
- * Inherited from YWidget.
+ * Set enabled/disabled state.
+ *
+ * Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
-
+ virtual void setEnabled( bool enabled );
+
/**
* Preferred width of the widget.
*
Modified: branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQRadioB…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQRadioButtonGroup.h Thu Nov 1 00:01:26 2007
@@ -47,12 +47,12 @@
virtual void addRadioButton( YRadioButton * button );
/**
- * Handle enabled/disabled state.
+ * Set enabled/disabled state.
*
* Reimplemented from YWidget.
**/
virtual void setEnabled( bool enabled );
-
+
/**
* Set the new size of the widget.
*
Modified: branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQReplac…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQReplacePoint.h Thu Nov 1 00:01:26 2007
@@ -45,12 +45,12 @@
virtual void showChild();
/**
- * Handle enabled/disabled state.
+ * Set enabled/disabled state.
*
* Reimplemented from YWidget.
**/
virtual void setEnabled( bool enabled );
-
+
/**
* Set the new size of the widget.
*
Modified: branches/tmp/sh/mod-ui/qt/src/YQSlider.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQSlider…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQSlider.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQSlider.h Thu Nov 1 00:01:26 2007
@@ -51,12 +51,12 @@
int initialValue );
/**
- * Sets the widget's enabled state.
+ * Set enabled/disabled state.
*
- * Inherited from YWidget.
+ * Reimplemented from YWidget.
**/
- void setEnabled( bool enabled );
-
+ virtual void setEnabled( bool enabled );
+
/**
* Preferred width of the widget.
*
Modified: branches/tmp/sh/mod-ui/qt/src/YQTimeField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTimeFi…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTimeField.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTimeField.cc Thu Nov 1 00:01:26 2007
@@ -20,46 +20,56 @@
#define y2log_component "qt-ui"
#include <ycp/y2log.h>
+#include <qdatetimeedit.h>
+
#include "utf8.h"
#include "YQUI.h"
#include "YQTimeField.h"
#include "YQWidgetCaption.h"
-YQTimeField::YQTimeField( QWidget * parent,
- const YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & time )
- //: QTimeEdit ( parent )
- : QVBox( parent )
- , YTimeField( opt, label )
+
+YQTimeField::YQTimeField( YWidget * parent, const string & label )
+ : QVBox( (QWidget *) parent->widgetRep() )
+ , YTimeField( parent, label )
{
setWidgetRep( this );
setSpacing( YQWidgetSpacing );
- setMargin( YQWidgetMargin );
+ setMargin ( YQWidgetMargin );
- _caption = new YQWidgetCaption( this, label->value() );
+ _caption = new YQWidgetCaption( this, fromUTF8( label ) );
YUI_CHECK_NEW( _caption );
- _qt_timeedit = new QTimeEdit( this );
- YUI_CHECK_NEW( _qt_timeedit );
+ _qt_timeEdit = new QTimeEdit( this );
+ YUI_CHECK_NEW( _qt_timeEdit );
+
+ _qt_timeEdit->setAutoAdvance( true );
+ _caption->setBuddy( _qt_timeEdit );
+}
+
+
+YQTimeField::~YQTimeField()
+{
+ // NOP
+}
- _qt_timeedit->setTime( QTime::fromString(time->value(), Qt::ISODate ));
- _caption->setBuddy( _qt_timeedit );
+string YQTimeField::value()
+{
+ return toUTF8( _qt_timeEdit->time().toString( Qt::ISODate ) );
}
-YCPString YQTimeField::getTime()
+void YQTimeField::setValue( const string & newValue )
{
- return YCPString( toUTF8(_qt_timeedit->time().toString(Qt::ISODate) ) );
+ _qt_timeEdit->setTime( QTime::fromString( fromUTF8( newValue ), Qt::ISODate ) );
}
-void YQTimeField::setLabel( const YCPString & label )
+void YQTimeField::setLabel( const string & newLabel )
{
- _caption->setText( label->value() );
- YTimeField::setLabel( label );
+ _caption->setText( fromUTF8( newLabel ) );
+ YTimeField::setLabel( newLabel );
}
@@ -88,12 +98,12 @@
}
-void YQTimeField::setNewTime( const YCPString & time )
+bool YQTimeField::setKeyboardFocus()
{
- _qt_timeedit->setTime( QTime::fromString(time->value(), Qt::ISODate ));
+ _qt_timeEdit->setFocus();
+ return true;
}
-
#include "YQTimeField.moc"
Modified: branches/tmp/sh/mod-ui/qt/src/YQTimeField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTimeFi…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTimeField.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTimeField.h Thu Nov 1 00:01:26 2007
@@ -20,15 +20,11 @@
#ifndef YQTimeField_h
#define YQTimeField_h
-#include <qdatetimeedit.h>
#include <qvbox.h>
-#include <qlabel.h>
-#include <ycp/YCPString.h>
-#include <ycp/YCPInteger.h>
-
#include "YTimeField.h"
class YQWidgetCaption;
+class QTimeEdit;
class YQTimeField : public QVBox, public YTimeField
@@ -36,67 +32,80 @@
Q_OBJECT
public:
-
/**
* Constructor.
**/
- YQTimeField( QWidget * parent,
- const YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & initialTime );
+ YQTimeField( YWidget * parent,
+ const string & label );
/**
- * Inherited from YWidget: Sets the enabled state of the
- * widget. All new widgets are enabled per definition. Only
- * enabled widgets can take user input.
+ * Destructor.
**/
- void setEnabled( bool enabled );
+ virtual ~YQTimeField();
/**
- * Preferred width of the widget.
+ * Get the current value (the text entered by the user or set from the
+ * outside) of this input field.
*
- * Reimplemented from YWidget.
+ * Implemented from YSimpleInputField.
**/
- virtual int preferredWidth();
+ virtual string value();
/**
- * Preferred height of the widget.
+ * Set the current value (the text entered by the user or set from the
+ * outside) of this input field.
*
- * Reimplemented from YWidget.
+ * Implemented from YSimpleInputField.
**/
- virtual int preferredHeight();
+ virtual void setValue( const string & newValue );
/**
- * Set the new size of the widget.
+ * Set the label (the caption above the input field).
+ *
+ * Reimplemented from YSimpleInputField.
+ **/
+ virtual void setLabel( const string & label );
+
+ /**
+ * Set enabled/disabled state.
*
* Reimplemented from YWidget.
**/
- virtual void setSize( int newWidth, int newHeight );
+ virtual void setEnabled( bool enabled );
/**
- * Set the time in the entry to a new value
+ * Preferred width of the widget.
+ *
+ * Reimplemented from YWidget.
**/
- void setNewTime( const YCPString & text );
+ virtual int preferredWidth();
/**
- * Gets the time currently entered in the Time entry
+ * Preferred height of the widget.
+ *
+ * Reimplemented from YWidget.
**/
- YCPString getTime();
+ virtual int preferredHeight();
/**
- * Changes the label of the time entry.
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
**/
- void setLabel( const YCPString & label );
+ virtual void setSize( int newWidth, int newHeight );
/**
- * Change the label text.
+ * Accept the keyboard focus.
+ *
+ * Reimplemented from YWidget.
**/
- //void setTime( const YCPString & label );
+ virtual bool setKeyboardFocus();
+
protected:
YQWidgetCaption * _caption;
- QTimeEdit * _qt_timeedit;
+ QTimeEdit * _qt_timeEdit;
};
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?r…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQUI.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQUI.h Thu Nov 1 00:01:26 2007
@@ -436,18 +436,6 @@
YWidget * createBarGraph ( YWidget * parent, YWidgetOpt & opt);
- bool hasDate();
- YWidget * createDate ( YWidget * parent,
- YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & date);
-
- bool hasTime();
- YWidget * createTime ( YWidget * parent,
- YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & time);
-
bool hasDownloadProgress();
YWidget * createDownloadProgress ( YWidget * parent,
YWidgetOpt & opt,
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_wid…
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQUI_widgets.cc Thu Nov 1 00:01:26 2007
@@ -155,34 +155,4 @@
-bool YQUI::hasDate()
-{
- return true;
-}
-
-YWidget * YQUI::createDate ( YWidget * parent,
- YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & date )
-{
- return new YQDateField( (QWidget *) ( parent->widgetRep() ), opt, label, date);
-}
-
-
-bool YQUI::hasTime()
-{
- return true;
-}
-
-
-YWidget * YQUI::createTime ( YWidget * parent,
- YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & time )
-{
- return new YQTimeField( (QWidget *) ( parent->widgetRep() ), opt, label, time);
-}
-
-
-
// EOF
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r41697 - in /branches/tmp/sh/mod-ui: core/libyui/doc/examples/ core/libyui/src/ qt/src/
by sh-sh-sh@svn.opensuse.org 31 Oct '07
by sh-sh-sh@svn.opensuse.org 31 Oct '07
31 Oct '07
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(a)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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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/YQDateFi…
==============================================================================
--- 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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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/YQDateFi…
==============================================================================
--- 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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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/YQOption…
==============================================================================
--- 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/YQTimeFi…
==============================================================================
--- 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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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/YQTimeFi…
==============================================================================
--- 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(a)suse.de>
+ Author: Stefan Hundhammer <sh(a)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_wid…
==============================================================================
--- 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/YQWidget…
==============================================================================
--- 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;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
31 Oct '07
Author: aschnell
Date: Wed Oct 31 17:15:28 2007
New Revision: 41696
URL: http://svn.opensuse.org/viewcvs/yast?rev=41696&view=rev
Log:
Created tag stable-2_16_2 for storage
Added:
tags/stable-2_16_2/storage/
- copied from r41695, trunk/storage/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
Author: aschnell
Date: Wed Oct 31 17:02:32 2007
New Revision: 41695
URL: http://svn.opensuse.org/viewcvs/yast?rev=41695&view=rev
Log:
- bump version for autobuild
Modified:
trunk/storage/VERSION
Modified: trunk/storage/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=41695&r1=416…
==============================================================================
--- trunk/storage/VERSION (original)
+++ trunk/storage/VERSION Wed Oct 31 17:02:32 2007
@@ -1 +1 @@
-2.16.1
+2.16.2
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r41694 - in /trunk/storage: package/yast2-storage.changes storage/src/storage_finish.ycp yast2-storage.spec.in
by aschnell@svn.opensuse.org 31 Oct '07
by aschnell@svn.opensuse.org 31 Oct '07
31 Oct '07
Author: aschnell
Date: Wed Oct 31 17:02:01 2007
New Revision: 41694
URL: http://svn.opensuse.org/viewcvs/yast?rev=41694&view=rev
Log:
- adapted to changes concerning Update.ycp and Installation.ycp
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/storage_finish.ycp
trunk/storage/yast2-storage.spec.in
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.ch…
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Wed Oct 31 17:02:01 2007
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Oct 31 16:56:34 CET 2007 - aschnell(a)suse.de
+
+- adapted to changes concerning Update.ycp and Installation.ycp
+
+-------------------------------------------------------------------
Thu Oct 25 17:55:57 CEST 2007 - fehr(a)suse.de
- fix problem when more than one device name translation could be
@@ -7,13 +12,13 @@
-------------------------------------------------------------------
Thu Oct 25 15:07:31 CEST 2007 - fehr(a)suse.de
-- force "partitions" in DEVICE line of mdadm.conf duing update if
+- force "partitions" in DEVICE line of mdadm.conf during update if
device names changed (#331604)
-------------------------------------------------------------------
Tue Oct 23 12:50:10 CEST 2007 - fehr(a)suse.de
-- make StorageDevice initializion delayed (#335582)
+- make StorageDevice initialization delayed (#335582)
- version 2.16.1
-------------------------------------------------------------------
Modified: trunk/storage/storage/src/storage_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/storage_fini…
==============================================================================
--- trunk/storage/storage/src/storage_finish.ycp (original)
+++ trunk/storage/storage/src/storage_finish.ycp Wed Oct 31 17:02:01 2007
@@ -19,7 +19,6 @@
import "Storage";
import "Mode";
import "Installation";
-import "Update";
import "Initrd";
include "installation/misc.ycp";
@@ -70,7 +69,7 @@
}
else
{
- Storage::Update (Update::installedVersion, Update::updateVersion);
+ Storage::Update (Installation::installedVersion, Installation::updateVersion);
}
if (Storage::CheckForLvmRootFs() )
{
Modified: trunk/storage/yast2-storage.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/yast2-storage.spec.in?re…
==============================================================================
--- trunk/storage/yast2-storage.spec.in (original)
+++ trunk/storage/yast2-storage.spec.in Wed Oct 31 17:02:01 2007
@@ -3,11 +3,10 @@
@HEADER@
BuildRequires: blocxx-devel evms evms-devel gcc-c++ libxcrypt-devel openssl-devel sablot swig yast2-installation docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite yast2-perl-bindings
-# Required only in inst-sys
-# Requires: yast2-update
Requires: parted yast2-installation yast2-storage-lib yast2-perl-bindings autoyast2-installation mdadm lvm2 dmraid kpartx cryptsetup
# proc_meminfo.scr moved to yast2-2.15.23
-Requires: yast2 >= 2.15.23
+# Installation::installedVersion and Installation::updateVersion
+Requires: yast2 >= 2.16.4
%ifarch s390 s390x
Requires: yast2-s390
%endif
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
31 Oct '07
Author: locilka
Date: Wed Oct 31 15:39:40 2007
New Revision: 41693
URL: http://svn.opensuse.org/viewcvs/yast?rev=41693&view=rev
Log:
Created tag stable-2_16_1 for packager
Added:
tags/stable-2_16_1/packager/
- copied from r41692, trunk/packager/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0