Author: sh-sh-sh
Date: Tue Jun 26 12:57:31 2007
New Revision: 39030
URL: http://svn.opensuse.org/viewcvs/yast?rev=39030&view=rev
Log:
cleaned up YWidget
Modified:
branches/tmp/sh/mod-ui/core/libyui/doc/Makefile.am
branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog
branches/tmp/sh/mod-ui/core/libyui/src/YAlignment.cc
branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.cc
branches/tmp/sh/mod-ui/core/libyui/src/YComboBox.cc
branches/tmp/sh/mod-ui/core/libyui/src/YDumbTab.h
branches/tmp/sh/mod-ui/core/libyui/src/YInputField.cc
branches/tmp/sh/mod-ui/core/libyui/src/YLabel.cc
branches/tmp/sh/mod-ui/core/libyui/src/YLayoutBox.cc
branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc
branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc
branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h
branches/tmp/sh/mod-ui/core/libyui/src/YWidgetOpt.h
branches/tmp/sh/mod-ui/qt/src/YQCheckBox.cc
branches/tmp/sh/mod-ui/qt/src/YQCheckBoxFrame.cc
branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc
branches/tmp/sh/mod-ui/qt/src/YQImage.cc
branches/tmp/sh/mod-ui/qt/src/YQInputField.cc
branches/tmp/sh/mod-ui/qt/src/YQIntField.cc
branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc
branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc
branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.cc
branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc
branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc
branches/tmp/sh/mod-ui/qt/src/YQSlider.cc
branches/tmp/sh/mod-ui/qt/src/YQTable.cc
branches/tmp/sh/mod-ui/qt/src/YQTree.cc
Modified: branches/tmp/sh/mod-ui/core/libyui/doc/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/doc/Makefile.am?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/doc/Makefile.am (original)
+++ branches/tmp/sh/mod-ui/core/libyui/doc/Makefile.am Tue Jun 26 12:57:31 2007
@@ -5,8 +5,7 @@
SUBDIRS = events examples FAQs
htmldir = $(docdir)/libyui
-builtin = $(srcdir)/../src/YUI_builtins.cc $(srcdir)/../src/YUI_widgets.cc \
- $(srcdir)/../src/YUI_special_widgets.cc
+builtin = $(srcdir)/../src/YUI_builtins.cc $(srcdir)/../src/YCPDialogParser.cc
builtinxml := $(builtin:%.cc=%.xml)
xmlfiles := $(foreach xml,$(builtinxml),$(notdir $(xml)))
htmlfiles = $(wildcard html/*.html)
@@ -39,8 +38,8 @@
html/yast2docs.css: html/index.html
cp @STYLESHEET_CSS@ html
cp -a `pkg-config --variable=yast2dir yast2-devtools`/data/docbook/images html
- cp -a $(srcdir)/examples html
- -find html -name .svn -type d -exec rm -rf '{}' \;
+ cp -a $(srcdir)/examples html
+ -find html -name .svn -type d -exec rm -rf '{}' \;
CLEANFILES = $(xmlfiles) output.xml
@@ -51,4 +50,4 @@
mkdir -p $(DESTDIR)$(htmldir)
cp -a $(srcdir)/html/images $(DESTDIR)$(htmldir)
cp -a $(srcdir)/examples $(DESTDIR)$(htmldir)
- -find $(DESTDIR)$(htmldir) -name .svn -type d -exec rm -rf '{}' \;
+ -find $(DESTDIR)$(htmldir) -name .svn -type d -exec rm -rf '{}' \;
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/ChangeLog?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog Tue Jun 26 12:57:31 2007
@@ -36,7 +36,7 @@
The rationale for splitting up nicesize() (and giving it an English name, no
longer German_en) was that in 95% of all cases the first thing an
- implementation does is something like
+ implementation does is something like
if ( dim == YD_HORIZ )
// calculate width
@@ -71,8 +71,8 @@
* All widgets:
- Most 'long' function parameters and return values are now 'int',
- including (but not restricted to):
+ Most 'long' function parameters and return values are now 'int',
+ including (but not restricted to):
* widget sizes
* widget positions
@@ -127,7 +127,7 @@
* virtual void setValue( YCPBoolean ) -> virtual void setValue( bool )
* new method: useBoldFont() (instead of YWidgetOpt::boldFont() )
- * new method: boldFont()
+ * new method: boldFont()
* YTextEntry:
@@ -208,7 +208,7 @@
* changed nicesize() to preferredWidth() and preferredHeight(), both returning int, not long
see longer explanations on top
-
+
* virtual YWidget::setSize() now has int params, no longer long
see longer explanations on top
@@ -219,3 +219,24 @@
For YCP, TextEntry is (and will remain) still a valid widget name.
`InputField is the new default name, though.
+
+
+2007-06-26 12:00 sh@suse.de
+
+* Renamed YWidget::getNotify() -> YWidget::notify()
+ Replace with:
+
+ perl -p -i -e 's/getNotify/notify/g' *.cc pkg/*.c
+
+
+* Added function key methods for NCurses F-key support:
+
+ - YWidget::functionKey()
+ - YWidget::hasFunctionKey()
+ - virtual YWidget::setFunctionKey
+
+ Since YWidgetOpt is no longer passed to constructors, NCurses should use
+ those new functions instead.
+ YWidget::setFunctionKey() is called from YCPDialogParser after the widget is
+ created, so either use the new function in the keyboard handlers or overwrite
+ YWidget::setFunctionKey().
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YAlignment.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YAlignment.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YAlignment.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YAlignment.cc Tue Jun 26 12:57:31 2007
@@ -20,6 +20,7 @@
#define y2log_component "ui"
#include
#include "YAlignment.h"
+#include "YBothDim.h"
using std::min;
@@ -29,8 +30,8 @@
/**
* Constructor.
**/
- YAlignmentPrivate( YAlignmentType hAlign,
- YAlignmentType vAlign )
+ YAlignmentPrivate( YAlignmentType horAlign,
+ YAlignmentType vertAlign )
: leftMargin(0)
, rightMargin(0)
, topMargin(0)
@@ -38,15 +39,14 @@
, minWidth(0)
, minHeight(0)
{
- alignment[ YD_HORIZ ] = hAlign;
- alignment[ YD_VERT ] = vAlign;
+ alignment.hor = horAlign;
+ alignment.vert = vertAlign;
}
//
// Data Members
//
-
int leftMargin;
int rightMargin;
int topMargin;
@@ -57,7 +57,7 @@
string backgroundPixmap;
- YAlignmentType alignment[ YUIAllDimensions ];
+ YBothDim<YAlignmentType> alignment;
};
@@ -213,20 +213,20 @@
}
- int newSize[ YUIAllDimensions ];
- newSize[ YD_HORIZ ] = newWidth;
- newSize[ YD_VERT ] = newHeight;
-
- int offset[ YUIAllDimensions ];
- offset[ YD_HORIZ ] = leftMargin();
- offset[ YD_VERT ] = topMargin();
-
- int totalMargin[ YUIAllDimensions ];
- totalMargin[ YD_HORIZ ] = leftMargin() + rightMargin();
- totalMargin[ YD_VERT ] = topMargin() + bottomMargin();
+ YBothDim<int> newSize;
+ newSize.hor = newWidth;
+ newSize.vert = newHeight;
+
+ YBothDim<int> offset;
+ offset.hor = leftMargin();
+ offset.vert = topMargin();
+
+ YBothDim<int> totalMargin;
+ totalMargin.hor = leftMargin() + rightMargin();
+ totalMargin.vert = topMargin() + bottomMargin();
- int newChildSize[ YUIAllDimensions ];
- int newChildPos [ YUIAllDimensions ];
+ YBothDim<int> newChildSize;
+ YBothDim<int> newChildPos;
for ( YUIDimension dim = YD_HORIZ; dim <= YD_VERT; dim = (YUIDimension) (dim+1) )
@@ -239,7 +239,7 @@
{
if ( firstChild()->stretchable( dim ) &&
( alignment( dim ) == YAlignUnchanged ||
- _stretch[ dim ] ) ) // special case: promote child stretchability if `opt(`?stretch) set
+ stretchable( dim ) ) ) // special case: promote child stretchability if `opt(`?stretch) set
{
newChildSize[ dim ] = newSize[ dim ] - totalMargin[ dim ];
}
@@ -293,13 +293,13 @@
newChildPos[ dim ] += offset[ dim ];
}
- firstChild()->setSize( newChildSize[ YD_HORIZ ], newChildSize[ YD_VERT ] );
- moveChild( firstChild(), newChildPos[ YD_HORIZ ], newChildPos[ YD_VERT ] );
+ firstChild()->setSize( newChildSize.hor, newChildSize.vert );
+ moveChild( firstChild(), newChildPos.hor, newChildPos.vert );
#if 0
- y2debug( "setSize( alignment, %ld, %ld )", newWidth, newHeight );
- y2debug( "setSize( child, %ld, %ld )", newChildSize[ YD_HORIZ ], newChildSize[ YD_VERT ] );
- y2debug( "moveChild( %ld, %ld) ", newChildPos[ YD_HORIZ ], newChildPos[ YD_VERT ] );
+ y2debug( "setSize( alignment, %d, %d )", newWidth, newHeight );
+ y2debug( "setSize( child, %d, %d )", newChildSize.hor, newChildSize.vert );
+ y2debug( "moveChild( %d, %d) ", newChildPos.hor, newChildPos.vert );
#endif
}
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/YCPDialogParser.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YCPDialogParser.cc Tue Jun 26 12:57:31 2007
@@ -36,6 +36,8 @@
#include "YUI_util.h"
#include "YWidgetFactory.h"
#include "YOptionalWidgetFactory.h"
+#include "YBothDim.h"
+
#include "YAlignment.h"
#include "YBarGraph.h"
@@ -143,7 +145,6 @@
else if ( sym == YUIOpt_vstretch ) opt.isVStretchable.setValue( true );
else if ( sym == YUIOpt_hvstretch ) { opt.isHStretchable.setValue( true ); opt.isVStretchable.setValue( true ); }
else if ( sym == YUIOpt_autoShortcut ) opt.autoShortcut.setValue( true );
- else if ( sym == YUIOpt_easterEgg ) opt.easterEgg.setValue( true );
else if ( sym == YUIOpt_testMode ) opt.testMode.setValue( true );
else if ( sym == YUIOpt_boldFont ) opt.boldFont.setValue( true );
else if ( sym == YUIOpt_keyEvents ) opt.keyEvents.setValue( true );
@@ -277,18 +278,25 @@
/*
* Note: Don't set the ID if it is already set!
- * This is important for createXy() functions that don't really create
+ * This is important for parseXy() functions that don't really create
* anything immediately but recursively call parseWidgetTreeTerm()
- * internally - e.g. createWeight(). In this case, the widget might
+ * internally - e.g. parseWeight(). In this case, the widget might
* already have an ID, so leave it alone.
+ *
+ * Otherwise, the ID that was specified for the Weight would be set
+ * on the Weight's child, which is not what the application
+ * programmer expects.
*/
}
- if ( opt.isDisabled.value() )
- w->setDisabled();
+ if ( opt.isDisabled.value() ) w->setDisabled();
+ if ( opt.notifyMode.value() ) w->setNotify( true );
+ if ( opt.keyEvents.value() ) w->setSendKeyEvents( true );
+ if ( opt.autoShortcut.value() ) w->setAutoShortcut( true );
+ if ( opt.isHStretchable.value() ) w->setStretchable( YD_HORIZ, true );
+ if ( opt.isVStretchable.value() ) w->setStretchable( YD_VERT, true );
+ if ( opt.key_Fxx.value() > 0 ) w->setFunctionKey( opt.key_Fxx.value() );
- if ( opt.notifyMode.value() )
- w->setNotify( true );
w->setParent(p);
}
@@ -393,9 +401,9 @@
term->name().c_str(),term->toString().c_str() );
return 0;
}
-
+
rejectAllOptions( term,optList );
-
+
return YUI::widgetFactory()->createEmpty( parent );
}
@@ -826,7 +834,7 @@
rejectAllOptions( term,optList );
YSquash * squash = YUI::widgetFactory()->createSquash( parent, horSquash, vertSquash );
parseWidgetTreeTerm( squash, term->value( argnr )->asTerm() );
-
+
return squash;
}
@@ -878,20 +886,20 @@
return 0;
}
rejectAllOptions( term,optList );
- int weightValue = term->value( argnr )->asInteger()->value();
+
+ // Create child widget tree
+ YWidget * child = parseWidgetTreeTerm( parent, term->value( argnr+1 )->asTerm() );
/*
* This is an exception from the general rule: No YWeight widget is created,
- * just the weight is passed as widget options to a newly created child widget.
+ * the weight is just set on the child widget.
* The YWeight widget is plain superfluos - YWidget can handle everything itself.
*/
- YWidgetOpt childOpt;
-
- if ( dim == YD_HORIZ ) childOpt.hWeight.setValue( weightValue );
- else childOpt.vWeight.setValue( weightValue );
+ int weight = term->value( argnr )->asInteger()->value();
+ child->setWeight( dim, weight );
- return parseWidgetTreeTerm( parent, childOpt, term->value( argnr+1 )->asTerm() );
+ return child;
}
@@ -1637,7 +1645,7 @@
}
string label = term->value( argnr )->asString()->value();
-
+
string initialValue;
if ( term->size() >= argnr + 2 )
initialValue = term->value( argnr+1 )->asString()->value();
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YComboBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YComboBox.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YComboBox.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YComboBox.cc Tue Jun 26 12:57:31 2007
@@ -82,7 +82,7 @@
}
}
- /**
+ /**
* @property id_list Items
* The items that are displayed
*/
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YDumbTab.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YDumbTab.h?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YDumbTab.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YDumbTab.h Tue Jun 26 12:57:31 2007
@@ -41,12 +41,12 @@
virtual const char * widgetClass() { return "YDumbTab"; }
/**
- * Implements the UI::ChangeWidget()
+ * Implements UI::ChangeWidget()
**/
YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue );
/**
- * Implements the UI::QueryWidget()
+ * Implements UI::QueryWidget()
**/
YCPValue queryWidget( const YCPSymbol & property );
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YInputField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YInputField.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YInputField.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YInputField.cc Tue Jun 26 12:57:31 2007
@@ -132,9 +132,9 @@
if ( propSet.isEmpty() )
{
/*
- * @property string Value the field's contents (the user input)
- * @property string Label caption above the field
- * @property string ValidChars set of valid input characters
+ * @property string Value the input field's contents (the user input)
+ * @property string Label caption above the input field
+ * @property string ValidChars set of valid input characters
* @property integer InputMaxLength maximum number of input characters
*/
propSet.add( YProperty( YUIProperty_Value, YStringProperty ) );
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YLabel.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YLabel.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YLabel.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YLabel.cc Tue Jun 26 12:57:31 2007
@@ -108,9 +108,9 @@
if ( propSet.isEmpty() )
{
/*
- * @property string Label the label text
- * @property boolean Value the label text (alias for Label)
- * @property boolean Text the label text (alias for Label)
+ * @property string Label the label text
+ * @property string Value the label text (alias for Label)
+ * @property string Text the label text (alias for Label)
*/
propSet.add( YProperty( YUIProperty_Label, YStringProperty ) );
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YLayoutBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YLayoutBox.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YLayoutBox.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YLayoutBox.cc Tue Jun 26 12:57:31 2007
@@ -513,11 +513,11 @@
* among them as fair as possible.
*/
- int tooSmall = -distributableSize;
- int loserCount = 0;
- int totalMargins = 0L;
- int remainingMargins = 0L;
- double marginScale = 0.0;
+ int tooSmall = -distributableSize;
+ int loserCount = 0;
+ int totalMargins = 0L;
+ int remainingMargins = 0L;
+ double marginScale = 0.0;
y2debug ( "Not enough space - %d too small - check the layout!", tooSmall );
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/YUI_builtins.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc Tue Jun 26 12:57:31 2007
@@ -869,7 +869,7 @@
YPropertySet propSet = widget->propertySet();
- if ( propSet.size() == 6 ) // unchanged from YWidget, no properties supported
+ if ( propSet.size() == 5 ) // unchanged from YWidget, no properties supported
{
// FIXME: Get rid of this
// FIXME: Get rid of this
@@ -984,7 +984,7 @@
YPropertySet propSet = widget->propertySet();
YCPSymbol sym = property->asSymbol();
- if ( propSet.size() == 6 ) // unchanged from YWidget, no properties supported
+ if ( propSet.size() == 5 ) // unchanged from YWidget, no properties supported
{
// FIXME: Get rid of this
// FIXME: Get rid of this
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc Tue Jun 26 12:57:31 2007
@@ -35,6 +35,7 @@
#include "YDialog.h"
#include "YUIException.h"
#include "YWidgetID.h"
+#include "YBothDim.h"
#include "YChildrenManager.h"
@@ -56,9 +57,17 @@
, beingDestroyed( false )
, enabled( true )
, notify( false )
+ , sendKeyEvents( false )
+ , autoShortcut( false )
, toolkitWidgetRep( 0 )
, id( 0 )
- {}
+ , functionKey( 0 )
+ {
+ stretch.hor = false;
+ stretch.vert = false;
+ weight.hor = 0;
+ weight.vert = 0;
+ }
//
// Data members
@@ -70,35 +79,24 @@
bool beingDestroyed;
bool enabled;
bool notify;
+ bool sendKeyEvents;
+ bool autoShortcut;
void * toolkitWidgetRep;
YWidgetID * id;
+ YBothDim<bool> stretch;
+ YBothDim<int> weight;
+ int functionKey;
};
-int YWidget::next_internal_widget_id = 0;
-
// FIXME: Obsolete
// FIXME: Obsolete
// FIXME: Obsolete
YWidget::YWidget( const YWidgetOpt & opt )
: priv( new YWidgetPrivate( new YWidgetChildrenRejector( this ) ) )
- , user_widget_id( YCPNull() )
- , windowID( -1 )
{
- internal_widget_id = next_internal_widget_id++;
- enabled = ! opt.isDisabled.value();
- notify = opt.notifyMode.value();
- _sendKeyEvents = opt.keyEvents.value();
- _autoShortcut = opt.autoShortcut.value();
- _stretch[ YD_HORIZ ] = opt.isHStretchable.value();
- _stretch[ YD_VERT ] = opt.isVStretchable.value();
- _weight[ YD_HORIZ ] = opt.hWeight.value();
- _weight[ YD_VERT ] = opt.vWeight.value();
-
- if ( ! enabled ) setDisabled();
- if ( notify ) setNotify( notify );
}
// FIXME: Obsolete
// FIXME: Obsolete
@@ -108,23 +106,10 @@
YWidget::YWidget( YWidget * parent )
: priv( new YWidgetPrivate( new YWidgetChildrenRejector( this ), parent ) )
- , user_widget_id( YCPNull() )
- , windowID( -1 )
{
YUI_CHECK_NEW( priv );
YUI_CHECK_NEW( priv->childrenManager );
- internal_widget_id = next_internal_widget_id++;
-
- enabled = true;
- notify = false;
- _sendKeyEvents = false;
- _autoShortcut = false;
- _stretch[ YD_HORIZ ] = false;
- _stretch[ YD_VERT ] = false;
- _weight [ YD_HORIZ ] = 0;
- _weight [ YD_VERT ] = 0;
-
if ( parent )
parent->addChild( this );
}
@@ -262,6 +247,48 @@
}
+bool YWidget::sendKeyEvents() const
+{
+ return priv->sendKeyEvents;
+}
+
+
+void YWidget::setSendKeyEvents( bool doSend )
+{
+ priv->sendKeyEvents = doSend;
+}
+
+
+bool YWidget::autoShortcut() const
+{
+ return priv->autoShortcut;
+}
+
+
+void YWidget::setAutoShortcut( bool newAutoShortcut )
+{
+ priv->autoShortcut = newAutoShortcut;
+}
+
+
+int YWidget::functionKey() const
+{
+ return priv->functionKey;
+}
+
+
+bool YWidget::hasFunctionKey() const
+{
+ return priv->functionKey > 0;
+}
+
+
+void YWidget::setFunctionKey( int fkey_no )
+{
+ priv->functionKey = fkey_no;
+}
+
+
YWidgetID *
YWidget::id() const
{
@@ -311,9 +338,16 @@
if ( propSet.isEmpty() )
{
+ /**
+ * @property boolean Enabled enabled/disabled state of this widget
+ * @property boolean Notify the current notify state (see also `opt( `notify ))
+ * @property string WidgetClass the widget class of this widget (YLabel, YPushButton, ...)
+ * @property string DebugLabel (possibly translated) text describing this widget for debugging
+ * @property string DialogDebugLabel (possibly translated) text describing this dialog for debugging
+ **/
+
propSet.add( YProperty( YUIProperty_Enabled, YBoolProperty ) );
propSet.add( YProperty( YUIProperty_Notify, YBoolProperty ) );
- propSet.add( YProperty( YUIProperty_WindowID, YIntegerProperty) );
propSet.add( YProperty( YUIProperty_WidgetClass, YStringProperty, true ) ); // read-only
propSet.add( YProperty( YUIProperty_DebugLabel, YStringProperty, true ) ); // read-only
propSet.add( YProperty( YUIProperty_DialogDebugLabel, YStringProperty, true ) ); // read-only
@@ -355,7 +389,7 @@
}
if ( propertyName == YUIProperty_Enabled ) return YPropertyValue( isEnabled() );
- if ( propertyName == YUIProperty_Notify ) return YPropertyValue( getNotify() );
+ if ( propertyName == YUIProperty_Notify ) return YPropertyValue( notify() );
if ( propertyName == YUIProperty_WidgetClass ) return YPropertyValue( widgetClass() );
if ( propertyName == YUIProperty_DebugLabel ) return YPropertyValue( debugLabel() );
if ( propertyName == YUIProperty_DialogDebugLabel )
@@ -409,13 +443,13 @@
void YWidget::setNotify( bool notify )
{
- this->notify = notify;
+ priv->notify = notify;
}
-bool YWidget::getNotify() const
+bool YWidget::notify() const
{
- return notify;
+ return priv->notify;
}
@@ -435,31 +469,37 @@
void YWidget::setStretchable( YUIDimension dim, bool newStretch )
{
- _stretch[ dim ] = newStretch;
+ priv->stretch[ dim ] = newStretch;
}
void YWidget::setDefaultStretchable( YUIDimension dim, bool newStretch )
{
- _stretch[ dim ] |= newStretch;
+ priv->stretch[ dim ] |= newStretch;
}
bool YWidget::stretchable( YUIDimension dim ) const
{
- return _stretch[ dim ];
+ return priv->stretch[ dim ];
}
int YWidget::weight( YUIDimension dim )
{
- return _weight[ dim ];
+ return priv->weight[ dim ];
+}
+
+
+void YWidget::setWeight( YUIDimension dim, int weight )
+{
+ priv->weight[ dim ] = weight;
}
bool YWidget::hasWeight( YUIDimension dim )
{
- // DO NOT simply return _weight[ dim ] here
+ // DO NOT simply return priv->weight[ dim ] here
// since weight() might be overwritten in derived classes!
return weight( dim ) > 0;
@@ -700,25 +740,19 @@
return YCPBoolean( false ); // Error
}
- /*
- * @property boolean Enabled the current enabled/disabled state
- */
if ( symbol == YUIProperty_Enabled )
{
if ( newvalue->isBoolean() )
{
bool e = newvalue->asBoolean()->value();
setEnabled(e);
- enabled = e;
+ priv->enabled = e;
return YCPBoolean( true );
}
else y2error( "Wrong argument %s for widget property `Enabled - boolean expected.",
newvalue->toString().c_str() );
}
- /*
- * @property boolean Notify the current notify state (see also `opt( `notify ))
- */
if ( symbol == YUIProperty_Notify )
{
if ( newvalue->isBoolean() )
@@ -745,21 +779,11 @@
YCPValue YWidget::queryWidget( const YCPSymbol & property )
{
string symbol = property->symbol();
-
+
if ( symbol == YUIProperty_Enabled ) return YCPBoolean( isEnabled() );
- if ( symbol == YUIProperty_Notify ) return YCPBoolean( getNotify() );
- if ( symbol == YUIProperty_WindowID ) return YCPInteger( windowID );
- /**
- * @property string WidgetClass the widget class of this widget (YLabel, YPushButton, ...)
- */
+ if ( symbol == YUIProperty_Notify ) return YCPBoolean( notify() );
if ( symbol == YUIProperty_WidgetClass ) return YCPString( widgetClass() );
- /**
- * @property string DebugLabel a (possibly translated) text describing this widget for debugging
- */
if ( symbol == YUIProperty_DebugLabel ) return YCPString( debugLabel() );
- /**
- * @property string DialogDebugLabel a (possibly translated) text describing this dialog for debugging
- */
if ( symbol == YUIProperty_DialogDebugLabel )
{
return YDialog::currentDialog()->queryWidget( property );
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h Tue Jun 26 12:57:31 2007
@@ -296,7 +296,7 @@
* The sizes passed here are not meant to affect any future
* preferredWidth() or preferredHeight() calls; they are just the outcome
* of all kinds of compromises (too little screen space or too much) for
- * the current geometry management calculation.
+ * the current geometry management calculation.
*
* Derived classes are required to implement this function.
**/
@@ -370,27 +370,13 @@
virtual bool isEnabled() const;
-
-
-
-
-
-
-
- /**
- * Return the widget serial number (the internal widget ID).
- **/
- int internalId() const { return internal_widget_id; }
-
/**
* This is a boolean value that determines whether the widget is resizable
* beyond its nice size in the specified dimension. A selection box is
* stretchable in both dimensions, a push button is not stretchable by
* default, a frame is stretchable if its contents are stretchable. Most
- * widgets accept a `hstretch or `vstretch option to become stretchable even
- * when they are not by default.
- *
- * @param dim Dimension, either YD_HORIZ or YD_VERT
+ * widgets accept a `hstretch or `vstretch option to become stretchable
+ * even when by default they are not.
**/
virtual bool stretchable( YUIDimension dim ) const;
@@ -406,22 +392,28 @@
**/
void setDefaultStretchable( YUIDimension dim, bool newStretch );
-
/**
* The weight is used in situations where all widgets can get there nice
* size and yet space is available. The remaining space will be devided
- * between all stretchable widgets according to their weights. A widget with
- * greater weight will get more space. The default weight for all widgets
- * is 0.
+ * between all stretchable widgets according to their weights. A widget
+ * with greater weight will get more space. The default weight for all
+ * widgets is 0.
*
- * @param dim Dimension, either YD_HORIZ or YD_VERT
+ * Derived classes can overwrite this function, but they should call this
+ * base class function in the new function.
**/
virtual int weight( YUIDimension dim );
/**
- * Return whether or not the widget has a weight.
+ * Return whether or not the widget has a weight in the specified
+ * dimension.
+ **/
+ bool hasWeight( YUIDimension dim );
+
+ /**
+ * Set a weight in the specified dimension.
**/
- virtual bool hasWeight( YUIDimension dim );
+ void setWeight( YUIDimension dim, int weight );
/**
* Sets the Notify property
@@ -432,62 +424,67 @@
* Returns whether the widget will notify, i.e. will case UserInput to
* return.
**/
- bool getNotify() const;
+ bool notify() const;
/**
* Returns 'true' if this widget should send key events, i.e. if it has
* `opt(`keyEvent) set.
**/
- bool sendKeyEvents() const { return _sendKeyEvents; }
+ bool sendKeyEvents() const;
/**
* Specify whether or not this widget should send key events.
**/
- void setSendKeyEvents( bool doSend ) { _sendKeyEvents = doSend; }
+ void setSendKeyEvents( bool doSend );
/**
* Returns 'true' if a keyboard shortcut should automatically be assigned
* to this widget - without complaints in the log file.
**/
- bool autoShortcut() const { return _autoShortcut; }
+ bool autoShortcut() const;
/**
* Sets the 'autoShortcut' flag.
**/
- void setAutoShortcut( bool _newAutoShortcut ) { _autoShortcut = _newAutoShortcut; }
+ void setAutoShortcut( bool _newAutoShortcut );
/**
- * Implements the ui command ChangeWidget. Implement this method in your
- * widget subclass and handle their all properties special to that widget.
- * If you encounter an unknown property, call YWidget::changeWidget
+ * Return a function key number that is assigned to this widget.
+ * (1 for F1, 2 for F2, etc.; 0 for none)
**/
- virtual YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue );
+ int functionKey() const;
/**
- * Implements the ui command ChangeWidget in the incarnation, where the
- * property is given in form of a term rather than a symbol. Implement this
- * method in your widget subclass and handle their all properties special to
- * that widget.
+ * Check if a function key is assigned to this widget.
+ **/
+ bool hasFunctionKey() const;
+
+ /**
+ * Assign a function key to this widget
+ * (1 for F1, 2 for F2, etc.; 0 for none)
*
- * If you encounter an unknown property, call YWidget::changeWidget
+ * Derived classes may want to overwrite this function, but they should
+ * call this base class function in the new function.
**/
+ virtual void setFunctionKey( int fkey_no );
+
+
+
+ // FIXME: Obsolete
+ // FIXME: Obsolete
+ // FIXME: Obsolete
+ virtual YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue );
+
virtual YCPValue changeWidgetTerm( const YCPTerm & property, const YCPValue & newvalue );
- /**
- * Implements the ui command QueryWidget. Implement this method in your
- * widget subclass and handle their all properties special to that widget.
- * If you encounter an unknown property, call YWidget::queryWidget
- **/
virtual YCPValue queryWidget( const YCPSymbol & property );
- /**
- * Implements the ui command QueryWidget in the incarnation, where the property
- * is given in form of a term rather than a symbol. Implement this method in your
- * widget subclass and handle their all properties special to that widget.
- * If you encounter an unknown property, call YWidget::queryWidget
- **/
virtual YCPValue queryWidgetTerm( const YCPTerm & property );
+ // FIXME: Obsolete
+ // FIXME: Obsolete
+ // FIXME: Obsolete
+
/**
* Set the keyboard focus to this widget.
* The default implementation just emits a warning message.
@@ -569,18 +566,11 @@
/**
* In some UIs updating the screen content is an expensive operation. Use
- * startMultipleChanges() to tell the ui that you're going to perform multiple
- * chages to the widget.
- * The UI may delay any screen updates until doneMultipleChanges() is called.
+ * startMultipleChanges() to tell the ui that you're going to perform
+ * multiple chages to the widget. The UI may delay any screen updates
+ * until doneMultipleChanges() is called.
**/
virtual void startMultipleChanges() {}
-
- /**
- * In some UIs updating the screen content is an expensive operation. Use
- * startMultipleChanges() to tell the ui that you're going to perform multiple
- * chages to the widget.
- * The UI may delay any screen updates until doneMultipleChanges() is called.
- **/
virtual void doneMultipleChanges() {}
@@ -639,74 +629,6 @@
-protected:
-
- /**
- * The user provided widget id of this widget -
- * strictly for user purposes. May or may not be set.
- * May or may not be unique.
- **/
- YCPValue user_widget_id;
-
- /**
- * The internal unique widget id of this widget.
- * Used to compare widget identity.
- **/
- int internal_widget_id;
-
- /**
- * The next internal widget id to be used for the next object of
- * this class. Initialized in YWidget.cc.
- **/
- static int next_internal_widget_id;
-
- /**
- * Flag: Can this widget currently receive user input?
- **/
- bool enabled;
-
- /**
- * Flag: Make UserInput() return on detailed events?
- **/
- bool notify;
-
- /**
- * Flag: Make UserInput() return on single key events?
- **/
- bool _sendKeyEvents;
-
- /**
- * Flag: Automatically assign a keyboard shortcut without complaints in the
- * log file?
- **/
- bool _autoShortcut;
-
- /**
- * Stretchability in both dimensions.
- **/
- bool _stretch [ YUIAllDimensions ];
-
- /**
- * Weight in both dimensions.
- **/
- int _weight [ YUIAllDimensions ];
-
- /**
- * window ID of the current widget
- **/
- long windowID;
-
-
-
-
-
-
-
-
-
-
-
-
// FIXME: Get this stuff out of here - it is utterly out of place
// FIXME: Get this stuff out of here - it is utterly out of place
// FIXME: Get this stuff out of here - it is utterly out of place
@@ -720,8 +642,8 @@
class OptimizeChanges
{
public:
- OptimizeChanges( YWidget & w ) : yw(w) { yw.startMultipleChanges(); }
- ~OptimizeChanges() { yw.doneMultipleChanges(); }
+ OptimizeChanges( YWidget & w ) : yw(w) { yw.startMultipleChanges(); }
+ ~OptimizeChanges() { yw.doneMultipleChanges(); }
private:
OptimizeChanges( const OptimizeChanges & ); // no copy
void operator=( const OptimizeChanges & ); // no assign
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YWidgetOpt.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YWidgetOpt.h?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YWidgetOpt.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YWidgetOpt.h Tue Jun 26 12:57:31 2007
@@ -126,13 +126,9 @@
YBoolOpt autoShortcut;
YBoolOpt autoAdvance;
YBoolOpt keyEvents;
- YBoolOpt easterEgg;
YBoolOpt testMode;
YBoolOpt boldFont; // YCheckBox, YRadioButton, YLabel
- YLongOpt hWeight; // from YUIInterpreter::createWeight()
- YLongOpt vWeight; // from YUIInterpreter::createWeight()
-
// Widget-specific options
//
Modified: branches/tmp/sh/mod-ui/qt/src/YQCheckBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQCheckBox.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQCheckBox.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQCheckBox.cc Tue Jun 26 12:57:31 2007
@@ -152,7 +152,7 @@
{
// y2milestone( "new state: %d", newState );
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQCheckBoxFrame.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQCheckBoxFrame.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQCheckBoxFrame.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQCheckBoxFrame.cc Tue Jun 26 12:57:31 2007
@@ -138,7 +138,7 @@
y2debug( "new state: %d", newState );
handleChildrenEnablement( newState );
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc Tue Jun 26 12:57:31 2007
@@ -219,7 +219,7 @@
void YQComboBox::slotSelected( int i )
{
- if ( getNotify() )
+ if ( notify() )
{
if ( ! YQUI::ui()->eventPendingFor( this ) )
{
@@ -233,7 +233,7 @@
void YQComboBox::textChanged( const QString & new_text )
{
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQImage.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQImage.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQImage.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQImage.cc Tue Jun 26 12:57:31 2007
@@ -101,7 +101,6 @@
_animated = opt.animated.value();
_tiled = opt.tiled.value();
setScaledContents( opt.scaleToFit.value() );
- windowID = winId();
_pixmapHeight = 0;
_pixmapWidth = 0;
Modified: branches/tmp/sh/mod-ui/qt/src/YQInputField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQInputField.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQInputField.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQInputField.cc Tue Jun 26 12:57:31 2007
@@ -203,7 +203,7 @@
void YQInputField::changed( const QString & )
{
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQIntField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQIntField.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQIntField.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQIntField.cc Tue Jun 26 12:57:31 2007
@@ -113,7 +113,7 @@
{
setValue( newValue );
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc Tue Jun 26 12:57:31 2007
@@ -175,7 +175,7 @@
_qt_textedit->setCursorPosition( para, index-1 );
}
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc Tue Jun 26 12:57:31 2007
@@ -257,7 +257,7 @@
void
YQMultiSelectionBox::slotSelected()
{
- if ( getNotify() )
+ if ( notify() )
{
if ( ! YQUI::ui()->eventPendingFor( this ) )
{
@@ -272,7 +272,7 @@
void
YQMultiSelectionBox::slotValueChanged()
{
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQPartitionSplitter.cc Tue Jun 26 12:57:31 2007
@@ -208,7 +208,7 @@
setValue( newPartSize );
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
@@ -221,7 +221,7 @@
else
setValue( newPartSize );
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQRadioButton.cc Tue Jun 26 12:57:31 2007
@@ -146,7 +146,7 @@
void YQRadioButton::changed( bool newState )
{
- if ( getNotify() && newState )
+ if ( notify() && newState )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc Tue Jun 26 12:57:31 2007
@@ -67,7 +67,7 @@
_shrinkable = opt.isShrinkable.value();
_immediateMode = opt.immediateMode.value();
- if ( getNotify() )
+ if ( notify() )
{
connect( _qt_listbox, SIGNAL( highlighted ( int ) ),
this, SLOT ( slotSelected( int ) ) );
Modified: branches/tmp/sh/mod-ui/qt/src/YQSlider.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQSlider.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQSlider.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQSlider.cc Tue Jun 26 12:57:31 2007
@@ -124,7 +124,7 @@
{
setValue( newValue );
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTable.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTable.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTable.cc Tue Jun 26 12:57:31 2007
@@ -269,7 +269,7 @@
void YQTable::slotSelected( QListViewItem * )
{
- if ( getNotify() )
+ if ( notify() )
{
if ( ! YQUI::ui()->eventPendingFor( this ) )
{
@@ -283,7 +283,7 @@
void YQTable::slotActivated( QListViewItem * )
{
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::Activated ) );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQTree.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTree.cc?rev=39030&r1=39029&r2=39030&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTree.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTree.cc Tue Jun 26 12:57:31 2007
@@ -196,13 +196,13 @@
void YQTree::slotSelected( void )
{
- if ( getNotify() && ! YQUI::ui()->eventPendingFor( this ) )
+ if ( notify() && ! YQUI::ui()->eventPendingFor( this ) )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::SelectionChanged ) );
}
void YQTree::slotActivated( void )
{
- if ( getNotify() )
+ if ( notify() )
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::Activated ) );
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org