Author: coolo
Date: Mon Dec 3 18:27:38 2007
New Revision: 42630
URL: http://svn.opensuse.org/viewcvs/yast?rev=42630&view=rev
Log:
merge in changes from wizard-rework. Still work in progress,
but it's technically working :)
Added:
branches/tmp/coolo/qt4-port/theme/Os103-installer-mockup.png
- copied unchanged from r42517, branches/tmp/coolo/wizard-rework/theme/Os103-installer-mockup.png
branches/tmp/coolo/qt4-port/theme/alpha_dummy-1.svg
- copied, changed from r42517, branches/tmp/coolo/wizard-rework/theme/alpha_dummy-1.svg
branches/tmp/coolo/qt4-port/theme/g22503.png
- copied unchanged from r42517, branches/tmp/coolo/wizard-rework/theme/g22503.png
branches/tmp/coolo/qt4-port/theme/rect2174.png
- copied unchanged from r42521, branches/tmp/coolo/wizard-rework/theme/rect2174.png
Removed:
branches/tmp/coolo/qt4-port/VERSION
Modified:
branches/tmp/coolo/qt4-port/VERSION.cmake
branches/tmp/coolo/qt4-port/src/CMakeLists.txt
branches/tmp/coolo/qt4-port/src/YQReplacePoint.cc
branches/tmp/coolo/qt4-port/src/YQUI.h
branches/tmp/coolo/qt4-port/src/YQUI_core.cc
branches/tmp/coolo/qt4-port/src/YQWizard.cc
branches/tmp/coolo/qt4-port/src/YQWizard.h
branches/tmp/coolo/qt4-port/theme/background-1024x768.png
branches/tmp/coolo/qt4-port/theme/step-current.png
branches/tmp/coolo/qt4-port/theme/step-done.png
branches/tmp/coolo/qt4-port/theme/step-todo.png
branches/tmp/coolo/qt4-port/theme/style.qss
Modified: branches/tmp/coolo/qt4-port/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/VERSION.cmake?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/VERSION.cmake (original)
+++ branches/tmp/coolo/qt4-port/VERSION.cmake Mon Dec 3 18:27:38 2007
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "16")
-SET(VERSION_PATCH "3")
+SET(VERSION_PATCH "6")
Modified: branches/tmp/coolo/qt4-port/src/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/CMakeLists.txt?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/CMakeLists.txt (original)
+++ branches/tmp/coolo/qt4-port/src/CMakeLists.txt Mon Dec 3 18:27:38 2007
@@ -49,7 +49,7 @@
INSTALL(TARGETS py2qt4 LIBRARY DESTINATION ${YAST_PLUGIN_DIR} )
-#ADD_SUBDIRECTORY(pkg)
+ADD_SUBDIRECTORY(pkg)
#SET_TARGET_PROPERTIES( y2lang_qt4 PROPERTIES PREFIX "" )
Modified: branches/tmp/coolo/qt4-port/src/YQReplacePoint.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQReplacePoint.cc?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQReplacePoint.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQReplacePoint.cc Mon Dec 3 18:27:38 2007
@@ -35,7 +35,7 @@
void YQReplacePoint::showChild()
{
YWidget * child = firstChild();
-
+
if ( child )
{
QWidget * qChild = (QWidget *) child->widgetRep();
Modified: branches/tmp/coolo/qt4-port/src/YQUI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQUI.h?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQUI.h (original)
+++ branches/tmp/coolo/qt4-port/src/YQUI.h Mon Dec 3 18:27:38 2007
@@ -230,16 +230,14 @@
*
* Reimplemented from YUI.
**/
- virtual void blockEvents( bool block = true )
- { _event_handler.blockEvents( block ); }
+ virtual void blockEvents( bool block = true );
/**
* Returns 'true' if events are currently blocked.
*
* Reimplemented from YUI.
**/
- virtual bool eventsBlocked() const
- { return _event_handler.eventsBlocked(); }
+ virtual bool eventsBlocked() const;
/**
* Returns the current product name
@@ -631,6 +629,8 @@
**/
YSimpleEventHandler _event_handler;
+ int blocked_level;
+
/**
* Saved normal palette
**/
@@ -651,9 +651,9 @@
**/
bool _askedForLeftHandedMouse;
- bool _ui_inited;
- int _ui_argc;
- char **_ui_argv;
+ bool _ui_inited;
+ int _ui_argc;
+ char **_ui_argv;
};
#endif // YQUI_h
Modified: branches/tmp/coolo/qt4-port/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQUI_core.cc?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQUI_core.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQUI_core.cc Mon Dec 3 18:27:38 2007
@@ -72,6 +72,7 @@
_leftHandedMouse = false;
_askedForLeftHandedMouse = false;
screenShotNameTemplate = "";
+ blocked_level = 0;
qInstallMsgHandler( qMessageHandler );
@@ -136,8 +137,9 @@
wflags |= Qt::FramelessWindowHint;
}
- _main_win = new QWidget( 0, 0, wflags ); // parent, name, wflags
+ _main_win = new QWidget( 0, wflags ); // parent, wflags
_main_win->setFocusPolicy( Qt::StrongFocus );
+ _main_win->setObjectName( "main_window" );
// Create widget stack for `opt(`defaultsize) dialogs
QVBoxLayout *vbox = new QVBoxLayout( _main_win );
@@ -151,7 +153,8 @@
_main_win->installEventFilter( this );
#endif
- _main_win->resize( _default_size );
+ //_main_win->resize( _default_size );
+ _main_win->setFixedSize( 1024, 768 );
if ( _fullscreen || ! _have_wm )
_main_win->move( 0, 0 );
@@ -442,7 +445,11 @@
{
init_ui();
- // y2milestone( "userInput %ld", timeout_millisec );
+ _event_handler.blockEvents( false );
+ _eventLoop->wakeUp();
+ blocked_level = 0;
+
+ //y2milestone( "userInput %ld", timeout_millisec );
YEvent * event = 0;
YQDialog * dialog = dynamic_cast ( YDialog::currentDialog( false ) );
@@ -462,12 +469,7 @@
normalCursor();
_do_exit_loop = true; // should exit_loop() be called in sendEvent()?
-
- while ( ! pendingEvent() )
- {
- _eventLoop->processEvents(QEventLoop::WaitForMoreEvents);
- }
-
+ _eventLoop->exec();
_do_exit_loop = false;
event = _event_handler.consumePendingEvent();
@@ -653,6 +655,31 @@
}
+void YQUI::blockEvents( bool block )
+{
+ if ( block )
+ {
+ if ( ++blocked_level == 1 )
+ {
+ _event_handler.blockEvents( true );
+ _eventLoop->exit();
+ }
+ }
+ else
+ {
+ if ( --blocked_level == 0 )
+ {
+ _event_handler.blockEvents( false );
+ _eventLoop->wakeUp();
+ }
+ }
+}
+
+
+bool YQUI::eventsBlocked() const
+{
+ return _event_handler.eventsBlocked();
+}
static void
qMessageHandler( QtMsgType type, const char * msg )
Modified: branches/tmp/coolo/qt4-port/src/YQWizard.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWizard.cc?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQWizard.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQWizard.cc Mon Dec 3 18:27:38 2007
@@ -30,6 +30,9 @@
#include
#include <QDialog>
+#include <QSvgRenderer>
+#include <QPainter>
+#include <QStackedWidget>
#include "ui_QHelpDialog.h"
#include
#include
@@ -140,7 +143,7 @@
//layoutTitleBar( this );
layout->addLayout( layoutSideBar( this ) );
- layout->addLayout( layoutWorkArea( this ) );
+ layout->addWidget( layoutWorkArea( this ) );
}
@@ -204,11 +207,10 @@
QLayout *YQWizard::layoutSideBar( QWidget * parent )
{
- _sideBar = new Q3WidgetStack( parent );
+ _sideBar = new QStackedWidget( parent );
YUI_CHECK_NEW( _sideBar );
_sideBar->setMinimumWidth( YQUI::ui()->defaultSize( YD_HORIZ ) / 5 );
_sideBar->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred ) ); // hor/vert
- _sideBar->setMargin( 0 );
QVBoxLayout *vbox = new QVBoxLayout( );
vbox->addWidget( _sideBar );
@@ -232,8 +234,10 @@
void YQWizard::layoutStepsPanel()
{
// Steps
- _stepsPanel = new QWidget( _sideBar );
+ _stepsPanel = new QFrame( _sideBar );
_sideBar->addWidget( _stepsPanel );
+ _sideBar->setObjectName( "steps" );
+ _stepsPanel->setProperty( "class", "steps QFrame" );
// Steps panel bottom buttons ("Help", "Release Notes")
@@ -444,6 +448,8 @@
void YQWizard::layoutHelpPanel()
{
+ return;
+
//
// Button box with bottom gradient
//
@@ -470,6 +476,7 @@
button = new QPushButton( _( "Steps" ), buttonBox );
YUI_CHECK_NEW( button );
_stepsButton = button;
+ _stepsButton->hide();
pixmap = QPixmap( PIXMAP_DIR "steps-button.png" );
}
@@ -690,11 +697,14 @@
-QLayout *YQWizard::layoutWorkArea( QFrame * parent )
+QWidget *YQWizard::layoutWorkArea( QWidget * parent )
{
- QVBoxLayout *vbox = new QVBoxLayout();
+ QFrame *workArea = new QFrame( parent );
+ workArea->setObjectName( "work_area" );
+
+ QVBoxLayout *vbox = new QVBoxLayout( workArea );
- _menuBar = new QMenuBar( parent );
+ _menuBar = new QMenuBar( workArea );
YUI_CHECK_NEW( _menuBar );
_menuBar->hide(); // will be made visible when menus are added
@@ -709,13 +719,13 @@
//headingHBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
vbox->addLayout( headingHBox );
- _dialogIcon = new QLabel( parent );
+ _dialogIcon = new QLabel( workArea );
YUI_CHECK_NEW( _dialogIcon );
headingHBox->addWidget( _dialogIcon );
_dialogIcon->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); // hor/vert
_dialogIcon->setObjectName( "DialogIcon" );
- _dialogHeading = new QLabel( parent );
+ _dialogHeading = new QLabel( workArea );
YUI_CHECK_NEW( _dialogHeading );
headingHBox->addWidget( _dialogHeading );
_dialogHeading->setAlignment( Qt::AlignLeft | Qt::WordBreak );
@@ -726,17 +736,17 @@
// Client area (the part that belongs to the YCP application)
//
- layoutClientArea( parent );
+ layoutClientArea( workArea );
vbox->addWidget( _clientArea );
//
// Button box
//
- QLayout *bb = layoutButtonBox( parent );
+ QLayout *bb = layoutButtonBox( workArea );
vbox->addLayout( bb );
- return vbox;
+ return workArea;
}
@@ -745,7 +755,7 @@
{
_clientArea = new Q3VBox( parent );
YUI_CHECK_NEW( _clientArea );
- _clientArea->layout()->setMargin( 4 );
+ // _clientArea->layout()->setMargin( 4 );
//
// HVCenter for wizard contents
@@ -753,6 +763,7 @@
_contents = new YQAlignment( this, _clientArea, YAlignCenter, YAlignCenter );
YUI_CHECK_NEW( _contents );
+ _contents->QObject::setProperty( "class", "Contents" );
_contents->setStretchable( YD_HORIZ, true );
_contents->setStretchable( YD_VERT, true );
@@ -785,9 +796,8 @@
QHBoxLayout * hbox = new QHBoxLayout(); // parent, spacing
YUI_CHECK_NEW( hbox );
- hbox->setSpacing( 5 );
- hbox->setMargin( 5 );
-
+ hbox->setSpacing( 0 );
+ hbox->setMargin( 0 );
// Help button - intentionally without keyboard shortcut
_helpButton = new QPushButton( _( "Help" ), parent );
@@ -837,6 +847,8 @@
// "Next" button
//
+ hbox->addSpacing( 5 );
+
_nextButton = new YQWizardButton( this, parent, _nextButtonLabel );
YUI_CHECK_NEW( _nextButton );
@@ -999,7 +1011,7 @@
{
if ( _sideBar && _stepsPanel )
{
- _sideBar->raiseWidget( _stepsPanel );
+ _sideBar->setCurrentWidget( _stepsPanel );
}
}
@@ -1008,7 +1020,7 @@
{
if ( _sideBar && _treePanel )
{
- _sideBar->raiseWidget( _treePanel );
+ _sideBar->setCurrentWidget( _treePanel );
}
}
@@ -1149,8 +1161,6 @@
_contents->setSize( contentsRect.width(), contentsRect.height() );
}
-
-
bool YQWizard::eventFilter( QObject * obj, QEvent * ev )
{
if ( ev->type() == QEvent::Resize && obj == _contents )
@@ -1177,6 +1187,8 @@
void YQWizard::showReleaseNotesButton( const string & label, const string & id )
{
+ return; // no longer supported!
+
if ( ! _releaseNotesButton )
{
y2error( "NULL Release Notes button" );
@@ -1221,21 +1233,31 @@
void YQWizard::Step::setStatus( Status s )
{
- if ( !_statusLabel || _status == s )
+ if ( !_statusLabel || !_nameLabel || _status == s )
return;
_status = s;
if ( s == Todo )
- _statusLabel->setProperty( "class", "todo-step QLabel" );
+ {
+ _statusLabel->setProperty( "class", "todo-step-status QLabel" );
+ _nameLabel->setProperty( "class", "todo-step-name QLabel" );
+ }
if ( s == Done )
- _statusLabel->setProperty( "class", "done-step QLabel" );
+ {
+ _statusLabel->setProperty( "class", "done-step-status QLabel" );
+ _nameLabel->setProperty( "class", "done-step-name QLabel" );
+ }
if ( s == Current )
- _statusLabel->setProperty( "class", "current-step QLabel" );
+ {
+ _statusLabel->setProperty( "class", "current-step-status QLabel" );
+ _nameLabel->setProperty( "class", "current-step-name QLabel" );
+ }
qApp->style()->polish( _statusLabel );
+ qApp->style()->polish( _nameLabel );
}
#include "YQWizard.moc"
Modified: branches/tmp/coolo/qt4-port/src/YQWizard.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWizard.h?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQWizard.h (original)
+++ branches/tmp/coolo/qt4-port/src/YQWizard.h Mon Dec 3 18:27:38 2007
@@ -47,7 +47,7 @@
class QSpacerItem;
class Q3TextBrowser;
class QToolButton;
-class Q3WidgetStack;
+class QStackedWidget;
class YReplacePoint;
class QTreeWidgetItem;
class YQAlignment;
@@ -446,7 +446,7 @@
void layoutStepsPanel();
void layoutHelpPanel();
void layoutTreePanel();
- QLayout *layoutWorkArea ( QFrame * parentHBox );
+ QWidget *layoutWorkArea ( QWidget * parent );
void layoutClientArea( QWidget * parent );
QLayout *layoutButtonBox( QWidget * parent );
@@ -526,7 +526,7 @@
QString _qHelpText;
- Q3WidgetStack * _sideBar;
+ QStackedWidget * _sideBar;
QWidget * _stepsPanel;
QPushButton * _releaseNotesButton;
string _releaseNotesButtonId;
Copied: branches/tmp/coolo/qt4-port/theme/alpha_dummy-1.svg (from r42517, branches/tmp/coolo/wizard-rework/theme/alpha_dummy-1.svg)
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/theme/alpha_dummy-1.svg?p2=branches/tmp/coolo/qt4-port/theme/alpha_dummy-1.svg&p1=branches/tmp/coolo/wizard-rework/theme/alpha_dummy-1.svg&r1=42517&r2=42630&rev=42630&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/theme/alpha_dummy-1.svg (original)
+++ branches/tmp/coolo/qt4-port/theme/alpha_dummy-1.svg Mon Dec 3 18:27:38 2007
@@ -145,10 +145,12 @@
inkscape:groupmode="layer"
id="layer2"
inkscape:label="thinks"
- style="display:inline">
+ style="display:none">
+ transform="matrix(0.8193774,0,0,0.9887048,286.32606,-30.736663)"
+ inkscape:export-xdpi="89.93"
+ inkscape:export-ydpi="89.93">
</g>
</g>
+
+
+ </g>
+
+
+ </g>
</svg>
Modified: branches/tmp/coolo/qt4-port/theme/background-1024x768.png
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/theme/background-1024x768.png?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
Binary files - no diff available.
Modified: branches/tmp/coolo/qt4-port/theme/step-current.png
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/theme/step-current.png?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
Binary files - no diff available.
Modified: branches/tmp/coolo/qt4-port/theme/step-done.png
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/theme/step-done.png?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
Binary files - no diff available.
Modified: branches/tmp/coolo/qt4-port/theme/step-todo.png
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/theme/step-todo.png?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
Binary files - no diff available.
Modified: branches/tmp/coolo/qt4-port/theme/style.qss
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/theme/style.qss?rev=42630&r1=42629&r2=42630&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/theme/style.qss (original)
+++ branches/tmp/coolo/qt4-port/theme/style.qss Mon Dec 3 18:27:38 2007
@@ -1,23 +1,44 @@
-/* Hintergrund: background-$RESULTION */
-.YQWizard {
- pbackground-image: url(bottom-gradient.png);
+#main_window {
background-image: url(background-1024x768.png);
background-position: bottom;
background-repeat: repeat-x;
}
-QDWidget { border-style: solid; border-width: 5px; }
+#work_area {
+ background-image: url(g22503.png);
+ background-position: top left;
+ background-repeat: none;
+ background-origin: border;
+ background-clip: padding;
+ border-style: none;
+ padding-left: 0px;
+ padding-top: 50px;
+ padding-right: 110px;
+ padding-bottom: 80px;
+}
+
+QDWidget { border-style: solid; border-width: 5px; }
QWidget { color: white; }
-/* We provide a min-width and min-height for push buttons
- so that they look elegant regardless of the width of the text. */
+#steps
+{
+ background-image: url(rect2174.png);
+ background-position: top right;
+ background-repeat: none;
+ background-origin: border;
+ background-clip: padding;
+ border-style: none;
+ padding-left: 20px;
+ padding-top: 10px;
+ margin-top: 60px;
+ margin-left: 10px;
+ min-width: 195px;
+ max-width: 195px;
+}
+
QPushButton {
- padding: 3px;
- margin-left: 20px;
- min-width: 9ex;
- min-height: 2.5ex;
color: black;
}
@@ -25,32 +46,23 @@
color: black;
}
-/* Increase the padding, so the text is shifted when the button is
- pressed. */
-QPushButton:pressed {
- padding-left: 5px;
- padding-top: 5px;
- background-color: #d0d67c;
+.current-step-name {
+ font: bold 10pt;
}
-/* Nice to have the background color change when hovered. */
-QRadioButton:hover, QCheckBox:hover {
- background-color: wheat;
-}
-
-.todo {
+.todo-step-status {
qproperty-pixmap: url(step-todo.png);
max-width: 14px;
min-width: 14px;
}
-.done {
+.done-step-status {
qproperty-pixmap: url(step-done.png);
max-width: 14px;
min-width: 14px;
}
-.current {
+.current-step-status {
qproperty-pixmap: url(step-current.png);
max-width: 14px;
min-width: 14px;
@@ -58,12 +70,19 @@
.steps_heading {
font: bold;
- font-size: 14pt;
+ color: black;
+ margin-bottom: 7px;
+ font-size: 11pt;
}
-#DialogIcon {}
+#DialogIcon { max-width: 0px; margin: 0px; }
#DialogHeading {
font-size: 20px;
padding: 12pt;
+ color: white;
+ font-style: bold;
+ margin: 0px;
}
+.Contents QWidget { color: black; }
+
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org