Mailing Lists
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2023
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
List overview
Download
YaST Commits
November 2007
----- 2023 -----
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
yast-commit@lists.opensuse.org
24 participants
864 discussions
Start a n
N
ew thread
[yast-commit] r42536 - in /branches/tmp/coolo/qt4-port/src: YQAlignment.cc YQUI.h
by dmacvicar@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: dmacvicar Date: Fri Nov 30 12:03:18 2007 New Revision: 42536 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42536&view=rev
Log: Ported YQAlignment Modified: branches/tmp/coolo/qt4-port/src/YQAlignment.cc branches/tmp/coolo/qt4-port/src/YQUI.h Modified: branches/tmp/coolo/qt4-port/src/YQAlignment.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQAlig…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQAlignment.cc (original) +++ branches/tmp/coolo/qt4-port/src/YQAlignment.cc Fri Nov 30 12:03:18 2007 @@ -76,7 +76,7 @@ if ( pixmapName.empty() ) // Delete any old background pixmap { - unsetPalette(); + setPalette(QPalette()); } else // Set a new background pixmap { @@ -88,7 +88,9 @@ } else { - setPaletteBackgroundPixmap( pixmap ); + QPalette palette; + palette.setBrush(backgroundRole(), QBrush(pixmap)); + setPalette(palette); } } } Modified: branches/tmp/coolo/qt4-port/src/YQUI.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQUI.h…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQUI.h (original) +++ branches/tmp/coolo/qt4-port/src/YQUI.h Fri Nov 30 12:03:18 2007 @@ -20,8 +20,9 @@ #define YQUI_h #include <qapplication.h> -#include <Qt/qmap.h> -#include <Qt/qtimer.h> +#include <QMap> +#include <QTimer> +#include <QPalette> #include <vector> #include "YSimpleEventHandler.h" -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42535 - in /branches/tmp/coolo/qt4-port/src: CMakeLists.txt QY2Settings.cc
by dmacvicar@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: dmacvicar Date: Fri Nov 30 12:03:16 2007 New Revision: 42535 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42535&view=rev
Log: Ported QY2Settings Modified: branches/tmp/coolo/qt4-port/src/CMakeLists.txt branches/tmp/coolo/qt4-port/src/QY2Settings.cc Modified: branches/tmp/coolo/qt4-port/src/CMakeLists.txt URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/CMakeL…
============================================================================== --- branches/tmp/coolo/qt4-port/src/CMakeLists.txt (original) +++ branches/tmp/coolo/qt4-port/src/CMakeLists.txt Fri Nov 30 12:03:16 2007 @@ -2,7 +2,7 @@ ADD_DEFINITIONS( -DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS} --DQT3_SUPPORT +#-DQT3_SUPPORT -DQT_LOCALEDIR=\\\"${CMAKE_INSTALL_PREFIX}/share/qt4/translations\\\" -DICONDIR=\\"${Y2QT_ICONDIR}\\" -DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\" Modified: branches/tmp/coolo/qt4-port/src/QY2Settings.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/QY2Set…
============================================================================== --- branches/tmp/coolo/qt4-port/src/QY2Settings.cc (original) +++ branches/tmp/coolo/qt4-port/src/QY2Settings.cc Fri Nov 30 12:03:16 2007 @@ -112,7 +112,7 @@ if ( it == _currentSection->constEnd() ) return fallback; - return it.data(); + return it.value(); } @@ -156,8 +156,8 @@ if ( ! file.open( QIODevice::ReadOnly ) ) { - cerr << "Can't load settings from " << (const char *) _fileName - << ": " << (const char *) file.errorString() + cerr << "Can't load settings from " << qPrintable(_fileName) + << ": " << qPrintable(file.errorString()) << endl; _readError = true; @@ -172,7 +172,7 @@ while ( ! file.atEnd() ) { - line = str.readLine().stripWhiteSpace(); + line = str.readLine().trimmed(); lineCount++; @@ -200,8 +200,8 @@ { // key=value pair - QString key = line.section( "=", 0, 0 ).stripWhiteSpace(); - QString value = line.section( "=", 1, 1 ).stripWhiteSpace(); + QString key = line.section( "=", 0, 0 ).trimmed(); + QString value = line.section( "=", 1, 1 ).trimmed(); value.replace( QRegExp( "^\"" ), "" ); // strip leading " value.replace( QRegExp( "\"$" ), "" ); // strip trailing " @@ -213,7 +213,7 @@ else { qWarning( "%s:%d: Syntax error: %s", - (const char *) _fileName, lineCount, (const char *) line ); + qPrintable( _fileName), lineCount, qPrintable(line) ); } } @@ -232,8 +232,8 @@ if ( ! file.open( QIODevice::WriteOnly ) ) { - cerr << "Can't save settings to " << (const char *) _fileName - << ": " << (const char *) file.errorString() + cerr << "Can't save settings to " << qPrintable(_fileName) + << ": " << qPrintable(file.errorString()) << endl; return false; @@ -274,7 +274,7 @@ it != sect->end(); ++it ) { - QString value = it.data(); + QString value = it.value(); value.replace( "\"", "\\\"" ); // Escape embedded " with \" str << it.key() << "= \"" << value << "\"" << endl; -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42534 - in /branches/tmp/coolo/qt4-port/src: YQWizard.cc YQWizard.h
by dmacvicar@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: dmacvicar Date: Fri Nov 30 12:03:15 2007 New Revision: 42534 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42534&view=rev
Log: the ui compiles Modified: branches/tmp/coolo/qt4-port/src/YQWizard.cc branches/tmp/coolo/qt4-port/src/YQWizard.h Modified: branches/tmp/coolo/qt4-port/src/YQWizard.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWiza…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQWizard.cc (original) +++ branches/tmp/coolo/qt4-port/src/YQWizard.cc Fri Nov 30 12:03:15 2007 @@ -939,9 +939,8 @@ { YQSignalBlocker sigBlocker( _tree ); - - item->setSelected(true); - //FIXME _tree->ensureItemVisible( item ); + _tree->setCurrentItem(item); + _tree->scrollToItem(item); } } } Modified: branches/tmp/coolo/qt4-port/src/YQWizard.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWiza…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQWizard.h (original) +++ branches/tmp/coolo/qt4-port/src/YQWizard.h Fri Nov 30 12:03:15 2007 @@ -20,6 +20,7 @@ #ifndef YQWizard_h #define YQWizard_h +#include <string> #include <q3vbox.h> #include <qpixmap.h> #include <q3ptrlist.h> @@ -213,7 +214,7 @@ * * Implemented from YWizard. **/ - virtual string currentTreeSelection(); + virtual std::string currentTreeSelection(); /** * Delete all tree items. -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42533 - in /branches/tmp/coolo/qt4-port/src: ./ pkg/
by dmacvicar@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: dmacvicar Date: Fri Nov 30 12:03:13 2007 New Revision: 42533 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42533&view=rev
Log: - ported listview and friends. Still does not build Modified: branches/tmp/coolo/qt4-port/src/QY2CharValidator.cc branches/tmp/coolo/qt4-port/src/QY2ComboTabWidget.cc branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.cc branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.h branches/tmp/coolo/qt4-port/src/QY2ListView.cc branches/tmp/coolo/qt4-port/src/QY2ListView.h branches/tmp/coolo/qt4-port/src/YQTable.cc branches/tmp/coolo/qt4-port/src/YQTable.h branches/tmp/coolo/qt4-port/src/YQWizard.cc branches/tmp/coolo/qt4-port/src/YQWizard.h branches/tmp/coolo/qt4-port/src/pkg/YQPatternSelector.cc branches/tmp/coolo/qt4-port/src/pkg/YQPkgChangesDialog.cc branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.cc branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.h branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.cc branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.h branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.cc branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.h Modified: branches/tmp/coolo/qt4-port/src/QY2CharValidator.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/QY2Cha…
============================================================================== --- branches/tmp/coolo/qt4-port/src/QY2CharValidator.cc (original) +++ branches/tmp/coolo/qt4-port/src/QY2CharValidator.cc Fri Nov 30 12:03:13 2007 @@ -28,9 +28,10 @@ QY2CharValidator::QY2CharValidator( const QString & initialValidChars, QObject * parent, const char * name ) - : QValidator( parent, name ) + : QValidator( parent ) , _validChars( initialValidChars ) { + setObjectName(name); } Modified: branches/tmp/coolo/qt4-port/src/QY2ComboTabWidget.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/QY2Com…
============================================================================== --- branches/tmp/coolo/qt4-port/src/QY2ComboTabWidget.cc (original) +++ branches/tmp/coolo/qt4-port/src/QY2ComboTabWidget.cc Fri Nov 30 12:03:13 2007 @@ -82,7 +82,7 @@ QY2ComboTabWidget::addPage( const QString & page_label, QWidget * new_page ) { pages.insert( combo_box->count(), new_page ); - combo_box->insertItem( page_label ); + combo_box->addItem( page_label ); widget_stack->addWidget( new_page ); if ( ! widget_stack->visibleWidget() ) @@ -114,7 +114,7 @@ { widget_stack->raiseWidget( page ); - if ( page == pages[ combo_box->currentItem() ] ) + if ( page == pages[ combo_box->currentIndex() ] ) { // Shortcut: If the requested page is the one that belongs to the item // currently selected in the combo box, don't bother searching the @@ -131,7 +131,7 @@ { if ( page == it.current() ) { - combo_box->setCurrentItem( it.currentKey() ); + combo_box->setCurrentIndex( it.currentKey() ); return; } Modified: branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/QY2Dis…
============================================================================== --- branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.cc (original) +++ branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.cc Fri Nov 30 12:03:13 2007 @@ -21,7 +21,6 @@ /-*/ - #include "QY2DiskUsageList.h" #include "YQi18n.h" #include "qpainter.h" @@ -38,31 +37,34 @@ _totalSizeCol = -42; _deviceNameCol = -42; + QStringList columnLabels; if ( addStdColumns ) { - int numCol = 0; - addColumn( _( "Name" ) ); _nameCol = numCol++; - - // Translators: Please keep this short! - addColumn( _( "Disk Usage" ) ); _percentageBarCol = numCol++; - addColumn( "" ); _percentageCol = numCol++; - addColumn( _( "Used" ) ); _usedSizeCol = numCol++; - addColumn( _( "Free" ) ); _freeSizeCol = numCol++; - addColumn( _( "Total" ) ); _totalSizeCol = numCol++; + int numCol = 0; + columnLabels << _( "Name" ); _nameCol = numCol++; + // Translators: Please keep this short! + columnLabels << _("Disk Usage"); _percentageBarCol = numCol++; + columnLabels << ""; _percentageCol = numCol++; + columnLabels << _("Used"); _usedSizeCol = numCol++; + columnLabels << _( "Free"); _freeSizeCol = numCol++; + columnLabels << _("Total"); _totalSizeCol = numCol++; #if 0 - addColumn( _( "Device" ) ); _deviceNameCol = numCol++; + addColumn( _( "Device" ) ); _deviceNameCol = numCol++; #endif - - setColumnAlignment( percentageCol(), Qt::AlignRight ); - setColumnAlignment( usedSizeCol(), Qt::AlignRight ); - setColumnAlignment( freeSizeCol(), Qt::AlignRight ); - setColumnAlignment( totalSizeCol(), Qt::AlignRight ); - - setSorting( percentageBarCol() ); + // needed? + setColumnCount(numCol); + setHeaderLabels(columnLabels); + + //FIXME +// setTextAlignment( percentageCol(), Qt::AlignRight ); +// setTextAlignment( usedSizeCol(), Qt::AlignRight ); +// setTextAlignment( freeSizeCol(), Qt::AlignRight ); +// setTextAlignment( totalSizeCol(), Qt::AlignRight ); + sortItems( percentageBarCol(), Qt::AscendingOrder ); } saveColumnWidths(); - setSelectionMode( Q3ListView::NoSelection ); + setSelectionMode(QAbstractItemView::NoSelection); } @@ -167,7 +169,7 @@ * +1 if this > other **/ int -QY2DiskUsageListItem::compare( Q3ListViewItem * otherListViewItem, +QY2DiskUsageListItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { @@ -207,7 +209,7 @@ return QY2ListViewItem::compare( otherListViewItem, col, ascending ); } - +/* void QY2DiskUsageListItem::paintCell( QPainter * painter, const QColorGroup & colorGroup, @@ -244,7 +246,7 @@ Q3ListViewItem::paintCell( painter, cg, column, width, alignment ); } } - +*/ /** * Stolen from KDirStat::KDirTreeView with the author's permission. @@ -257,80 +259,80 @@ const QColor & fillColor, const QColor & barBackground ) { - if ( percent > 100.0 ) percent = 100.0; - if ( percent < 0.0 ) percent = 0.0; - int penWidth = 2; - int extraMargin = 3; - int x = _diskUsageList->itemMargin(); - int y = extraMargin; - int w = width - 2 * _diskUsageList->itemMargin(); - int h = height() - 2 * extraMargin; - int fillWidth; - - painter->eraseRect( 0, 0, width, height() ); - w -= indent; - x += indent; - - if ( w > 0 ) - { - QPen pen( painter->pen() ); - pen.setWidth(0); - painter->setPen( pen ); - painter->setBrush( Qt::NoBrush ); - fillWidth = (int) ( ( w - 2 * penWidth ) * percent / 100.0 ); - - - // Fill bar background. - - painter->fillRect( x + penWidth, y + penWidth, - w - 2 * penWidth + 1, h - 2 * penWidth + 1, - barBackground ); - /* - * Notice: The Xlib XDrawRectangle() function always fills one - * pixel less than specified. Altough this is very likely just a - * plain old bug, it is documented that way. Obviously, Qt just - * maps the fillRect() call directly to XDrawRectangle() so they - * inherited that bug ( although the Qt doc stays silent about - * it ). So it is really necessary to compensate for that missing - * pixel in each dimension. - * - * If you don't believe it, see for yourself. - * Hint: Try the xmag program to zoom into the drawn pixels. - **/ - - // Fill the desired percentage. - - painter->fillRect( x + penWidth, y + penWidth, - fillWidth+1, h - 2 * penWidth+1, - fillColor ); - - - // Draw 3D shadows. - - pen.setColor( contrastingColor ( Qt::black, - painter->backgroundColor() ) ); - painter->setPen( pen ); - painter->drawLine( x, y, x+w, y ); - painter->drawLine( x, y, x, y+h ); - - pen.setColor( contrastingColor( barBackground.dark(), - painter->backgroundColor() ) ); - painter->setPen( pen ); - painter->drawLine( x+1, y+1, x+w-1, y+1 ); - painter->drawLine( x+1, y+1, x+1, y+h-1 ); - - pen.setColor( contrastingColor( barBackground.light(), - painter->backgroundColor() ) ); - painter->setPen( pen ); - painter->drawLine( x+1, y+h, x+w, y+h ); - painter->drawLine( x+w, y, x+w, y+h ); - - pen.setColor( contrastingColor( Qt::white, - painter->backgroundColor() ) ); - painter->setPen( pen ); - painter->drawLine( x+2, y+h-1, x+w-1, y+h-1 ); - painter->drawLine( x+w-1, y+1, x+w-1, y+h-1 ); - } +// if ( percent > 100.0 ) percent = 100.0; +// if ( percent < 0.0 ) percent = 0.0; +// int penWidth = 2; +// int extraMargin = 3; +// int x = 0; /*FIXME _diskUsageList->itemMargin(); */ +// int y = extraMargin; +// int w = width - 2; /*FIXME * _diskUsageList->horizontalOffset(); */ +// int h = height() - 2; /*FIXME * extraMargin; */ +// int fillWidth; +// +// painter->eraseRect( 0, 0, width, height() ); +// w -= indent; +// x += indent; +// +// if ( w > 0 ) +// { +// QPen pen( painter->pen() ); +// pen.setWidth(0); +// painter->setPen( pen ); +// painter->setBrush( Qt::NoBrush ); +// fillWidth = (int) ( ( w - 2 * penWidth ) * percent / 100.0 ); +// +// +// // Fill bar background. +// +// painter->fillRect( x + penWidth, y + penWidth, +// w - 2 * penWidth + 1, h - 2 * penWidth + 1, +// barBackground ); +// /* +// * Notice: The Xlib XDrawRectangle() function always fills one +// * pixel less than specified. Altough this is very likely just a +// * plain old bug, it is documented that way. Obviously, Qt just +// * maps the fillRect() call directly to XDrawRectangle() so they +// * inherited that bug ( although the Qt doc stays silent about +// * it ). So it is really necessary to compensate for that missing +// * pixel in each dimension. +// * +// * If you don't believe it, see for yourself. +// * Hint: Try the xmag program to zoom into the drawn pixels. +// **/ +// +// // Fill the desired percentage. +// +// painter->fillRect( x + penWidth, y + penWidth, +// fillWidth+1, h - 2 * penWidth+1, +// fillColor ); +// +// +// // Draw 3D shadows. +// +// pen.setColor( contrastingColor ( Qt::black, +// painter->backgroundColor() ) ); +// painter->setPen( pen ); +// painter->drawLine( x, y, x+w, y ); +// painter->drawLine( x, y, x, y+h ); +// +// pen.setColor( contrastingColor( barBackground.dark(), +// painter->backgroundColor() ) ); +// painter->setPen( pen ); +// painter->drawLine( x+1, y+1, x+w-1, y+1 ); +// painter->drawLine( x+1, y+1, x+1, y+h-1 ); +// +// pen.setColor( contrastingColor( barBackground.light(), +// painter->backgroundColor() ) ); +// painter->setPen( pen ); +// painter->drawLine( x+1, y+h, x+w, y+h ); +// painter->drawLine( x+w, y, x+w, y+h ); +// +// pen.setColor( contrastingColor( Qt::white, +// painter->backgroundColor() ) ); +// painter->setPen( pen ); +// painter->drawLine( x+2, y+h-1, x+w-1, y+h-1 ); +// painter->drawLine( x+w-1, y+1, x+w-1, y+h-1 ); +// } } @@ -370,13 +372,12 @@ int minS, maxS; int minV, maxV; - minColor.hsv( &minH, &minS, &minV ); - maxColor.hsv( &maxH, &maxS, &maxV ); + minColor.getHsv( &minH, &minS, &minV ); + maxColor.getHsv( &maxH, &maxS, &maxV ); - return QColor( interpolate( val, minVal, maxVal, minH, maxH ), + return QColor::fromHsv( interpolate( val, minVal, maxVal, minH, maxH ), interpolate( val, minVal, maxVal, minS, maxS ), - interpolate( val, minVal, maxVal, minV, maxV ), - QColor::Hsv ); + interpolate( val, minVal, maxVal, minV, maxV ) ); } Modified: branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/QY2Dis…
============================================================================== --- branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.h (original) +++ branches/tmp/coolo/qt4-port/src/QY2DiskUsageList.h Fri Nov 30 12:03:13 2007 @@ -177,7 +177,7 @@ * confused which one to use. **/ void setText( int column, const QString & text ) - { Q3ListViewItem::setText( column, text ); } + { QTreeWidgetItem::setText( column, text ); } /** * Set a column text via FSize. @@ -193,7 +193,7 @@ * * Reimplemented from QY2ListViewItem. **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; @@ -221,12 +221,12 @@ * * Reimplemented from QY2ListViewItem. **/ - virtual void paintCell( QPainter * painter, + /*virtual void paintCell( QPainter * painter, const QColorGroup & colorGroup, int column, int width, int alignment ); - + */ /** * Paint a percentage bar into a @ref QListViewItem cell. * 'width' is the width of the entire cell. Modified: branches/tmp/coolo/qt4-port/src/QY2ListView.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/QY2Lis…
============================================================================== --- branches/tmp/coolo/qt4-port/src/QY2ListView.cc (original) +++ branches/tmp/coolo/qt4-port/src/QY2ListView.cc Fri Nov 30 12:03:13 2007 @@ -26,7 +26,7 @@ QY2ListView::QY2ListView( QWidget * parent ) - : Q3ListView( parent ) + : QTreeWidget( parent ) , _mousePressedItem(0) , _mousePressedCol( -1 ) , _mousePressedButton( Qt::NoButton ) @@ -35,16 +35,16 @@ , _mouseButton1PressedInHeader( false ) , _finalSizeChangeExpected( false ) { - Q3ListView::setShowToolTips( false ); + //FIXME QTreeWidget::setShowToolTips( false ); #if FIXME_TOOLTIP _toolTip = new QY2ListViewToolTip( this ); #endif - if ( header() ) - header()->installEventFilter( this ); +// if ( header() ) +// header()->installEventFilter( this ); - connect( header(), SIGNAL( sizeChange ( int, int, int ) ), + connect( this, SIGNAL( columnResized ( int, int, int ) ), this, SLOT ( columnWidthChanged( int, int, int ) ) ); } @@ -61,15 +61,15 @@ void QY2ListView::selectSomething() { - Q3ListViewItemIterator it( this ); + QTreeWidgetItemIterator it( this ); while ( *it ) { QY2ListViewItem * item = dynamic_cast<QY2ListViewItem *> (*it); - if ( item && item->isSelectable() ) + if ( item /*FIXME&& item->isSelectable() */ ) { - setSelected( item, true ); // emits signal, too + item->setSelected(true); // emits signal, too return; } @@ -81,7 +81,7 @@ void QY2ListView::clear() { - Q3ListView::clear(); + QTreeWidget::clear(); restoreColumnWidths(); } @@ -89,7 +89,7 @@ void QY2ListView::updateItemStates() { - Q3ListViewItemIterator it( this ); + QTreeWidgetItemIterator it( this ); while ( *it ) { @@ -106,7 +106,7 @@ void QY2ListView::updateItemData() { - Q3ListViewItemIterator it( this ); + QTreeWidgetItemIterator it( this ); while ( *it ) { @@ -121,7 +121,7 @@ QString -QY2ListView::toolTip( Q3ListViewItem * listViewItem, int column ) +QY2ListView::toolTip( QTreeWidgetItem * listViewItem, int column ) { if ( ! listViewItem ) return QString::null; @@ -152,9 +152,9 @@ QY2ListView::saveColumnWidths() { _savedColumnWidth.clear(); - _savedColumnWidth.reserve( columns() ); + _savedColumnWidth.reserve( columnCount() ); - for ( int i = 0; i < columns(); i++ ) + for ( int i = 0; i < columnCount(); i++ ) { _savedColumnWidth.push_back( columnWidth(i) ); } @@ -164,14 +164,14 @@ void QY2ListView::restoreColumnWidths() { - if ( _savedColumnWidth.size() != (unsigned) columns() ) // never manually resized + if ( _savedColumnWidth.size() != (unsigned) columnCount() ) // never manually resized { - for ( int i = 0; i < columns(); i++ ) // use optimized column width - adjustColumn( i ); + for ( int i = 0; i < columnCount(); i++ ) // use optimized column width + resizeColumnToContents(i); } else // stored settings after manual resizing { - for ( int i = 0; i < columns(); i++ ) + for ( int i = 0; i < columnCount(); i++ ) { setColumnWidth( i, _savedColumnWidth[ i ] ); // restore saved column width } @@ -182,12 +182,13 @@ void QY2ListView::contentsMousePressEvent( QMouseEvent * ev ) { - Q3ListViewItem * item = itemAt( contentsToViewport( ev->pos() ) ); + //FIXME may be convert to global + QTreeWidgetItem * item = itemAt( mapToGlobal( ev->pos() ) ); - if ( item && item->isEnabled() ) + if ( item && ( item->flags() & Qt::ItemIsEnabled ) ) { _mousePressedItem = item; - _mousePressedCol = header()->sectionAt( ev->pos().x() ); +//FIXME _mousePressedCol = header()->sectionAt( ev->pos().x() ); _mousePressedButton = ev->button(); } else // invalidate last click data @@ -198,25 +199,26 @@ } // Call base class method - Q3ListView::contentsMousePressEvent( ev ); + //FIXME QTreeWidget::contentsMousePressEvent( ev ); } void QY2ListView::contentsMouseReleaseEvent( QMouseEvent * ev ) { - Q3ListViewItem * item = itemAt( contentsToViewport( ev->pos() ) ); + QTreeWidgetItem * item = itemAt( mapToGlobal( ev->pos() ) ); - if ( item && item->isEnabled() && item == _mousePressedItem ) + if ( item && ( item->flags() & Qt::ItemIsEnabled ) && item == _mousePressedItem ) { - int col = header()->sectionAt( ev->pos().x() ); - - if ( item == _mousePressedItem && - col == _mousePressedCol && - ev->button() == _mousePressedButton ) - { - emit( columnClicked( ev->button(), item, col, ev->globalPos() ) ); - } +// FIXME +// int col = header()->sectionAt( ev->pos().x() ); +// +// if ( item == _mousePressedItem && +// col == _mousePressedCol && +// ev->button() == _mousePressedButton ) +// { +// emit( columnClicked( ev->button(), item, col, ev->globalPos() ) ); +// } } @@ -227,29 +229,29 @@ _mousePressedButton = Qt::NoButton; // Call base class method - Q3ListView::contentsMouseReleaseEvent( ev ); + //FIXME QTreeWidget::contentsMouseReleaseEvent( ev ); } void QY2ListView::contentsMouseDoubleClickEvent( QMouseEvent * ev ) { - Q3ListViewItem * item = itemAt( contentsToViewport( ev->pos() ) ); - - if ( item && item->isEnabled() ) - { - int col = header()->sectionAt( ev->pos().x() ); - emit( columnDoubleClicked( ev->button(), (QY2ListViewItem *) item, col, ev->globalPos() ) ); - } - - // invalidate last click data - - _mousePressedItem = 0; - _mousePressedCol = -1; - _mousePressedButton = Qt::NoButton; + QTreeWidgetItem * item = itemAt( mapToGlobal( ev->pos() ) ); - // Call base class method - Q3ListView::contentsMouseDoubleClickEvent( ev ); +// if ( item && ( item->flags() & Qt::ItemIsEnabled ) ) +// { +// int col = header()->sectionAt( ev->pos().x() ); +// emit( columnDoubleClicked( ev->button(), (QY2ListViewItem *) item, col, ev->globalPos() ) ); +// } +// +// // invalidate last click data +// +// _mousePressedItem = 0; +// _mousePressedCol = -1; +// _mousePressedButton = Qt::NoButton; +// +// // Call base class method +// QTreeWidget::contentsMouseDoubleClickEvent( ev ); } @@ -281,31 +283,31 @@ bool QY2ListView::eventFilter( QObject * obj, QEvent * event ) { - if ( event && obj && obj == header() ) - { - if ( event->type() == QEvent::MouseButtonPress ) - { - QMouseEvent * mouseEvent = (QMouseEvent *) event; - - if ( mouseEvent->button() == 1 ) - { - _mouseButton1PressedInHeader = true; - _finalSizeChangeExpected = false; - } - } - else if ( event->type() == QEvent::MouseButtonRelease ) - { - QMouseEvent * mouseEvent = (QMouseEvent *) event; - - if ( mouseEvent->button() == 1 ) - { - _finalSizeChangeExpected = true; - _mouseButton1PressedInHeader = false; - } - } - } +// if ( event && obj && obj == header() ) +// { +// if ( event->type() == QEvent::MouseButtonPress ) +// { +// QMouseEvent * mouseEvent = (QMouseEvent *) event; +// +// if ( mouseEvent->button() == 1 ) +// { +// _mouseButton1PressedInHeader = true; +// _finalSizeChangeExpected = false; +// } +// } +// else if ( event->type() == QEvent::MouseButtonRelease ) +// { +// QMouseEvent * mouseEvent = (QMouseEvent *) event; +// +// if ( mouseEvent->button() == 1 ) +// { +// _finalSizeChangeExpected = true; +// _mouseButton1PressedInHeader = false; +// } +// } +// } - return Q3ListView::eventFilter( obj, event ); + return QTreeWidget::eventFilter( obj, event ); } @@ -320,7 +322,7 @@ QY2ListView::setSortByInsertionSequence( bool sortByInsertionSequence ) { _sortByInsertionSequence = sortByInsertionSequence; - sort(); + //FIXME sort(); } @@ -330,19 +332,19 @@ QY2ListViewItem::QY2ListViewItem( QY2ListView * parentListView, const QString & text ) - : Q3ListViewItem( parentListView, text ) + : QTreeWidgetItem( parentListView, QStringList(text), 1) { _serial = parentListView->nextSerial(); } -QY2ListViewItem::QY2ListViewItem( Q3ListViewItem * parentItem, +QY2ListViewItem::QY2ListViewItem( QTreeWidgetItem * parentItem, const QString & text ) - : Q3ListViewItem( parentItem, text ) + : QTreeWidgetItem( parentItem, QStringList(text), 1 ) { _serial = 0; - QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( listView() ); + QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( treeWidget() ); if ( parentListView ) _serial = parentListView->nextSerial(); @@ -363,12 +365,12 @@ * +1 if this > other **/ int -QY2ListViewItem::compare( Q3ListViewItem * otherListViewItem, +QY2ListViewItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { bool sortByInsertionSequence = false; - QY2ListView * parentListView = dynamic_cast<QY2ListView *> (listView()); + QY2ListView * parentListView = dynamic_cast<QY2ListView *> (treeWidget()); if ( parentListView ) sortByInsertionSequence = parentListView->sortByInsertionSequence(); @@ -397,24 +399,25 @@ } - return Q3ListViewItem::compare( otherListViewItem, col, ascending ); + //return QTreeWidgetItem::compare( otherListViewItem, col, ascending ); + return 0; } -void -QY2ListViewItem::paintCell( QPainter * painter, - const QColorGroup & colorGroup, - int column, - int width, - int alignment ) -{ - QColorGroup cg = colorGroup; - - if ( _textColor.isValid() ) cg.setColor( QColorGroup::Text, _textColor ); - if ( _backgroundColor.isValid() ) cg.setColor( QColorGroup::Base, _backgroundColor ); - - Q3ListViewItem::paintCell( painter, cg, column, width, alignment ); -} +// void +// QY2ListViewItem::paintCell( QPainter * painter, +// const QColorGroup & colorGroup, +// int column, +// int width, +// int alignment ) +// { +// QColorGroup cg = colorGroup; +// +// if ( _textColor.isValid() ) cg.setColor( QColorGroup::Text, _textColor ); +// if ( _backgroundColor.isValid() ) cg.setColor( QColorGroup::Base, _backgroundColor ); +// +// QTreeWidgetItem::paintCell( painter, cg, column, width, alignment ); +// } @@ -422,40 +425,24 @@ QY2CheckListItem::QY2CheckListItem( QY2ListView * parentListView, - const QString & text, - Q3CheckListItem::Type type ) - : Q3CheckListItem( parentListView, text, type ) + const QString & text ) + : QTreeWidgetItem( parentListView, QStringList(text), 1 ) { _serial = parentListView->nextSerial(); } -QY2CheckListItem::QY2CheckListItem( Q3ListViewItem * parentItem, - const QString & text, - Q3CheckListItem::Type type ) - : Q3CheckListItem( parentItem, text, type ) -{ - _serial = 0; - QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( listView() ); - - if ( parentListView ) - _serial = parentListView->nextSerial(); -} - - -QY2CheckListItem::QY2CheckListItem( Q3CheckListItem * parentItem, - const QString & text, - Q3CheckListItem::Type type ) - : Q3CheckListItem( parentItem, text, type ) +QY2CheckListItem::QY2CheckListItem( QTreeWidgetItem * parentItem, + const QString & text ) + : QTreeWidgetItem( parentItem, QStringList(text), 1 ) { _serial = 0; - QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( listView() ); + QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( treeWidget() ); if ( parentListView ) _serial = parentListView->nextSerial(); } - QY2CheckListItem::~QY2CheckListItem() { // NOP @@ -470,12 +457,12 @@ * +1 if this > other **/ int -QY2CheckListItem::compare( Q3ListViewItem * otherListViewItem, +QY2CheckListItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { bool sortByInsertionSequence = false; - QY2ListView * parentListView = dynamic_cast<QY2ListView *> (listView()); + QY2ListView * parentListView = dynamic_cast<QY2ListView *> (treeWidget()); if ( parentListView ) sortByInsertionSequence = parentListView->sortByInsertionSequence(); @@ -505,10 +492,11 @@ } - return Q3ListViewItem::compare( otherListViewItem, col, ascending ); + //FIXME return QTreeWidgetItem::compare( otherListViewItem, col, ascending ); + return 0; } - +/* void QY2CheckListItem::paintCell( QPainter * painter, const QColorGroup & colorGroup, @@ -521,16 +509,16 @@ if ( _textColor.isValid() ) cg.setColor( QColorGroup::Text, _textColor ); if ( _backgroundColor.isValid() ) cg.setColor( QColorGroup::Base, _backgroundColor ); - Q3CheckListItem::paintCell( painter, cg, column, width, alignment ); + QTreeWidgetItem::paintCell( painter, cg, column, width, alignment ); } - +*/ #if FIXME_TOOLTIP void QY2ListViewToolTip::maybeTip( const QPoint & pos ) { Q3Header * header = _listView->header(); - Q3ListViewItem * item = _listView->itemAt( pos ); + QTreeWidgetItem * item = _listView->itemAt( pos ); if ( ! item ) return; Modified: branches/tmp/coolo/qt4-port/src/QY2ListView.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/QY2Lis…
============================================================================== --- branches/tmp/coolo/qt4-port/src/QY2ListView.h (original) +++ branches/tmp/coolo/qt4-port/src/QY2ListView.h Fri Nov 30 12:03:13 2007 @@ -22,7 +22,7 @@ #ifndef QY2ListView_h #define QY2ListView_h -#include <q3listview.h> +#include <QTreeWidget> #include <qtooltip.h> #include <qpoint.h> #include <qcolor.h> @@ -38,7 +38,7 @@ /** * @short Enhanced Q3ListView **/ -class QY2ListView : public Q3ListView +class QY2ListView : public QTreeWidget { Q_OBJECT @@ -102,7 +102,7 @@ * Emitted for mouse clicks on an item **/ void columnClicked ( int button, - Q3ListViewItem * item, + QTreeWidgetItem * item, int col, const QPoint & pos ); @@ -110,7 +110,7 @@ * Emitted for mouse double clicks on an item **/ void columnDoubleClicked ( int button, - Q3ListViewItem * item, + QTreeWidgetItem * item, int col, const QPoint & pos ); @@ -127,7 +127,7 @@ * * Derived classes may handle this differently. **/ - virtual QString toolTip( Q3ListViewItem * item, int column ); + virtual QString toolTip( QTreeWidgetItem * item, int column ); /** * Returns 'true' if the sort order should always be the item insertion @@ -194,7 +194,7 @@ // Data members // - Q3ListViewItem * _mousePressedItem; + QTreeWidgetItem * _mousePressedItem; int _mousePressedCol; int _mousePressedButton; @@ -210,9 +210,9 @@ /** - * Enhanced Q3ListViewItem + * Enhanced QTreeWidgetItem **/ -class QY2ListViewItem: public Q3ListViewItem +class QY2ListViewItem: public QTreeWidgetItem { public: @@ -226,7 +226,7 @@ /** * Constructor for deeper level items. **/ - QY2ListViewItem( Q3ListViewItem * parentItem, + QY2ListViewItem( QTreeWidgetItem * parentItem, const QString & text = QString::null ); /** @@ -257,9 +257,9 @@ * 0 if this == other * +1 if this > other * - * Reimplemented from Q3ListViewItem + * Reimplemented from QTreeWidgetItem **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; @@ -295,17 +295,18 @@ protected: /** - * Paint method. Reimplemented from @ref Q3ListViewItem so different + * Paint method. Reimplemented from @ref QTreeWidgetItem so different * colors can be used. * - * Reimplemented from Q3ListViewItem. + * Reimplemented from QTreeWidgetItem. **/ + /* virtual void paintCell( QPainter * painter, const QColorGroup & colorGroup, int column, int width, int alignment ); - + */ // // Data members // @@ -321,7 +322,7 @@ /** * Enhanced QCheckListItem **/ -class QY2CheckListItem: public Q3CheckListItem +class QY2CheckListItem: public QTreeWidgetItem { public: @@ -329,24 +330,14 @@ * Constructor for toplevel items. **/ QY2CheckListItem( QY2ListView * parentListView, - const QString & text, - Q3CheckListItem::Type type ); + const QString & text ); /** * Constructor for deeper level items. **/ - QY2CheckListItem( Q3ListViewItem * parentItem, - const QString & text, - Q3CheckListItem::Type type ); - - - /** - * Constructor for deeper level items for QCheckListItem parents. - **/ - QY2CheckListItem( Q3CheckListItem * parentItem, - const QString & text, - Q3CheckListItem::Type type ); + QY2CheckListItem( QTreeWidgetItem * parentItem, + const QString & text ); /** * Destructor @@ -376,9 +367,9 @@ * 0 if this == other * +1 if this > other * - * Reimplemented from Q3ListViewItem + * Reimplemented from QTreeWidgetItem **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; @@ -414,17 +405,17 @@ protected: /** - * Paint method. Reimplemented from @ref Q3ListViewItem so different + * Paint method. Reimplemented from @ref QTreeWidgetItem so different * colors can be used. * - * Reimplemented from Q3ListViewItem. + * Reimplemented from QTreeWidgetItem. **/ - virtual void paintCell( QPainter * painter, + /*virtual void paintCell( QPainter * painter, const QColorGroup & colorGroup, int column, int width, int alignment ); - + */ // // Data members // Modified: branches/tmp/coolo/qt4-port/src/YQTable.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQTabl…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQTable.cc (original) +++ branches/tmp/coolo/qt4-port/src/YQTable.cc Fri Nov 30 12:03:13 2007 @@ -54,7 +54,7 @@ for ( int i=0; i < columns(); i++ ) { - _qt_listView->addColumn( fromUTF8( header( i ) ) ); + //FIXME _qt_listView->addColumn( fromUTF8( header( i ) ) ); int qt_alignment = Qt::Left; @@ -67,7 +67,7 @@ case YAlignUnchanged: break; } - _qt_listView->setColumnAlignment( i, qt_alignment ); + //FIXME _qt_listView->setColumnAlignment( i, qt_alignment ); // _qt_listView->adjustColumn( column ); } @@ -76,14 +76,14 @@ // Connect signals and slots // - connect( _qt_listView, SIGNAL( doubleClicked ( Q3ListViewItem * ) ), - this, SLOT ( slotActivated ( Q3ListViewItem * ) ) ); + connect( _qt_listView, SIGNAL( doubleClicked ( QTreeWidgetItem * ) ), + this, SLOT ( slotActivated ( QTreeWidgetItem * ) ) ); - connect( _qt_listView, SIGNAL( spacePressed ( Q3ListViewItem * ) ), - this, SLOT ( slotActivated ( Q3ListViewItem * ) ) ); + connect( _qt_listView, SIGNAL( spacePressed ( QTreeWidgetItem * ) ), + this, SLOT ( slotActivated ( QTreeWidgetItem * ) ) ); - connect( _qt_listView, SIGNAL( selectionChanged ( Q3ListViewItem * ) ), - this, SLOT ( slotSelected ( Q3ListViewItem * ) ) ); + connect( _qt_listView, SIGNAL( selectionChanged ( QTreeWidgetItem * ) ), + this, SLOT ( slotSelected ( QTreeWidgetItem * ) ) ); } @@ -115,7 +115,7 @@ if ( item->selected() ) { YQSignalBlocker sigBlocker( _qt_listView ); - _qt_listView->setSelected( clone, true ); + clone->setSelected(true); } } @@ -131,13 +131,14 @@ YQTableListViewItem * clone = (YQTableListViewItem *) item->data(); YUI_CHECK_PTR( clone ); - if ( ! selected && clone == _qt_listView->selectedItem() ) + //FIXME selected first + if ( ! selected && clone == _qt_listView->currentItem() ) { deselectAllItems(); } else { - _qt_listView->setSelected( clone, true ); + clone->setSelected( true ); YTable::selectItem( item, selected ); } } @@ -175,7 +176,7 @@ void -YQTable::selectOrigItem( Q3ListViewItem * listViewItem ) +YQTable::selectOrigItem( QTreeWidgetItem * listViewItem ) { if ( listViewItem ) { @@ -188,7 +189,7 @@ void -YQTable::slotSelected( Q3ListViewItem * listViewItem ) +YQTable::slotSelected( QTreeWidgetItem * listViewItem ) { selectOrigItem( listViewItem ); @@ -205,7 +206,7 @@ void -YQTable::slotActivated( Q3ListViewItem * listViewItem ) +YQTable::slotActivated( QTreeWidgetItem * listViewItem ) { selectOrigItem( listViewItem ); @@ -218,7 +219,7 @@ YQTable::setEnabled( bool enabled ) { _qt_listView->setEnabled( enabled ); - _qt_listView->triggerUpdate(); + //FIXME _qt_listView->triggerUpdate(); YWidget::setEnabled( enabled ); } @@ -317,13 +318,13 @@ if ( icon.isNull() ) y2warning( "Can't load icon %s", iconName.c_str() ); else - setPixmap( column, icon ); + setData( column, Qt::DecorationRole, icon ); } else // No pixmap name { - if ( pixmap( column ) ) // Was there a pixmap before? + if ( ! data( column, Qt::DecorationRole ).isNull() ) // Was there a pixmap before? { - setPixmap( column, QPixmap() ); // Set empty pixmap + setData( column, Qt::DecorationRole, QPixmap() ); // Set empty pixmap } } } Modified: branches/tmp/coolo/qt4-port/src/YQTable.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQTabl…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQTable.h (original) +++ branches/tmp/coolo/qt4-port/src/YQTable.h Fri Nov 30 12:03:13 2007 @@ -26,7 +26,7 @@ class QY2ListView; -class Q3ListViewItem; +class QTreeWidgetItem; class YQListViewItem; class YQTable : public QFrame, public YTable @@ -133,12 +133,12 @@ /** * Notification that an item is selected (single click or keyboard). **/ - void slotSelected( Q3ListViewItem * ); + void slotSelected( QTreeWidgetItem * ); /** * Notification that an item is activated (double click or keyboard). **/ - void slotActivated( Q3ListViewItem * ); + void slotActivated( QTreeWidgetItem * ); protected: @@ -147,7 +147,7 @@ * Select the original item (the YTableItem) that corresponds to the * specified listViewItem. **/ - void selectOrigItem( Q3ListViewItem * listViewItem ); + void selectOrigItem( QTreeWidgetItem * listViewItem ); // // Data members Modified: branches/tmp/coolo/qt4-port/src/YQWizard.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWiza…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQWizard.cc (original) +++ branches/tmp/coolo/qt4-port/src/YQWizard.cc Fri Nov 30 12:03:13 2007 @@ -829,19 +829,21 @@ _tree = new QY2ListView( vbox ); YUI_CHECK_NEW( _tree ); - _tree->addColumn( "" ); - _tree->header()->hide(); + //FIXME +// _tree->addColumn( "" ); +// _tree->header()->hide(); + _tree->setRootIsDecorated( true ); _tree->setSortByInsertionSequence( true ); connect( _tree, SIGNAL( selectionChanged ( void ) ), this, SLOT ( treeSelectionChanged ( void ) ) ); - connect( _tree, SIGNAL( spacePressed ( Q3ListViewItem * ) ), - this, SLOT ( sendTreeEvent ( Q3ListViewItem * ) ) ); + connect( _tree, SIGNAL( spacePressed ( QTreeWidgetItem * ) ), + this, SLOT ( sendTreeEvent ( QTreeWidgetItem * ) ) ); - connect( _tree, SIGNAL( doubleClicked ( Q3ListViewItem * ) ), - this, SLOT ( sendTreeEvent ( Q3ListViewItem * ) ) ); + connect( _tree, SIGNAL( doubleClicked ( QTreeWidgetItem * ) ), + this, SLOT ( sendTreeEvent ( QTreeWidgetItem * ) ) ); // Bottom gradient @@ -937,14 +939,15 @@ { YQSignalBlocker sigBlocker( _tree ); - _tree->setSelected( item, true ); - _tree->ensureItemVisible( item ); + + item->setSelected(true); + //FIXME _tree->ensureItemVisible( item ); } } } -void YQWizard::sendTreeEvent( Q3ListViewItem * listViewItem ) +void YQWizard::sendTreeEvent( QTreeWidgetItem * listViewItem ) { if ( listViewItem ) { @@ -957,9 +960,9 @@ void YQWizard::treeSelectionChanged() -{ +{ //FIXME is currentItem correct or selected.first if ( _tree ) - sendTreeEvent( _tree->selectedItem() ); + sendTreeEvent( _tree->currentItem() ); } @@ -967,7 +970,7 @@ { if ( _tree ) { - Q3ListViewItem * sel = _tree->selectedItem(); + QTreeWidgetItem * sel = _tree->currentItem(); if ( sel ) { Modified: branches/tmp/coolo/qt4-port/src/YQWizard.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWiza…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQWizard.h (original) +++ branches/tmp/coolo/qt4-port/src/YQWizard.h Fri Nov 30 12:03:13 2007 @@ -48,7 +48,7 @@ class QToolButton; class Q3WidgetStack; class YReplacePoint; - +class QTreeWidgetItem; class YQAlignment; class YQReplacePoint; class QY2ListView; @@ -447,7 +447,7 @@ * tree item. * If the item has an ID, that ID will be returned to UI::UserInput(). **/ - void sendTreeEvent( Q3ListViewItem * item ); + void sendTreeEvent( QTreeWidgetItem * item ); /** * Internal notification that the tree selection has changed. @@ -715,8 +715,8 @@ , _id( id ) {} - virtual QString text(int index) const { return Q3ListViewItem::text(index); } - QString text() const { return Q3ListViewItem::text(0); } + virtual QString text(int index) const { return QTreeWidgetItem::text(index); } + QString text() const { return QTreeWidgetItem::text(0); } QString id() const { return _id; } private: Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPatternSelector.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPatternSelector.cc (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPatternSelector.cc Fri Nov 30 12:03:13 2007 @@ -141,7 +141,7 @@ false, // no autoFill - need to connect to details view first false ); // no autoFilter - filterMatch() is not connected Q_CHECK_PTR( _patternList ); - _patternList->header()->hide(); + //FIXME _patternList->header()->hide(); } if ( ! _patternList ) @@ -161,7 +161,7 @@ false, // no autoFill - need to connect to details view first false ); // no autoFilter - filterMatch() is not connected Q_CHECK_PTR( _selList ); - _selList->header()->hide(); + //FIXME _selList->header()->hide(); } if ( _wizard ) // No button box - add "Details..." button here Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgChangesDialog.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgChangesDialog.cc (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgChangesDialog.cc Fri Nov 30 12:03:13 2007 @@ -192,7 +192,7 @@ bool YQPkgChangesDialog::isEmpty() const { - return _pkgList->firstChild() == 0; + return _pkgList->topLevelItemCount() == 0; } Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.cc (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.cc Fri Nov 30 12:03:13 2007 @@ -60,7 +60,8 @@ YQPkgConflictList::YQPkgConflictList( QWidget * parent ) : QY2ListView( parent ) { - addColumn( _( "Dependency Conflict" ) ); + + setHeaderLabel( _( "Dependency Conflict" ) ); setRootIsDecorated( true ); setSortByInsertionSequence( true ); } @@ -96,9 +97,10 @@ { zypp::ProblemSolutionList userChoices; - Q3ListViewItem * child = firstChild(); + int count=0; + QTreeWidgetItem * child; - while ( child ) + while ( (child = topLevelItem(count)) ) { YQPkgConflict * conflict = dynamic_cast<YQPkgConflict *> (child); @@ -110,7 +112,7 @@ userChoices.push_back( userChoice ); } - child = child->nextSibling(); + count++; } zypp::getZYpp()->resolver()->applySolutions( userChoices ); @@ -166,13 +168,13 @@ // Recursively write all items + int count=0; + const QTreeWidgetItem * item; - const Q3ListViewItem * item = firstChild(); - - while ( item ) + while ( (item = topLevelItem(count)) ) { saveItemToFile( file, item ); - item = item->nextSibling(); + count++; } @@ -190,7 +192,7 @@ void YQPkgConflictList::saveItemToFile( FILE * file, - const Q3ListViewItem * item ) const + const QTreeWidgetItem * item ) const { if ( ! item || ! file ) return; @@ -227,7 +229,7 @@ { // Recursively write children - const Q3ListViewItem * child = item->firstChild(); + const QTreeWidgetItem * child = item->firstChild(); while ( child ) { @@ -239,7 +241,7 @@ void -YQPkgConflictList::dumpList( Q3ListViewItem * parent, +YQPkgConflictList::dumpList( QTreeWidgetItem * parent, const QString & longText, const QString & header, int splitThreshold ) @@ -321,8 +323,8 @@ QPixmap icon = YQIconPool::normalPkgConflict(); setTextColor( BRIGHT_RED ); - setText( 0, fromUTF8( problem()->description() ) ); - setPixmap( 0, icon ); + setText( 0, Qt::DisplayRole, fromUTF8( problem()->description() ) ); + setData( 0, Qt::DecorationRole, icon ); } @@ -332,8 +334,7 @@ _resolutionsHeader = new QY2CheckListItem( this, // Heading for the choices // how to resolve this conflict - _( "Conflict Resolution:" ), - Q3CheckListItem::Controller ); + _( "Conflict Resolution:" ) ); Q_CHECK_PTR( _resolutionsHeader ); _resolutionsHeader->setOpen( true ); _resolutionsHeader->setBackgroundColor( LIGHT_GREY ); @@ -364,9 +365,10 @@ zypp::ProblemSolution_Ptr YQPkgConflict::userSelectedResolution() { - Q3ListViewItem * item = _resolutionsHeader->firstChild(); + int count = 0; + QTreeWidgetItem * item; - while ( item ) + while ( item = _resolutionsHeader->topLevelItem(count) ) { YQPkgConflictResolution * res = dynamic_cast<YQPkgConflictResolution *> (item); @@ -380,7 +382,7 @@ return solution; } - item = item->nextSibling(); + count++; } return zypp::ProblemSolution_Ptr(); // Null pointer @@ -395,8 +397,8 @@ zypp::ProblemSolution_Ptr solution ) : QY2CheckListItem( parent, fromUTF8( solution->description() ), - Q3CheckListItem::RadioButton ) - , _solution( solution ) + /*Q3CheckListItem::RadioButton) */ + , _solution( solution )) { YQPkgConflictList::dumpList( this, fromUTF8( solution->details() ) ); } Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.h (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgConflictList.h Fri Nov 30 12:03:13 2007 @@ -63,12 +63,12 @@ /** * Check if the conflict list is empty. **/ - bool isEmpty() const { return childCount() == 0; } + bool isEmpty() const { return topLevelItemCount() == 0; } /** * Returns the number of conflicts in the list. **/ - int count() const { return childCount(); } + int count() const { return topLevelItemCount(); } public slots: @@ -108,7 +108,7 @@ * "More...". * If 'header' is not empty, it will be added as the parent of the lines. **/ - static void dumpList( Q3ListViewItem * parent, + static void dumpList( QTreeWidgetItem * parent, const QString & longText, const QString & header = QString::null, int splitThreshold = 5 ); @@ -118,7 +118,7 @@ /** * (Recursively) save one item to file. **/ - void saveItemToFile( FILE * file, const Q3ListViewItem * item ) const; + void saveItemToFile( FILE * file, const QTreeWidgetItem * item ) const; signals: Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc Fri Nov 30 12:03:13 2007 @@ -131,7 +131,7 @@ void YQPkgList::pkgObjClicked( int button, - Q3ListViewItem * listViewItem, + QTreeWidgetItem * listViewItem, int col, const QPoint & pos ) { @@ -194,7 +194,7 @@ YQPkgList::setInstallCurrentSourceRpm( bool installSourceRpm, bool selectNextItem ) { - Q3ListViewItem * listViewItem = selectedItem(); + QTreeWidgetItem * listViewItem = selectedItem(); if ( ! listViewItem ) return; @@ -220,7 +220,7 @@ if ( ! _editable ) return; - Q3ListViewItem * listViewItem = firstChild(); + QTreeWidgetItem * listViewItem = firstChild(); while ( listViewItem ) { @@ -407,7 +407,7 @@ // Write all items // - const Q3ListViewItem * item = firstChild(); + const QTreeWidgetItem * item = firstChild(); while ( item ) { @@ -721,7 +721,7 @@ * +1 if this > other **/ int -YQPkgListItem::compare( Q3ListViewItem * otherListViewItem, +YQPkgListItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { @@ -758,7 +758,7 @@ QColorGroup cg = colorGroup; cg.setColor( QColorGroup::Text, QColor( 0xA0, 0xA0, 0xA0 ) ); - Q3ListViewItem::paintCell( painter, cg, column, width, alignment ); + QTreeWidgetItem::paintCell( painter, cg, column, width, alignment ); } else { @@ -774,7 +774,7 @@ cg.setColor( QColorGroup::Text, QColor( 0xFF, 0, 0 ) ); // Foreground } - Q3ListViewItem::paintCell( painter, cg, column, width, alignment ); + QTreeWidgetItem::paintCell( painter, cg, column, width, alignment ); } else if ( candidateIsNewer() ) { @@ -788,11 +788,11 @@ cg.setColor( QColorGroup::Base, QColor( 0xF0, 0xF0, 0xF0 ) ); // Background } - Q3ListViewItem::paintCell( painter, cg, column, width, alignment ); + QTreeWidgetItem::paintCell( painter, cg, column, width, alignment ); } else { - Q3ListViewItem::paintCell( painter, colorGroup, column, width, alignment ); + QTreeWidgetItem::paintCell( painter, colorGroup, column, width, alignment ); } } } Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h Fri Nov 30 12:03:13 2007 @@ -119,7 +119,7 @@ * Reimplemented from YQPkgObjList. **/ virtual void pkgObjClicked( int button, - Q3ListViewItem * item, + QTreeWidgetItem * item, int col, const QPoint & pos ); @@ -269,7 +269,7 @@ * * Reimplemented from QListViewItem **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc Fri Nov 30 12:03:13 2007 @@ -67,14 +67,14 @@ createActions(); - connect( this, SIGNAL( columnClicked ( int, Q3ListViewItem *, int, const QPoint & ) ), - this, SLOT ( pkgObjClicked ( int, Q3ListViewItem *, int, const QPoint & ) ) ); + connect( this, SIGNAL( columnClicked ( int, QTreeWidgetItem *, int, const QPoint & ) ), + this, SLOT ( pkgObjClicked ( int, QTreeWidgetItem *, int, const QPoint & ) ) ); - connect( this, SIGNAL( columnDoubleClicked ( int, Q3ListViewItem *, int, const QPoint & ) ), - this, SLOT ( pkgObjClicked ( int, Q3ListViewItem *, int, const QPoint & ) ) ); + connect( this, SIGNAL( columnDoubleClicked ( int, QTreeWidgetItem *, int, const QPoint & ) ), + this, SLOT ( pkgObjClicked ( int, QTreeWidgetItem *, int, const QPoint & ) ) ); - connect( this, SIGNAL( selectionChanged ( Q3ListViewItem * ) ), - this, SLOT ( selectionChangedInternal( Q3ListViewItem * ) ) ); + connect( this, SIGNAL( selectionChanged ( QTreeWidgetItem * ) ), + this, SLOT ( selectionChangedInternal( QTreeWidgetItem * ) ) ); } @@ -122,7 +122,7 @@ void YQPkgObjList::pkgObjClicked( int button, - Q3ListViewItem * listViewItem, + QTreeWidgetItem * listViewItem, int col, const QPoint & pos ) { @@ -158,7 +158,7 @@ void -YQPkgObjList::selectionChangedInternal( Q3ListViewItem * listViewItem ) +YQPkgObjList::selectionChangedInternal( QTreeWidgetItem * listViewItem ) { YQPkgObjListItem * item = dynamic_cast<YQPkgObjListItem *> (listViewItem); @@ -267,7 +267,7 @@ void YQPkgObjList::setCurrentStatus( ZyppStatus newStatus, bool doSelectNextItem ) { - Q3ListViewItem * listViewItem = selectedItem(); + QTreeWidgetItem * listViewItem = selectedItem(); if ( ! listViewItem ) return; @@ -306,7 +306,7 @@ return; YQUI::ui()->busyCursor(); - Q3ListViewItemIterator it( this ); + QTreeWidgetItemIterator it( this ); while ( *it ) { @@ -341,7 +341,7 @@ void YQPkgObjList::selectNextItem() { - Q3ListViewItem * item = selectedItem(); + QTreeWidgetItem * item = selectedItem(); if ( item && item->nextSibling() ) { @@ -580,7 +580,7 @@ } - Q3ListViewItem * selectedListViewItem = selectedItem(); + QTreeWidgetItem * selectedListViewItem = selectedItem(); if ( selectedListViewItem ) { @@ -708,11 +708,11 @@ YQPkgObjList::applyExcludeRules() { // y2debug( "Applying exclude rules" ); - Q3ListViewItemIterator listView_it( this ); + QTreeWidgetItemIterator listView_it( this ); while ( *listView_it ) { - Q3ListViewItem * current_item = *listView_it; + QTreeWidgetItem * current_item = *listView_it; // Advance iterator now so it remains valid even if there are changes // to the QListView, e.g., if the current item is excluded and thus @@ -726,7 +726,7 @@ while ( excluded_it != _excludedItems->end() ) { - Q3ListViewItem * current_item = (*excluded_it).first; + QTreeWidgetItem * current_item = (*excluded_it).first; // Advance iterator now so it remains valid even if there are changes // to the excluded items, e.g., if the current item is un-excluded and thus @@ -764,7 +764,7 @@ void -YQPkgObjList::applyExcludeRules( Q3ListViewItem * listViewItem ) +YQPkgObjList::applyExcludeRules( QTreeWidgetItem * listViewItem ) { YQPkgObjListItem * item = dynamic_cast<YQPkgObjListItem *>( listViewItem ); @@ -817,7 +817,7 @@ if ( exclude ) { - Q3ListViewItem * parentItem = item->parent(); + QTreeWidgetItem * parentItem = item->parent(); if ( parentItem ) parentItem->takeItem( item ); @@ -830,7 +830,7 @@ { if ( _excludedItems->contains( item ) ) { - Q3ListViewItem * oldParent = _excludedItems->oldParentItem( item ); + QTreeWidgetItem * oldParent = _excludedItems->oldParentItem( item ); _excludedItems->remove( item ); if ( oldParent ) @@ -946,7 +946,7 @@ void YQPkgObjListItem::setText( int column, const string text ) { - Q3ListViewItem::setText( column, fromUTF8( text.c_str() ) ); + QTreeWidgetItem::setText( column, fromUTF8( text.c_str() ) ); } @@ -1364,7 +1364,7 @@ * +1 if this > other **/ int -YQPkgObjListItem::compare( Q3ListViewItem * otherListViewItem, +YQPkgObjListItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { @@ -1482,7 +1482,7 @@ bool -YQPkgObjList::ExcludeRule::match( Q3ListViewItem * item ) +YQPkgObjList::ExcludeRule::match( QTreeWidgetItem * item ) { if ( ! _enabled ) return false; @@ -1512,13 +1512,13 @@ } -void YQPkgObjList::ExcludedItems::add( Q3ListViewItem * item, Q3ListViewItem * oldParent ) +void YQPkgObjList::ExcludedItems::add( QTreeWidgetItem * item, QTreeWidgetItem * oldParent ) { _excludeMap.insert( ItemPair( item, oldParent ) ); } -void YQPkgObjList::ExcludedItems::remove( Q3ListViewItem * item ) +void YQPkgObjList::ExcludedItems::remove( QTreeWidgetItem * item ) { ItemMap::iterator it = _excludeMap.find( item ); @@ -1542,13 +1542,13 @@ } -bool YQPkgObjList::ExcludedItems::contains( Q3ListViewItem * item ) +bool YQPkgObjList::ExcludedItems::contains( QTreeWidgetItem * item ) { return ( _excludeMap.find( item ) != _excludeMap.end() ); } -Q3ListViewItem * YQPkgObjList::ExcludedItems::oldParentItem( Q3ListViewItem * item ) +QTreeWidgetItem * YQPkgObjList::ExcludedItems::oldParentItem( QTreeWidgetItem * item ) { ItemMap::iterator it = _excludeMap.find( item ); Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h Fri Nov 30 12:03:13 2007 @@ -139,7 +139,7 @@ /** * Apply all exclude rules of this list to one item. **/ - void applyExcludeRules( Q3ListViewItem * ); + void applyExcludeRules( QTreeWidgetItem * ); /** * Exclude or include an item, i.e. remove it from the visible items @@ -177,7 +177,7 @@ * Dispatcher slot for mouse click: cycle status depending on column. **/ virtual void pkgObjClicked( int button, - Q3ListViewItem * item, + QTreeWidgetItem * item, int col, const QPoint & pos ); @@ -247,7 +247,7 @@ /** * Dispatcher slot for selection change - internal only. **/ - virtual void selectionChangedInternal( Q3ListViewItem * item ); + virtual void selectionChangedInternal( QTreeWidgetItem * item ); signals: @@ -524,7 +524,7 @@ * * Reimplemented from QListViewItem **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; @@ -625,7 +625,7 @@ * confused which one to use. **/ void setText( int column, const QString & text ) - { Q3ListViewItem::setText( column, text ); } + { QTreeWidgetItem::setText( column, text ); } /** * Set a column text via Edition. @@ -716,7 +716,7 @@ * Returns 'true' if the item matches this exclude rule, * i.e. if it should be excluded. **/ - bool match( Q3ListViewItem * item ); + bool match( QTreeWidgetItem * item ); private: @@ -731,8 +731,8 @@ { public: - typedef std::map <Q3ListViewItem *, Q3ListViewItem *> ItemMap; - typedef std::pair<Q3ListViewItem *, Q3ListViewItem *> ItemPair; + typedef std::map <QTreeWidgetItem *, QTreeWidgetItem *> ItemMap; + typedef std::pair<QTreeWidgetItem *, QTreeWidgetItem *> ItemPair; typedef ItemMap::iterator iterator; /** @@ -752,13 +752,13 @@ * oldParent is the previous parent item of this item * or 0 if it was a root item. **/ - void add( Q3ListViewItem * item, Q3ListViewItem * oldParent ); + void add( QTreeWidgetItem * item, QTreeWidgetItem * oldParent ); /** * Remove a list item from the excluded items and transfer ownership back * to the caller. **/ - void remove( Q3ListViewItem * item ); + void remove( QTreeWidgetItem * item ); /** * Clear the excluded items. Delete all items still excluded. @@ -768,13 +768,13 @@ /** * Returns 'true' if the specified item is in the excluded items. **/ - bool contains( Q3ListViewItem * item ); + bool contains( QTreeWidgetItem * item ); /** * Returns the old parent of this item so it can be reparented * or 0 if it was a root item. **/ - Q3ListViewItem * oldParentItem( Q3ListViewItem * item ); + QTreeWidgetItem * oldParentItem( QTreeWidgetItem * item ); /** * Returns the number of items Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.cc (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.cc Fri Nov 30 12:03:13 2007 @@ -70,7 +70,7 @@ if ( autoFilter ) { - connect( this, SIGNAL( selectionChanged( Q3ListViewItem * ) ), + connect( this, SIGNAL( selectionChanged( QTreeWidgetItem * ) ), this, SLOT ( filter() ) ); } @@ -214,7 +214,7 @@ YQPkgPatternListItem * YQPkgPatternList::selection() const { - Q3ListViewItem * item = selectedItem(); + QTreeWidgetItem * item = selectedItem(); if ( ! item ) return 0; @@ -225,7 +225,7 @@ void YQPkgPatternList::pkgObjClicked( int button, - Q3ListViewItem * listViewItem, + QTreeWidgetItem * listViewItem, int col, const QPoint & pos ) { @@ -252,7 +252,7 @@ void YQPkgPatternList::selectSomething() { - Q3ListViewItemIterator it( this ); + QTreeWidgetItemIterator it( this ); while ( *it ) { @@ -332,7 +332,7 @@ * +1 if this > other **/ int -YQPkgPatternListItem::compare( Q3ListViewItem * otherListViewItem, +YQPkgPatternListItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { @@ -346,7 +346,7 @@ if ( otherCategoryItem ) // Patterns without category should always be sorted return -1; // before any category - return Q3ListViewItem::compare( otherListViewItem, col, ascending ); + return QTreeWidgetItem::compare( otherListViewItem, col, ascending ); } @@ -403,7 +403,7 @@ void YQPkgPatternCategoryItem::setOpen( bool open ) { - Q3ListViewItem::setOpen( open ); + QTreeWidgetItem::setOpen( open ); setTreeIcon(); } @@ -428,7 +428,7 @@ * +1 if this > other **/ int -YQPkgPatternCategoryItem::compare( Q3ListViewItem * otherListViewItem, +YQPkgPatternCategoryItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { @@ -443,7 +443,7 @@ if ( otherPatternListitem ) // Patterns without category should always be sorted return 1; // before any category - return Q3ListViewItem::compare( otherListViewItem, col, ascending ); + return QTreeWidgetItem::compare( otherListViewItem, col, ascending ); } Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.h (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatternList.h Fri Nov 30 12:03:13 2007 @@ -92,7 +92,7 @@ * Reimplemented from YQPkgObjList. **/ virtual void pkgObjClicked( int button, - Q3ListViewItem * item, + QTreeWidgetItem * item, int col, const QPoint & pos ); @@ -190,7 +190,7 @@ * Reimplemented from QListViewItem: * Sort by zypp::Pattern::order() only. **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; @@ -259,7 +259,7 @@ * Reimplemented from QListViewItem: * Sort by zypp::Pattern::order() only. **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.cc (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.cc Fri Nov 30 12:03:13 2007 @@ -46,7 +46,7 @@ if ( autoFilter ) { - connect( this, SIGNAL( selectionChanged( Q3ListViewItem * ) ), + connect( this, SIGNAL( selectionChanged( QTreeWidgetItem * ) ), this, SLOT ( filter() ) ); } @@ -158,7 +158,7 @@ YQPkgSelListItem * YQPkgSelList::selection() const { - Q3ListViewItem * item = selectedItem(); + QTreeWidgetItem * item = selectedItem(); if ( ! item ) return 0; @@ -214,7 +214,7 @@ * +1 if this > other **/ int -YQPkgSelListItem::compare( Q3ListViewItem * otherListViewItem, +YQPkgSelListItem::compare( QTreeWidgetItem * otherListViewItem, int col, bool ascending ) const { Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQ…
============================================================================== --- branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.h (original) +++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgSelList.h Fri Nov 30 12:03:13 2007 @@ -144,7 +144,7 @@ * Reimplemented from QListViewItem: * Sort by zypp::Selection::order() only. **/ - virtual int compare( Q3ListViewItem * other, + virtual int compare( QTreeWidgetItem * other, int col, bool ascending ) const; -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42532 - in /trunk/qt/src: YQImage.cc YQImage.h
by coolo@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: coolo Date: Fri Nov 30 11:13:41 2007 New Revision: 42532 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42532&view=rev
Log: backport the icon disabling - it looks horrible with QIconset though Modified: trunk/qt/src/YQImage.cc trunk/qt/src/YQImage.h Modified: trunk/qt/src/YQImage.cc URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQImage.cc?rev=42532&r1=4…
============================================================================== --- trunk/qt/src/YQImage.cc (original) +++ trunk/qt/src/YQImage.cc Fri Nov 30 11:13:41 2007 @@ -20,6 +20,7 @@ #include <unistd.h> #include <qpixmap.h> #include <qmovie.h> +#include <qiconset.h> #define y2log_component "qt-ui" #include <ycp/y2log.h> @@ -163,5 +164,17 @@ resize( newWidth, newHeight ); } +void YQImage::setEnabled( bool enable ) +{ + if (enable) + setImage( imageFileName(), animated() ); + else { + // Trigger image re-display + QPixmap pixmap( fromUTF8( imageFileName() ) ); + QIconSet icon(pixmap); + icon.setIconSize( QIconSet::Large, pixmap.size()); + QLabel::setPixmap( icon.pixmap( QIconSet::Large, QIconSet::Disabled, QIconSet::Off ) ); + } +} #include "YQImage.moc" Modified: trunk/qt/src/YQImage.h URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQImage.h?rev=42532&r1=42…
============================================================================== --- trunk/qt/src/YQImage.h (original) +++ trunk/qt/src/YQImage.h Fri Nov 30 11:13:41 2007 @@ -62,6 +62,11 @@ virtual void setAutoScale( bool autoScale = true ); /** + * if false, the image will be displayed in gray + */ + virtual void setEnabled( bool enabled ); + + /** * Preferred width of the widget. * * Reimplemented from YWidget. -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42531 - /trunk/core/libyui/doc/examples/Image1.ycp
by coolo@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: coolo Date: Fri Nov 30 11:07:09 2007 New Revision: 42531 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42531&view=rev
Log: test if disabling the widget does anything (from Lukas) Modified: trunk/core/libyui/doc/examples/Image1.ycp Modified: trunk/core/libyui/doc/examples/Image1.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/doc/examples/Image1.…
============================================================================== --- trunk/core/libyui/doc/examples/Image1.ycp (original) +++ trunk/core/libyui/doc/examples/Image1.ycp Fri Nov 30 11:07:09 2007 @@ -1,12 +1,20 @@ // Simple image example { - UI::OpenDialog( - `VBox( - `Image( "/usr/share/YaST2/theme/current/wallpapers/welcome.jpg", "fallback text" ), - `PushButton(`opt(`default), "&OK") - ) - ); - UI::UserInput(); + UI::OpenDialog( + `VBox( + `Image (`id ("image"), "/usr/share/YaST2/theme/current/wallpapers/welcome.jpg", "fallback text"), + `PushButton(`opt(`default), "&OK") + ) + ); + UI::UserInput(); + if (UI::WidgetExists (`id ("image"))) { + UI::ChangeWidget (`id ("image"), `Enabled, false); + UI::UserInput(); + UI::ChangeWidget (`id ("image"), `Enabled, true); + UI::UserInput(); + } else { + y2error ("No such widget id"); + } UI::CloseDialog(); } -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42530 - in /branches/tmp/coolo/qt4-port/src: YQImage.cc YQImage.h
by coolo@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: coolo Date: Fri Nov 30 11:01:26 2007 New Revision: 42530 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42530&view=rev
Log: follow the widget state - for reference: you don't want to do this for wallpapers too often Modified: branches/tmp/coolo/qt4-port/src/YQImage.cc branches/tmp/coolo/qt4-port/src/YQImage.h Modified: branches/tmp/coolo/qt4-port/src/YQImage.cc URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQImag…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQImage.cc (original) +++ branches/tmp/coolo/qt4-port/src/YQImage.cc Fri Nov 30 11:01:26 2007 @@ -20,6 +20,7 @@ #include <unistd.h> #include <qpixmap.h> #include <qmovie.h> +#include <QIcon> //Added by qt3to4: #include <qlabel.h> #define y2log_component "qt-ui" @@ -165,5 +166,17 @@ resize( newWidth, newHeight ); } +void YQImage::setEnabled( bool enable ) +{ + qDebug("setEnabled %d", enable); + if (enable) + setImage( imageFileName(), animated() ); + else { + // Trigger image re-display + QPixmap pixmap( fromUTF8( imageFileName() ) ); + QIcon icon(pixmap); + QLabel::setPixmap( icon.pixmap( pixmap.size(), QIcon::Disabled, QIcon::Off) ); + } +} #include "YQImage.moc" Modified: branches/tmp/coolo/qt4-port/src/YQImage.h URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQImag…
============================================================================== --- branches/tmp/coolo/qt4-port/src/YQImage.h (original) +++ branches/tmp/coolo/qt4-port/src/YQImage.h Fri Nov 30 11:01:26 2007 @@ -62,6 +62,11 @@ virtual void setAutoScale( bool autoScale = true ); /** + * if false, the image will be displayed in gray + */ + virtual void setEnabled( bool enabled ); + + /** * Preferred width of the widget. * * Reimplemented from YWidget. -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42529 - /trunk/s390/src/dump/helps.ycp
by jsrain@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: jsrain Date: Fri Nov 30 10:56:35 2007 New Revision: 42529 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42529&view=rev
Log: more texts from proofread Modified: trunk/s390/src/dump/helps.ycp Modified: trunk/s390/src/dump/helps.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/dump/helps.ycp?rev=4252…
============================================================================== --- trunk/s390/src/dump/helps.ycp (original) +++ trunk/s390/src/dump/helps.ycp Fri Nov 30 10:56:35 2007 @@ -17,9 +17,10 @@ map DUMP_HELPS = $[ /* Read dialog help 1/2 */ - "read" : _("<p><b><big>Initializing Dump Devices Configuration</big></b> + "read" : _("<p><b><big>Initializing Dump Device Configuration</big></b> <br> -Please wait...<br></p>") + +Please wait...<br></p> +") + /* Read dialog help 2/2 */ _("<p><b><big>Aborting Initialization:</big></b><br> -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42528 - in /trunk/s390: package/yast2-s390.changes src/modules/Xpram.ycp
by jsrain@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: jsrain Date: Fri Nov 30 10:55:32 2007 New Revision: 42528 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42528&view=rev
Log: merged texts from proofread Modified: trunk/s390/package/yast2-s390.changes trunk/s390/src/modules/Xpram.ycp Modified: trunk/s390/package/yast2-s390.changes URL:
http://svn.opensuse.org/viewcvs/yast/trunk/s390/package/yast2-s390.changes?…
============================================================================== --- trunk/s390/package/yast2-s390.changes (original) +++ trunk/s390/package/yast2-s390.changes Fri Nov 30 10:55:32 2007 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Nov 30 10:55:21 CET 2007 - jsrain(a)suse.cz + +- merged texts from proofread + +------------------------------------------------------------------- Fri Oct 19 13:13:17 CEST 2007 - mzugec(a)suse.de - allow to select zfcp WWPN and LUN manually (#332690) Modified: trunk/s390/src/modules/Xpram.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/Xpram.ycp?rev=4…
============================================================================== --- trunk/s390/src/modules/Xpram.ycp (original) +++ trunk/s390/src/modules/Xpram.ycp Fri Nov 30 10:55:32 2007 @@ -127,7 +127,7 @@ y2milestone("Service::Stop (xpram) returns %1", bret); if (! bret) { - Report::Error (_("Error stopping xpram. Please try manual \"rcxpram stop\"")); + Report::Error (_("Error stopping xpram. Please try \"rcxpram stop\" manually.")); } else { @@ -151,7 +151,7 @@ bret = Service::Start ("xpram"); if (! bret) { - Report::Error (_("Error starting xpram. Please try manual \"rcxpram start\"")); + Report::Error (_("Error starting xpram. Please try \"rcxpram start\" manually.")); } y2milestone("Service::Start (xpram) returns %1", bret); } -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r42527 - in /trunk/installation/src/clients: inst_network_setup.ycp inst_system_analysis.ycp
by locilka@svn.opensuse.org
30 Nov '07
30 Nov '07
Author: locilka Date: Fri Nov 30 09:50:40 2007 New Revision: 42527 URL:
http://svn.opensuse.org/viewcvs/yast?rev=42527&view=rev
Log: Adjusting to new Progress Modified: trunk/installation/src/clients/inst_network_setup.ycp trunk/installation/src/clients/inst_system_analysis.ycp Modified: trunk/installation/src/clients/inst_network_setup.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_ne…
============================================================================== --- trunk/installation/src/clients/inst_network_setup.ycp (original) +++ trunk/installation/src/clients/inst_network_setup.ycp Fri Nov 30 09:50:40 2007 @@ -1358,7 +1358,7 @@ actions_doing, // TRANSLATORS: dialog help _("<p>Please, wait while network configuration is being written and tested...</p>"), - [] + [visible_icons, invisible_icons] ); Wizard::SetBackButton (`back, Label::BackButton()); Modified: trunk/installation/src/clients/inst_system_analysis.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_sy…
============================================================================== --- trunk/installation/src/clients/inst_system_analysis.ycp (original) +++ trunk/installation/src/clients/inst_system_analysis.ycp Fri Nov 30 09:50:40 2007 @@ -460,7 +460,7 @@ actions_doing, // TRANSLATORS: dialog help _("Please wait while computer hardware and installed systems are being probed..."), - [invisible_icons, visible_icons] + [visible_icons, invisible_icons] ); foreach (any run_function, actions_functions, { -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200