[yast-commit] r56241 - in /branches/tmp/SLE-11-SP1-Stash/qt: package/yast2-qt.changes src/YQMainWinDock.cc src/YQWizard.cc src/YQWizard.h
Author: kmachalkova
Date: Thu Mar 19 15:26:16 2009
New Revision: 56241
URL: http://svn.opensuse.org/viewcvs/yast?rev=56241&view=rev
Log:
Backport of QSplitter into SLE11 SP1 -
bnc#460739 & friends
Modified:
branches/tmp/SLE-11-SP1-Stash/qt/package/yast2-qt.changes
branches/tmp/SLE-11-SP1-Stash/qt/src/YQMainWinDock.cc
branches/tmp/SLE-11-SP1-Stash/qt/src/YQWizard.cc
branches/tmp/SLE-11-SP1-Stash/qt/src/YQWizard.h
Modified: branches/tmp/SLE-11-SP1-Stash/qt/package/yast2-qt.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/qt/package/yast2-qt.changes?rev=56241&r1=56240&r2=56241&view=diff
==============================================================================
--- branches/tmp/SLE-11-SP1-Stash/qt/package/yast2-qt.changes (original)
+++ branches/tmp/SLE-11-SP1-Stash/qt/package/yast2-qt.changes Thu Mar 19 15:26:16 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Mar 19 14:57:45 CET 2009 - kmachalkova@suse.cz
+
+- Backported QSplitter-based Wizard widget, to make installation
+ steps panel collapsible (bnc#460739, bnc#445682 and others)
+
+-------------------------------------------------------------------
Tue Jan 13 17:03:58 CET 2009 - tgoettlicher@suse.de
- Fixed bnc #445951: Help dialog untranslated
Modified: branches/tmp/SLE-11-SP1-Stash/qt/src/YQMainWinDock.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/qt/src/YQMainWinDock.cc?rev=56241&r1=56240&r2=56241&view=diff
==============================================================================
--- branches/tmp/SLE-11-SP1-Stash/qt/src/YQMainWinDock.cc (original)
+++ branches/tmp/SLE-11-SP1-Stash/qt/src/YQMainWinDock.cc Thu Mar 19 15:26:16 2009
@@ -93,9 +93,9 @@
if ( wizard && wizard->isSecondary() )
{
if ( QApplication::isLeftToRight() )
- rect.setLeft( _sideBarWidth );
+ rect.setLeft( 0 );
else
- rect.setWidth( rect.width() - _sideBarWidth );
+ rect.setWidth( rect.width() );
}
if ( dialog->rect() != rect )
@@ -168,7 +168,8 @@
// untouched; only the right side (the work area) of that wizard is to be
// activated or deactivated.
- YQWizard * wizard = dialog->findWizard();
+ // probably no longer needed, now the windows (even with steps) fully overlap ??
+ /*YQWizard * wizard = dialog->findWizard();
if ( wizard && wizard->wizardMode() == YWizardMode_Steps )
{
@@ -177,7 +178,7 @@
if ( wizardWorkArea )
widget = wizardWorkArea;
// else -> stick with dialog->widgetRep()
- }
+ }*/
if ( widget )
widget->setEnabled( active );
Modified: branches/tmp/SLE-11-SP1-Stash/qt/src/YQWizard.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/qt/src/YQWizard.cc?rev=56241&r1=56240&r2=56241&view=diff
==============================================================================
--- branches/tmp/SLE-11-SP1-Stash/qt/src/YQWizard.cc (original)
+++ branches/tmp/SLE-11-SP1-Stash/qt/src/YQWizard.cc Thu Mar 19 15:26:16 2009
@@ -81,7 +81,8 @@
const string & abortButtonLabel,
const string & nextButtonLabel,
YWizardMode wizardMode )
- : QFrame( (QWidget *) parent->widgetRep() )
+ : QSplitter( Qt::Horizontal, (QWidget *) parent->widgetRep() )
+
, YWizard( parent,
backButtonLabel,
abortButtonLabel,
@@ -93,6 +94,7 @@
, _helpDlg ( NULL )
{
setObjectName( "wizard" );
+ setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
QHBoxLayout* layout = new QHBoxLayout( this );
layout->setSpacing( 0 );
@@ -100,7 +102,8 @@
setWidgetRep( this );
- _stepsEnabled = (wizardMode == YWizardMode_Steps);
+ //either main wizard with `opt(`stepsEnabled), or sub-wizard of steps-enabled wizard
+ _stepsEnabled = ( (wizardMode == YWizardMode_Steps) || main_wizard );
_treeEnabled = (wizardMode == YWizardMode_Tree);
_stepsRegistered = false;
@@ -138,6 +141,9 @@
layout->addLayout( layoutSideBar( this ) );
layout->addWidget( layoutWorkArea( this ) );
+ setStretchFactor(indexOf(_sideBar),0);
+ setStretchFactor(indexOf(_workArea),1);
+
/* If steps are enabled, we want to delay
the registering for after we have steps registered */
if ( !_stepsEnabled )
@@ -149,6 +155,7 @@
}
else if ( main_wizard )
{
+ copySteps( main_wizard );
YQMainWinDock::mainWinDock()->resizeVisibleChild();
}
@@ -159,7 +166,14 @@
{
deleteSteps();
if ( this == main_wizard )
- main_wizard = 0;
+ {
+ main_wizard = 0;
+ }
+ else if ( main_wizard )
+ {
+ //transfer the widget ratio to the main wizard
+ main_wizard->setSizes( sizes() );
+ }
delete _helpDlg;
@@ -467,6 +481,37 @@
updateStepStates();
}
+void YQWizard::copySteps( YQWizard *wizard)
+{
+ QList
participants (1)
-
kmachalkova@svn.opensuse.org