Author: sh-sh-sh
Date: Thu Jul 12 17:05:47 2007
New Revision: 39371
URL: http://svn.opensuse.org/viewcvs/yast?rev=39371&view=rev
Log:
use new helper widget
Modified:
branches/tmp/sh/mod-ui/qt/src/QY2ComboTabWidget.h
branches/tmp/sh/mod-ui/qt/src/QY2DiskUsageList.h
branches/tmp/sh/mod-ui/qt/src/QY2FloppyMountDialog.h
branches/tmp/sh/mod-ui/qt/src/QY2ListView.h
branches/tmp/sh/mod-ui/qt/src/QY2Settings.h
branches/tmp/sh/mod-ui/qt/src/YFrameBuffer.h
branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc
branches/tmp/sh/mod-ui/qt/src/YQComboBox.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/YQDownloadProgress.cc
branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h
branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h
branches/tmp/sh/mod-ui/qt/src/YQIconPool.h
branches/tmp/sh/mod-ui/qt/src/YQInputField.h
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/YQLogView.cc
branches/tmp/sh/mod-ui/qt/src/YQLogView.h
branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h
branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc
branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.h
branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc
branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.h
branches/tmp/sh/mod-ui/qt/src/YQProgressBar.cc
branches/tmp/sh/mod-ui/qt/src/YQProgressBar.h
branches/tmp/sh/mod-ui/qt/src/YQRichText.h
branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc
branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.h
branches/tmp/sh/mod-ui/qt/src/YQSlider.cc
branches/tmp/sh/mod-ui/qt/src/YQSlider.h
branches/tmp/sh/mod-ui/qt/src/YQTime.cc
branches/tmp/sh/mod-ui/qt/src/YQTime.h
branches/tmp/sh/mod-ui/qt/src/YQTree.cc
branches/tmp/sh/mod-ui/qt/src/YQTree.h
Modified: branches/tmp/sh/mod-ui/qt/src/QY2ComboTabWidget.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/QY2ComboTabWidget.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/QY2ComboTabWidget.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/QY2ComboTabWidget.h Thu Jul 12 17:05:47 2007
@@ -93,8 +93,6 @@
protected:
- // Data members
-
QComboBox * combo_box;
QLabel * combo_label;
QWidgetStack * widget_stack;
Modified: branches/tmp/sh/mod-ui/qt/src/QY2DiskUsageList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/QY2DiskUsageList.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/QY2DiskUsageList.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/QY2DiskUsageList.h Thu Jul 12 17:05:47 2007
@@ -66,8 +66,6 @@
protected:
- // Data members
-
int _nameCol;
int _percentageBarCol;
int _percentageCol;
@@ -273,7 +271,9 @@
int minTo, int maxTo );
+ //
// Data members
+ //
QY2DiskUsageList * _diskUsageList;
};
Modified: branches/tmp/sh/mod-ui/qt/src/QY2FloppyMountDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/QY2FloppyMountDialog.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/QY2FloppyMountDialog.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/QY2FloppyMountDialog.h Thu Jul 12 17:05:47 2007
@@ -139,9 +139,11 @@
* Show an error message
**/
void error( const QString & msg );
-
+
+ //
// Data members
+ //
QRadioButton * _useHardDisk;
QRadioButton * _useFloppy;
Modified: branches/tmp/sh/mod-ui/qt/src/QY2ListView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/QY2ListView.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/QY2ListView.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/QY2ListView.h Thu Jul 12 17:05:47 2007
@@ -175,8 +175,9 @@
virtual void contentsMouseDoubleClickEvent( QMouseEvent * );
-
+ //
// Data members
+ //
QListViewItem * _mousePressedItem;
int _mousePressedCol;
@@ -311,7 +312,9 @@
int width,
int alignment );
+ //
// Data members
+ //
int _serial;
bool _sortByInsertionSequence;
@@ -456,7 +459,9 @@
int width,
int alignment );
+ //
// Data members
+ //
int _serial;
bool _sortByInsertionSequence;
@@ -497,7 +502,9 @@
virtual void maybeTip( const QPoint & p );
+ //
// Data members
+ //
QY2ListView * _listView;
};
Modified: branches/tmp/sh/mod-ui/qt/src/QY2Settings.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/QY2Settings.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/QY2Settings.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/QY2Settings.h Thu Jul 12 17:05:47 2007
@@ -234,9 +234,10 @@
**/
void saveSection( QTextStream & stream, Section * section );
-
+
+ //
// Data members
-
+ //
QString _fileName;
AccessMode _accessMode;
Modified: branches/tmp/sh/mod-ui/qt/src/YFrameBuffer.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YFrameBuffer.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YFrameBuffer.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YFrameBuffer.h Thu Jul 12 17:05:47 2007
@@ -71,8 +71,10 @@
**/
void munmapFB();
-
+
+ //
// Data members
+ //
int _width;
int _height;
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQComboBox.cc Thu Jul 12 17:05:47 2007
@@ -33,6 +33,7 @@
#include "QY2CharValidator.h"
#include "YQComboBox.h"
#include "YQSignalBlocker.h"
+#include "YQWidgetCaption.h"
@@ -47,14 +48,9 @@
setSpacing( YQWidgetSpacing );
setMargin ( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( label.empty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label );
_qt_comboBox = new QComboBox( editable, this );
- _qt_label->setBuddy( _qt_comboBox );
+ _caption->setBuddy( _qt_comboBox );
#if SEND_SELECTION_CHANGED_EVENT
connect( _qt_comboBox, SIGNAL( highlighted (int) ),
@@ -136,19 +132,7 @@
void YQComboBox::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();
- }
-
+ _caption->setText( label );
YComboBox::setLabel( label );
}
@@ -248,7 +232,7 @@
void YQComboBox::setEnabled( bool enabled )
{
- _qt_label->setEnabled( enabled );
+ _caption->setEnabled( enabled );
_qt_comboBox->setEnabled( enabled );
YWidget::setEnabled( enabled );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQComboBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQComboBox.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQComboBox.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQComboBox.h Thu Jul 12 17:05:47 2007
@@ -21,11 +21,9 @@
#define YQComboBox_h
#include
-
#include "YComboBox.h"
-
-class QLabel;
+class YQWidgetCaption;
class QComboBox;
class QY2CharValidator;
@@ -163,8 +161,8 @@
//
// Data members
//
-
- QLabel * _qt_label;
+
+ YQWidgetCaption * _caption;
QComboBox * _qt_comboBox;
QY2CharValidator * _validator;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDate.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDate.cc Thu Jul 12 17:05:47 2007
@@ -23,6 +23,7 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQDate.h"
+#include "YQWidgetCaption.h"
YQDate::YQDate( QWidget * parent,
@@ -37,17 +38,12 @@
setSpacing( YQWidgetSpacing );
setMargin( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8(label->value()), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( _qt_label->text().isEmpty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label->value() );
_qt_dateedit = new QDateEdit( this );
_qt_dateedit->setOrder( QDateEdit::DMY );
_qt_dateedit->setDate( QDate::fromString(date->value(), Qt::ISODate ));
- _qt_label->setBuddy( _qt_dateedit );
+ _caption->setBuddy( _qt_dateedit );
}
@@ -59,19 +55,7 @@
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();
- }
-
+ _caption->setText( label->value() );
YDate::setLabel( label );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQDate.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDate.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDate.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDate.h Thu Jul 12 17:05:47 2007
@@ -22,12 +22,13 @@
#include
#include
-#include
#include
#include
#include "YDate.h"
+class YQWidgetCaption;
+
class YQDate : public QVBox, public YDate
{
@@ -92,8 +93,9 @@
//void setDate( const YCPString & label );
protected:
- QDateEdit * _qt_dateedit;
- QLabel * _qt_label;
+
+ YQWidgetCaption * _caption;
+ QDateEdit * _qt_dateedit;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.cc Thu Jul 12 17:05:47 2007
@@ -26,6 +26,7 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQDownloadProgress.h"
+#include "YQWidgetCaption.h"
YQDownloadProgress::YQDownloadProgress( QWidget * parent,
@@ -39,12 +40,7 @@
setWidgetRep( this );
setMargin( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( _qt_label->text().isEmpty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label->value() );
_qt_progress = new QProgressBar( this );
_qt_progress->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
@@ -86,19 +82,7 @@
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();
- }
-
+ _caption->setText( label->value() );
YDownloadProgress::setLabel( label );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQDownloadProgress.h Thu Jul 12 17:05:47 2007
@@ -22,13 +22,12 @@
#include
#include
-
#include "YDownloadProgress.h"
-
-class QLabel;
+class YQWidgetCaption;
class QProgressBar;
+
class YQDownloadProgress : public QVBox, public YDownloadProgress
{
Q_OBJECT
@@ -96,7 +95,7 @@
protected:
- QLabel * _qt_label;
+ YQWidgetCaption * _caption;
QProgressBar * _qt_progress;
QTimer * _timer;
};
Modified: branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQGenericButton.h Thu Jul 12 17:05:47 2007
@@ -159,8 +159,6 @@
private:
- // Data members
-
YQDialog * _dialog;
QPushButton * _qPushButton;
bool _setDefaultButtonRecursive;
Modified: branches/tmp/sh/mod-ui/qt/src/YQIconPool.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQIconPool.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQIconPool.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQIconPool.h Thu Jul 12 17:05:47 2007
@@ -93,7 +93,7 @@
private:
/**
- * ( Private! ) Constructor
+ * (Private!) Constructor
* Singleton object - use the static methods only!
**/
YQIconPool();
@@ -103,7 +103,10 @@
**/
virtual ~YQIconPool();
+
+ //
// Data members
+ //
static YQIconPool * _iconPool;
QPtrDict<QPixmap> _iconCache;
Modified: branches/tmp/sh/mod-ui/qt/src/YQInputField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQInputField.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQInputField.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQInputField.h Thu Jul 12 17:05:47 2007
@@ -26,12 +26,10 @@
#include "YInputField.h"
-
-class QLineEdit;
class QString;
class QY2CharValidator;
-class YQRawLineEdit;
class YQWidgetCaption;
+class YQRawLineEdit;
using std::string;
@@ -146,10 +144,6 @@
protected:
- //
- // Data members
- //
-
YQWidgetCaption * _caption;
YQRawLineEdit * _qt_lineEdit;
QY2CharValidator * _validator;
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQIntField.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQIntField.cc Thu Jul 12 17:05:47 2007
@@ -25,6 +25,7 @@
#include "YEvent.h"
#include "YQIntField.h"
#include "YQSignalBlocker.h"
+#include "YQWidgetCaption.h"
YQIntField::YQIntField( QWidget * parent,
@@ -41,19 +42,14 @@
setSpacing( YQWidgetSpacing );
setMargin( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
- _qt_label->setAlignment( Qt::AlignLeft );
-
- if ( _qt_label->text().isEmpty() )
- _qt_label->hide();
-
+
+ _caption = new YQWidgetCaption( this, label->value() );
_qt_spinbox = new QSpinBox( minValue, maxValue,
1, // step
this );
_qt_spinbox->setValue( initialValue );
- _qt_label->setBuddy( _qt_spinbox );
+ _caption->setBuddy( _qt_spinbox );
setValue( initialValue );
@@ -64,7 +60,7 @@
void YQIntField::setEnabled( bool enabled )
{
- _qt_label->setEnabled ( enabled );
+ _caption->setEnabled ( enabled );
_qt_spinbox->setEnabled( enabled );
YWidget::setEnabled( enabled );
}
@@ -90,19 +86,7 @@
void YQIntField::setLabel( const YCPString & newLabel )
{
- _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();
- }
-
+ _caption->setText( newLabel->value() );
YIntField::setLabel( newLabel );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQIntField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQIntField.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQIntField.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQIntField.h Thu Jul 12 17:05:47 2007
@@ -30,7 +30,7 @@
class QString;
-class QLabel;
+class YQWidgetCaption;
class QIntField;
class YQIntField : public QVBox, public YIntField
@@ -108,8 +108,8 @@
protected:
- QLabel * _qt_label;
- QSpinBox * _qt_spinbox;
+ YQWidgetCaption * _caption;
+ QSpinBox * _qt_spinbox;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQLogView.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQLogView.cc Thu Jul 12 17:05:47 2007
@@ -28,6 +28,7 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQLogView.h"
+#include "YQWidgetCaption.h"
YQLogView::YQLogView( QWidget * parent,
@@ -43,17 +44,12 @@
setSpacing( YQWidgetSpacing );
setMargin( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( _qt_label->text().isEmpty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label->value() );
_qt_text = new QMultiLineEdit( this );
_qt_text->setReadOnly( true );
_qt_text->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- _qt_label->setBuddy( _qt_text );
+ _caption->setBuddy( _qt_text );
}
@@ -72,7 +68,7 @@
int YQLogView::preferredHeight()
{
- int hintHeight = _qt_label->sizeHint().height();
+ int hintHeight = _caption->sizeHint().height();
hintHeight += visibleLines() * _qt_text->fontMetrics().lineSpacing();
hintHeight += _qt_text->style().scrollBarExtent().height();
hintHeight += _qt_text->frameWidth() * 2;
@@ -96,19 +92,7 @@
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();
- }
-
+ _caption->setText( label->value() );
YLogView::setLabel( label );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQLogView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQLogView.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQLogView.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQLogView.h Thu Jul 12 17:05:47 2007
@@ -21,12 +21,13 @@
#define YQLogView_h
#include
-#include
#include
#include
#include "YLogView.h"
+class YQWidgetCaption;
+
class YQLogView : public QVBox, public YLogView
{
@@ -89,12 +90,8 @@
protected:
- //
- // Data members
- //
-
- QLabel * _qt_label;
- QMultiLineEdit * _qt_text;
+ YQWidgetCaption * _caption;
+ QMultiLineEdit * _qt_text;
};
Modified: branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMenuButton.h Thu Jul 12 17:05:47 2007
@@ -106,10 +106,6 @@
protected:
- //
- // Data members
- //
-
QPushButton * _qt_pushbutton;
int _selected_item_index;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.cc Thu Jul 12 17:05:47 2007
@@ -29,6 +29,7 @@
#include "YEvent.h"
#include "YQMultiLineEdit.h"
#include "YQSignalBlocker.h"
+#include "YQWidgetCaption.h"
YQMultiLineEdit::YQMultiLineEdit( YWidget * parent, const string & label )
@@ -39,17 +40,12 @@
setSpacing( YQWidgetSpacing );
setMargin ( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( label.empty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label );
_qt_textEdit = new QTextEdit( this );
_qt_textEdit->setTextFormat( Qt::PlainText );
_qt_textEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- _qt_label->setBuddy( _qt_textEdit );
+ _caption->setBuddy( _qt_textEdit );
connect( _qt_textEdit, SIGNAL( textChanged( void ) ),
this, SLOT ( changed ( void ) ) );
@@ -78,19 +74,7 @@
void YQMultiLineEdit::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();
- }
-
+ _caption->setText( label );
YMultiLineEdit::setLabel( label );
}
@@ -185,8 +169,8 @@
int hintHeight = defaultVisibleLines() * _qt_textEdit->fontMetrics().lineSpacing();
hintHeight += _qt_textEdit->frameWidth() * 2 + YQWidgetMargin * 2;
- if ( _qt_label && _qt_label->isShown() )
- hintHeight += _qt_label->sizeHint().height() + YQWidgetSpacing;
+ if ( _caption && _caption->isShown() )
+ hintHeight += _caption->sizeHint().height() + YQWidgetSpacing;
return max( 10, hintHeight );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMultiLineEdit.h Thu Jul 12 17:05:47 2007
@@ -21,13 +21,12 @@
#define YQMultiLineEdit_h
#include
-#include
-
#include "YMultiLineEdit.h"
-
+class YQWidgetCaption;
class QTextEdit;
+
/**
* MultiLineEdit - an input area for multi-line text.
**/
@@ -132,8 +131,8 @@
protected:
- QLabel * _qt_label;
- QTextEdit * _qt_textEdit;
+ YQWidgetCaption * _caption;
+ QTextEdit * _qt_textEdit;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.cc Thu Jul 12 17:05:47 2007
@@ -31,6 +31,7 @@
#include "YEvent.h"
#include "YQMultiSelectionBox.h"
#include "YQSignalBlocker.h"
+#include "YQWidgetCaption.h"
#define DEFAULT_VISIBLE_LINES 5
#define SHRINKABLE_VISIBLE_LINES 2
@@ -46,18 +47,13 @@
setSpacing( YQWidgetSpacing );
setMargin( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( label.empty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label );
_qt_listView = new QListView( this );
_qt_listView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
_qt_listView->addColumn( "" ); // QListView doesn't have one single column by default!
_qt_listView->setSorting( 0, false );
_qt_listView->header()->hide();
- _qt_label->setBuddy( _qt_listView );
+ _caption->setBuddy( _qt_listView );
// Very small default size if specified
@@ -78,19 +74,7 @@
void
YQMultiSelectionBox::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();
- }
-
+ _caption->setText( label );
YMultiSelectionBox::setLabel( label );
}
@@ -183,7 +167,7 @@
void
YQMultiSelectionBox::setEnabled( bool enabled )
{
- _qt_label->setEnabled( enabled );
+ _caption->setEnabled( enabled );
_qt_listView->setEnabled( enabled );
_qt_listView->triggerUpdate();
YWidget::setEnabled( enabled );
@@ -192,7 +176,7 @@
int YQMultiSelectionBox::preferredWidth()
{
- int hintWidth = _qt_label->sizeHint().width() + frameWidth();
+ int hintWidth = _caption->sizeHint().width() + frameWidth();
return max( 80, hintWidth );
}
@@ -200,7 +184,7 @@
int YQMultiSelectionBox::preferredHeight()
{
- int hintHeight = _qt_label->sizeHint().height();
+ int hintHeight = _caption->sizeHint().height();
int visibleLines = shrinkable() ? SHRINKABLE_VISIBLE_LINES : DEFAULT_VISIBLE_LINES;
hintHeight += visibleLines * _qt_listView->fontMetrics().lineSpacing();
hintHeight += _qt_listView->frameWidth() * 2;
Modified: branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQMultiSelectionBox.h Thu Jul 12 17:05:47 2007
@@ -25,8 +25,7 @@
#include "YMultiSelectionBox.h"
-
-class QLabel;
+class YQWidgetCaption;
class YQMultiSelectionBoxItem;
@@ -162,8 +161,8 @@
YQMultiSelectionBoxItem * findItem( YItem * item );
- QLabel * _qt_label;
- QListView * _qt_listView;
+ YQWidgetCaption * _caption;
+ QListView * _qt_listView;
};
@@ -208,8 +207,9 @@
virtual QString key ( int column,
bool ascending ) const;
-
+ //
// Data members
+ //
YItem * _yItem;
int _serial;
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQProgressBar.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQProgressBar.cc Thu Jul 12 17:05:47 2007
@@ -27,6 +27,7 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQProgressBar.h"
+#include "YQWidgetCaption.h"
YQProgressBar::YQProgressBar( YWidget * parent,
@@ -40,14 +41,9 @@
setSpacing( YQWidgetSpacing );
setMargin ( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( label.empty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label );
_qt_progressbar = new QProgressBar( maxValue, this );
- _qt_label->setBuddy( _qt_progressbar );
+ _caption->setBuddy( _qt_progressbar );
}
@@ -59,18 +55,8 @@
void YQProgressBar::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();
- }
+ _caption->setText( label );
+ YProgressBar::setLabel( label );
}
@@ -84,7 +70,7 @@
void YQProgressBar::setEnabled( bool enabled )
{
- _qt_label->setEnabled( enabled );
+ _caption->setEnabled( enabled );
_qt_progressbar->setEnabled( enabled );
YWidget::setEnabled( enabled );
}
@@ -92,9 +78,9 @@
int YQProgressBar::preferredWidth()
{
- int hintWidth = _qt_label->sizeHint().width() + margin();
+ int hintWidth = _caption->sizeHint().width() + margin();
- if ( ! _qt_label->isVisible() )
+ if ( ! _caption->isVisible() )
hintWidth = 0;
return max( 200, hintWidth );
Modified: branches/tmp/sh/mod-ui/qt/src/YQProgressBar.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQProgressBar.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQProgressBar.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQProgressBar.h Thu Jul 12 17:05:47 2007
@@ -25,7 +25,7 @@
class QString;
-class QLabel;
+class YQWidgetCaption;
class QProgressBar;
class YQProgressBar : public QVBox, public YProgressBar
@@ -94,11 +94,7 @@
protected:
- //
- // Data members
- //
-
- QLabel * _qt_label;
+ YQWidgetCaption * _caption;
QProgressBar * _qt_progressbar;
};
Modified: branches/tmp/sh/mod-ui/qt/src/YQRichText.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQRichText.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQRichText.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQRichText.h Thu Jul 12 17:05:47 2007
@@ -127,10 +127,6 @@
protected:
- //
- // Data members
- //
-
YQTextBrowser * _textBrowser;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.cc Thu Jul 12 17:05:47 2007
@@ -33,6 +33,7 @@
#include "YQSignalBlocker.h"
#include "YQDialog.h"
#include "YUIException.h"
+#include "YQWidgetCaption.h"
#define VERBOSE_SELECTION 1
@@ -49,19 +50,14 @@
setSpacing( YQWidgetSpacing );
setMargin ( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( label.empty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label );
_qt_listBox = new QListBox( this );
_qt_listBox->installEventFilter( this );
_qt_listBox->setVariableHeight( false );
_qt_listBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
QSizePolicy::Expanding ) );
_qt_listBox->setTopItem(0);
- _qt_label->setBuddy( _qt_listBox );
+ _caption->setBuddy( _qt_listBox );
connect( _qt_listBox, SIGNAL( highlighted ( int ) ),
this, SLOT ( slotSelected( int ) ) );
@@ -85,20 +81,8 @@
void YQSelectionBox::setLabel( const string & label )
{
+ _caption->setText( label );
YSelectionBox::setLabel( label );
-
- _qt_label->setText( fromUTF8( label ) );
-
- if ( label.empty() )
- {
- if ( _qt_label->isVisible() )
- _qt_label->hide();
- }
- else
- {
- if ( _qt_label->isHidden() )
- _qt_label->show();
- }
}
@@ -191,7 +175,7 @@
int YQSelectionBox::preferredWidth()
{
- int hintWidth = _qt_label->sizeHint().width() + frameWidth();
+ int hintWidth = _caption->sizeHint().width() + frameWidth();
return max( 80, hintWidth );
}
@@ -199,7 +183,7 @@
int YQSelectionBox::preferredHeight()
{
- int hintHeight = _qt_label->sizeHint().height();
+ int hintHeight = _caption->sizeHint().height();
int visibleLines = shrinkable() ? SHRINKABLE_VISIBLE_LINES : DEFAULT_VISIBLE_LINES;
hintHeight += visibleLines * _qt_listBox->fontMetrics().lineSpacing();
hintHeight += _qt_listBox->frameWidth() * 2;
@@ -216,7 +200,7 @@
void YQSelectionBox::setEnabled( bool enabled )
{
- _qt_label->setEnabled( enabled );
+ _caption->setEnabled( enabled );
_qt_listBox->setEnabled( enabled );
_qt_listBox->triggerUpdate( true );
YWidget::setEnabled( enabled );
Modified: branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQSelectionBox.h Thu Jul 12 17:05:47 2007
@@ -25,7 +25,7 @@
#include "YSelectionBox.h"
-class QLabel;
+class YQWidgetCaption;
class QListBox;
class QListBoxItem;
@@ -155,11 +155,12 @@
**/
void selectItem( int index );
+
//
// Data members
//
- QLabel * _qt_label;
+ YQWidgetCaption * _caption;
QListBox * _qt_listBox;
QTimer _timer;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQSlider.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQSlider.cc Thu Jul 12 17:05:47 2007
@@ -25,6 +25,7 @@
#include "YEvent.h"
#include "YQSlider.h"
#include "YQSignalBlocker.h"
+#include "YQWidgetCaption.h"
YQSlider::YQSlider( QWidget * parent,
@@ -40,13 +41,9 @@
setWidgetRep( this );
setSpacing( YQWidgetSpacing );
- setMargin( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
- _qt_label->setAlignment( Qt::AlignRight );
-
- if ( _qt_label->text().isEmpty() )
- _qt_label->hide();
+ setMargin ( YQWidgetMargin );
+ _caption = new YQWidgetCaption( this, label->value() );
+ _caption->setAlignment( Qt::AlignRight );
_hbox = new QHBox( this );
_hbox->setSpacing( YQWidgetSpacing );
@@ -61,7 +58,7 @@
_hbox );
_qt_spinbox->setValue( initialValue );
- _qt_label->setBuddy( _qt_spinbox );
+ _caption->setBuddy( _qt_spinbox );
setValue( initialValue );
@@ -78,7 +75,7 @@
void YQSlider::setEnabled( bool enabled )
{
- _qt_label->setEnabled ( enabled );
+ _caption->setEnabled ( enabled );
_qt_slider->setEnabled ( enabled );
_qt_spinbox->setEnabled( enabled );
YWidget::setEnabled( enabled );
@@ -106,19 +103,7 @@
void YQSlider::setLabel( const YCPString & newLabel )
{
- _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();
- }
-
+ _caption->setText( newLabel->value() );
YSlider::setLabel( newLabel );
}
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.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQSlider.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQSlider.h Thu Jul 12 17:05:47 2007
@@ -31,7 +31,7 @@
class QString;
-class QLabel;
+class YQWidgetCaption;
class QSlider;
class YQSlider : public QVBox, public YSlider
@@ -109,10 +109,10 @@
protected:
- QLabel * _qt_label;
- QSlider * _qt_slider;
- QSpinBox * _qt_spinbox;
- QHBox * _hbox;
+ YQWidgetCaption * _caption;
+ QSlider * _qt_slider;
+ QSpinBox * _qt_spinbox;
+ QHBox * _hbox;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTime.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTime.cc Thu Jul 12 17:05:47 2007
@@ -23,6 +23,7 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQTime.h"
+#include "YQWidgetCaption.h"
YQTime::YQTime( QWidget * parent,
@@ -37,16 +38,11 @@
setSpacing( YQWidgetSpacing );
setMargin( YQWidgetMargin );
- _qt_label = new QLabel( fromUTF8(label->value()), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( label->value() == "" )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label->value() );
_qt_timeedit = new QTimeEdit( this );
_qt_timeedit->setTime( QTime::fromString(time->value(), Qt::ISODate ));
- _qt_label->setBuddy( _qt_timeedit );
+ _caption->setBuddy( _qt_timeedit );
}
@@ -58,19 +54,7 @@
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();
- }
-
+ _caption->setText( label->value() );
YTime::setLabel( label );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQTime.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTime.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTime.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTime.h Thu Jul 12 17:05:47 2007
@@ -28,6 +28,8 @@
#include "YTime.h"
+class YQWidgetCaption;
+
class YQTime : public QVBox, public YTime
{
@@ -38,10 +40,10 @@
/**
* Constructor.
**/
- YQTime( QWidget * parent,
- const YWidgetOpt & opt,
- const YCPString & label,
- const YCPString & time );
+ YQTime( QWidget * parent,
+ const YWidgetOpt & opt,
+ const YCPString & label,
+ const YCPString & time );
/**
* Inherited from YWidget: Sets the enabled state of the
@@ -92,8 +94,9 @@
//void setTime( const YCPString & label );
protected:
- QTimeEdit * _qt_timeedit;
- QLabel * _qt_label;
+
+ YQWidgetCaption * _caption;
+ QTimeEdit * _qt_timeedit;
};
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=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTree.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTree.cc Thu Jul 12 17:05:47 2007
@@ -34,6 +34,7 @@
#include "YQTree.h"
#include "YItem.h"
#include "YQSignalBlocker.h"
+#include "YQWidgetCaption.h"
#define VERBOSE_TREE_ITEMS 0
@@ -49,18 +50,13 @@
_nextSerialNo = 0;
- _qt_label = new QLabel( fromUTF8( label ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
-
- if ( _qt_label->text().isEmpty() )
- _qt_label->hide();
-
+ _caption = new YQWidgetCaption( this, label );
_qt_listView = new QListView( this );
_qt_listView->addColumn( "" );
_qt_listView->header()->hide();
_qt_listView->setRootIsDecorated ( true );
- _qt_label->setBuddy ( _qt_listView );
+ _caption->setBuddy ( _qt_listView );
connect( _qt_listView, SIGNAL( selectionChanged ( QListViewItem * ) ),
this, SLOT ( slotSelected ( QListViewItem * ) ) );
@@ -81,19 +77,7 @@
void YQTree::setLabel( const string & label )
{
- _qt_label->setText( fromUTF8( label ) );
-
- if ( _qt_label->text().isEmpty() )
- {
- if ( _qt_label->isVisible() )
- _qt_label->hide();
- }
- else
- {
- if ( _qt_label->isHidden() )
- _qt_label->show();
- }
-
+ _caption->setText( label );
YTree::setLabel( label );
}
@@ -218,7 +202,7 @@
int YQTree::preferredWidth()
{
- return max( 200, _qt_label->sizeHint().width() );
+ return max( 200, _caption->sizeHint().width() );
}
@@ -227,7 +211,7 @@
// 300 is an arbitrary value. Use a MinSize or MinHeight widget to set a
// size that is useful for the application.
- return 300 + _qt_label->sizeHint().height();
+ return 300 + _caption->sizeHint().height();
}
@@ -239,7 +223,7 @@
void YQTree::setEnabled( bool enabled )
{
- _qt_label->setEnabled( enabled );
+ _caption->setEnabled( enabled );
_qt_listView->setEnabled( enabled );
YWidget::setEnabled( enabled );
}
Modified: branches/tmp/sh/mod-ui/qt/src/YQTree.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQTree.h?rev=39371&r1=39370&r2=39371&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQTree.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQTree.h Thu Jul 12 17:05:47 2007
@@ -26,7 +26,7 @@
#include "YTree.h"
-class QLabel;
+class YQWidgetCaption;
class YQTreeItem;
@@ -160,9 +160,9 @@
// Data members
//
- QLabel * _qt_label;
- QListView * _qt_listView;
- int _nextSerialNo;
+ YQWidgetCaption * _caption;
+ QListView * _qt_listView;
+ int _nextSerialNo;
};
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org