[yast-commit] r39143 - in /branches/tmp/sh/mod-ui/qt/src: YQComboBox.cc YQDate.cc YQDownloadProgress.cc YQInputField.cc YQIntField.cc YQLogView.cc YQProgressBar.cc YQSelectionBox.cc YQSlider.cc YQTime.cc YQTree.cc
Author: sh-sh-sh Date: Tue Jul 3 16:47:27 2007 New Revision: 39143 URL: http://svn.opensuse.org/viewcvs/yast?rev=39143&view=rev Log: honor empty labels Modified: branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc branches/tmp/sh/mod-ui/qt/src/YQDate.cc branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.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/YQLogView.cc branches/tmp/sh/mod-ui/qt/src/YQProgressBar.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/YQTime.cc branches/tmp/sh/mod-ui/qt/src/YQTree.cc 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=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc Tue Jul 3 16:47:27 2007 @@ -48,7 +48,7 @@ _qt_label = new QLabel( fromUTF8( label ), this ); _qt_label->setTextFormat( QLabel::PlainText ); - if ( _qt_label->text().isEmpty() ) + if ( label.empty() ) _qt_label->hide(); _qt_combo_box = new QComboBox( editable, this ); @@ -120,7 +120,7 @@ { _qt_label->setText( fromUTF8( label ) ); - if ( _qt_label->text().isEmpty() ) + if ( label.empty() ) { if ( _qt_label->isVisible() ) _qt_label->hide(); Modified: branches/tmp/sh/mod-ui/qt/src/YQDate.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDate.cc?rev=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQDate.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQDate.cc Tue Jul 3 16:47:27 2007 @@ -40,7 +40,7 @@ _qt_label = new QLabel( fromUTF8(label->value()), this ); _qt_label->setTextFormat( QLabel::PlainText ); - if ( label->value() == "" ) + if ( _qt_label->text().isEmpty() ) _qt_label->hide(); _qt_dateedit = new QDateEdit( this ); @@ -60,6 +60,18 @@ void YQDate::setLabel( const YCPString & label ) { _qt_label->setText( fromUTF8(label->value() ) ); + + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YDate::setLabel( label ); } Modified: branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.cc?rev=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.cc Tue Jul 3 16:47:27 2007 @@ -42,6 +42,9 @@ _qt_label = new QLabel( fromUTF8( label->value() ), this ); _qt_label->setTextFormat( QLabel::PlainText ); + if ( _qt_label->text().isEmpty() ) + _qt_label->hide(); + _qt_progress = new QProgressBar( this ); _qt_progress->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); @@ -84,6 +87,18 @@ void YQDownloadProgress::setLabel( const YCPString & label ) { _qt_label->setText( fromUTF8( label->value() ) ); + + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YDownloadProgress::setLabel( label ); } 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=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQInputField.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQInputField.cc Tue Jul 3 16:47:27 2007 @@ -141,6 +141,18 @@ void YQInputField::setLabel( const string & label ) { _qt_label->setText( fromUTF8(label ) ); + + if ( label.empty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YInputField::setLabel( label ); } 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=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQIntField.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQIntField.cc Tue Jul 3 16:47:27 2007 @@ -44,6 +44,9 @@ _qt_label->setTextFormat( QLabel::PlainText ); _qt_label->setAlignment( Qt::AlignLeft ); + if ( _qt_label->text().isEmpty() ) + _qt_label->hide(); + _qt_spinbox = new QSpinBox( minValue, maxValue, 1, // step this ); @@ -88,6 +91,17 @@ { _qt_label->setText( fromUTF8( newLabel->value() ) ) ; + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YIntField::setLabel( newLabel ); } Modified: branches/tmp/sh/mod-ui/qt/src/YQLogView.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQLogView.cc?rev=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQLogView.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQLogView.cc Tue Jul 3 16:47:27 2007 @@ -46,9 +46,9 @@ _qt_label = new QLabel( fromUTF8( label->value() ), this ); _qt_label->setTextFormat( QLabel::PlainText ); - if ( label->value() == "" ) + if ( _qt_label->text().isEmpty() ) _qt_label->hide(); - + _qt_text = new QMultiLineEdit( this ); _qt_text->setReadOnly( true ); _qt_text->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); @@ -97,6 +97,18 @@ void YQLogView::setLabel( const YCPString & label ) { _qt_label->setText( fromUTF8( label->value() ) ); + + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YLogView::setLabel( label ); } Modified: branches/tmp/sh/mod-ui/qt/src/YQProgressBar.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQProgressBar.cc?rev=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQProgressBar.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQProgressBar.cc Tue Jul 3 16:47:27 2007 @@ -92,6 +92,17 @@ void YQProgressBar::setLabel( const YCPString & text ) { _qt_label->setText( fromUTF8(text->value() ) ); + + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } } 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=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc Tue Jul 3 16:47:27 2007 @@ -53,7 +53,7 @@ _qt_label = new QLabel( fromUTF8( label ), this ); _qt_label->setTextFormat( QLabel::PlainText ); - if ( _qt_label->text().isEmpty() ) + if ( label.empty() ) _qt_label->hide(); _qt_listBox = new QListBox( this ); @@ -90,7 +90,7 @@ _qt_label->setText( fromUTF8( label ) ); - if ( _qt_label->text().isEmpty() ) + if ( label.empty() ) { if ( _qt_label->isVisible() ) _qt_label->hide(); 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=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQSlider.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQSlider.cc Tue Jul 3 16:47:27 2007 @@ -44,6 +44,9 @@ _qt_label->setTextFormat( QLabel::PlainText ); _qt_label->setAlignment( Qt::AlignRight ); + if ( _qt_label->text().isEmpty() ) + _qt_label->hide(); + _hbox = new QHBox( this ); _hbox->setSpacing( YQWidgetSpacing ); @@ -104,6 +107,17 @@ { _qt_label->setText( fromUTF8( newLabel->value() ) ) ; + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YSlider::setLabel( newLabel ); } Modified: branches/tmp/sh/mod-ui/qt/src/YQTime.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTime.cc?rev=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQTime.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQTime.cc Tue Jul 3 16:47:27 2007 @@ -59,6 +59,18 @@ void YQTime::setLabel( const YCPString & label ) { _qt_label->setText( fromUTF8(label->value() ) ); + + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YTime::setLabel( label ); } 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=39143&r1=39142&r2=39143&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/qt/src/YQTree.cc (original) +++ branches/tmp/sh/mod-ui/qt/src/YQTree.cc Tue Jul 3 16:47:27 2007 @@ -53,6 +53,9 @@ _qt_label = new QLabel( fromUTF8( label->value() ), this ); _qt_label->setTextFormat( QLabel::PlainText ); + if ( _qt_label->text().isEmpty() ) + _qt_label->hide(); + _listView = new QListView( this ); _listView->addColumn( "" ); _listView->header()->hide(); @@ -75,6 +78,18 @@ YQTree::setLabel( const YCPString & label ) { _qt_label->setText( fromUTF8( label->value() ) ); + + if ( _qt_label->text().isEmpty() ) + { + if ( _qt_label->isVisible() ) + _qt_label->hide(); + } + else + { + if ( _qt_label->isHidden() ) + _qt_label->show(); + } + YTree::setLabel( label ); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
sh-sh-sh@svn.opensuse.org