restart qt4 porting
authorcoolo <coolo@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Mon, 26 Nov 2007 10:05:30 +0000 (10:05 +0000)
committercoolo <coolo@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Mon, 26 Nov 2007 10:05:30 +0000 (10:05 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/branches/tmp/coolo/qt4-port@42379 e0cc52ee-31ee-0310-8b87-e83c4596d67c

290 files changed:
.cvsignore [new file with mode: 0644]
MAINTAINER [new file with mode: 0644]
Makefile.cvs [new file with mode: 0644]
RPMNAME [new file with mode: 0644]
SUBDIRS [new file with mode: 0644]
VERSION [new file with mode: 0644]
acinclude.m4 [new file with mode: 0644]
configure.in.in [new file with mode: 0644]
doc/.cvsignore [new file with mode: 0644]
doc/Makefile.am [new file with mode: 0644]
doc/autodocs/.cvsignore [new file with mode: 0644]
doc/autodocs/Makefile.am [new file with mode: 0644]
doc/richtext.txt [new file with mode: 0644]
fonts/.cvsignore [new file with mode: 0644]
fonts/Makefile.am [new file with mode: 0644]
fonts/fonts.dir [new file with mode: 0644]
fonts/newunifont.pcf.gz [new file with mode: 0644]
fonts/unifont.pcf.gz [new file with mode: 0644]
package/.cvsignore [new file with mode: 0644]
package/yast2-qt.changes [new file with mode: 0644]
src/.cvsignore [new file with mode: 0644]
src/Makefile.am [new file with mode: 0644]
src/QY2CharValidator.cc [new file with mode: 0644]
src/QY2CharValidator.h [new file with mode: 0644]
src/QY2ComboTabWidget.cc [new file with mode: 0644]
src/QY2ComboTabWidget.h [new file with mode: 0644]
src/QY2DiskUsageList.cc [new file with mode: 0644]
src/QY2DiskUsageList.h [new file with mode: 0644]
src/QY2LayoutUtils.cc [new file with mode: 0644]
src/QY2LayoutUtils.h [new file with mode: 0644]
src/QY2ListView.cc [new file with mode: 0644]
src/QY2ListView.h [new file with mode: 0644]
src/QY2Settings.cc [new file with mode: 0644]
src/QY2Settings.h [new file with mode: 0644]
src/Y2CCQt.cc [new file with mode: 0644]
src/Y2CCQt.h [new file with mode: 0644]
src/YFrameBuffer.cc [new file with mode: 0644]
src/YFrameBuffer.h [new file with mode: 0644]
src/YQAlignment.cc [new file with mode: 0644]
src/YQAlignment.h [new file with mode: 0644]
src/YQApplication.cc [new file with mode: 0644]
src/YQApplication.h [new file with mode: 0644]
src/YQBarGraph.cc [new file with mode: 0644]
src/YQBarGraph.h [new file with mode: 0644]
src/YQCheckBox.cc [new file with mode: 0644]
src/YQCheckBox.h [new file with mode: 0644]
src/YQCheckBoxFrame.cc [new file with mode: 0644]
src/YQCheckBoxFrame.h [new file with mode: 0644]
src/YQComboBox.cc [new file with mode: 0644]
src/YQComboBox.h [new file with mode: 0644]
src/YQDateField.cc [new file with mode: 0644]
src/YQDateField.h [new file with mode: 0644]
src/YQDialog.cc [new file with mode: 0644]
src/YQDialog.h [new file with mode: 0644]
src/YQDownloadProgress.cc [new file with mode: 0644]
src/YQDownloadProgress.h [new file with mode: 0644]
src/YQDumbTab.cc [new file with mode: 0644]
src/YQDumbTab.h [new file with mode: 0644]
src/YQEBunny.cc [new file with mode: 0644]
src/YQEBunny.h [new file with mode: 0644]
src/YQEmpty.cc [new file with mode: 0644]
src/YQEmpty.h [new file with mode: 0644]
src/YQFrame.cc [new file with mode: 0644]
src/YQFrame.h [new file with mode: 0644]
src/YQGenericButton.cc [new file with mode: 0644]
src/YQGenericButton.h [new file with mode: 0644]
src/YQIconPool.cc [new file with mode: 0644]
src/YQIconPool.h [new file with mode: 0644]
src/YQImage.cc [new file with mode: 0644]
src/YQImage.h [new file with mode: 0644]
src/YQInputField.cc [new file with mode: 0644]
src/YQInputField.h [new file with mode: 0644]
src/YQIntField.cc [new file with mode: 0644]
src/YQIntField.h [new file with mode: 0644]
src/YQLabel.cc [new file with mode: 0644]
src/YQLabel.h [new file with mode: 0644]
src/YQLayoutBox.cc [new file with mode: 0644]
src/YQLayoutBox.h [new file with mode: 0644]
src/YQLogView.cc [new file with mode: 0644]
src/YQLogView.h [new file with mode: 0644]
src/YQMenuButton.cc [new file with mode: 0644]
src/YQMenuButton.h [new file with mode: 0644]
src/YQMultiLineEdit.cc [new file with mode: 0644]
src/YQMultiLineEdit.h [new file with mode: 0644]
src/YQMultiProgressMeter.cc [new file with mode: 0644]
src/YQMultiProgressMeter.h [new file with mode: 0644]
src/YQMultiSelectionBox.cc [new file with mode: 0644]
src/YQMultiSelectionBox.h [new file with mode: 0644]
src/YQOptionalWidgetFactory.cc [new file with mode: 0644]
src/YQOptionalWidgetFactory.h [new file with mode: 0644]
src/YQPackageSelectorPlugin.cc [new file with mode: 0644]
src/YQPackageSelectorPlugin.h [new file with mode: 0644]
src/YQPartitionSplitter.cc [new file with mode: 0644]
src/YQPartitionSplitter.h [new file with mode: 0644]
src/YQProgressBar.cc [new file with mode: 0644]
src/YQProgressBar.h [new file with mode: 0644]
src/YQPushButton.cc [new file with mode: 0644]
src/YQPushButton.h [new file with mode: 0644]
src/YQRadioButton.cc [new file with mode: 0644]
src/YQRadioButton.h [new file with mode: 0644]
src/YQRadioButtonGroup.cc [new file with mode: 0644]
src/YQRadioButtonGroup.h [new file with mode: 0644]
src/YQReplacePoint.cc [new file with mode: 0644]
src/YQReplacePoint.h [new file with mode: 0644]
src/YQRichText.cc [new file with mode: 0644]
src/YQRichText.h [new file with mode: 0644]
src/YQSelectionBox.cc [new file with mode: 0644]
src/YQSelectionBox.h [new file with mode: 0644]
src/YQSignalBlocker.cc [new file with mode: 0644]
src/YQSignalBlocker.h [new file with mode: 0644]
src/YQSlider.cc [new file with mode: 0644]
src/YQSlider.h [new file with mode: 0644]
src/YQSpacing.cc [new file with mode: 0644]
src/YQSpacing.h [new file with mode: 0644]
src/YQSquash.cc [new file with mode: 0644]
src/YQSquash.h [new file with mode: 0644]
src/YQTable.cc [new file with mode: 0644]
src/YQTable.h [new file with mode: 0644]
src/YQTimeField.cc [new file with mode: 0644]
src/YQTimeField.h [new file with mode: 0644]
src/YQTree.cc [new file with mode: 0644]
src/YQTree.h [new file with mode: 0644]
src/YQUI.h [new file with mode: 0644]
src/YQUIComponent.h [new file with mode: 0644]
src/YQUI_builtins.cc [new file with mode: 0644]
src/YQUI_core.cc [new file with mode: 0644]
src/YQUI_widgets.cc [new file with mode: 0644]
src/YQUI_x11.cc [new file with mode: 0644]
src/YQWidgetCaption.cc [new file with mode: 0644]
src/YQWidgetCaption.h [new file with mode: 0644]
src/YQWidgetFactory.cc [new file with mode: 0644]
src/YQWidgetFactory.h [new file with mode: 0644]
src/YQWizard.cc [new file with mode: 0644]
src/YQWizard.h [new file with mode: 0644]
src/YQWizardButton.cc [new file with mode: 0644]
src/YQWizardButton.h [new file with mode: 0644]
src/YQi18n.h [new file with mode: 0644]
src/lang_fonts [new file with mode: 0644]
src/pkg/Makefile.am [new file with mode: 0644]
src/pkg/YQPackageSelector.cc [new file with mode: 0644]
src/pkg/YQPackageSelector.h [new file with mode: 0644]
src/pkg/YQPackageSelectorBase.cc [new file with mode: 0644]
src/pkg/YQPackageSelectorBase.h [new file with mode: 0644]
src/pkg/YQPackageSelectorHelp.cc [new file with mode: 0644]
src/pkg/YQPatternSelector.cc [new file with mode: 0644]
src/pkg/YQPatternSelector.h [new file with mode: 0644]
src/pkg/YQPkgChangeLogView.cc [new file with mode: 0644]
src/pkg/YQPkgChangeLogView.h [new file with mode: 0644]
src/pkg/YQPkgChangesDialog.cc [new file with mode: 0644]
src/pkg/YQPkgChangesDialog.h [new file with mode: 0644]
src/pkg/YQPkgConflictDialog.cc [new file with mode: 0644]
src/pkg/YQPkgConflictDialog.h [new file with mode: 0644]
src/pkg/YQPkgConflictList.cc [new file with mode: 0644]
src/pkg/YQPkgConflictList.h [new file with mode: 0644]
src/pkg/YQPkgDependenciesView.cc [new file with mode: 0644]
src/pkg/YQPkgDependenciesView.h [new file with mode: 0644]
src/pkg/YQPkgDescriptionDialog.cc [new file with mode: 0644]
src/pkg/YQPkgDescriptionDialog.h [new file with mode: 0644]
src/pkg/YQPkgDescriptionView.cc [new file with mode: 0644]
src/pkg/YQPkgDescriptionView.h [new file with mode: 0644]
src/pkg/YQPkgDiskUsageList.cc [new file with mode: 0644]
src/pkg/YQPkgDiskUsageList.h [new file with mode: 0644]
src/pkg/YQPkgDiskUsageWarningDialog.cc [new file with mode: 0644]
src/pkg/YQPkgDiskUsageWarningDialog.h [new file with mode: 0644]
src/pkg/YQPkgFileListView.cc [new file with mode: 0644]
src/pkg/YQPkgFileListView.h [new file with mode: 0644]
src/pkg/YQPkgGenericDetailsView.cc [new file with mode: 0644]
src/pkg/YQPkgGenericDetailsView.h [new file with mode: 0644]
src/pkg/YQPkgLangList.cc [new file with mode: 0644]
src/pkg/YQPkgLangList.h [new file with mode: 0644]
src/pkg/YQPkgList.cc [new file with mode: 0644]
src/pkg/YQPkgList.h [new file with mode: 0644]
src/pkg/YQPkgObjList.cc [new file with mode: 0644]
src/pkg/YQPkgObjList.h [new file with mode: 0644]
src/pkg/YQPkgPatchFilterView.cc [new file with mode: 0644]
src/pkg/YQPkgPatchFilterView.h [new file with mode: 0644]
src/pkg/YQPkgPatchList.cc [new file with mode: 0644]
src/pkg/YQPkgPatchList.h [new file with mode: 0644]
src/pkg/YQPkgPatternList.cc [new file with mode: 0644]
src/pkg/YQPkgPatternList.h [new file with mode: 0644]
src/pkg/YQPkgProductDialog.cc [new file with mode: 0644]
src/pkg/YQPkgProductDialog.h [new file with mode: 0644]
src/pkg/YQPkgProductList.cc [new file with mode: 0644]
src/pkg/YQPkgProductList.h [new file with mode: 0644]
src/pkg/YQPkgRepoFilterView.cc [new file with mode: 0644]
src/pkg/YQPkgRepoFilterView.h [new file with mode: 0644]
src/pkg/YQPkgRepoList.cc [new file with mode: 0644]
src/pkg/YQPkgRepoList.h [new file with mode: 0644]
src/pkg/YQPkgRpmGroupTagsFilterView.cc [new file with mode: 0644]
src/pkg/YQPkgRpmGroupTagsFilterView.h [new file with mode: 0644]
src/pkg/YQPkgSearchFilterView.cc [new file with mode: 0644]
src/pkg/YQPkgSearchFilterView.h [new file with mode: 0644]
src/pkg/YQPkgSelDescriptionView.cc [new file with mode: 0644]
src/pkg/YQPkgSelDescriptionView.h [new file with mode: 0644]
src/pkg/YQPkgSelList.cc [new file with mode: 0644]
src/pkg/YQPkgSelList.h [new file with mode: 0644]
src/pkg/YQPkgSelMapper.cc [new file with mode: 0644]
src/pkg/YQPkgSelMapper.h [new file with mode: 0644]
src/pkg/YQPkgStatusFilterView.cc [new file with mode: 0644]
src/pkg/YQPkgStatusFilterView.h [new file with mode: 0644]
src/pkg/YQPkgTechnicalDetailsView.cc [new file with mode: 0644]
src/pkg/YQPkgTechnicalDetailsView.h [new file with mode: 0644]
src/pkg/YQPkgTextDialog.cc [new file with mode: 0644]
src/pkg/YQPkgTextDialog.h [new file with mode: 0644]
src/pkg/YQPkgUpdateProblemFilterView.cc [new file with mode: 0644]
src/pkg/YQPkgUpdateProblemFilterView.h [new file with mode: 0644]
src/pkg/YQPkgVersionsView.cc [new file with mode: 0644]
src/pkg/YQPkgVersionsView.h [new file with mode: 0644]
src/pkg/YQSimplePatchSelector.cc [new file with mode: 0644]
src/pkg/YQSimplePatchSelector.h [new file with mode: 0644]
src/pkg/YQZypp.h [new file with mode: 0644]
src/pkg/grep-fixme [new file with mode: 0755]
src/pkg/icons/.cvsignore [new file with mode: 0644]
src/pkg/icons/Makefile.am [new file with mode: 0644]
src/pkg/icons/autodel.xpm [new file with mode: 0644]
src/pkg/icons/autodel_disabled.xpm [new file with mode: 0644]
src/pkg/icons/autoinstall.xpm [new file with mode: 0644]
src/pkg/icons/autoinstall_disabled.xpm [new file with mode: 0644]
src/pkg/icons/autoupdate.xpm [new file with mode: 0644]
src/pkg/icons/autoupdate_disabled.xpm [new file with mode: 0644]
src/pkg/icons/checklist_off.xpm [new file with mode: 0644]
src/pkg/icons/checklist_on.xpm [new file with mode: 0644]
src/pkg/icons/del.xpm [new file with mode: 0644]
src/pkg/icons/del_disabled.xpm [new file with mode: 0644]
src/pkg/icons/delete_conflict.xpm [new file with mode: 0644]
src/pkg/icons/install.xpm [new file with mode: 0644]
src/pkg/icons/install_disabled.xpm [new file with mode: 0644]
src/pkg/icons/keepinstalled.xpm [new file with mode: 0644]
src/pkg/icons/keepinstalled_disabled.xpm [new file with mode: 0644]
src/pkg/icons/noinst.xpm [new file with mode: 0644]
src/pkg/icons/noinst_disabled.xpm [new file with mode: 0644]
src/pkg/icons/normal_conflict.xpm [new file with mode: 0644]
src/pkg/icons/protected.xpm [new file with mode: 0644]
src/pkg/icons/protected_disabled.xpm [new file with mode: 0644]
src/pkg/icons/satisfied.xpm [new file with mode: 0644]
src/pkg/icons/sel_autodel.xpm [new file with mode: 0644]
src/pkg/icons/sel_autodel_disabled.xpm [new file with mode: 0644]
src/pkg/icons/sel_autoinstall.xpm [new file with mode: 0644]
src/pkg/icons/sel_autoinstall_disabled.xpm [new file with mode: 0644]
src/pkg/icons/sel_autoupdate.xpm [new file with mode: 0644]
src/pkg/icons/sel_autoupdate_disabled.xpm [new file with mode: 0644]
src/pkg/icons/select_conflict.xpm [new file with mode: 0644]
src/pkg/icons/step_current.xpm [new file with mode: 0644]
src/pkg/icons/step_done.xpm [new file with mode: 0644]
src/pkg/icons/step_todo.xpm [new file with mode: 0644]
src/pkg/icons/stop.xpm [new file with mode: 0644]
src/pkg/icons/taboo.xpm [new file with mode: 0644]
src/pkg/icons/taboo_disabled.xpm [new file with mode: 0644]
src/pkg/icons/tree_minus.xpm [new file with mode: 0644]
src/pkg/icons/tree_plus.xpm [new file with mode: 0644]
src/pkg/icons/unresolvable_conflict.xpm [new file with mode: 0644]
src/pkg/icons/update.xpm [new file with mode: 0644]
src/pkg/icons/update_disabled.xpm [new file with mode: 0644]
src/pkg/icons/warning_sign.xpm [new file with mode: 0644]
src/utf8.h [new file with mode: 0644]
testsuite/.cvsignore [new file with mode: 0644]
testsuite/Makefile.am [new file with mode: 0644]
testsuite/README [new file with mode: 0644]
testsuite/config/default.exp [new file with mode: 0644]
testsuite/config/unix.exp [new file with mode: 0644]
testsuite/config/unknown.exp [new file with mode: 0644]
testsuite/lib/y2qt.exp [new file with mode: 0644]
testsuite/lib/y2qt_init.exp [new file with mode: 0644]
testsuite/runqt.cc [new file with mode: 0644]
testsuite/tests/Label1.ui [new file with mode: 0644]
testsuite/tests/aaa.err [new file with mode: 0644]
testsuite/tests/aaa.out [new file with mode: 0644]
testsuite/tests/aaa.ui [new file with mode: 0644]
testsuite/tests/mkdata.sh [new file with mode: 0755]
testsuite/tests/ru1.err [new file with mode: 0644]
testsuite/tests/ru1.out [new file with mode: 0644]
testsuite/tests/ru1.ui [new file with mode: 0644]
testsuite/tests/stretch2.err [new file with mode: 0644]
testsuite/tests/stretch2.out [new file with mode: 0644]
testsuite/tests/stretch2.ui [new file with mode: 0644]
testsuite/tests/textentry3.err [new file with mode: 0644]
testsuite/tests/textentry3.out [new file with mode: 0644]
testsuite/tests/textentry3.ui [new file with mode: 0644]
testsuite/tests/thread002.err [new file with mode: 0644]
testsuite/tests/thread002.out [new file with mode: 0644]
testsuite/tests/thread002.ui [new file with mode: 0644]
testsuite/tests/vbox1.err [new file with mode: 0644]
testsuite/tests/vbox1.out [new file with mode: 0644]
testsuite/tests/vbox1.ui [new file with mode: 0644]
testsuite/tests/vbox2.err [new file with mode: 0644]
testsuite/tests/vbox2.out [new file with mode: 0644]
testsuite/tests/vbox2.ui [new file with mode: 0644]
testsuite/y2qt.cc [new file with mode: 0644]
testsuite/y2qt.test/y2qt.exp [new file with mode: 0644]
yast2-qt.spec.in [new file with mode: 0644]

diff --git a/.cvsignore b/.cvsignore
new file mode 100644 (file)
index 0000000..4219e46
--- /dev/null
@@ -0,0 +1,23 @@
+Makefile
+Makefile.am
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.cache
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.in
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+mkinstalldirs
+packages-qt.pot
+stamp-h*
+Makefile.am.common
diff --git a/MAINTAINER b/MAINTAINER
new file mode 100644 (file)
index 0000000..3bbdb0b
--- /dev/null
@@ -0,0 +1 @@
+Stefan Hundhammer <sh@suse.de>
diff --git a/Makefile.cvs b/Makefile.cvs
new file mode 100644 (file)
index 0000000..14f32c9
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Makefile.cvs
+#
+
+LIB = $(shell y2tool get-lib)
+
+PREFIX = /usr
+
+configure: all
+       ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB) --with-qt-dir=/usr/lib/qt3 --with-qt-libdir=/usr/lib/qt3/$(LIB)
+
+all:
+       y2tool y2autoconf
+       y2tool y2automake
+       autoreconf --force --install
+
+install: configure
+       make
+       make install
+
+reconf: all
+       ./config.status --recheck
+       ./config.status
diff --git a/RPMNAME b/RPMNAME
new file mode 100644 (file)
index 0000000..b0bfc63
--- /dev/null
+++ b/RPMNAME
@@ -0,0 +1 @@
+yast2-qt
diff --git a/SUBDIRS b/SUBDIRS
new file mode 100644 (file)
index 0000000..63f500b
--- /dev/null
+++ b/SUBDIRS
@@ -0,0 +1 @@
+src doc fonts testsuite
diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..37b36c1
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+2.16.3
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644 (file)
index 0000000..330053a
--- /dev/null
@@ -0,0 +1,37 @@
+##   -*- autoconf -*-
+
+dnl  Include file for "configure.in" for the YaST2 Qt UI
+dnl  See file COPYING for license
+dnl
+dnl  Author:   Stefan Hundhammer <sh@suse.de>
+dnl  Updated:  2001-12-14
+dnl
+
+
+dnl AC_MIN_QT_VERSION(numeric-qt-version, text_qt_version)
+dnl Checks for Qt version as specified or higher
+dnl
+AC_DEFUN([AC_MIN_QT_VERSION],
+[
+AC_MSG_CHECKING([for Qt $2 or higher])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -I$QTDIR/include"
+
+AC_TRY_COMPILE([
+#include <qglobal.h>
+],
+[
+#if QT_VERSION < $1
+#error Qt $2 or higher required!
+#endif
+],
+[AC_MSG_RESULT([yes])],
+[AC_MSG_ERROR([Qt $2 or higher required!
+
+Check whether the Qt base packages and the Qt development packages 
+are installed and QTDIR is set correctly.
+])]
+)
+CFLAGS="$save_CFLAGS"
+])
+
diff --git a/configure.in.in b/configure.in.in
new file mode 100644 (file)
index 0000000..688b989
--- /dev/null
@@ -0,0 +1,27 @@
+## general configure.in.in
+
+## initialize
+@YAST2-INIT-COMMON@
+@YAST2-INIT-PROGRAM@
+
+## some common checks
+@YAST2-CHECKS-COMMON@
+@YAST2-CHECKS-PROGRAM@
+@YAST2-CHECKS-QT@
+
+## special stuff
+AC_MIN_QT_VERSION(301,3.01)
+
+AC_MSG_CHECKING([X font directory])
+#ugh, /etc/YaST2/XVersion is in yast2.rpm which is only built after us
+#so let's hardcode, like in the spec file anyway
+case "$x_includes" in
+     *X11R6*) Xfontsdir=$prefix/X11R6/lib/X11/fonts ;;
+     *) Xfontsdir=$prefix/share/fonts ;;
+esac
+AC_MSG_RESULT([$Xfontsdir])
+AC_SUBST(Xfontsdir)
+PKG_CHECK_MODULES([ZYPP], [libzypp])
+
+## and generate the output
+@YAST2-OUTPUT@
diff --git a/doc/.cvsignore b/doc/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..a99e80c
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# Makefile.am for qt/doc
+#
+
+SUBDIRS = autodocs
+
+htmldir = $(docdir)
+
+html_DATA = richtext.txt
+
+EXTRA_DIST = $(html_DATA)
diff --git a/doc/autodocs/.cvsignore b/doc/autodocs/.cvsignore
new file mode 100644 (file)
index 0000000..e1e4a35
--- /dev/null
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+*.html
+*.png
+*.tag
+doxygen.css
+doxygen.log
+doxygen.conf
+installdox
diff --git a/doc/autodocs/Makefile.am b/doc/autodocs/Makefile.am
new file mode 100644 (file)
index 0000000..0d2535f
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Makefile.am for qt/doc/autodocs
+#
+# Parameters:
+#
+#   AUTODOCS_CC: Directories that the C++ autodocs is built from
+#                Optional - the default is $(srcdir)/../../src
+#   AUTODOCS_DEPS: dependencies of the docs, default is $(AUTODOCS_CC)/*.h
+#   AUTODOCS_PARAMS: more params for ydoxygen
+#
+# see also mvidner's post on yast2-announce on 2006-02-21
+
+# AUTODOCS_CC   = $(srcdir)/../../src/
+
+AUTODOCS_DEPS = $(srcdir)/../../src/include/*.h
+
+# Use this to enable generating autodocs:
+#
+# include $(top_srcdir)/autodocs-cc.ami
+#
+# and this to disable it:
+#
+include $(top_srcdir)/autodocs-cc-off.ami
diff --git a/doc/richtext.txt b/doc/richtext.txt
new file mode 100644 (file)
index 0000000..b7d2d99
--- /dev/null
@@ -0,0 +1,72 @@
+The RichText widget in the Qt UI currently supports the tags listed
+below. Note that not all of them will make sense for use within YaST.
+(Most notably all those which refer to files)
+
+     * <qt>...</qt> - A Qt rich text document. It understands the
+       following attributes
+          + title - the caption of the document. This attribute is easily
+            accessible with [25]QTextView::documentTitle()
+          + type - The type of the document. The default type is page .
+            It indicates that the document is displayed in a page of its
+            own. Another style is detail. It can be used to explain
+            certain expressions more detailed in a few sentences. The
+            QTextBrowser will then keep the current page and display the
+            new document in a small popup similar to QWhatsThis. Note
+            that links will not work in documents with <qt type="detail"
+            >...</qt>
+          + bgcolor - The background color, for example bgcolor="yellow"
+            or bgcolor="#0000FF"
+          + background - The background pixmap, for example
+            background="granit.xpm". The pixmap name will be resolved by
+            a [26]QMimeSourceFactory().
+          + text - The default text color, for example text="red"
+          + link - The link color, for example link="green"
+     * <a>...</a> - An anchor or link. The reference target is defined in
+       the href attribute of the tag as in \c<a
+       href="target.qml">...</a>. You can also specify an additional
+       anchor within the specified target document, for example <a
+       href="target.qml#123">...</a>. If a is meant to be an anchor, the
+       reference source is given in the name attribute.
+     * <font>...</font> - Customizes the font size and text color. The
+       tag understands two attributes:
+          + color - the text color, for example color="red" or
+            color="#FF0000".
+          + size - the logical size of the font. Logical sizes 1 to 7 are
+            supported. The value may either be absolute, for example
+            size=3, or relative. In the latter case, the sizes are simply
+            added.
+     * <em>...</em> - Emphasized. As default, this is the same as
+       <i>...</i> (Italic)
+     * <strong>...</strong> - Strong. As default, this is the same as
+       <bold>...</bold> (bold)
+     * <big>...</big> - A larger font size.
+     * <small>...</small> - A smaller font size.
+     * <code>...</code> - Indicates Code. As default, this is the same as
+       <tt>...</tt> (typewriter)
+     * <pre>...</pre> - For larger junks of code. Whitespaces in the
+       contents are preserved.
+     * <large>...</large> - Large font size.
+     * <b>...</b> - Bold font style.
+     * <h1>...</h1> - A top-level heading.
+     * <h2>...</h2> - A sub-level heading.
+     * <h3>...</h3> - A sub-sub-level heading.
+     * <p>...</p> - A paragraph.
+     * <center>...</center> - A centered paragraph.
+     * <blockquote>...</blockquote> - An indented paragraph, useful for
+       quotes.
+     * <multicol cols=n >...</multicol> - Multicol display with n columns
+     * <twocolumn>...</twocolumn> - Two-column display.
+     * <ul>...</ul> - An un-ordered list. You can also pass a type
+       argument to define the bullet style. The default is type=disc,
+       other types are circle and square.
+     * <ol>...</ol> - An ordered list. You can also pass a type argument
+       to define the enumeration label style. The default is type="1",
+       other types are "a" and "A".
+     * <li>...</li> - A list item.
+     * <img/> - An image. The image name for the mime source factory is
+       given in the source attribute, for example <img source="qt.xpm"/>
+       The image tag also understands the attributes width and height
+       that determine the size of the image. If the pixmap does not fit
+       to the specified size, it will be scaled automatically.
+     * <br/> - A line break
+     * <hr/> - A horizonal line
diff --git a/fonts/.cvsignore b/fonts/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/fonts/Makefile.am b/fonts/Makefile.am
new file mode 100644 (file)
index 0000000..6f50f1e
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# Makefile.am for qt/fonts
+#
+
+fontsdir = $(Xfontsdir)/uni
+
+fonts_DATA = fonts.dir         \
+       newunifont.pcf.gz       \
+       unifont.pcf.gz
+
+EXTRA_DIST = $(fonts_DATA)
diff --git a/fonts/fonts.dir b/fonts/fonts.dir
new file mode 100644 (file)
index 0000000..ca0b8df
--- /dev/null
@@ -0,0 +1,3 @@
+2
+unifont.pcf.gz -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1
+newunifont.pcf.gz -gnu-unifont-medium-r-normal--16-160-75-75-p-80-iso10646-1
diff --git a/fonts/newunifont.pcf.gz b/fonts/newunifont.pcf.gz
new file mode 100644 (file)
index 0000000..eb515e5
Binary files /dev/null and b/fonts/newunifont.pcf.gz differ
diff --git a/fonts/unifont.pcf.gz b/fonts/unifont.pcf.gz
new file mode 100644 (file)
index 0000000..7b4eb24
Binary files /dev/null and b/fonts/unifont.pcf.gz differ
diff --git a/package/.cvsignore b/package/.cvsignore
new file mode 100644 (file)
index 0000000..d992c6d
--- /dev/null
@@ -0,0 +1,3 @@
+*.tar.bz2
+*.tar.gz
+*.spec
diff --git a/package/yast2-qt.changes b/package/yast2-qt.changes
new file mode 100644 (file)
index 0000000..c7084b2
--- /dev/null
@@ -0,0 +1,2612 @@
+-------------------------------------------------------------------
+Fri Nov 23 15:55:31 CET 2007 - tgoettlicher@suse.de
+
+- fixed unneeded help icon in "please wait" window (#202818) 
+
+-------------------------------------------------------------------
+Thu Nov 22 21:13:01 CET 2007 - sh@suse.de
+
+- Moved setLanguage() and font handling from YQUI to YQApplication 
+
+-------------------------------------------------------------------
+Tue Nov 20 18:03:00 CET 2007 - sh@suse.de
+
+- Prevent self-generated events in YQDumbTab
+- Fixed cut-off YQInputField labels 
+- V 2.16.3
+
+-------------------------------------------------------------------
+Mon Nov 19 13:44:00 CET 2007 - tgoettlicher@suse.de
+
+- fixed ignored arch selection in package selector (#304966)
+- V 2.16.2
+
+-------------------------------------------------------------------
+Fri Nov 16 16:36:13 CET 2007 - sh@suse.de
+
+- Merged mod-ui branch to trunk
+- V 2.16.1
+
+-------------------------------------------------------------------
+Mon Sep  3 18:13:36 CEST 2007 - sh@suse.de
+
+- Limit pkg popups to screen size even with substandard resolutions
+  (bug #300632: dialogs too big on PS3)
+- V 2.15.16
+
+-------------------------------------------------------------------
+Wed Aug 29 14:38:24 CEST 2007 - tgoettlicher@suse.de
+
+- wizard shows titlebar depending on existence of title-bar-gradient.png
+- r40568
+- V 2.15.15
+
+-------------------------------------------------------------------
+Mon Aug 27 16:14:15 CEST 2007 - sh@suse.de
+
+- Fixed bug #297637: Repository names not shown in Package Manager 
+- V 2.15.14
+
+-------------------------------------------------------------------
+Thu Aug 23 13:25:08 CEST 2007 - kmachalkova@suse.cz
+
+- Display repository name instead of product name in package selector
+  (#296782) 
+
+-------------------------------------------------------------------
+Wed Aug 15 13:02:44 CEST 2007 - jsuchome@suse.cz
+
+- Messages back from proofreading 
+- 2.15.12 
+
+-------------------------------------------------------------------
+Fri Aug 10 17:53:20 CEST 2007 - mvidner@suse.cz
+
+- Finished integrating Feature #120292, UI as a namespace callable
+  from yast2-*-bindings.
+- 2.15.11
+
+-------------------------------------------------------------------
+Wed Aug  8 09:27:30 CEST 2007 - kmachalkova@suse.cz
+
+- Added text referring to whereabouts of the license text to 
+  license agreement popup (FaTE #302018) 
+- V 2.15.10
+
+-------------------------------------------------------------------
+Mon Aug  6 13:55:08 CEST 2007 - mvidner@suse.cz
+
+- Adapted to changes in yast2-core needed for making UI callable from
+  yast2-*-bindings.
+- 2.15.7.1
+
+-------------------------------------------------------------------
+Fri Aug  3 12:42:01 CEST 2007 - sh@suse.de
+
+- Fixed bug #295485: Text cut off in MultiSelectionBox
+  (in repository names in that bug) 
+- Fixed bug #189267: Unlocalized text in online update
+- V 2.17.9
+
+-------------------------------------------------------------------
+Thu Aug  2 17:34:26 CEST 2007 - sh@suse.de
+
+- V 2.17.8
+- Fate #302052: Restrict patches view to show only update stack
+  patches if there are any 
+
+-------------------------------------------------------------------
+Tue Jul 24 10:59:06 CEST 2007 - sh@suse.de
+
+- Fixed bug #285915: Can't cancel package search
+- Consistent naming scheme: inst source -> repository 
+
+-------------------------------------------------------------------
+Tue Jul 17 10:12:25 CEST 2007 - kmachalkova@suse.cz
+
+- Require new libzypp (>= 3.11.8)
+- Changes from libzypp refactoring branches merges back to trunk 
+
+-------------------------------------------------------------------
+Tue Jul 10 11:55:26 CEST 2007 - sh@suse.de
+
+- Don't over-simplify whitespace (replacing newlines with blanks)
+  in dependency problem reports
+- V 2.15.7
+
+-------------------------------------------------------------------
+Fri Jul  6 14:03:15 CEST 2007 - ma@suse.de
+
+- Adapt to new libzypp. Installation sources were replaced by
+  repositories.
+- V 2.15.6
+
+-------------------------------------------------------------------
+Thu Jun 21 17:40:44 CEST 2007 - adrian@suse.de
+
+- fix changelog entry order
+
+-------------------------------------------------------------------
+Mon Apr 23 15:33:26 CEST 2007 - sh@suse.de
+
+- Load qt_pkg plugin for PatternSelector widget, too 
+- V 2.15.5
+
+-------------------------------------------------------------------
+Mon Apr 16 15:44:13 CEST 2007 - sh@suse.de
+
+- Added qt_pkg plugins to file list 
+- V 2.15.4
+
+-------------------------------------------------------------------
+Fri Apr 13 17:50:18 CEST 2007 - sh@suse.de
+
+Merged mod-ui branch changes back to trunk (r37143:37466):
+
+- Reorganized source directory layout:
+  - Header files now in same directory as .cc files
+  - Moved package selection related sources to separate subdir src/pkg
+
+- Load package selection stuff upon demand as plugin
+  (saves 2 MB VmRSS if no PackageSelector needed)
+  [see also Fate #302119]
+
+- V 2.15.3 
+
+-------------------------------------------------------------------
+Mon Mar 26 14:11:50 CEST 2007 - sh@suse.de
+
+- Fixed bug #251215: "Save screenshot to" not translated 
+
+-------------------------------------------------------------------
+Fri Mar  9 15:36:01 CET 2007 - sh@suse.de
+
+- PackageSelector/PatternSelector no longer use zypp::transactResKind()
+  to emulate what a real solver run might do, now always does a real
+  solver run which is no longer painfully slow with recent
+  solver improvements.
+- Auto-solving on by default in PackageSelector
+- V 2.15.2 
+
+-------------------------------------------------------------------
+Tue Feb 20 15:02:11 CET 2007 - sh@suse.de
+
+- Fixed bug #239829 (again): Show patch version in patches list
+- V 2.15.1
+
+-------------------------------------------------------------------
+Thu Feb 15 16:46:24 CET 2007 - sh@suse.de
+
+- Fixed bug #148469: Exclude -debuginfo and -devel pkgs on demand
+- V 2.14.7
+
+-------------------------------------------------------------------
+Tue Feb  6 17:38:34 CET 2007 - mvidner@suse.cz
+
+- Prefixized font patch check.
+
+-------------------------------------------------------------------
+Thu Feb  1 14:37:29 CET 2007 - sh@suse.de
+
+- Merged SLE10-SP1 branch changes back to trunk:
+  - Fixed bug #239829: Show patch name (ID) in patches list
+
+- V 2.14.6
+
+-------------------------------------------------------------------
+Wed Jan 31 14:22:26 CET 2007 - sh@suse.de
+
+- Merged SLE10-SP1 branch changes back to trunk:
+  - Fixed bug #187322: Ignore solver errors in patch mode
+    at first solver run
+  - Fixed bug #232522: Added inst src URL to pkg versions view
+  - Fixed bug #152997: Install progress icons
+
+- V 2.14.5 
+
+-------------------------------------------------------------------
+Wed Jan 24 14:53:55 CET 2007 - sh@suse.de
+
+- Merged SLE10-SP1 branch changes back to trunk:
+  - Fixed bug #218669: Broken UTF8 chars in pkg to text file export
+  - Fixed bug #227409: Add installed packages to text file export
+  - Fixed bug #229368: comparison with string literal
+  - Added Qt-UI support for feature #301178: verify installed system
+  - Added CheckBoxFrame widget for feature #5673
+  - Implemented feature #300729: Saving of patterns and packages
+
+- V 2.14.4
+
+-------------------------------------------------------------------
+Thu Nov 23 16:50:28 CET 2006 - sh@suse.de
+
+- Fixed bug #223416: Updated patches not visible in default view 
+- V 2.14.3
+
+-------------------------------------------------------------------
+Tue Nov 21 12:05:34 CET 2006 - sh@suse.de
+
+- V 2.14.2
+- Fixed bug #222505 (left-handed mouse) 
+
+-------------------------------------------------------------------
+Fri Nov 10 13:39:07 CET 2006 - sh@suse.de
+
+- Merged SLE-10-SP1-Branch to trunk (r31627:34245)
+- V 2.14.1
+
+-------------------------------------------------------------------
+Tue Oct 31 17:32:00 CET 2006 - sh@suse.de
+
+- Improved bugfix for bug #183735 (display only relevant patches
+  by default): Also display patches that are satisfied, but
+  not installed yet
+
+- Fixed bug #189134: Show description of initial patch / pkg
+
+- Override patch category tooltips with "Dependencies broken" or
+  "Dependencies satisfied" in patch list
+
+- V 2.13.73 
+
+-------------------------------------------------------------------
+Mon Oct 30 18:11:50 CET 2006 - sh@suse.de
+
+- Consistent handling of isSatisfied and isBroken for bug #173488
+- Added real "isSatisfied" icon 
+- V 2.13.72
+
+-------------------------------------------------------------------
+Fri Oct 27 13:43:42 CEST 2006 - sh@suse.de
+
+- Added missing icon to dist tarball 
+- V 2.13.71
+
+-------------------------------------------------------------------
+Thu Oct 26 18:57:05 CEST 2006 - sh@suse.de
+
+- Fixed bug #162164: pattern detection does not work
+- Fixed bug #173488: Status satisfied for a patch is displayed like
+  uninstalled 
+- V 2.13.70
+
+-------------------------------------------------------------------
+Thu Oct 26 17:26:25 CEST 2006 - sh@suse.de
+
+- Fixed bug #183735 - YOU should display only relevant patches by
+  default
+- V 2.13.69
+
+-------------------------------------------------------------------
+Wed Oct 25 17:35:07 CEST 2006 - sh@suse.de
+
+- Implemented feature #300756: Added support for resolver test 
+  case generation (PackageSelector -> "Extras" menu)
+- V 2.13.68 
+
+-------------------------------------------------------------------
+Tue Oct 24 18:29:08 CEST 2006 - sh@suse.de
+
+- Implemented feature #120142: View installed products 
+- Implemented feature #301229: Fold hidden patterns into parents
+- V 2.13.67
+
+-------------------------------------------------------------------
+Thu Oct 12 17:32:16 CEST 2006 - sh@suse.de
+
+- Implemented feature #301222: Easy access to updating all packages
+- V 2.13.66 
+
+-------------------------------------------------------------------
+Wed Oct  4 17:27:21 CEST 2006 - sh@suse.de
+
+- Fixed bug #208694: Allow deleting patches
+  (only the patch meta data will be deleted, packages will remain
+   the same!)
+
+- V 2.13.65 
+
+-------------------------------------------------------------------
+Tue Oct  3 13:58:43 CEST 2006 - jsrain@suse.cz
+
+- added missing files to Makefile.am
+- 2.13.64
+
+-------------------------------------------------------------------
+Fri Sep 29 17:53:59 CEST 2006 - sh@suse.de
+
+- V 2.13.63
+- Fixed bug #205059: CapsLock warning in password fields 
+
+-------------------------------------------------------------------
+Fri Sep 22 16:59:31 CEST 2006 - sh@suse.de
+
+- Allow pattern categories to be collapsed 
+- V 2.13.62
+
+-------------------------------------------------------------------
+Wed Sep 13 16:42:01 CEST 2006 - sh@suse.de
+
+- Applied patch from Ricardo Cruz <rpmcruz@clix.pt>
+  for new UI::Beep() built-in
+
+-------------------------------------------------------------------
+Thu Aug  3 15:23:52 CEST 2006 - mvidner@suse.cz
+
+- Added a configure-time check for the X font directory.
+- 2.13.61
+
+-------------------------------------------------------------------
+Tue Jun 27 15:09:34 CEST 2006 - sh@suse.de
+
+- Fixed bug #188018: Patch description: Text in angle brackets 
+
+-------------------------------------------------------------------
+Wed May 31 18:49:40 CEST 2006 - sh@suse.de
+
+- V 2.13.60
+- Fixed bug #179679: Untranslated text in file dialogs 
+
+-------------------------------------------------------------------
+Wed May 24 17:47:15 CEST 2006 - sh@suse.de
+
+- V 2.13.59
+- Added support for licenses for patches (bug #174476) 
+
+-------------------------------------------------------------------
+Thu May 18 10:51:01 CEST 2006 - kkaempf@suse.de
+
+- adapt to libzypp 1.0.0 api
+- require libzypp >= 1.0.0
+- V 2.13.58
+
+-------------------------------------------------------------------
+Wed May 10 15:05:21 CEST 2006 - sh@suse.de
+
+- Set package to "update" or "install" if user selects a different
+  version in the "Versions" tab of the package selector
+  (workaround for bug #164487: can't downgrade using a patch)
+- V 2.13.57 
+
+-------------------------------------------------------------------
+Tue May  9 16:15:03 CEST 2006 - sh@suse.de
+
+- Fixed bug #173122: Easter egg crashes the installation
+- V 2.13.56 
+
+-------------------------------------------------------------------
+Tue May  9 14:36:44 CEST 2006 - sh@suse.de
+
+- Fixed bug #173865: No "automatic changes" dialog upon "Accept" 
+  in Qt package selector 
+- V 2.13.55
+
+-------------------------------------------------------------------
+Thu May  4 12:32:46 CEST 2006 - sh@suse.de
+
+- V 2.13.54
+- Messages back from proofreading 
+
+-------------------------------------------------------------------
+Fri Apr 28 12:20:54 CEST 2006 - sh@suse.de
+
+- V 2.13.53
+- Disabled patches view in package selector (non-YOU-mode)
+  to avoid problems with kernel and ZYPP patches
+  (patches view is still available upon F2 keypress) 
+
+-------------------------------------------------------------------
+Tue Apr 25 14:33:53 CEST 2006 - sh@suse.de
+
+- Fixed bug #168904: Changing "all in this list" status in pkg lists
+  takes too long
+- V 2.13.52 
+
+-------------------------------------------------------------------
+Tue Apr 25 13:44:39 CEST 2006 - schubi@suse.de
+
+- Bug 167565 - UI: deselecting one preselected pattern deselects everything
+  Added transactResKind( zypp::ResTraits<zypp::Product>::kind ) in solveResolvableCollections 
+
+-------------------------------------------------------------------
+Mon Apr 24 13:22:50 CEST 2006 - sh@suse.de
+
+- V 2.13.51
+- Add installed pkg to SelMapper to fix "update problems" list
+  (required for pkgs that are not available and marked auto-delete) 
+
+-------------------------------------------------------------------
+Thu Apr 20 18:18:14 CEST 2006 - sh@suse.de
+
+- V 2.13.50
+- Re-implemented list of problematic packages during update 
+
+-------------------------------------------------------------------
+Thu Apr 20 17:15:49 CEST 2006 - sh@suse.de
+
+- Ask for confirmation to abandon changes if a language is changed 
+
+-------------------------------------------------------------------
+Thu Apr 20 12:47:39 CEST 2006 - mvidner@suse.cz
+
+- Catch exceptions when calling package management code (#166278).
+- Adapted for libzypp in a nonstandard prefix.
+- 2.13.49
+
+-------------------------------------------------------------------
+Tue Apr 18 17:39:43 CEST 2006 - sh@suse.de
+
+- V 2.13.48
+- Added infrastructure to fix bug #164869: Duplicate "Accept" button
+  in pattern selector
+
+-------------------------------------------------------------------
+Thu Apr 13 13:47:50 CEST 2006 - schubi@suse.de
+
+- Bug 164365 - build 906: Deselecting a selection, all packages are still selected
+
+-------------------------------------------------------------------
+Fri Apr  7 19:10:30 CEST 2006 - sh@suse.de
+
+- v 2.13.45
+
+- Fixed bug #163827: Special package licenses not shown in weird cases 
+
+- Fixed inconsistent propagation of installation status of packages
+  that belong to selections, patterns, languages etc.
+
+-------------------------------------------------------------------
+Tue Apr  4 17:59:20 CEST 2006 - sh@suse.de
+
+- V 2.13.45
+- Fixed bug #161400: Switching between alternative patterns
+- Migrated from Resolver::transactResObject() to 
+  Resolver::transactResKind() for all higher-level YQPkg*Lists 
+
+-------------------------------------------------------------------
+Fri Mar 31 22:02:38 CEST 2006 - sh@suse.de
+
+- V 2.13.44
+- Fixed bug #161860: Pattern selector layout out of proportion 
+
+-------------------------------------------------------------------
+Fri Mar 31 18:34:56 CEST 2006 - sh@suse.de
+
+- Fixed bug #152700: Automatic changes dialog displays garbage 
+
+-------------------------------------------------------------------
+Wed Mar 29 21:20:47 CEST 2006 - sh@suse.de
+
+- V 2.13.43
+- Fixed bug #121872: segfault at program end if no Qt style defined 
+
+-------------------------------------------------------------------
+Wed Mar 29 12:08:01 CEST 2006 - sh@suse.de
+
+- V 2.13.42
+- Fixed broken umlaut characters in pattern categories 
+
+-------------------------------------------------------------------
+Tue Mar 28 16:15:20 CEST 2006 - sh@suse.de
+
+- V 2.13.41
+- Show language specific packages in "languages" filter 
+
+-------------------------------------------------------------------
+Mon Mar 27 15:44:05 CEST 2006 - sh@suse.de
+
+- V 2.13.40
+- Fixed bug #156590: No way to reset ignored dependency problems
+
+-------------------------------------------------------------------
+Thu Mar 23 18:46:11 CET 2006 - sh@suse.de
+
+- V 2.13.39
+- Calculate and display patches total download size on the fly 
+
+-------------------------------------------------------------------
+Thu Mar 23 16:29:21 CET 2006 - sh@suse.de
+
+- V 2.13.38
+- Enable auto-solving for patches
+- Support for multi-arch patches: Prevent duplicate entries
+  in pkg list 
+
+-------------------------------------------------------------------
+Thu Mar 23 13:17:39 CET 2006 - sh@suse.de
+
+- Fall back to search view if no multiple sources 
+
+-------------------------------------------------------------------
+Thu Mar 23 12:08:31 CET 2006 - sh@suse.de
+
+- V 2.13.37
+- Enable starting up package selector in inst sources mode: Use
+  `opt(`instSourcesMode) 
+
+-------------------------------------------------------------------
+Wed Mar 22 17:49:52 CET 2006 - sh@suse.de
+
+- V 2.13.36
+- Small fixes 
+
+-------------------------------------------------------------------
+Mon Mar 20 09:11:43 CET 2006 - visnov@suse.cz
+
+- V 2.13.35
+- adapt for latest libzypp
+
+-------------------------------------------------------------------
+Thu Mar 16 12:54:29 CET 2006 - sh@suse.de
+
+- Fixed bug #158576: 'install -> all in this list' does not work
+  for patterns 
+
+-------------------------------------------------------------------
+Wed Mar 15 19:06:18 CET 2006 - sh@suse.de
+
+- V 2.13.34
+- Display patch content (packages and scripts)
+- Moved solving for single current item to base class 
+
+-------------------------------------------------------------------
+Tue Mar 14 18:12:15 CET 2006 - sh@suse.de
+
+- V 2.13.33 
+- Fixed yast2-qt part of bug #151834: third party licenses
+  (Acrobat reader, flash player, ...) 
+
+-------------------------------------------------------------------
+Tue Mar 14 15:21:16 CET 2006 - sh@suse.de
+
+- V 2.13.32
+- Ported disk usage in package selector to ZYPP 
+
+-------------------------------------------------------------------
+Fri Mar 10 20:12:21 CET 2006 - sh@suse.de
+
+- V 2.13.31
+- First version of patches view that can display patch contents
+
+-------------------------------------------------------------------
+Fri Mar 10 15:18:57 CET 2006 - sh@suse.de
+
+- V 2.13.30
+- Fixed bug #155799: Qt package selector does not recognize newer
+  packages as newer 
+- Display patch category in patches view
+
+
+-------------------------------------------------------------------
+Thu Mar  9 18:28:55 CET 2006 - sh@suse.de
+
+- V 2.13.29 
+- First (still crude) version of patches view for ZYPP
+- Activate "patches" filter view in package selector upon F2 key 
+
+-------------------------------------------------------------------
+Wed Mar  8 18:33:27 CET 2006 - sh@suse.de
+
+- V 2.13.28
+- Added "file list"  view to package selector
+- Added "change log" view to package selector 
+
+-------------------------------------------------------------------
+Tue Mar  7 17:27:25 CET 2006 - sh@suse.de
+
+- V 2.13.27
+- Allow searching in RPM requires / provides tags 
+
+-------------------------------------------------------------------
+Mon Mar  6 18:34:50 CET 2006 - sh@suse.de
+
+- V 2.13.26
+- Ported "dependencies" details view to ZYPP
+- No longer translating RPM tags "provides", ... 
+
+-------------------------------------------------------------------
+Mon Mar  6 14:31:56 CET 2006 - sh@suse.de
+
+- Ported "languages" filter view to ZYPP
+  (no lang-specific packages displayed yet, missing in libzypp) 
+
+-------------------------------------------------------------------
+Fri Mar  3 17:00:34 CET 2006 - sh@suse.de
+
+- V 2.13.25
+- Ported RPM groups filter view to ZYPP
+
+-------------------------------------------------------------------
+Thu Mar  2 18:37:06 CET 2006 - sh@suse.de
+
+- V 2.13.24
+- Display product name (if available) for package versions
+  in "versions" details view 
+
+-------------------------------------------------------------------
+Thu Mar  2 18:12:12 CET 2006 - sh@suse.de
+
+- Yet another performance boost for "installation sources"
+  filter view (~120 millisec per click instead of ~1.2 sec) 
+
+-------------------------------------------------------------------
+Thu Mar  2 12:17:39 CET 2006 - sh@suse.de
+
+- Performance boost for "installation sources" filter view (factor 10) 
+- V 2.13.23
+
+-------------------------------------------------------------------
+Tue Feb 28 19:19:35 CET 2006 - sh@suse.de
+
+- Installation sources filter view migrated to ZYPP
+- V 2.13.22 
+
+-------------------------------------------------------------------
+Tue Feb 28 14:52:33 CET 2006 - sh@suse.de
+
+- YQPkgVersionsView migrated to ZYPP 
+
+-------------------------------------------------------------------
+Tue Feb 28 13:35:59 CET 2006 - sh@suse.de
+
+- Removed beta warning upon insistence of our project managers
+  despite the fact that the package manager GUI is still broken
+  beyond recognition
+- V 2.13.21
+
+-------------------------------------------------------------------
+Mon Feb 27 16:40:29 CET 2006 - sh@suse.de
+
+- Fixed bug #153035
+- Fixed bug #153032
+- V 2.13.20 
+
+-------------------------------------------------------------------
+Mon Feb 27 15:35:23 CET 2006 - sh@suse.de
+
+- Re-enabled TABOO and PROTECTED 
+
+-------------------------------------------------------------------
+Wed Feb 22 18:10:14 CET 2006 - sh@suse.de
+
+- V 2.13.19
+- Removing patterns and selections now works as well as adding them 
+
+-------------------------------------------------------------------
+Tue Feb 21 16:39:02 CET 2006 - sh@suse.de
+
+- V 2.13.18
+- use new way to enable/disable autodocs by mvidner 
+
+-------------------------------------------------------------------
+Tue Feb 21 12:08:32 CET 2006 - sh@suse.de
+
+- sort category-less patterns before any category
+- no tree indentation for patterns
+- disable closing pattern categories
+- disable selecting pattern categories 
+
+-------------------------------------------------------------------
+Mon Feb 20 18:47:44 CET 2006 - sh@suse.de
+
+- V 2.13.17
+- Added pattern categories
+- Patterns now use their sort order field 
+
+-------------------------------------------------------------------
+Fri Feb 17 18:56:08 CET 2006 - sh@suse.de
+
+- Added pattern icons to pattern selector 
+
+-------------------------------------------------------------------
+Fri Feb 17 16:06:21 CET 2006 - sh@suse.de
+
+- Don't install and distribute autodocs (#151370) 
+
+-------------------------------------------------------------------
+Thu Feb 16 17:57:28 CET 2006 - sh@suse.de
+
+- V 2.13.15
+
+- Use patterns in PatternSelector if there are any,
+  but fall back to selections if there are none
+  (and fall back to detailed selection if there are no selections,
+  either) 
+
+-------------------------------------------------------------------
+Thu Feb 16 17:31:41 CET 2006 - sh@suse.de
+
+- First real pattern filter view 
+
+-------------------------------------------------------------------
+Wed Feb 15 19:08:14 CET 2006 - sh@suse.de
+
+- V 2.13.14
+
+- Fixed package description formatting 
+
+- Migrated "automatic changes" dialog in PkgSel to ZYPP
+
+- Workaround for incomplete selections packages handling
+
+- Migrated pkg description popup (for hyperlinks) in PkgSel to ZYPP
+
+
+-------------------------------------------------------------------
+Tue Feb 14 19:14:42 CET 2006 - sh@suse.de
+
+Package selector changes:
+
+- Display selections filter view only if there are any selections
+
+- Display packages that belong to a selection in selections filter
+
+- Propagate selection status change to corresponding packages
+
+- Display separate columns for installed and available package only
+  if there are any installed packages
+
+- "Technical Details" view now (almost) complete
+
+-------------------------------------------------------------------
+Tue Feb 14 11:25:02 CET 2006 - sh@suse.de
+
+- Applied mfabian's fix for bug #132577: SuSE Serif Italic font 
+
+-------------------------------------------------------------------
+Fri Feb 10 20:26:15 CET 2006 - sh@suse.de
+
+- V 2.13.13
+- "Installation summary" filter view ported to ZYPP
+- Re-enabled "Cancel" button (saveState / restoreState) in PkgSel
+- Code cleanup 
+
+-------------------------------------------------------------------
+Wed Feb  8 21:46:53 CET 2006 - sh@suse.de
+
+- ZYPP resolver integrated and working
+- "Search" view working in package selector
+- V 2.13.12 
+
+-------------------------------------------------------------------
+Wed Feb  8 16:19:11 CET 2006 - kkaempf@suse.de
+
+- Initial libzypp integration
+- V 2.13.11
+
+-------------------------------------------------------------------
+Fri Feb  3 11:11:09 CET 2006 - visnov@suse.cz
+
+- Temporary fix for build
+- V 2.13.10 
+
+-------------------------------------------------------------------
+Thu Feb  2 14:02:54 CET 2006 - sh@suse.de
+
+- Fixed bug #145189 (untranslated text): Added "Textdomain" 
+
+-------------------------------------------------------------------
+Tue Jan 31 11:20:19 CET 2006 - sh@suse.de
+
+- Fixed extra qualification 
+- V 2.13.9
+
+-------------------------------------------------------------------
+Mon Jan 30 19:12:41 CET 2006 - sh@suse.de
+
+- V 2.13.8
+- Implemented YQPatternSelector (feature #129) 
+
+-------------------------------------------------------------------
+Thu Jan 12 17:08:21 CET 2006 - sh@suse.de
+
+- V 2.13.7
+- Now starting xterm in background upon Ctrl-Alt-Shift-X
+
+-------------------------------------------------------------------
+Wed Jan  4 19:24:05 CET 2006 - sh@suse.de
+
+- V 2.13.5 
+- Implemented feature #3476: Left-handed mouse during installation
+
+  now asking the user if he wants his mouse buttons switched
+  if he clicks the right mouse button on a push button or in a
+  selection box
+
+-------------------------------------------------------------------
+Wed Jan  4 17:33:25 CET 2006 - sh@suse.de
+
+- Open xterm upon Ctrl-Shift-Alt-X hotkey (for debugging in inst-sys)
+
+-------------------------------------------------------------------
+Tue Dec 20 17:08:25 CET 2005 - sh@suse.de
+
+- V 2.13.4
+- Fixed bug #114193: YQComboBox doesn't send valueChanged event 
+
+-------------------------------------------------------------------
+Fri Nov 18 16:09:44 CET 2005 - sh@suse.de
+
+- V 2.13.3
+- Added new secondary filter view "summary" to inst src filter view 
+
+-------------------------------------------------------------------
+Thu Nov 17 17:57:40 CET 2005 - sh@suse.de
+
+- V 2.13.2
+- Added secondary filter views to installation sources filter view:
+  - All Packages
+  - RPM groups
+  - Search
+   
+
+-------------------------------------------------------------------
+Wed Nov 16 14:57:56 CET 2005 - sh@suse.de
+
+- V 2.13.2
+- New filter view in package selector: installation sources
+
+-------------------------------------------------------------------
+Tue Oct 25 11:40:55 CEST 2005 - sh@suse.de
+
+- V 2.13.1
+- Merged aj's patch to fix stricter gcc4 warnings 
+
+-------------------------------------------------------------------
+Fri Sep  9 16:43:24 CEST 2005 - sh@suse.de
+
+- Fixed bug #114072: custom package selection lost
+  No longer offering the user to delete his base selection in
+  dependency problem dialog if he set a selection to "taboo"
+  the base selection depends upon
+- V 2.12.12 
+
+-------------------------------------------------------------------
+Thu Aug 25 20:26:28 CEST 2005 - sh@suse.de
+
+- V 2.12.11 
+
+-------------------------------------------------------------------
+Thu Aug 25 17:26:04 CEST 2005 - mfabian@suse.de
+
+- Bugzilla #102978: Japanese TrueType fonts are not used in first
+  part of installation: fix typo in lang_conf.
+
+-------------------------------------------------------------------
+Thu Aug 18 18:09:47 CEST 2005 - sh@suse.de
+
+- V 2.12.10
+- Now using llunak's updated qxembed.{cc,h} to fix bug #46495:
+  Keyboard focus problems with YaST2 embedded into KControl 
+
+-------------------------------------------------------------------
+Thu Jul 21 13:54:11 CEST 2005 - sh@suse.de
+
+- Now using `opt(`hvstretch) to restore old YQWizard layout behaviour
+  (centering content by default)
+- V 2.12.9 
+
+-------------------------------------------------------------------
+Wed Jul 20 15:30:48 CEST 2005 - sh@suse.de
+
+- Prevent segfault if there is no steps heading in the side panel
+- V 2.12.8
+
+-------------------------------------------------------------------
+Wed Jul 20 10:46:59 CEST 2005 - jsrain@suse.cz
+
+- added libxml2(-devel) to neededforbuild
+- 2.12.7
+
+-------------------------------------------------------------------
+Mon Jul 18 17:12:41 CEST 2005 - sh@suse.de
+
+- Removed @plugindir@/libpy2qt.la from file list in .spec file
+  (and removing it after "make install")
+
+-------------------------------------------------------------------
+Mon Jul 18 14:42:19 CEST 2005 - sh@suse.de
+
+- Enable font switching upon UI::SetLanguage()
+- V 2.12.6
+
+-------------------------------------------------------------------
+Tue Jul  5 17:35:18 CEST 2005 - sh@suse.de
+
+- Added support for background pixmaps in YQAlignment
+- V 2.12.5 
+
+-------------------------------------------------------------------
+Tue Jul  5 11:31:55 CEST 2005 - sh@suse.de
+
+- Fixed alignment in YQDumbTab to properly promote stretchability
+- V 2.12.4 
+
+-------------------------------------------------------------------
+Wed Jun 29 16:51:15 CEST 2005 - sh@suse.de
+
+- Support for `opt(`boldFont) for some widgets:
+  - Label
+  - ColoredLabel
+  - CheckBox
+  - RadioButton 
+
+-------------------------------------------------------------------
+Tue Jun  7 17:10:13 CEST 2005 - sh@suse.de
+
+- Reverted wizard button order
+  (postponed until changes can be done consistently)
+- V 2.12.3 
+
+-------------------------------------------------------------------
+Wed Apr 27 19:00:19 CEST 2005 - sh@suse.de
+
+- Added support for icons in selection box widget 
+
+-------------------------------------------------------------------
+Thu Apr 21 16:50:01 CEST 2005 - sh@suse.de
+
+- Merged selection_widget_cleanups branch to trunk:
+  selection widgets can now replace list items
+  (SelectionBox, ComboBox, MultiSelectionBox, Tree) 
+
+-------------------------------------------------------------------
+Wed Apr  6 18:44:24 CEST 2005 - visnov@suse.cz
+
+- gcc4 fixes (missing include and forward declaration fix)
+- V 2.12.2 
+
+-------------------------------------------------------------------
+Tue Apr  5 14:38:04 CEST 2005 - sh@suse.de
+
+- Merged 9.3-branch 21937:22910 to to trunk
+- V 2.12.1
+
+-------------------------------------------------------------------
+Tue Mar 22 18:54:04 CET 2005 - sh@suse.de
+
+- Reverting back to old (SL 9.2) auto font sizes for bug #66498
+  (Qt inst-sys default font is reverted to 9.2 font, too)
+- V 2.11.13 
+
+-------------------------------------------------------------------
+Mon Mar 21 16:24:09 CET 2005 - sh@suse.de
+
+- One more fix for bug #72799: Help/Steps buttons not translated
+- V 2.11.12
+
+-------------------------------------------------------------------
+Wed Mar 16 18:30:09 CET 2005 - sh@suse.de
+
+- Fixed bug #72799: Help/Steps buttons not translated
+  Added setTextdomain() call to YQWizard
+- V 2.11.11 
+
+-------------------------------------------------------------------
+Fri Mar 11 18:11:03 CET 2005 - sh@suse.de
+
+- V 2.11.10
+- Fixed bug #72174: Installation font too small in 800x600 and 1024x768 
+
+-------------------------------------------------------------------
+Fri Mar 11 13:22:52 CET 2005 - sh@suse.de
+
+- Fixed bug #72158: File selection box on screen shots
+- V 2.11.9 
+
+-------------------------------------------------------------------
+Fri Mar  4 12:57:32 CET 2005 - sh@suse.de
+
+- Increased calculated font sizes in inst-sys to compensate
+  for new (much smaller) default font
+- Fixed bug #6649: Japanese, Chinese, Korean chars clipped
+- V 2.11.8 
+
+-------------------------------------------------------------------
+Wed Feb 23 14:59:49 CET 2005 - sh@suse.de
+
+- Fallback rule for reverse layout for Arabic and Hebrew
+  even if no translations for predefined Qt dialogs are available 
+
+-------------------------------------------------------------------
+Wed Feb 16 16:03:13 CET 2005 - sh@suse.de
+
+- Package selector: Keep width of left pane minimal 
+
+-------------------------------------------------------------------
+Mon Feb 14 18:43:11 CET 2005 - sh@suse.de
+
+- V 2.11.7
+- Fixed bug #50468: Segfault if querying current item in empty
+  MultiSelectionBox while recording macro 
+
+-------------------------------------------------------------------
+Fri Feb  4 19:01:54 CET 2005 - sh@suse.de
+
+- Fixed full-size dialog size for multihead
+
+-------------------------------------------------------------------
+Thu Feb  3 18:27:43 CET 2005 - sh@suse.de
+
+- Added empty space below wizard side panel upon explicit request
+- V 2.11.6
+
+-------------------------------------------------------------------
+Mon Jan 31 17:09:00 CET 2005 - sh@suse.de
+
+- V 2.11.5
+- Added "Release Notes" button + functions to YQWizard 
+
+-------------------------------------------------------------------
+Mon Jan 24 16:59:35 CET 2005 - sh@suse.de
+
+- Minor usability changes in wizard layout
+- Added "add -debuginfo packages" menu action in pkg manager 
+
+-------------------------------------------------------------------
+Wed Dec  8 17:04:21 CET 2004 - sh@suse.de
+
+- Added hotkey to switch to a special high-contrast color
+  palette for vision impaired users: Shift-F4 
+
+-------------------------------------------------------------------
+Wed Nov 17 13:53:29 CET 2004 - sh@suse.de
+
+- Improved YQWizard debugLabel() readability 
+- V 2.11.3 
+
+-------------------------------------------------------------------
+Fri Nov  5 17:41:40 CET 2004 - sh@suse.de
+
+- Changed save_y2logs key from plain F8 to Shift-F8 
+
+-------------------------------------------------------------------
+Thu Nov  4 19:13:47 CET 2004 - sh@suse.de
+
+- Added F8 hotkey to save y2logs 
+- V 2.11.2
+
+-------------------------------------------------------------------
+Tue Nov  2 14:05:39 CET 2004 - nashif@suse.de
+
+- Added new special widgets: YDate / YTime 
+
+-------------------------------------------------------------------
+Thu Oct 28 19:38:43 CEST 2004 - sh@suse.de
+
+- Fixed bug #46805: Error handling for TextEntry and ComboBox
+  with restricted ValidChars 
+
+-------------------------------------------------------------------
+Thu Oct 28 15:42:46 CEST 2004 - sh@suse.de
+
+- Fixed bug #43389: Tristate checkbox doesn't send events properly 
+
+-------------------------------------------------------------------
+Thu Oct 28 13:48:21 CEST 2004 - sh@suse.de
+
+- Fixed bug #43410: Timer signals close screen shot file selector 
+
+-------------------------------------------------------------------
+Mon Oct 25 17:04:43 CEST 2004 - sh@suse.de
+
+- Bumped version to 2.11.0 for 9.3 
+
+-------------------------------------------------------------------
+Wed Oct  6 16:47:30 CEST 2004 - sh@suse.de
+
+- Dropped support for hardcoded images "suseheader" and "yast2"
+  Use path names and/or the wizard instead! 
+
+-------------------------------------------------------------------
+Fri Oct  1 13:46:37 CEST 2004 - sh@suse.de
+
+- Fixed bug #46598: YOU layout broken with 800x600 default size
+  Now using 0.7*screen_size as default size
+- V 2.10.12 
+
+-------------------------------------------------------------------
+Wed Sep 29 17:03:54 CEST 2004 - sh@suse.de
+
+- V 2.10.11
+- Fixed bug #45111: Use arrow with clock as busy cursor 
+
+-------------------------------------------------------------------
+Mon Sep 27 16:14:49 CEST 2004 - sh@suse.de
+
+- V 2.10.10
+- (abauer) fixed bug #44926: Xinerama full screen handling
+- (mfabian) fixed unicode fonts
+
+-------------------------------------------------------------------
+Fri Sep 24 17:10:48 CEST 2004 - sh@suse.de
+
+- V 2.10.9
+- Fixed bug #45772: software manager segfaults
+  Now catching WM_CLOSE events only for dialogs managed by the UI 
+
+-------------------------------------------------------------------
+Fri Sep 24 15:51:50 CEST 2004 - sh@suse.de
+
+- V 2.10.8
+- Fixed bug #46047: Table columns always too wide in Qt package selection 
+
+-------------------------------------------------------------------
+Wed Sep 22 16:35:06 CEST 2004 - sh@suse.de
+
+- Changed yast2-devel-packages to yast2-core-devel-packages 
+  in neededforbuild
+
+-------------------------------------------------------------------
+Wed Sep 15 17:23:25 CEST 2004 - sh@suse.de
+
+- V 2.10.7
+- Added support for ProgressBar with huge numbers (long long)
+- Exchanged Unicode font (mfabian) 
+
+-------------------------------------------------------------------
+Fri Sep 10 15:07:28 CEST 2004 - sh@suse.de
+
+- V 2.10.6 
+- Fixes for right-to-left languages (Arabic/Hebrew)
+
+-------------------------------------------------------------------
+Mon Sep  6 11:49:01 CEST 2004 - sh@suse.de
+
+- V 2.10.5
+- Applied patch for bug #44145: Package EULA 
+
+-------------------------------------------------------------------
+Fri Sep  3 15:10:58 CEST 2004 - sh@suse.de
+
+- V 2.10.4
+- Fixed bug #44331: Sysconfig editor unusable from kcontrol 
+
+-------------------------------------------------------------------
+Wed Sep  1 18:23:27 CEST 2004 - sh@suse.de
+
+- V 2.10.3
+- Fixed bug #44579: YMultiProgressBar integer overflow 
+
+-------------------------------------------------------------------
+Thu Aug 26 18:05:06 CEST 2004 - sh@suse.de
+
+- V 2.10.2
+- Removed obsolete /usr/include/y2qt/ directory from files list 
+
+-------------------------------------------------------------------
+Mon Aug 23 16:03:28 CEST 2004 - sh@suse.de
+
+- V 2.10.1
+- New widget: MultiProgressMeter
+
+-------------------------------------------------------------------
+Thu Jul  8 11:29:51 CEST 2004 - sh@suse.de
+
+- Fixed bug #42846: Installing unneeded header files
+
+-------------------------------------------------------------------
+Tue Jul  6 16:44:00 CEST 2004 - sh@suse.de
+
+- Added "Install all matching -devel packages" to pkg selection
+  (mmj's idea) 
+
+-------------------------------------------------------------------
+Tue Jun 29 13:22:58 CEST 2004 - sh@suse.de
+
+- Fixed bug #39227: Over-long pkg status column after pkg search
+  with no results
+
+-------------------------------------------------------------------
+Mon Jun 28 18:02:48 CEST 2004 - sh@suse.de
+
+- Fixed bug #10524: Textentry label overflow 
+
+-------------------------------------------------------------------
+Mon Jun 28 17:29:44 CEST 2004 - sh@suse.de
+
+- Fixed bug #40259: package selection hides search widgets 
+  now using a combo box instead of radio buttons
+
+-------------------------------------------------------------------
+Wed May 26 18:30:28 CEST 2004 - sh@suse.de
+
+- Improved support for low-color (<= 8 bit) displays (bug #40228):
+  Only use complex wizard pixmaps in high color modes 
+
+-------------------------------------------------------------------
+Wed May 12 16:47:32 CEST 2004 - sh@suse.de
+
+- Workaround for bug #35612: Layout problems with 800x600
+  Now using smaller fonts in 600x600: 12/14 instead of 14/16
+
+-------------------------------------------------------------------
+Thu May  6 16:44:10 CEST 2004 - sh@suse.de
+
+- Fixed bug #40071: Obsolete doc about making screen shots
+
+-------------------------------------------------------------------
+Tue May  4 19:07:41 CEST 2004 - sh@suse.de
+
+- Fixed bug #39846: Strange button layout after RestoreBackButton()
+- Fixed bug #39692: Wizard tree and menu item IDs returned in wrong encoding
+- V 2.9.24
+
+-------------------------------------------------------------------
+Tue May  4 16:10:22 CEST 2004 - gs@suse.de
+
+- messages from proof reading merged back 
+
+-------------------------------------------------------------------
+Fri Apr 30 13:48:01 CEST 2004 - sh@suse.de
+
+- Added new DumbTab widget
+- V 2.9.23 
+
+-------------------------------------------------------------------
+Tue Apr 20 14:21:14 CEST 2004 - mvidner@suse.cz
+
+- link against libyui to make loading from Perl work (#39192)
+- 2.9.22
+
+-------------------------------------------------------------------
+Wed Apr  7 16:00:09 CEST 2004 - sh@suse.de
+
+- V 2.9.21
+- Fixed bug #38603: Excessive wizard headings make buttons disappear
+
+-------------------------------------------------------------------
+Tue Apr  6 16:10:39 CEST 2004 - sh@suse.de
+
+- V 2.9.20
+- Fixed bug #36908: Dynamic font sizes during installation
+- Fixed bug #37001: Dynamic default window size based on resolution 
+
+-------------------------------------------------------------------
+Tue Apr  6 12:23:30 CEST 2004 - sh@suse.de
+
+- V 2.9.19
+- Fixed bug #38216: No shortcut check upon Wizard::Set???Button()
+
+-------------------------------------------------------------------
+Mon Apr  5 18:41:36 CEST 2004 - sh@suse.de
+
+- V 2.9.18
+- Honor environment variable KCMYAST2_CALL for KControl embedding
+  (no wizard decorations, suppress wizard help) 
+
+-------------------------------------------------------------------
+Sun Apr  4 22:19:57 CEST 2004 - adrian@suse.de
+
+- the old (bad) qxembed solution is back .. :/
+
+-------------------------------------------------------------------
+Fri Apr  2 16:24:00 CEST 2004 - sh@suse.de
+
+- License change to GPL
+
+-------------------------------------------------------------------
+Thu Apr  1 15:35:48 CEST 2004 - sh@suse.de
+
+- V 2.9.16
+- Small fixes for wizard menus + trees
+  patch verified by cschum 
+
+-------------------------------------------------------------------
+Wed Mar 31 16:20:37 CEST 2004 - sh@suse.de
+
+- Fixed bug #37581: Inconsistent widgets in yast2 modules:
+  Added wizard menus and trees
+
+-------------------------------------------------------------------
+Wed Mar 31 14:19:50 CEST 2004 - sh@suse.de
+
+- Implemented YQWizard::currentTreeSelection() for QueryWidget()
+
+-------------------------------------------------------------------
+Wed Mar 31 13:59:51 CEST 2004 - cschum@suse.de
+
+- Do UTF8 conversion for patch kind tooltips (#37584).
+
+-------------------------------------------------------------------
+Tue Mar 30 20:29:21 CEST 2004 - sh@suse.de
+
+- Added tree to wizard side panel (for autoyast, sysconfig-editor)
+
+-------------------------------------------------------------------
+Mon Mar 22 17:07:52 CET 2004 - sh@suse.de
+
+- Fixed bug #36218: Use YaST icons for YaST windows WM decorations
+
+-------------------------------------------------------------------
+Mon Mar 22 16:46:18 CET 2004 - sh@suse.de
+
+- Fixed bug #35625: Wizard button order
+  Restored old button order 
+
+-------------------------------------------------------------------
+Wed Mar 17 15:07:36 CET 2004 - sh@suse.de
+
+- Fixed bug #35645: Wizard layout looks strange
+  added HVCenter() around ReplacePoint()
+
+-------------------------------------------------------------------
+Wed Mar 17 00:35:10 CET 2004 - nashif@suse.de
+
+- #if 0 not working hasSmallDecorations completely
+
+-------------------------------------------------------------------
+Tue Mar 16 18:05:46 CET 2004 - sh@suse.de
+
+- Minimal approach fix for bug #33584: Show license agreements
+- V 2.9.12 
+
+-------------------------------------------------------------------
+Fri Mar 12 23:25:48 CET 2004 - sh@suse.de
+
+- Enabled shortcut checking for wizard buttons
+- Integrated wizard buttons in YQDialog default button handling
+- Adapted to const ref fix in libyui for all widget constructors 
+- V 2.9.11
+
+-------------------------------------------------------------------
+Thu Mar 11 18:53:02 CET 2004 - sh@suse.de
+
+- Fixed bug #35611: &product; macro not expanded
+- Fixed bug #35623: Allow status "protected" for YOU patches
+
+-------------------------------------------------------------------
+Wed Mar 10 15:55:04 CET 2004 - lnussel@suse.de
+
+- New conflict resolution remove referers (#24306) 
+- V 2.9.10
+
+-------------------------------------------------------------------
+Wed Mar 10 01:45:27 CET 2004 - sh@suse.de
+
+- New wizard 
+- V 2.9.9
+
+-------------------------------------------------------------------
+Thu Mar  4 19:10:51 CET 2004 - sh@suse.de
+
+- Fixed bug #34909: Pkg Mgr "auto-changed pkgs" too large for screen 
+
+-------------------------------------------------------------------
+Mon Mar  1 18:39:22 CET 2004 - sh@suse.de
+
+- Save screen shot name if recording macro 
+
+-------------------------------------------------------------------
+Sat Feb 28 14:16:49 CET 2004 - sh@suse.de
+
+- V 2.9.5
+- more fixes for improved GUI
+
+-------------------------------------------------------------------
+Tue Feb 10 20:36:34 CET 2004 - arvin@suse.de
+
+- include YQWizard.h in tar-ball
+
+-------------------------------------------------------------------
+Tue Feb 10 18:45:36 CET 2004 - sh@suse.de
+
+- V 2.9.3
+- Merged wizard-widget-branch to HEAD with NI
+- Misc small fixes
+
+-------------------------------------------------------------------
+Wed Feb  4 17:42:03 CET 2004 - sh@suse.de
+
+- V 2.9.2
+- New embedding: No more QXEmbed, now via KPart (external program)
+
+-------------------------------------------------------------------
+Thu Jan 29 19:49:03 CET 2004 - sh@suse.de
+
+- Fixed Y2Component handling
+
+-------------------------------------------------------------------
+Tue Jan 27 18:05:43 CET 2004 - sh@suse.de
+
+- V 2.9.1
+- Adapted to new interpreter (visnov@suse.cz)
+- Adapted to new libyui naming scheme
+- Consistent naming scheme
+
+-------------------------------------------------------------------
+Fri Nov 14 11:30:35 CET 2003 - mvidner@suse.cz
+
+- adapted to doxygen
+
+-------------------------------------------------------------------
+Tue Oct 21 16:03:20 CEST 2003 - sh@suse.de
+
+- Fixed bug #32510: Excess initial SelBox SelectionChanged event
+
+-------------------------------------------------------------------
+Fri Oct 10 12:24:00 CEST 2003 - sh@suse.de
+
+- V 2.9.0
+
+- Applied cschum's fix for bug #31965:
+  Wrong encoding in YOU "display raw package info" dialog
+
+-------------------------------------------------------------------
+Fri Sep 19 17:19:13 CEST 2003 - sh@suse.de
+
+- V 2.8.15
+
+- Applied visnov's patch to fix bug #5547: IntField value
+
+- Fixed bug #31015 thanks to llunak: "Solving dependencies"
+  popup without WM decoreations
+
+-------------------------------------------------------------------
+Wed Sep 17 17:59:15 CEST 2003 - sh@suse.de
+
+- V 2.8.14
+
+-------------------------------------------------------------------
+Wed Sep 17 15:31:22 CEST 2003 - sh@suse.de
+
+- Fixed bug #30236: Bad fullscreen geometry for some window managers
+
+-------------------------------------------------------------------
+Wed Sep 17 14:55:35 CEST 2003 - sh@suse.de
+
+- Fixed bug #31155: Busy cursor in disk space warning dialog
+
+-------------------------------------------------------------------
+Wed Sep 17 13:44:04 CEST 2003 - sh@suse.de
+
+- Fixed bug #30513: Some PkgMgr popup dialogs too large in 640x480
+
+-------------------------------------------------------------------
+Wed Sep 17 12:37:02 CEST 2003 - sh@suse.de
+
+- Fixed bug #31047: File selection dialog untranslated
+
+-------------------------------------------------------------------
+Mon Sep 15 16:15:20 CEST 2003 - sh@suse.de
+
+- V 2.8.13
+- Better fix for bug #30500 by jw@suse.de
+
+-------------------------------------------------------------------
+Fri Sep 12 16:51:37 CEST 2003 - sh@suse.de
+
+- V 2.8.12
+- Interim fix for bug #30500
+
+-------------------------------------------------------------------
+Mon Sep  8 15:43:54 CEST 2003 - sh@suse.de
+
+- V 2.8.11
+- Fixed bug #26494: Keyboard focus when embedded into KControl:
+  Reimported the latest version of QXEmbed
+
+-------------------------------------------------------------------
+Fri Sep  5 17:01:14 CEST 2003 - sh@suse.de
+
+- V 2.8.10
+- Fixed bug #30151: Enable starting pkg mgr in search mode
+  by default in installed system
+
+-------------------------------------------------------------------
+Thu Sep  4 17:14:49 CEST 2003 - sh@suse.de
+
+- V 2.8.9
+- Fixed bug #29529: Package links (again):
+  Discard trailing slashes in URL
+
+-------------------------------------------------------------------
+Tue Sep  2 13:39:42 CEST 2003 - sh@suse.de
+
+- Fixed bug #23660: RichText widget eats [Return]
+
+-------------------------------------------------------------------
+Mon Sep  1 18:15:45 CEST 2003 - sh@suse.de
+
+- Fixed bug #27336: Combo box for YOU patch selection
+- Fixed bug #27437: Display YOU pre/post scripts / extra files
+
+-------------------------------------------------------------------
+Mon Sep  1 16:34:42 CEST 2003 - sh@suse.de
+
+- V 2.8.8
+- Fixed bug #29529: Package links
+
+-------------------------------------------------------------------
+Fri Aug 29 13:12:22 CEST 2003 - sh@suse.de
+
+- V 2.8.7
+- Fixed bug #29603 - fonts.dir should have %verify in .spec file
+
+-------------------------------------------------------------------
+Wed Aug 27 12:20:32 CEST 2003 - sh@suse.de
+
+- V 2.8.6
+- Removed qApp->unlock() at end of YUIQt constructor:
+  No more QMutex warning in log
+
+-------------------------------------------------------------------
+Tue Aug 12 15:02:25 CEST 2003 - gs@suse.de
+
+- V 2.8.5
+- merge texts from proofread
+
+-------------------------------------------------------------------
+Tue Jul 15 17:24:50 CEST 2003 - sh@suse.de
+
+- V 2.8.4
+- Lots of internal reworking
+- Completely reworked event handling
+- No more self-generated events during widget creation / ChangeWidget
+- Basic support for right-to-left languages like Arabic / Hebrew
+  (not perfect yet)
+
+-------------------------------------------------------------------
+Tue Jun 10 15:30:13 CEST 2003 - sh@suse.de
+
+- V 2.8.3
+- Don't build obsolete standalone server component "qt" any more
+- Don't install header files: they are not packaged anyway
+
+-------------------------------------------------------------------
+Wed Jun  4 11:25:52 CEST 2003 - sh@suse.de
+
+- V 2.8.2
+- Fixed yet another ambituous overload due to changed Qt lib
+
+-------------------------------------------------------------------
+Fri May 23 11:59:39 CEST 2003 - sh@suse.de
+
+- Fixed build problems due to new Qt lib (ambiguous overload)
+- V 2.8.1
+
+-------------------------------------------------------------------
+Thu Apr 10 15:29:01 CEST 2003 - sh@suse.de
+
+- Fixed bug #25419: Qt PkgMgr shows correct version downgrades red
+
+-------------------------------------------------------------------
+Tue Apr  8 13:39:02 CEST 2003 - sh@suse.de
+
+- Fixed bug #26155: Hiding YOU patches marked for update
+
+-------------------------------------------------------------------
+Wed Mar 12 18:39:26 CET 2003 - sh@suse.de
+
+- Don't force *.sel extension for pkg lists
+
+-------------------------------------------------------------------
+Wed Mar 12 18:16:25 CET 2003 - sh@suse.de
+
+- Enable mounting floppy for pkg list import / export
+
+-------------------------------------------------------------------
+Mon Mar 10 18:57:03 CET 2003 - sh@suse.de
+
+- Fixed bug #25011: Force dependency check on startup in PkgMgr
+
+-------------------------------------------------------------------
+Mon Mar 10 17:37:33 CET 2003 - sh@suse.de
+
+- Update disk usage in PkgMgr after selection dependency solving
+
+-------------------------------------------------------------------
+Mon Mar 10 15:47:59 CET 2003 - sh@suse.de
+
+- V 2.7.15
+- Fixed bug #24981: Can't search for non-ASCII chars in Qt PkgMgr
+
+-------------------------------------------------------------------
+Thu Mar  6 17:49:30 CET 2003 - sh@suse.de
+
+- Fixed bug #24615: "checking dependencies" popup not centered
+
+-------------------------------------------------------------------
+Wed Mar  5 21:47:35 CET 2003 - sh@suse.de
+
+- Fixed bug #24707: QListView tooltips only on right scroll bar
+
+-------------------------------------------------------------------
+Fri Feb 28 17:23:38 CET 2003 - sh@suse.de
+
+- V 2.7.14
+
+-------------------------------------------------------------------
+Fri Feb 28 16:41:20 CET 2003 - sh@suse.de
+
+- Fixed bug #22513 - language selection loses some key events
+
+-------------------------------------------------------------------
+Fri Feb 28 15:27:58 CET 2003 - sh@suse.de
+
+- Use new 'floppyDevice' parameter for PackageSelector
+
+-------------------------------------------------------------------
+Fri Feb 28 12:34:31 CET 2003 - sh@suse.de
+
+- Fixed bug #24388: YQFrame repaint one pixel off in both dimensions
+
+-------------------------------------------------------------------
+Thu Feb 27 18:03:03 CET 2003 - sh@suse.de
+
+- Fixed bug #24445: Missing status update when importing pkg list
+
+-------------------------------------------------------------------
+Thu Feb 27 17:29:29 CET 2003 - sh@suse.de
+
+- Fixed bug #23368: kcontrol embedding fails if first dialog is a popup
+
+-------------------------------------------------------------------
+Wed Feb 26 19:26:29 CET 2003 - sh@suse.de
+
+-  Fixed bug #23574: "Checking dependencies" popup
+
+-------------------------------------------------------------------
+Wed Feb 26 14:48:55 CET 2003 - sh@suse.de
+
+- Fixed bug #24274: Wrong disk initial usage display
+
+-------------------------------------------------------------------
+Tue Feb 25 17:32:45 CET 2003 - sh@suse.de
+
+- Workaround for bug #24088: Leftover busy cursor in root window
+
+-------------------------------------------------------------------
+Tue Feb 25 16:28:13 CET 2003 - sh@suse.de
+
+- Fixed bug #24255: Multiple search in yast2-qt package
+
+-------------------------------------------------------------------
+Tue Feb 25 14:50:18 CET 2003 - sh@suse.de
+
+- Fixed wrong tool tip "this version is installed in your system"
+  (for all versions) in package manager "versions" view
+
+-------------------------------------------------------------------
+Tue Feb 25 14:35:11 CET 2003 - sh@suse.de
+
+- Fixed bug #23855: Asking for loading Modules does not have focus
+
+-------------------------------------------------------------------
+Mon Feb 24 17:35:40 CET 2003 - sh@suse.de
+
+- V 2.7.13
+- Fixed bug #23923: Can't save package selection
+
+-------------------------------------------------------------------
+Thu Feb 20 17:58:39 CET 2003 - sh@suse.de
+
+- Fixed bug #23868: Handle preformatted notify texts
+
+-------------------------------------------------------------------
+Thu Feb 20 17:14:07 CET 2003 - sh@suse.de
+
+- "Obsolete" dependency conflicts cannot be ignored
+  (RPM always deletes the obsoleted package)
+
+-------------------------------------------------------------------
+Thu Feb 20 16:38:11 CET 2003 - sh@suse.de
+
+- Fixed bug #23914: Package manager crashes when opening "package"
+  menu and package list is empty (e.g., empty search result)
+
+-------------------------------------------------------------------
+Wed Feb 19 16:18:06 CET 2003 - sh@suse.de
+
+- Fixed bug #23755: Busy cursor in file selection dialogs
+
+-------------------------------------------------------------------
+Wed Feb 19 14:58:39 CET 2003 - sh@suse.de
+
+- Fixed bug #23654: Window partially invisible
+
+-------------------------------------------------------------------
+Wed Feb 19 11:52:39 CET 2003 - sh@suse.de
+
+- Fixed bug #23770: Always show automatically selected pkgs, even
+  during base installation
+
+-------------------------------------------------------------------
+Tue Feb 18 11:47:27 CET 2003 - sh@suse.de
+
+- New "protected" icons by Ken
+
+-------------------------------------------------------------------
+Mon Feb 17 17:45:11 CET 2003 - sh@suse.de
+
+- V 2.7.12
+- Fixed broken "protected" actions
+- Fixed preliminary "protected" icons
+
+-------------------------------------------------------------------
+Fri Feb 14 15:40:11 CET 2003 - sh@suse.de
+
+- V 2.7.11
+- Fixed bug #23577: Popups can be clicked into the background
+
+-------------------------------------------------------------------
+Fri Feb 14 12:33:35 CET 2003 - sh@suse.de
+
+- Fixed bug #23650: Confusion about "Export List to Text File":
+  Moved this function from "Extras" menu to package list context
+  menu
+
+- Disabled pkg status "protected" for selections / YOU patches
+
+-------------------------------------------------------------------
+Thu Feb 13 15:48:21 CET 2003 - sh@suse.de
+
+- Suppress "YaST2@linux" window title (bug #23584)
+
+-------------------------------------------------------------------
+Thu Feb 13 13:18:23 CET 2003 - sh@suse.de
+
+- Improved default button behaviour
+- Removed junk logging
+
+-------------------------------------------------------------------
+Mon Feb 10 17:23:28 CET 2003 - sh@suse.de
+
+- V 2.7.10
+- New package status "protected"
+
+-------------------------------------------------------------------
+Mon Feb 10 15:30:27 CET 2003 - sh@suse.de
+
+- V 2.7.9
+- Don't force Unicode font
+- Show different icons in package manager for autoinstall etc. by
+  selection and autoinstall etc. by dependencies
+
+-------------------------------------------------------------------
+Fri Jan 31 18:11:03 CET 2003 - sh@suse.de
+
+- V 2.7.8
+- Adapted to changed PkgDep::RelInfo API
+
+-------------------------------------------------------------------
+Wed Jan 29 17:11:07 CET 2003 - sh@suse.de
+
+- V 2.7.7
+- User messages back from proofreading
+- Show auto-packages on demand in package manager
+
+-------------------------------------------------------------------
+Mon Jan 27 17:10:32 CET 2003 - sh@suse.de
+
+- V 2.7.6
+- Added "rpm-devel" to "neededforbuild"
+- Support enabling/disabling for container widgets as well
+- Show "auto changes" popup in package manager
+
+- YOU mode package manager changes:
+  - Show total download size
+  - Dropped "Packages" menu (pkgs are read-only there)
+  - Added "YOU Patches" menu instead
+  - Addes "Show raw patch info" dialog
+
+-------------------------------------------------------------------
+Tue Jan 21 18:06:15 CET 2003 - sh@suse.de
+
+- V 2.7.5
+- Use textdomain "qt-packages" for all texts to avoid textdomain
+  name clashes
+- New command line options --fullscreen, --noborder
+- Fixed busy cursors
+
+-------------------------------------------------------------------
+Mon Jan 20 20:00:44 CET 2003 - sh@suse.de
+
+- Package manager enhancements:
+  - Enhanced feedback while checking dependencies
+  - Changed default to "off" for auto dependency check
+  - Save/load ignored dependency conflicts to/from
+    /var/adm/YaST/ignored-conflicts
+- Bumped version to 2.7.4
+
+-------------------------------------------------------------------
+Tue Jan 14 19:05:09 CET 2003 - sh@suse.de
+
+- Package manager enhancements:
+  - Added menu bar
+  - Added bubble help for all kinds of lists
+  - Rearranged pkg list columns (moved summary left)
+  - Re-enabled source RPM handling
+  - Added currently installed version to "versions" view
+    (non-editable)
+  - Status change actions for "all in current list"
+  - Show disk space for all available partitions
+  - Added "installation summary" filter view
+  - Dependency checking now for selections, too
+  - Added symbols help
+  - Added special keys help
+  - Auto check is now "off" by default
+- Bumped version to 2.7.3
+
+-------------------------------------------------------------------
+Tue Dec 03 16:37:31 CET 2002 - arvin@suse.de
+
+- added curl-devel and openssl-devel to neededforbuild
+
+-------------------------------------------------------------------
+Mon Nov 11 17:58:23 CET 2002 - sh@suse.de
+
+- Support for buttons with icons and text
+
+-------------------------------------------------------------------
+Fri Nov  8 16:18:33 CET 2002 - sh@suse.de
+
+- Fixed bug #20326: [Cancel] doesn't abandon changes in package mgr
+
+-------------------------------------------------------------------
+Thu Nov  7 20:04:33 CET 2002 - sh@suse.de
+
+- Fixed bug #16339: [Space] doesn't trigger UserInput() in YTable
+
+-------------------------------------------------------------------
+Thu Nov  7 19:46:18 CET 2002 - sh@suse.de
+
+- Fixed bug #20539: Screen shot function causes unnecessary exits
+- Fixed bug #8362:  File selection box for screen shots
+- Fixed possible security hole: Screen shots in /tmp by default
+
+-------------------------------------------------------------------
+Thu Nov  7 13:31:42 CET 2002 - sh@suse.de
+
+- Fixed bug #19389: Frame widget shows keyboard shortcuts, but
+  can't handle any
+
+-------------------------------------------------------------------
+Fri Sep 20 16:23:32 CEST 2002 - msvec@suse.cz
+
+- added missing textdomain
+- added missing files to POTFILES
+- 2.6.23
+
+-------------------------------------------------------------------
+Fri Sep 13 14:56:41 CEST 2002 - sh@suse.de
+
+- V 2.6.22
+- Disabled selecting source RPMs until it works further down
+
+-------------------------------------------------------------------
+Thu Sep 12 14:24:47 CEST 2002 - sh@suse.de
+
+- V 2.6.21
+- Show DelNotify popup even if pkg not installed yet
+- Fixed bug #19333: Can't get out of pkg dialog with "Accept"
+
+-------------------------------------------------------------------
+Wed Sep 11 17:48:32 CEST 2002 - sh@suse.de
+
+- Fixed bug #19419: Y2Pkg hangs on middle mouse click
+  This is really a Qt bug. Introduced workaround for that.
+
+-------------------------------------------------------------------
+Wed Sep 11 14:07:50 CEST 2002 - sh@suse.de
+
+- Fixed bug #19390: Sometimes no keyboard focus without a mouse
+
+-------------------------------------------------------------------
+Tue Sep 10 22:21:48 CEST 2002 - sh@suse.de
+
+- V 2.6.19
+
+-------------------------------------------------------------------
+Tue Sep 10 21:31:55 CEST 2002 - sh@suse.de
+
+- Fixed sort by source RPM status in pkg list
+
+-------------------------------------------------------------------
+Tue Sep 10 21:01:37 CEST 2002 - sh@suse.de
+
+- Change packager priorities: Prefer candidateObj over installedObj
+  so the user gets to see his native language more often in pkg
+  descriptions (RPM DB is English only)
+
+-------------------------------------------------------------------
+Tue Sep 10 20:06:11 CEST 2002 - sh@suse.de
+
+- V 2.6.18
+- New details view: Dependencies
+- Bugfix: No initial dependency check in YOU mode
+- Show patch sizes in YOU mode
+
+-------------------------------------------------------------------
+Tue Sep 10 18:55:25 CEST 2002 - sh@suse.de
+
+- V 2.6.17
+- Fixed 'Accept doesn't leave pkg selection' bug
+- New view for selecting different versions to install
+
+-------------------------------------------------------------------
+Mon Sep  9 20:01:22 CEST 2002 - sh@suse.de
+
+- V 2.6.16
+- Prepared disk usage display (still disabled for internal reasons)
+- Lots of small fixes
+
+-------------------------------------------------------------------
+Mon Sep  9 18:46:35 CEST 2002 - sh@suse.de
+
+- Fixed minimumSize() hints for YQPkg* - works now in 640x480
+- Special icon for delete pkg conflict (tackat)
+- Brighter colors for over-long conflict lists ("999 more...")
+
+-------------------------------------------------------------------
+Mon Sep  9 02:20:37 CEST 2002 - sh@suse.de
+
+- V 2.6.15
+
+Package manager changes:
+
+- Really ignore conflicts when user chooses so
+- Auto dependency check on startup
+- "Ignore All" button in dependency conflict dialog
+- Show InsNotify / DelNotify
+- Search for provides / requires
+- Search immediately upon [Return]
+- Show pkgs without any RPM group in "zzz All"
+- Ignore WM_CLOSE for package selection
+- Prepared translation stuff
+
+-------------------------------------------------------------------
+Fri Sep  6 17:13:10 CEST 2002 - sh@suse.de
+
+- V 2.6.14
+- Search view
+- Update problem list view
+- Misc minor stuff
+
+-------------------------------------------------------------------
+Thu Sep  5 21:04:18 CEST 2002 - sh@suse.de
+
+- V 2.6.13
+- Dependency resolving works - including conflicts
+
+-------------------------------------------------------------------
+Mon Sep  2 19:58:07 CEST 2002 - sh@suse.de
+
+- V 2.6.12
+- Fixed crash with inconsistent YOU data
+
+-------------------------------------------------------------------
+Mon Sep  2 18:55:01 CEST 2002 - sh@suse.de
+
+- V 2.6.11
+- Fixed confusing selection status handling
+
+-------------------------------------------------------------------
+Mon Sep  2 18:15:01 CEST 2002 - sh@suse.de
+
+- V 2.6.10
+- Generalized internal pkg classes
+- YOU UI now usable
+- colorized lists
+- context menus
+- lots of small stuff
+
+-------------------------------------------------------------------
+Tue Aug 27 19:15:23 CEST 2002 - sh@suse.de
+
+- V 2.6.9
+- Pkg selection now usable (no dependency checking/solving yet)
+
+-------------------------------------------------------------------
+Wed Aug 21 17:51:27 CEST 2002 - kkaempf@suse.de
+
+- fix "make dist"
+- V 2.6.8
+
+-------------------------------------------------------------------
+Mon Aug 19 19:03:14 CEST 2002 - sh@suse.de
+
+- V 2.6.7
+- New package management
+
+-------------------------------------------------------------------
+Fri Aug  9 18:51:05 CEST 2002 - sh@suse.de
+
+- V 2.6.6
+- Fixed table sorting with `opt(`keepSorting)
+
+-------------------------------------------------------------------
+Sat Aug 03 15:17:56 CEST 2002 - arvin@suse.de
+
+- write qt warnings to y2log (bug #17161)
+
+-------------------------------------------------------------------
+Mon Jul 15 18:21:50 CEST 2002 - arvin@suse.de
+
+- workaround for timing problem
+
+-------------------------------------------------------------------
+Mon Jul  8 16:54:24 CEST 2002 - mvidner@suse.cz
+
+- Provides/Obsoletes also the devel subpackage
+
+-------------------------------------------------------------------
+Wed Jul 03 12:26:33 CEST 2002 - msvec@suse.cz
+
+- devel sub-package not neeeded
+
+-------------------------------------------------------------------
+Mon Jun 24 13:40:16 CEST 2002 - arvin@suse.de
+
+- renamed from yast2-ui-qt to yast2-qt
+
+-------------------------------------------------------------------
+Thu Jun 06 14:55:22 CEST 2002 - arvin@suse.de
+
+- don't link -lstdc++ explicitly
+
+-------------------------------------------------------------------
+Fri May 24 17:24:23 CEST 2002 - arvin@suse.de
+
+- fixed locking so we can use multi threaded version of qt
+
+-------------------------------------------------------------------
+Mon Apr 08 17:19:43 CEST 2002 - arvin@suse.de
+
+- fixes for gcc 3.1
+
+-------------------------------------------------------------------
+Fri Mar 22 17:11:40 CET 2002 - kkaempf@suse.de
+
+- pass callback information from component stub to interpreter
+  (#15311).
+
+-------------------------------------------------------------------
+Mon Feb 25 18:18:36 CET 2002 - sh@suse.de
+
+- V 2.5.16
+- Applied Michal Svec's security patch
+
+-------------------------------------------------------------------
+Mon Feb 25 16:28:54 CET 2002 - sh@suse.de
+
+- V 2.5.15
+- Fixed wish #13876: Host name in window title bar
+
+-------------------------------------------------------------------
+Wed Feb 20 13:47:27 CET 2002 - sh@suse.de
+
+- V 2.5.14
+- Fixed bug #13604: Change fallback title image to new design
+
+-------------------------------------------------------------------
+Mon Feb 18 18:22:55 CET 2002 - sh@suse.de
+
+- V 2.5.13
+- Fixed bug #13131: SetFocus on a TextEntry should select its contents
+
+-------------------------------------------------------------------
+Thu Feb 14 12:19:19 CET 2002 - sh@suse.de
+
+- V 2.5.12
+- Fixed changed Qt-3 behaviour: Correct handling for tristate
+  checkbox
+
+-------------------------------------------------------------------
+Wed Feb 13 17:56:05 CET 2002 - sh@suse.de
+
+- V 2.5.11
+- Fixed ColoredLabel alignment: Left and vertically centered
+
+-------------------------------------------------------------------
+Fri Feb  8 17:06:46 CET 2002 - sh@suse.de
+
+- V 2.5.10
+- New YQImage constructor: Load images locally from within the UI
+- Support YQImage `opt(`tiled, `scaleToFit)
+- Load images in background pixmap
+
+-------------------------------------------------------------------
+Thu Feb  7 17:18:10 CET 2002 - sh@suse.de
+
+- V 2.5.9
+- Better check for YaST2 special keys (Ctrl-Shift-Alt)
+
+-------------------------------------------------------------------
+Fri Jan 25 17:48:15 CET 2002 - sh@suse.de
+
+- V 2.5.8
+- Added MNG support for Image widget
+
+-------------------------------------------------------------------
+Thu Jan 24 21:29:48 CET 2002 - sh@suse.de
+
+- V 2.5.6
+- New optional widget: ColoredLabel
+
+-------------------------------------------------------------------
+Tue Jan 22 18:33:52 CET 2002 - sh@suse.de
+
+- V 2.5.6
+- Support new `opt(`keepSorting) for YTable widget
+
+-------------------------------------------------------------------
+Tue Jan 22 17:39:10 CET 2002 - sh@suse.de
+
+- Show initial selection (first item)
+
+-------------------------------------------------------------------
+Tue Jan 22 16:42:26 CET 2002 - sh@suse.de
+
+- Fixed bug #12833: Arbitrary table sorting with Qt3
+
+-------------------------------------------------------------------
+Tue Jan  8 15:58:58 CET 2002 - sh@suse.de
+
+- V 2.5.5
+- Added qt3-non-mt to neededforbuild
+
+-------------------------------------------------------------------
+Fri Dec 14 15:12:52 CET 2001 - sh@suse.de
+
+- V 2.5.4
+- Ported to Qt 3.x
+
+-------------------------------------------------------------------
+Tue Dec 11 14:59:32 CET 2001 - sh@suse.de
+
+- V 2.5.3
+- Added hyperlink support to RichText widget
+
+-------------------------------------------------------------------
+Thu Nov 15 13:30:47 CET 2001 - sh@suse.de
+
+- V 2.5.2
+- added proper #include for tolower()
+
+-------------------------------------------------------------------
+Fri Nov  9 01:41:55 CET 2001 - ro@suse.de
+
+- use qt-devel-packages in neededforbuild
+
+-------------------------------------------------------------------
+Tue Nov  6 18:22:15 CET 2001 - sh@suse.de
+
+- V 2.5.1
+- Fixed YQPushButton for automatic shortcut check / resolving
+
+-------------------------------------------------------------------
+Thu Sep 27 17:38:26 CEST 2001 - sh@suse.de
+
+- Fixed bug #11350: WM close button closes win, but keeps app alive
+
+-------------------------------------------------------------------
+Mon Sep 24 17:42:42 CEST 2001 - sh@suse.de
+
+- Don't set root window cursor to busy cursor
+- V 2.4.17
+
+-------------------------------------------------------------------
+Fri Sep 21 18:16:34 CEST 2001 - sh@suse.de
+
+- Fixed bug #11073: busy cursor unreliable
+  The Qt UI now makes its own busy cursors rather than Qt's.
+- V 2.4.16
+
+-------------------------------------------------------------------
+Tue Sep 18 14:11:41 CEST 2001 - sh@suse.de
+
+- Fixed bug #8534: Spurious <b> </b> in SuSEconfig protocoll
+- V 2.4.15
+
+-------------------------------------------------------------------
+Mon Sep 17 18:33:09 CEST 2001 - sh@suse.de
+
+- Fixed bug #10754: Large popup windows partially invisible
+- V 2.4.14
+
+-------------------------------------------------------------------
+Fri Sep 14 15:28:34 CEST 2001 - sh@suse.de
+
+- Fixed bug #10614: Ikea mode triggered on Alt-W
+- Consistent default button handling even in selbox
+- V 2.4.13
+
+-------------------------------------------------------------------
+Wed Sep 12 16:42:19 CEST 2001 - sh@suse.de
+
+- Only one window for all `opt(`defaultsize) dialogs
+- Fixed bug #9915: Default button keyboard focus unreliable
+- V 2.4.12
+
+-------------------------------------------------------------------
+Thu Sep  6 18:22:38 CEST 2001 - sh@suse.de
+
+- V 2.4.11
+  Implemented new UI builtin: GetDisplayInfo()
+
+-------------------------------------------------------------------
+Wed Sep  5 11:50:12 CEST 2001 - sh@suse.de
+
+- V 2.4.10
+  All headers "ydoc" compliant - fixed build problems
+
+-------------------------------------------------------------------
+Tue Sep  4 18:29:18 CEST 2001 - sh@suse.de
+
+- V 2.4.9
+  improved focus handling - (possible) fix for bug #9915
+
+-------------------------------------------------------------------
+Wed Jul 11 15:31:05 CEST 2001 - sh@suse.de
+
+- V 2.4.8
+  added glyph support (for new UI builtin Glyph() )
+
+-------------------------------------------------------------------
+Sat Jul 07 16:48:47 CEST 2001 - arvin@suse.de
+
+- neededforbuild += freetype2
+
+-------------------------------------------------------------------
+Thu Jul  5 11:07:33 CEST 2001 - kkaempf@suse.de
+
+- drop yast2-core-translator from neededforbuild
+
+-------------------------------------------------------------------
+Wed Jun 27 18:06:42 CEST 2001 - sh@suse.de
+
+- V 2.4.5
+  New widget: MultiSelectionBox
+
+-------------------------------------------------------------------
+Tue Jun 26 19:25:39 CEST 2001 - sh@suse.de
+
+- V 2.4.4
+  New widget: MenuButton
+
+-------------------------------------------------------------------
+Tue Jun 19 16:17:33 CEST 2001 - sh@suse.de
+
+- Implemented wish #8357: Restrict input characters
+  new widget property `ValidChars for TextEntry, ComboBox
+
+-------------------------------------------------------------------
+Tue Jun 19 14:58:31 CEST 2001 - kkaempf@suse.de
+
+- implemented callback mechanism
+
+-------------------------------------------------------------------
+Tue Jun 12 14:50:45 CEST 2001 - sh@suse.de
+
+- V 2.4.2
+  Changed BarGraph variable substitution from "%d" to "%1"
+  to become sformat() compatible
+
+-------------------------------------------------------------------
+Fri Jun  8 15:58:39 CEST 2001 - sh@suse.de
+
+- V 2.4.1
+- Implemented wish #7259: Automatically set `opt(`decorated)
+  for non-defaultsize dialogs
+- Implemented wish #8363: UserInput() returns special ID
+  'debugHotkey when Ctrl-Alt-Shift-D is pressed
+
+-------------------------------------------------------------------
+Fri Jun  8 14:47:22 CEST 2001 - sh@suse.de
+
+- V 2.4.0
+  Macro recorder
+
+-------------------------------------------------------------------
+Mon May 14 17:21:21 CEST 2001 - sh@suse.de
+
+- V 2.3.14: Fixed bug #8254, 2nd part: Bad czech charset in resizer
+  Work around QString::sprintf() limitations (Latin1 compatible
+  only), use QString::arg() instead
+
+-------------------------------------------------------------------
+Mon May 14 14:20:44 CEST 2001 - sh@suse.de
+
+- V 2.3.13: Fixed bug #8254: Bad czech charset in resizer
+  Added fromUTF8() call for explicit string conversion
+
+-------------------------------------------------------------------
+Tue May  8 12:10:05 CEST 2001 - kkaempf@suse.de
+
+- provide split-alias entries for older versions
+
+-------------------------------------------------------------------
+Mon Apr 30 16:17:05 CEST 2001 - kkaempf@suse.de
+
+- provide "YaST2-UI"
+
+-------------------------------------------------------------------
+Mon Apr 30 15:21:03 CEST 2001 - sh@suse.de
+
+- V 2.3.10
+  (partial) fix for bug #7004:
+  Top-left align image in YImage widgets
+
+-------------------------------------------------------------------
+Thu Apr 19 19:14:02 CEST 2001 - sh@suse.de
+
+- V 2.3.9
+  Fixed bugs in RadioBox behaviour:
+  - second click on the same button will no longer deactivate it
+  - accept only one active RadioButton on RadioBox creation
+    (all but the last will be deactivated)
+
+-------------------------------------------------------------------
+Thu Apr 12 13:03:47 CEST 2001 - sh@suse.de
+
+- V 2.3.8
+  Improved RadioBox keyboard navigation:
+  No longer rely on QButtonGroup, own implementation of RadioBox
+  behaviour -> no longer strange key mappings (cursor keys rather
+  than tab as everybody expects)
+
+-------------------------------------------------------------------
+Thu Apr  5 19:52:11 CEST 2001 - sh@suse.de
+
+- new options zeroWidth, zeroHeight for image widget
+  to avoid complaints about title graphics not getting their
+  "nice size" of 2000 pixels wide
+- V 2.3.7
+
+-------------------------------------------------------------------
+Thu Mar 29 14:33:53 CEST 2001 - sh@suse.de
+
+- moved shared libs from /usr/lib/YaST2/lib to /usr/lib
+- V 2.3.5
+
+-------------------------------------------------------------------
+Thu Mar 29 09:25:54 CEST 2001 - kkaempf@suse.de
+
+- dont install lib, only plugin is needed
+
+-------------------------------------------------------------------
+Tue Mar 27 15:56:27 CEST 2001 - kkaempf@suse.de
+
+- minimize file list for yast2-ui-qt package
+
+-------------------------------------------------------------------
+Fri Mar 23 12:44:29 CET 2001 - arvin@suse.de
+
+- moved documentation to packages/yast2-ui-qt
+
+-------------------------------------------------------------------
+Sun Mar 18 23:24:19 CET 2001 - ro@suse.de
+
+- fixed neededforbuild
+
+-------------------------------------------------------------------
+Mon Mar 12 13:15:05 CET 2001 - arvin@suse.de
+
+- Strip plugin in package.
+
+-------------------------------------------------------------------
+Thu Mar  8 18:11:07 CET 2001 - arvin@suse.de
+
+- Added unicode fonts (previously in y2base).
+
+-------------------------------------------------------------------
+Sat Jan 27 21:19:35 CET 2001 - arvin@suse.de
+
+- package split y2qt / y2qt-devel
+
+-------------------------------------------------------------------
+Tue Jan 23 11:12:09 CET 2001 - sh@suse.de
+
+- prevent crash upon window manager close
+
+-------------------------------------------------------------------
+Mon Jan 22 13:31:18 CET 2001 - sh@suse.de
+
+- V2.2.10
+- New default title graphics from <wimer@suse.de> that are
+  no longer cut off at the right at 640x480
+- Renamed suseheader.xpm to yast2.xpm
+- Use yast2.xpm for both `Image(`suseheader) and `Image(`yast2)
+- Removed obsolete XPM images that were never used anyway
+
+-------------------------------------------------------------------
+Tue Jan 16 11:54:04 CET 2001 - sh@suse.de
+
+- V2.2.9
+- New default image for Image(`suseheader): 2000 pixels wide
+
+-------------------------------------------------------------------
+Fri Jan 12 21:57:42 CET 2001 - sh@suse.de
+
+- V2.2.8
+- Added module QXEmbed from Qt/KDE2 (TrollTech / LGPL)
+  to enable reliable KDE2 control center integration:
+  keyboard focus now works when running embedded in kcmshell
+  (fix for bug #5475)
+
+-------------------------------------------------------------------
+Thu Jan 11 16:10:28 CET 2001 - sh@suse.de
+
+- V2.2.7
+- Hide YQTextEntry label if empty label specified
+  -> no empty space above TextEntry widgets without label
+
+-------------------------------------------------------------------
+Tue Dec 19 14:58:33 CET 2000 - ma@suse.de
+
+- V2.2.6
+- pass YCPstrings to ui specific widgets
+
+-------------------------------------------------------------------
+Mon Dec 18 19:35:30 CET 2000 - sh@suse.de
+
+- New optional widget: DownloadProgress
+- V2.2.5
+
+-------------------------------------------------------------------
+Fri Dec  8 15:54:12 CET 2000 - sh@suse.de
+
+- More reliable nicesize() and setSize() behaviour for
+  SelectionBox and TextEntry
+  -> no more cut-off pixel lines at the bottom
+- V2.2.4
+
+-------------------------------------------------------------------
+Tue Dec  5 16:51:05 CET 2000 - sh@suse.de
+
+- New widget: MultiLineEdit
+- Dialogs can no longer exceed screen dimensions
+- V2.2.3
+
+-------------------------------------------------------------------
+Tue Nov 28 17:23:30 CET 2000 - arvin@suse.de
+
+- Fixed ComboBox layout errors on resize.
+
+-------------------------------------------------------------------
+Tue Nov 28 15:43:07 CET 2000 - kkaempf@suse.de
+
+- add libmng-devel to neededforbuild
+
+-------------------------------------------------------------------
+Thu Nov 16 17:18:52 CET 2000 - kkaempf@suse.de
+
+- split library and plugin
+
+-------------------------------------------------------------------
+Mon Nov 13 11:21:34 CET 2000 - sh@suse.de
+
+- Removed glx, glx-devel, mesa from .spec.in - Qt no longer needs it
+- V2.1.8
+
+-------------------------------------------------------------------
+Thu Nov  9 12:46:05 CET 2000 - kkaempf@suse.de
+
+- static plugin only
+
+-------------------------------------------------------------------
+Tue Nov  7 18:43:30 CET 2000 - sh@suse.de
+
+- re-enabled static libs
+  new widgets: LogView, IntField
+  moved completely to new logging
+  version 2.1.6
+
+-------------------------------------------------------------------
+Fri Nov  3 08:54:17 CET 2000 - kkaempf@suse.de
+
+- adapt neededforbuild for new qt
+
+-------------------------------------------------------------------
+Thu Nov  2 11:43:34 CET 2000 - kkaempf@suse.de
+
+- fix runqt include file
+
+-------------------------------------------------------------------
+Tue Oct 31 14:33:38 CET 2000 - sh@suse.de
+
+- Increased gcc warning level
+  resolved minor warnings
+  disabled static libs (speed up compilation)
+  version 2.1.4
+
+-------------------------------------------------------------------
+Fri Oct 27 12:47:55 CEST 2000 - kkaempf@suse.de
+
+- provide correct library
+
+-------------------------------------------------------------------
+Wed Oct 25 18:33:58 CEST 2000 - kkaempf@suse.de
+
+- Group provided
+
+-------------------------------------------------------------------
+Wed Oct 25 13:58:34 CEST 2000 - sh@suse.de
+
+- New widgets: BarGraph, Slider, PartitionSplitter
+  version 2.1.2
+
+-------------------------------------------------------------------
+Thu Aug 31 13:34:27 CEST 2000 - sh@suse.de
+
+- Added mesa and mesasoft to spec file
+  (Qt 2.2+ now requires OpenGL)
+  version 2.1.1
+
+-------------------------------------------------------------------
+Thu Jul 13 18:58:23 CEST 2000 - sh@suse.de
+
+- Resize behaviour
+  version 2.0.11
+
+-------------------------------------------------------------------
+Fri Jul  7 16:41:06 CEST 2000 - sh@suse.de
+
+- Change table widget sorting for the umpteenth time:
+  Maintain insertion order but allow for user sort-by-click
+  version 2.0.10
+
+-------------------------------------------------------------------
+Thu Jul  6 15:48:28 CEST 2000 - sh@suse.de
+
+- proper window close button handling (-> `cancel)
+  version 2.0.9
+
+-------------------------------------------------------------------
+Tue Jul  4 14:11:43 CEST 2000 - kkaempf@suse.de
+
+- check argument in returnNow
+  version 2.0.8
+
+-------------------------------------------------------------------
+Mon Jun 26 16:03:32 CEST 2000 - sh@suse.de
+
+- Changed default title image for SuSE 7.0
+- increased version number to 2.0.7
+
+-------------------------------------------------------------------
+Mon Jun 19 17:41:54 CEST 2000 - kkaempf@suse.de
+
+- use xmset from new saxtools package
+  version 2.0.6
+
+-------------------------------------------------------------------
+Mon Jun 19 16:51:27 CEST 2000 - schwab@suse.de
+
+- Add %suse_update_config.
+- Lower opt level on ia64.
+
+-------------------------------------------------------------------
+Mon Jun 19 10:24:39 CEST 2000 - kkaempf@suse.de
+
+- add xmset from SaX2
+  version 2.0.5
+
+-------------------------------------------------------------------
+Thu Jun  8 11:22:40 CEST 2000 - sh@suse.de
+
+- Disabled X Input Method hack - this doesn't seem to work with
+  XFree86 4.0
+
+-------------------------------------------------------------------
+Mon Jun  5 18:46:25 CEST 2000 - sh@suse.de
+
+- Added correct QTDIR and dependencies to qtlib2 to spec file
+
+-------------------------------------------------------------------
+Thu May 18 13:11:54 CEST 2000 - kkaempf@suse.de
+
+- pass includes to dist
+  add tools to specfile
+
+-------------------------------------------------------------------
+Mon May 15 16:07:09 CEST 2000 - sh@suse.de
+
+- New widget: ComboBox
+
+-------------------------------------------------------------------
+Wed Apr 26 16:25:39 CEST 2000 - kkaempf@suse.de
+
+- Initial version based on yast2 from SuSE 6.4
+
diff --git a/src/.cvsignore b/src/.cvsignore
new file mode 100644 (file)
index 0000000..a7bd469
--- /dev/null
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+*.lo
+.deps
+*.moc
+.libs
+y2qt.kdoc
+*.la
+qt
+*.bak
+*.auto
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..3ff68d2
--- /dev/null
@@ -0,0 +1,279 @@
+#
+# Makefile.am for qt/src
+#
+
+SUBDIRS = pkg
+
+AM_CXXFLAGS = -DY2LOG=\"ui-qt\"                                        \
+       -DQT_THREAD_SUPPORT                                     \
+       -DLOCALEDIR=\"${localedir}\"                            \
+       -DQT_LOCALEDIR=\"$(QTDIR)/translations\"                \
+       -DICONDIR=\"${themedir}/current\"                       \
+       -DTHEMEDIR=\"${themedir}/current\"                      \
+       -DHELPIMAGEDIR=\"${imagedir}\"                          \
+       -DLANG_FONTS_FILE=\"${lang_fontsdir}/lang_fonts\"       \
+       -DQTLIBDIR=\"$(QTLIBDIR)\"                              \
+       -fmessage-length=0
+
+
+MOC = $(QTDIR)/bin/moc
+
+serversdir = $(execcompdir)/servers
+
+lang_fontsdir=$(ydatadir)
+lang_fonts_DATA = lang_fonts
+
+EXTRA_DIST = $(lang_fonts_DATA)
+
+# plugin, libtool forces 'lib' prefix
+plugin_LTLIBRARIES = libpy2qt.la
+libpy2qt_la_LDFLAGS = -version-info 2:0
+
+libpy2qt_la_LIBADD =                   \
+       -L$(plugindir) -lpy2UI          \
+       -L$(QTLIBDIR) -lqt-mt           \
+       -lX11 -lXext -lSM -lICE
+
+# libpy2qt_la_LIBADD =                 \
+#      -Lpkg -ly2qt_pkg                \
+#      -L$(plugindir) -lpy2UI          \
+#      -L$(QTLIBDIR) -lqt-mt           \
+#      -lX11 -lXext -lSM -lICE
+
+# noinst_LTLIBRARIES = liby2qt.la
+# liby2qt_la_LDFLAGS = -version-info 2:0
+# liby2qt_la_LIBADD = $(libpy2qt_la_LIBADD)
+
+
+noinst_HEADERS = $(wildcard *.h)
+
+libpy2qt_la_SOURCES =                          \
+       Y2CCQt.cc                               \
+                                               \
+       YQUI_core.cc                            \
+       YQUI_widgets.cc                         \
+       YQUI_builtins.cc                        \
+       YQUI_x11.cc                             \
+       YQApplication.cc                        \
+       YQWidgetFactory.cc                      \
+       YQOptionalWidgetFactory.cc              \
+       YQPackageSelectorPlugin.cc              \
+       YQSignalBlocker.cc                      \
+       YQIconPool.cc                           \
+       YQWidgetCaption.cc                      \
+                                               \
+       YQAlignment.cc                          \
+       YQBarGraph.cc                           \
+       YQCheckBox.cc                           \
+       YQCheckBoxFrame.cc                      \
+       YQComboBox.cc                           \
+       YQDateField.cc                          \
+       YQDialog.cc                             \
+       YQDownloadProgress.cc                   \
+       YQDumbTab.cc                            \
+       YQEBunny.cc                             \
+       YQEmpty.cc                              \
+       YQFrame.cc                              \
+       YQGenericButton.cc                      \
+       YQImage.cc                              \
+       YQInputField.cc                         \
+       YQIntField.cc                           \
+       YQLabel.cc                              \
+       YQLayoutBox.cc                          \
+       YQLogView.cc                            \
+       YQMenuButton.cc                         \
+       YQMultiLineEdit.cc                      \
+       YQMultiProgressMeter.cc                 \
+       YQMultiSelectionBox.cc                  \
+       YQPartitionSplitter.cc                  \
+       YQProgressBar.cc                        \
+       YQPushButton.cc                         \
+       YQRadioButton.cc                        \
+       YQRadioButtonGroup.cc                   \
+       YQReplacePoint.cc                       \
+       YQRichText.cc                           \
+       YQSelectionBox.cc                       \
+       YQSlider.cc                             \
+       YQSpacing.cc                            \
+       YQSquash.cc                             \
+       YQTable.cc                              \
+       YQTimeField.cc                          \
+       YQTree.cc                               \
+       YQWizard.cc                             \
+       YQWizardButton.cc                       \
+                                               \
+       YFrameBuffer.cc                         \
+       QY2ComboTabWidget.cc                    \
+       QY2DiskUsageList.cc                     \
+       QY2CharValidator.cc                     \
+       QY2ListView.cc                          \
+       QY2Settings.cc                          \
+       QY2LayoutUtils.cc
+
+
+
+
+# Note: QY2LayoutUtils and QY2Settings don't need any .moc file: No QObjects
+
+
+# the plugin adds the liby2 component interface
+#
+# libpy2qt_la_SOURCES =                                \
+#      $(liby2qt_la_SOURCES)                   \
+#      Y2CCQt.cc
+
+
+BUILT_SOURCES =                                        \
+       YQUI.moc                                \
+       YQApplication.moc                       \
+       YQWidgetCaption.cc                      \
+                                               \
+       YQAlignment.moc                         \
+       YQBarGraph.moc                          \
+       YQCheckBox.moc                          \
+       YQCheckBoxFrame.moc                     \
+       YQComboBox.moc                          \
+       YQDialog.moc                            \
+       YQDownloadProgress.moc                  \
+       YQDumbTab.moc                           \
+       YQEmpty.moc                             \
+       YQFrame.moc                             \
+       YQGenericButton.moc                     \
+       YQImage.moc                             \
+       YQInputField.moc                        \
+       YQIntField.moc                          \
+       YQLabel.moc                             \
+       YQLayoutBox.moc                         \
+       YQLogView.moc                           \
+       YQMenuButton.moc                        \
+       YQMultiLineEdit.moc                     \
+       YQMultiProgressMeter.moc                \
+       YQMultiSelectionBox.moc                 \
+       YQPartitionSplitter.moc                 \
+       YQProgressBar.moc                       \
+       YQPushButton.moc                        \
+       YQRadioButton.moc                       \
+       YQRadioButtonGroup.moc                  \
+       YQReplacePoint.moc                      \
+       YQRichText.moc                          \
+       YQSelectionBox.moc                      \
+       YQSlider.moc                            \
+       YQSpacing.moc                           \
+       YQSquash.moc                            \
+       YQTable.moc                             \
+       YQTree.moc                              \
+       YQWizard.moc                            \
+       YQWizardButton.moc                      \
+                                               \
+       QY2ComboTabWidget.moc                   \
+       QY2DiskUsageList.moc                    \
+       QY2CharValidator.moc                    \
+       QY2ListView.moc
+
+
+YQUI_core.o YQUI_core.lo:                                      YQUI.moc
+YQUI_widgets.o YQUI_widgets.lo:                                        YQUI.moc
+YQUI_builtins.o YQUI_builtins.lo:                              YQUI.moc
+YQUI_x11.o YQUI_x11.lo:                                                YQUI.moc
+YQApplication.o YQApplication.lo:                              YQApplication.moc
+YQWidgetCaption.o YQWidgetCaption.lo:                          YQWidgetCaption.moc
+
+YQAlignment.o YQAlignment.lo:                                  YQAlignment.moc
+YQBarGraph.o YQBarGraph.lo:                                    YQBarGraph.moc
+YQCheckBox.o YQCheckBox.lo:                                    YQCheckBox.moc
+YQCheckBoxFrame.o YQCheckBoxFrame.lo:                          YQCheckBoxFrame.moc
+YQComboBox.o YQComboBox.lo:                                    YQComboBox.moc
+YQDateField.o YQDateField.lo:                                  YQDateField.moc
+YQDialog.o YQDialog.lo:                                                YQDialog.moc
+YQDownloadProgress.o YQDownloadProgress.lo:                    YQDownloadProgress.moc
+YQDumbTab.o YQDumbTab.lo:                                      YQDumbTab.moc
+YQEmpty.o YQEmpty.lo:                                          YQEmpty.moc
+YQFrame.o YQFrame.lo:                                          YQFrame.moc
+YQGenericButton.o YQGenericButton.lo:                          YQGenericButton.moc
+YQImage.o YQImage.lo:                                          YQImage.moc
+YQInputField.o YQInputField.lo:                                        YQInputField.moc
+YQIntField.o YQIntField.lo:                                    YQIntField.moc
+YQLabel.o YQLabel.lo:                                          YQLabel.moc
+YQLayoutBox.o YQLayoutBox.lo:                                  YQLayoutBox.moc
+YQLogView.o YQLogView.lo:                                      YQLogView.moc
+YQMenuButton.o YQMenuButton.lo:                                        YQMenuButton.moc
+YQMultiLineEdit.o YQMultiLineEdit.lo:                          YQMultiLineEdit.moc
+YQMultiProgressMeter.o YQMultiProgressMeter.lo:                        YQMultiProgressMeter.moc
+YQMultiSelectionBox.o YQMultiSelectionBox.lo:                  YQMultiSelectionBox.moc
+YQPartitionSplitter.o YQPartitionSplitter.lo:                  YQPartitionSplitter.moc
+YQProgressBar.o YQProgressBar.lo:                              YQProgressBar.moc
+YQPushButton.o YQPushButton.lo:                                        YQPushButton.moc
+YQRadioButton.o YQRadioButton.lo:                              YQRadioButton.moc
+YQRadioButtonGroup.o YQRadioButtonGroup.lo:                    YQRadioButtonGroup.moc
+YQReplacePoint.o YQReplacePoint.lo:                            YQReplacePoint.moc
+YQRichText.o YQRichText.lo:                                    YQRichText.moc
+YQSelectionBox.o YQSelectionBox.lo:                            YQSelectionBox.moc
+YQSlider.o YQSlider.lo:                                                YQSlider.moc
+YQSpacing.o YQSpacing.lo:                                      YQSpacing.moc
+YQSquash.o YQSquash.lo:                                                YQSquash.moc
+YQTable.o YQTable.lo:                                          YQTable.moc
+YQTimeField.o YQTimeField.lo:                                  YQTimeField.moc
+YQTree.o YQTree.lo:                                            YQTree.moc
+YQWizard.o YQWizard.lo:                                                YQWizard.moc
+YQWizardButton.o YQWizardButton.lo:                            YQWizardButton.moc
+
+QY2ComboTabWidget.o QY2ComboTabWidget.lo:                      QY2ComboTabWidget.cc
+QY2DiskUsageList.o QY2DiskUsageList.lo:                                QY2DiskUsageList.cc
+QY2CharValidator.o QY2CharValidator.lo:                                QY2CharValidator.moc
+QY2ListView.o QY2ListView.lo:                                  QY2ListView.moc
+
+
+
+YQUI.moc:                              YQUI.h
+YQApplication.moc:                     YQApplication.h
+YQWidgetCaption.moc:                   YQWidgetCaption.h
+
+YQAlignment.moc:                       YQAlignment.h
+YQBarGraph.moc:                                YQBarGraph.h
+YQCheckBox.moc:                                YQCheckBox.h
+YQCheckBoxFrame.moc:                   YQCheckBoxFrame.h
+YQComboBox.moc:                                YQComboBox.h
+YQDialog.moc:                          YQDialog.h
+YQDownloadProgress.moc:                        YQDownloadProgress.h
+YQDumbTab.moc:                         YQDumbTab.h
+YQEmpty.moc:                           YQEmpty.h
+YQFrame.moc:                           YQFrame.h
+YQGenericButton.moc:                   YQGenericButton.h
+YQImage.moc:                           YQImage.h
+YQInputField.moc:                      YQInputField.h
+YQIntField.moc:                                YQIntField.h
+YQLabel.moc:                           YQLabel.h
+YQLayoutBox.moc:                       YQLayoutBox.h
+YQLogView.moc:                         YQLogView.h
+YQMenuButton.moc:                      YQMenuButton.h
+YQMultiLineEdit.moc:                   YQMultiLineEdit.h
+YQMultiProgressMeter.moc:              YQMultiProgressMeter.h
+YQMultiSelectionBox.moc:               YQMultiSelectionBox.h
+YQPartitionSplitter.moc:               YQPartitionSplitter.h
+YQProgressBar.moc:                     YQProgressBar.h
+YQPushButton.moc:                      YQPushButton.h
+YQRadioButton.moc:                     YQRadioButton.h
+YQRadioButtonGroup.moc:                YQRadioButtonGroup.h
+YQReplacePoint.moc:                    YQReplacePoint.h
+YQRichText.moc:                                YQRichText.h
+YQSelectionBox.moc:                    YQSelectionBox.h
+YQSlider.moc:                          YQSlider.h
+YQSpacing.moc:                         YQSpacing.h
+YQSquash.moc:                          YQSquash.h
+YQTable.moc:                           YQTable.h
+YQTree.moc:                            YQTree.h
+YQWizard.moc:                          YQWizard.h
+YQWizardButton.moc:                    YQWizardButton.h
+
+QY2ComboTabWidget.moc:                 QY2ComboTabWidget.h
+QY2DiskUsageList.moc:                  QY2DiskUsageList.h
+QY2CharValidator.moc:                  QY2CharValidator.h
+QY2ListView.moc:                       QY2ListView.h
+
+
+%.moc: %.h
+       $(MOC) $< -o $@
+
+CLEANFILES = *.moc
+
+INCLUDES = -I$(srcdir)/pkg -I$(QTDIR)/include -I$(includedir) -I$(includedir)/yui
diff --git a/src/QY2CharValidator.cc b/src/QY2CharValidator.cc
new file mode 100644 (file)
index 0000000..9e06130
--- /dev/null
@@ -0,0 +1,65 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt objects                      |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2CharValidator.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt object - it can be used independently of YaST2.
+
+/-*/
+
+
+#include <stdio.h>
+#include <qvalidator.h>
+#include "QY2CharValidator.h"
+
+
+
+QY2CharValidator::QY2CharValidator( const QString &    initialValidChars,
+                                   QObject *           parent,
+                                   const char *        name )
+    : QValidator( parent, name )
+    , _validChars( initialValidChars )
+{
+}
+
+
+QY2CharValidator::~QY2CharValidator()
+{
+    // NOP
+}
+
+
+QValidator::State
+QY2CharValidator::validate( QString & fieldContents, int & pos ) const
+{
+    if ( validChars().isEmpty() || fieldContents.isEmpty() )
+       return QValidator::Acceptable;
+
+
+    // Check the entire field contents.
+    //
+    // There might be more than one new character - the user might have copied
+    // some longer text via the X clipboard.
+
+    for ( unsigned i=0; i < fieldContents.length(); i++ )
+    {
+       if ( ! validChars().contains( fieldContents[i] ) )
+           return QValidator::Invalid;
+    }
+
+    return QValidator::Acceptable;
+}
+
+
+#include "QY2CharValidator.moc"
diff --git a/src/QY2CharValidator.h b/src/QY2CharValidator.h
new file mode 100644 (file)
index 0000000..c350905
--- /dev/null
@@ -0,0 +1,73 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt objects                      |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2CharValidator.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt object - it can be used independently of YaST2.
+
+/-*/
+
+
+#ifndef QY2CharValidator_h
+#define QY2CharValidator_h
+
+#include <qvalidator.h>
+
+
+class QY2CharValidator : public QValidator
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor.
+     *
+     * Create a validator object that checks for input characters being any one
+     * of 'validChars'. If this is empty, any input is accepted.
+     **/
+    QY2CharValidator( const QString &  initialValidChars,
+                     QObject *         parent  = 0,
+                     const char *      name    = 0 );
+
+    /**
+     * Destructor.
+     **/
+    ~QY2CharValidator();
+
+    /**
+     * Check user input.
+     *
+     * Reimplemented from @ref QValidator.
+     **/
+    virtual State validate( QString & input, int & pos ) const;
+
+    /**
+     * Set the valid input characters.
+     * If 'newValidChars' is empty, any input is accepted.
+     **/
+    void setValidChars( const QString &        newValidChars )
+       { _validChars = newValidChars; }
+
+    /**
+     * Retrieve the valid input characters.
+     **/
+    QString validChars() const { return _validChars; }
+
+protected:
+
+    QString _validChars;
+};
+
+#endif // QY2CharValidator_h
diff --git a/src/QY2ComboTabWidget.cc b/src/QY2ComboTabWidget.cc
new file mode 100644 (file)
index 0000000..1c1708b
--- /dev/null
@@ -0,0 +1,146 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt widgets                      |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2ComboTabWidget.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt widget - it can be used independently of YaST2.
+
+/-*/
+
+
+#include <qhbox.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qwidgetstack.h>
+
+#define y2log_component "qt-pkg"
+#include <ycp/y2log.h>
+
+#include "QY2ComboTabWidget.h"
+
+
+#define SPACING                        6       // between subwidgets
+#define MARGIN                 4       // around the widget
+
+
+
+QY2ComboTabWidget::QY2ComboTabWidget( const QString &  label,
+                                     QWidget *         parent,
+                                     const char *      name )
+    : QVBox( parent, name )
+{
+    setFrameStyle( QFrame::Panel | QFrame::Raised );
+    setLineWidth(2);
+    setMidLineWidth(2);
+    setSpacing( SPACING );
+    setMargin ( MARGIN  );
+
+    
+    QHBox * hbox = new QHBox( this );
+    CHECK_PTR( hbox );
+    hbox->setSpacing( SPACING );
+    hbox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); // hor/vert
+    
+
+    combo_label = new QLabel( label, hbox );
+    CHECK_PTR( combo_label );
+    
+    combo_box = new QComboBox( hbox );
+    CHECK_PTR( combo_box );
+    
+    combo_label->setBuddy( combo_box );
+    combo_box->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); // hor/vert
+    connect( combo_box, SIGNAL( activated( int ) ),
+            this,      SLOT  ( showPage ( int ) ) );
+    
+    widget_stack = new QWidgetStack( this );
+    CHECK_PTR( widget_stack );
+}
+
+
+
+QY2ComboTabWidget::~QY2ComboTabWidget()
+{
+    
+}
+
+
+void
+QY2ComboTabWidget::addPage( const QString & page_label, QWidget * new_page )
+{
+    pages.insert( combo_box->count(), new_page );
+    combo_box->insertItem( page_label );
+    widget_stack->addWidget( new_page );
+
+    if ( ! widget_stack->visibleWidget() )
+       widget_stack->raiseWidget( new_page );
+}
+
+
+void
+QY2ComboTabWidget::showPage( int index )
+{
+    QWidget * page = pages[ index ];
+
+    if ( page )
+    {
+       widget_stack->raiseWidget( page );
+       // y2debug( "Changing current page" );
+       emit currentChanged( page );
+    }
+    else
+    {
+       qWarning( "QY2ComboTabWidget: Page #%d not found", index );
+       return;
+    }
+}
+
+
+void
+QY2ComboTabWidget::showPage( QWidget * page )
+{
+    widget_stack->raiseWidget( page );
+
+    if ( page == pages[ combo_box->currentItem() ] )
+    {
+       // Shortcut: If the requested page is the one that belongs to the item
+       // currently selected in the combo box, don't bother searching the
+       // correct combo box item.
+       return;
+    }
+
+    
+    // Search the dict for this page
+    
+    QIntDictIterator<QWidget> it( pages );
+
+    while ( it.current() )
+    {
+       if ( page == it.current() )
+       {
+           combo_box->setCurrentItem( it.currentKey() );
+           return;
+       }
+
+       ++it;
+    }
+
+    // If we come this far, that page isn't present in the dict.
+
+    qWarning( "QY2ComboTabWidget: Page not found" );
+}
+
+
+
+#include "QY2ComboTabWidget.moc"
diff --git a/src/QY2ComboTabWidget.h b/src/QY2ComboTabWidget.h
new file mode 100644 (file)
index 0000000..c89488c
--- /dev/null
@@ -0,0 +1,102 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt widgets                      |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2ComboTabWidget.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt widget - it can be used independently of YaST2.
+
+/-*/
+
+
+#ifndef QY2ComboTabWidget_h
+#define QY2ComboTabWidget_h
+
+#include <qvbox.h>
+#include <qstring.h>
+#include <qintdict.h>
+
+class QComboBox;
+class QLabel;
+class QWidgetStack;
+class QWidget;
+
+
+/**
+ * This widget is very much like a QTabWidget, but it uses a combo box above
+ * the tab pages rather than a ( scrolled ) one-line row of tabs.
+ **/
+class QY2ComboTabWidget : public QVBox
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor. 'combo_box_label' is the user-visible label of the combo
+     * box that is used to switch between the different tab pages.
+     **/
+    QY2ComboTabWidget( const QString & combo_box_label,
+                      QWidget *        parent = 0,
+                      const char *     name   = 0 );
+
+    /**
+     * Destructor.
+     **/
+    virtual ~QY2ComboTabWidget();
+
+    /**
+     * Add a page. 'page_label' will be the user-visible combo box entry for
+     * that page.
+     **/
+    void addPage( const QString & page_label, QWidget * page );
+
+    
+signals:
+
+    /**
+     * Emitted when the current page changes.
+     * NOT emitted initially for the very first page that is shown.
+     **/
+    void currentChanged( QWidget * newCurrentPage );
+
+    
+public slots:
+
+    /**
+     * Show a page. Updates the combo box contents accordingly.
+     * This is an expensive operation: All combo box items are searched for the
+     * item that corresponds to this page.
+     **/
+    void showPage( QWidget * page );
+
+
+
+protected slots:
+
+    /**
+     * Show a page identified by its index. Does NOT update the combo box
+     * contents.
+     **/
+    void showPage( int index );
+
+
+protected:
+
+    QComboBox          * combo_box;
+    QLabel             * combo_label;
+    QWidgetStack       * widget_stack;
+    QIntDict<QWidget>    pages;
+};
+
+#endif // QY2ComboTabWidget_h
diff --git a/src/QY2DiskUsageList.cc b/src/QY2DiskUsageList.cc
new file mode 100644 (file)
index 0000000..7e8f5f7
--- /dev/null
@@ -0,0 +1,418 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2DiskUsageList.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  Textdomain "packages-qt"
+
+  This is a pure Qt widget - it can be used independently of YaST2.
+
+
+/-*/
+
+
+#include "QY2DiskUsageList.h"
+#include "YQi18n.h"
+#include "qpainter.h"
+
+
+QY2DiskUsageList::QY2DiskUsageList( QWidget * parent, bool addStdColumns )
+    : QY2ListView( parent )
+{
+    _nameCol           = -42;
+    _percentageBarCol  = -42;
+    _percentageCol     = -42;
+    _usedSizeCol       = -42;
+    _freeSizeCol       = -42;
+    _totalSizeCol      = -42;
+    _deviceNameCol     = -42;
+
+    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++;
+#if 0
+       addColumn( _( "Device"          ) );    _deviceNameCol          = numCol++;
+#endif
+
+       setColumnAlignment( percentageCol(),    Qt::AlignRight );
+       setColumnAlignment( usedSizeCol(),      Qt::AlignRight );
+       setColumnAlignment( freeSizeCol(),      Qt::AlignRight );
+       setColumnAlignment( totalSizeCol(),     Qt::AlignRight );
+
+       setSorting( percentageBarCol() );
+    }
+
+    saveColumnWidths();
+    setSelectionMode( QListView::NoSelection );
+}
+
+
+QY2DiskUsageList::~QY2DiskUsageList()
+{
+}
+
+
+
+
+
+
+QY2DiskUsageListItem::QY2DiskUsageListItem( QY2DiskUsageList * parent )
+    : QY2ListViewItem( parent )
+    , _diskUsageList( parent )
+{
+}
+
+
+
+
+QY2DiskUsageListItem::~QY2DiskUsageListItem()
+{
+    // NOP
+}
+
+
+
+
+void
+QY2DiskUsageListItem::init( bool allFields )
+{
+    if ( percentageCol()       >= 0 )
+    {
+       QString percentageText;
+       percentageText.sprintf( "%d%%", usedPercent() );
+       setText( percentageCol(), percentageText );
+    }
+
+    if ( usedSizeCol()         >= 0 ) setText( usedSizeCol(),          usedSize()      );
+    if ( freeSizeCol()         >= 0 ) setText( freeSizeCol(),          freeSize()      );
+
+    if ( allFields )
+    {
+       if ( totalSizeCol()     >= 0 ) setText( totalSizeCol(),         totalSize()     );
+       if ( nameCol()          >= 0 ) setText( nameCol(),              " " + name()    );
+       if ( deviceNameCol()    >= 0 ) setText( deviceNameCol(),        deviceName()    );
+    }
+}
+
+
+void
+QY2DiskUsageListItem::setText( int column, const FSize & size )
+{
+    QString sizeText = size.form( 0, 1, true ).c_str();
+    sizeText += " ";
+    setText( column, sizeText );
+}
+
+
+FSize
+QY2DiskUsageListItem::freeSize() const
+{
+    return totalSize() - usedSize();
+}
+
+
+int
+QY2DiskUsageListItem::usedPercent() const
+{
+    int percent = 0;
+
+    if ( totalSize() != 0 )
+       percent = ( 100 * usedSize() ) / totalSize();
+
+    return percent;
+}
+
+
+void
+QY2DiskUsageListItem::updateStatus()
+{
+    init( false );
+}
+
+
+void
+QY2DiskUsageListItem::updateData()
+{
+    init( true );
+}
+
+
+
+
+
+/**
+ * Comparison function used for sorting the list.
+ * Returns:
+ * -1 if this <         other
+ *  0 if this == other
+ * +1 if this >         other
+ **/
+int
+QY2DiskUsageListItem::compare( QListViewItem * otherListViewItem,
+                              int              col,
+                              bool             ascending ) const
+{
+    QY2DiskUsageListItem * other = dynamic_cast<QY2DiskUsageListItem *> (otherListViewItem);
+
+    if ( other )
+    {
+       if ( col == percentageCol()    ||
+            col == percentageBarCol()   )
+       {
+           // Intentionally reverting sort order: Fullest first
+
+           if ( this->usedPercent() < other->usedPercent() )   return  1;
+           if ( this->usedPercent() > other->usedPercent() )   return -1;
+           return 0;
+       }
+       else if ( col == usedSizeCol() )
+       {
+           if ( this->usedSize() < other->usedSize() )         return -1;
+           if ( this->usedSize() > other->usedSize() )         return  1;
+           return 0;
+       }
+       else if ( col == freeSizeCol() )
+       {
+           if ( this->freeSize() < other->freeSize() )         return -1;
+           if ( this->freeSize() > other->freeSize() )         return  1;
+           return 0;
+       }
+       else if ( col == totalSizeCol() )
+       {
+           if ( this->totalSize() < other->totalSize() )       return -1;
+           if ( this->totalSize() > other->totalSize() )       return  1;
+           return 0;
+       }
+    }
+
+    return QY2ListViewItem::compare( otherListViewItem, col, ascending );
+}
+
+
+void
+QY2DiskUsageListItem::paintCell( QPainter *            painter,
+                                const QColorGroup &    colorGroup,
+                                int                    column,
+                                int                    width,
+                                int                    alignment )
+{
+    if ( column == percentageBarCol() )
+    {
+       QColor background = colorGroup.base();
+       painter->setBackgroundColor( background );
+
+       paintPercentageBar( usedPercent(),
+                           painter,
+                           _diskUsageList->treeStepSize() * depth(),
+                           width,
+                           interpolateColor( usedPercent(),
+                                             60, 95,
+                                             QColor( 0, 0x80, 0 ),     // Medium dark green
+                                             QColor( 0xFF, 0, 0 ) ),   // Bright red
+                           background.dark( 115 ) );
+
+    }
+    else
+    {
+       QColorGroup cg( colorGroup );
+
+       if ( usedSize() > totalSize() )
+           cg.setColor( QColorGroup::Text, Qt::red );          // Set red text foreground
+
+       // Intentionally bypassing the direct parent class method, use the grandparent's:
+       // Don't let QY2ListViewItem::_textColor / _backgroundColor interfere with our colors.
+
+       QListViewItem::paintCell( painter, cg, column, width, alignment );
+    }
+}
+
+
+/**
+ * Stolen from KDirStat::KDirTreeView with the author's permission.
+ **/
+void
+QY2DiskUsageListItem::paintPercentageBar( float                        percent,
+                                         QPainter *            painter,
+                                         int                   indent,
+                                         int                   width,
+                                         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( 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 );
+    }
+}
+
+
+/**
+ * Stolen from KDirStat::KDirTreeView with the author's permission.
+ **/
+QColor
+QY2DiskUsageListItem::contrastingColor( const QColor & desiredColor,
+                                       const QColor & contrastColor )
+{
+    if ( desiredColor != contrastColor )
+    {
+       return desiredColor;
+    }
+
+    if ( contrastColor != contrastColor.light() )
+    {
+       // try a little lighter
+       return contrastColor.light();
+    }
+    else
+    {
+       // try a little darker
+       return contrastColor.dark();
+    }
+}
+
+
+QColor
+QY2DiskUsageListItem::interpolateColor( int            val,
+                                       int             minVal,
+                                       int             maxVal,
+                                       const QColor &  minColor,
+                                       const QColor &  maxColor )
+{
+    int minH, maxH;
+    int minS, maxS;
+    int minV, maxV;
+
+    minColor.hsv( &minH, &minS, &minV );
+    maxColor.hsv( &maxH, &maxS, &maxV );
+
+    return QColor( interpolate( val, minVal, maxVal, minH, maxH ),
+                  interpolate( val, minVal, maxVal, minS, maxS ),
+                  interpolate( val, minVal, maxVal, minV, maxV ),
+                  QColor::Hsv );
+}
+
+
+int
+QY2DiskUsageListItem::interpolate( int from,
+                                  int minFrom, int maxFrom,
+                                  int minTo,   int maxTo       )
+{
+    if ( minFrom > maxFrom )
+    {
+       // Swap min/max values
+
+       int tmp = maxFrom;
+       maxFrom = minFrom;
+       minFrom = tmp;
+    }
+
+    long x = from - minFrom;
+    x *= maxTo - minTo;
+    x /= maxFrom - minFrom;
+    x += minTo;
+
+    if ( minTo < maxTo )
+    {
+       if ( x < minTo )        x = minTo;
+       if ( x > maxTo )        x = maxTo;
+    }
+    else
+    {
+       if ( x < maxTo )        x = maxTo;
+       if ( x > minTo )        x = minTo;
+    }
+
+    return (int) x;
+}
+
+
+
+#include "QY2DiskUsageList.moc"
diff --git a/src/QY2DiskUsageList.h b/src/QY2DiskUsageList.h
new file mode 100644 (file)
index 0000000..f4249bd
--- /dev/null
@@ -0,0 +1,284 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt widgets                      |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2DiskUsageList.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt widget - it can be used independently of YaST2.
+
+/-*/
+
+
+#ifndef QY2DiskUsageList_h
+#define QY2DiskUsageList_h
+
+#include <QY2ListView.h>
+#include <FSize.h>
+#include <qcolor.h>
+
+
+class QY2DiskUsageListItem;
+
+
+/**
+ * Generic scrollable list of disk usage for any number of partitions.
+ **/
+class QY2DiskUsageList : public QY2ListView
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor.
+     *
+     * Adds a standard set of list columns if 'addStdColumns' is
+     *'true'. Otherwise the caller is responsible for adding any columns.
+     **/
+    QY2DiskUsageList( QWidget * parent, bool addStdColumns = true );
+
+    /**
+     * Destructor
+     **/
+    virtual ~QY2DiskUsageList();
+
+
+    // Column numbers
+
+    int nameCol()              const   { return _nameCol;              }
+    int percentageBarCol()     const   { return _percentageBarCol;     }
+    int percentageCol()                const   { return _percentageCol;        }
+    int usedSizeCol()          const   { return _usedSizeCol;          }
+    int freeSizeCol()          const   { return _freeSizeCol;          }
+    int totalSizeCol()         const   { return _totalSizeCol;         }
+    int deviceNameCol()                const   { return _deviceNameCol;        }
+
+
+protected:
+
+    int _nameCol;
+    int _percentageBarCol;
+    int _percentageCol;
+    int _usedSizeCol;
+    int _freeSizeCol;
+    int _totalSizeCol;
+    int _deviceNameCol;
+};
+
+
+
+/**
+ * Abstract base class for one partition ( mount point ) to display in a
+ * QY2DiskUsageList.
+ *
+ * This class contains pure virtuals, so it cannot be used directly.
+ **/
+class QY2DiskUsageListItem: public QY2ListViewItem
+{
+protected:
+    /**
+     * Constructor.
+     *
+     * Call updateData() after the constructor for the initial display
+     * update. Unfortunately, this cannot be done automatically in the
+     * constructor since it uses virtual methods that are not available yet at
+     * this point.
+     **/
+    QY2DiskUsageListItem( QY2DiskUsageList * parent );
+
+
+    /**
+     * Destructor.
+     **/
+    virtual ~QY2DiskUsageListItem();
+
+
+public:
+
+    /**
+     * The currently used size of this partition.
+     *
+     * Derived classes need to implement this method.
+     **/
+
+    virtual FSize usedSize() const = 0;
+
+    /**
+     * The total size of this partition.
+     *
+     * Derived classes need to implement this method.
+     **/
+    virtual FSize totalSize() const = 0;
+
+    /**
+     * The current free size of this partition.
+     *
+     * Derived classes can choose reimpmenent this if it is less expensive than
+     * calculating this value each time from usedSize() and totalSize() which
+     * is the default implementation.
+     **/
+    virtual FSize freeSize() const;
+
+    /**
+     * The currently used percentage ( 0..100 ) of this partition.
+     *
+     * Derived classes can choose reimpmenent this if it is less expensive than
+     * calculating this value each time from usedSize() and totalSize() which
+     * is the default implementation.
+     **/
+    virtual int usedPercent() const;
+
+    /**
+     * The name to display for this partition.
+     * It makes most sense to use the mount point here ( but this is not a
+     * requirement ). This is what will be displayed in the "Name" column.
+     *
+     * Derived classes need to implement this method.
+     **/
+    virtual QString name() const = 0;
+
+    /**
+     * The device name of this partition.
+     *
+     * Derived classes may choose to reimplement this method.
+     * This default implementation returns an empty string.
+     **/
+    virtual QString deviceName() const { return ""; }
+
+
+    /**
+     * Update this item's status ( here: the numeric fields ).
+     * Triggered by QY2ListView::updateAllItemStates().
+     *
+     * Reimplemented from QY2ListViewItem.
+     **/
+    virtual void updateStatus();
+
+    /**
+     * Update this item's data completely.
+     * Triggered by QY2ListView::updateAllItemData().
+     *
+     * Reimplemented from QY2ListViewItem.
+     **/
+    virtual void updateData();
+
+    /**
+     * Re-declare ordinary setText() method so the compiler doesn't get
+     * confused which one to use.
+     **/
+    void setText( int column, const QString & text )
+       { QListViewItem::setText( column, text ); }
+
+    /**
+     * Set a column text via FSize.
+     **/
+    void setText( int column, const FSize & size );
+
+    /**
+     * Comparison function used for sorting the list.
+     * Returns:
+     * -1 if this <  other
+     * 0 if this == other
+     * +1 if this >  other
+     *
+     * Reimplemented from QY2ListViewItem.
+     **/
+    virtual int compare( QListViewItem *       other,
+                        int                    col,
+                        bool                   ascending ) const;
+
+    // Columns
+
+    int nameCol()              const   { return _diskUsageList->nameCol();             }
+    int percentageBarCol()     const   { return _diskUsageList->percentageBarCol();    }
+    int percentageCol()                const   { return _diskUsageList->percentageCol();       }
+    int usedSizeCol()          const   { return _diskUsageList->usedSizeCol();         }
+    int freeSizeCol()          const   { return _diskUsageList->freeSizeCol();         }
+    int totalSizeCol()         const   { return _diskUsageList->totalSizeCol();        }
+    int deviceNameCol()                const   { return _diskUsageList->deviceNameCol();       }
+
+
+protected:
+
+    /**
+     * ( Re- ) initialize fields - all displayed fields ( if 'allFields' is
+     * 'true' ) or only the varying fields ( used, free, percentage ).
+     **/
+    void init( bool allFields );
+
+    /**
+     * Paint method.
+     *
+     * Reimplemented from QY2ListViewItem.
+     **/
+    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.
+     * 'indent' is the number of pixels to indent the bar.
+     *
+     * Stolen from KDirStat::KDirTreeView with the author's permission.
+     **/
+    void paintPercentageBar( float             percent,
+                            QPainter *         painter,
+                            int                indent,
+                            int                width,
+                            const QColor &     fillColor,
+                            const QColor &     barBackground   );
+
+    /**
+     * Return a color that contrasts to 'contrastColor'.
+     *
+     * Stolen from KDirStat::KDirTreeView with the author's permission.
+     **/
+    QColor contrastingColor ( const QColor &   desiredColor,
+                             const QColor &    contrastColor );
+
+    /**
+     * Interpolate ( in the HSV color space ) a color between 'minColor' and
+     * 'maxColor' for a current value 'val' so that 'minVal' corresponds to
+     * 'minColor' and 'maxVal' to 'maxColor'.
+     *
+     * Returns the interpolated color.
+     **/
+    virtual QColor interpolateColor( int               val,
+                                    int                minVal,
+                                    int                maxVal,
+                                    const QColor &     minColor,
+                                    const QColor &     maxColor );
+
+    /**
+     * Interpolate ( translate ) a value 'from' in the range between 'minFrom'
+     * and 'maxFrom'  to a range between 'minTo' and 'maxTo'.
+     **/
+    int interpolate( int from,
+                    int minFrom,       int maxFrom,
+                    int minTo,         int maxTo       );
+
+
+    //
+    // Data members
+    //
+
+    QY2DiskUsageList * _diskUsageList;
+};
+
+
+
+
+#endif // ifndef QY2DiskUsageList_h
diff --git a/src/QY2LayoutUtils.cc b/src/QY2LayoutUtils.cc
new file mode 100644 (file)
index 0000000..3fc0839
--- /dev/null
@@ -0,0 +1,86 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2LayoutUtils.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  These are pure Qt functions - they can be used independently of YaST2.
+
+/-*/
+
+
+#include <qapplication.h>
+#include <qwidget.h>
+#include "QY2LayoutUtils.h"
+
+
+QWidget * addVStretch( QWidget * parent )
+{
+    QWidget * spacer = new QWidget( parent );
+    spacer->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) ); // hor/vert
+
+    return spacer;
+}
+
+
+QWidget * addHStretch( QWidget * parent )
+{
+    QWidget * spacer = new QWidget( parent );
+    spacer->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
+
+    return spacer;
+}
+
+
+QWidget * addVSpacing( QWidget * parent, int height )
+{
+    QWidget * spacer = new QWidget( parent );
+    CHECK_PTR( spacer );
+    spacer->setFixedHeight( height );
+
+    return spacer;
+}
+
+
+QWidget * addHSpacing( QWidget * parent, int width )
+{
+    QWidget * spacer = new QWidget( parent );
+    CHECK_PTR( spacer );
+    spacer->setFixedWidth( width );
+
+    return spacer;
+}
+
+
+QSize
+limitToScreenSize( const QWidget * widget, int width, int height )
+{
+    return limitToScreenSize( widget, QSize( width, height ) );
+}
+
+
+QSize
+limitToScreenSize( const QWidget * widget, const QSize & desiredSize )
+{
+    QSize availableSize = qApp->desktop()->availableGeometry( const_cast<QWidget*> (widget) ).size();
+
+    // Subtract WM decorations. There seems to be no reliable way to tell if
+    // this is necessary at all (even fvwm2 claims it is a NETWM compliant
+    // window manager) or how large the WM decorations are.
+    // For the purpose of this function, let's assume we have to subtract the
+    // common fvwm2 decoration size. This is simplistic and should be improved.
+    availableSize -= QSize( 10, 35 );
+
+    return desiredSize.boundedTo( availableSize );
+}
+
diff --git a/src/QY2LayoutUtils.h b/src/QY2LayoutUtils.h
new file mode 100644 (file)
index 0000000..6357679
--- /dev/null
@@ -0,0 +1,54 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt widgets                      |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2LayoutUtils.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  These are pure Qt functions - they can be used independently of YaST2.
+
+/-*/
+
+
+#ifndef QY2LayoutUtils_h
+#define QY2LayoutUtils_h
+
+class QWidget;
+
+
+/**
+ * Add vertical stretchable space.
+ **/
+QWidget * addVStretch( QWidget * parent );
+
+/**
+ * Add horizontal stretchable space.
+ **/
+QWidget * addHStretch( QWidget * parent );
+
+/**
+ * Add a fixed height vertical space
+ **/
+QWidget * addVSpacing( QWidget * parent, int height = 8 );
+
+/**
+ * Add a fixed height horizontal space
+ **/
+QWidget * addHSpacing( QWidget * parent, int width = 8 );
+
+/**
+ * Limit a QSize to what is available on the same screen as 'widget'.
+ **/
+QSize limitToScreenSize( const QWidget * widget, const QSize & desiredSize );
+QSize limitToScreenSize( const QWidget * widget, int width, int height );
+
+#endif // ifndef QY2LayoutUtils_h
diff --git a/src/QY2ListView.cc b/src/QY2ListView.cc
new file mode 100644 (file)
index 0000000..8f38a92
--- /dev/null
@@ -0,0 +1,569 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2ListView.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt widget - it can be used independently of YaST2.
+
+/-*/
+
+
+#include <qpixmap.h>
+#include <qheader.h>
+
+#include "QY2ListView.h"
+
+
+QY2ListView::QY2ListView( QWidget * parent )
+    : QListView( parent )
+    , _mousePressedItem(0)
+    , _mousePressedCol( -1 )
+    , _mousePressedButton( NoButton )
+    , _sortByInsertionSequence( false )
+    , _nextSerial(0)
+    , _mouseButton1PressedInHeader( false )
+    , _finalSizeChangeExpected( false )
+{
+    QListView::setShowToolTips( false );
+    _toolTip = new QY2ListViewToolTip( this );
+
+    if ( header() )
+       header()->installEventFilter( this );
+
+    connect( header(), SIGNAL( sizeChange        ( int, int, int ) ),
+            this,      SLOT  ( columnWidthChanged( int, int, int ) ) );
+}
+
+
+QY2ListView::~QY2ListView()
+{
+    if ( _toolTip )
+       delete _toolTip;
+}
+
+
+void
+QY2ListView::selectSomething()
+{
+    QListViewItemIterator it( this );
+
+    while ( *it )
+    {
+       QY2ListViewItem * item = dynamic_cast<QY2ListViewItem *> (*it);
+
+       if ( item && item->isSelectable() )
+       {
+           setSelected( item, true ); // emits signal, too
+           return;
+       }
+       
+       ++it;
+    }
+}
+
+
+void
+QY2ListView::clear()
+{
+    QListView::clear();
+    restoreColumnWidths();
+}
+
+
+void
+QY2ListView::updateItemStates()
+{
+    QListViewItemIterator it( this );
+
+    while ( *it )
+    {
+       QY2ListViewItem * item = dynamic_cast<QY2ListViewItem *> (*it);
+
+       if ( item )
+           item->updateStatus();
+       
+       ++it;
+    }
+}
+
+
+void
+QY2ListView::updateItemData()
+{
+    QListViewItemIterator it( this );
+
+    while ( *it )
+    {
+       QY2ListViewItem * item = dynamic_cast<QY2ListViewItem *> (*it);
+
+       if ( item )
+           item->updateData();
+       
+       ++it;
+    }
+}
+
+
+QString
+QY2ListView::toolTip( QListViewItem * listViewItem, int column )
+{
+    if ( ! listViewItem )
+       return QString::null;
+
+    QString text;
+
+#if 0
+    text.sprintf( "Column %d:\n%s", column, (const char *) listViewItem->text( column ) );
+#endif
+
+    // Try known item classes
+
+    QY2ListViewItem * item = dynamic_cast<QY2ListViewItem *> (listViewItem);
+
+    if ( item )
+       return item->toolTip( column );
+
+    QY2CheckListItem * checkListItem = dynamic_cast<QY2CheckListItem *> (listViewItem);
+
+    if ( checkListItem )
+       return checkListItem->toolTip( column );
+
+    return QString::null;
+}
+
+
+void
+QY2ListView::saveColumnWidths()
+{
+    _savedColumnWidth.clear();
+    _savedColumnWidth.reserve( columns() );
+
+    for ( int i = 0; i < columns(); i++ )
+    {
+       _savedColumnWidth.push_back( columnWidth(i) );
+    }
+}
+
+
+void
+QY2ListView::restoreColumnWidths()
+{
+    if ( _savedColumnWidth.size() != (unsigned) columns() )    // never manually resized
+    {
+       for ( int i = 0; i < columns(); i++ )           // use optimized column width
+           adjustColumn( i );
+    }
+    else                                               // stored settings after manual resizing
+    {
+       for ( int i = 0; i < columns(); i++ )
+       {
+           setColumnWidth( i, _savedColumnWidth[ i ] ); // restore saved column width
+       }
+    }
+}
+
+
+void
+QY2ListView::contentsMousePressEvent( QMouseEvent * ev )
+{
+    QListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
+
+    if ( item && item->isEnabled() )
+    {
+       _mousePressedItem       = item;
+       _mousePressedCol        = header()->sectionAt( ev->pos().x() );
+       _mousePressedButton     = ev->button();
+    }
+    else       // invalidate last click data
+    {
+       _mousePressedItem       = 0;
+       _mousePressedCol        = -1;
+       _mousePressedButton     = -1;
+    }
+
+    // Call base class method
+    QListView::contentsMousePressEvent( ev );
+}
+
+
+void
+QY2ListView::contentsMouseReleaseEvent( QMouseEvent * ev )
+{
+    QListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
+
+    if ( item && item->isEnabled() && 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() ) );
+       }
+
+    }
+
+    // invalidate last click data
+
+    _mousePressedItem  = 0;
+    _mousePressedCol   = -1;
+    _mousePressedButton        = NoButton;
+
+    // Call base class method
+    QListView::contentsMouseReleaseEvent( ev );
+}
+
+
+void
+QY2ListView::contentsMouseDoubleClickEvent( QMouseEvent * ev )
+{
+    QListViewItem * 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        = NoButton;
+
+    // Call base class method
+    QListView::contentsMouseDoubleClickEvent( ev );
+}
+
+
+void
+QY2ListView::columnWidthChanged( int, int, int )
+{
+    // Workaround for Qt bug:
+    //
+    // QHeader sends a sizeChange() signal for every size change, not only (as
+    // documented) when the user resizes a header column manually. But we only
+    // want to record the column widths if the user explicitly did that, so
+    // ignore those signals if the mouse isn't pressed. There is also one final
+    // sizeChange() signal immediately after the user releases the mouse button.
+
+    if ( _mouseButton1PressedInHeader || _finalSizeChangeExpected )
+    {
+       saveColumnWidths();
+
+       // Consume that one sizeChange() signal that is sent immediately after
+       // the mouse button is released, but make sure to reset that flag only
+       // when appropriate.
+
+       if ( ! _mouseButton1PressedInHeader )
+           _finalSizeChangeExpected = false;
+    }
+}
+
+
+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;
+           }
+       }
+    }
+
+    return QListView::eventFilter( obj, event );
+}
+
+
+QSize
+QY2ListView::minimumSizeHint() const
+{
+    return QSize( 0, 0 );
+}
+
+
+void
+QY2ListView::setSortByInsertionSequence( bool sortByInsertionSequence )
+{
+    _sortByInsertionSequence = sortByInsertionSequence;
+    sort();
+}
+
+
+
+
+
+
+QY2ListViewItem::QY2ListViewItem( QY2ListView *        parentListView,
+                                 const QString &       text )
+    : QListViewItem( parentListView, text )
+{
+    _serial = parentListView->nextSerial();
+}
+
+
+QY2ListViewItem::QY2ListViewItem( QListViewItem *      parentItem,
+                                 const QString &       text )
+    : QListViewItem( parentItem, text )
+{
+    _serial = 0;
+
+    QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( listView() );
+
+    if ( parentListView )
+       _serial = parentListView->nextSerial();
+}
+
+
+QY2ListViewItem::~QY2ListViewItem()
+{
+    // NOP
+}
+
+
+/**
+ * Comparison function used for sorting the list.
+ * Returns:
+ * -1 if this <         other
+ *  0 if this == other
+ * +1 if this >         other
+ **/
+int
+QY2ListViewItem::compare( QListViewItem *      otherListViewItem,
+                         int                   col,
+                         bool                  ascending ) const
+{
+    bool sortByInsertionSequence = false;
+    QY2ListView * parentListView = dynamic_cast<QY2ListView *> (listView());
+
+    if ( parentListView )
+       sortByInsertionSequence = parentListView->sortByInsertionSequence();
+    
+    if ( sortByInsertionSequence )
+    {
+       QY2ListViewItem * other = dynamic_cast<QY2ListViewItem *> (otherListViewItem);
+
+       if ( other )
+       {
+           if ( this->serial() < other->serial() ) return -1;
+           if ( this->serial() > other->serial() ) return  1;
+           return 0;
+       }
+
+       // Still here? Try the other version: QY2CheckListItem.
+
+       QY2CheckListItem * otherCheckListItem = dynamic_cast<QY2CheckListItem *> (otherListViewItem);
+
+       if ( otherCheckListItem )
+       {
+           if ( this->serial() < otherCheckListItem->serial() ) return -1;
+           if ( this->serial() > otherCheckListItem->serial() ) return  1;
+           return 0;
+       }
+
+    }
+
+    return QListViewItem::compare( otherListViewItem, col, ascending );
+}
+
+
+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 );
+
+    QListViewItem::paintCell( painter, cg, column, width, alignment );
+}
+
+
+
+
+
+
+QY2CheckListItem::QY2CheckListItem( QY2ListView *              parentListView,
+                                   const QString &             text,
+                                   QCheckListItem::Type        type )
+    : QCheckListItem( parentListView, text, type )
+{
+    _serial = parentListView->nextSerial();
+}
+
+
+QY2CheckListItem::QY2CheckListItem( QListViewItem *            parentItem,
+                                   const QString &             text,
+                                   QCheckListItem::Type        type )
+    : QCheckListItem( parentItem, text, type )
+{
+    _serial = 0;
+    QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( listView() );
+
+    if ( parentListView )
+       _serial = parentListView->nextSerial();
+}
+
+
+QY2CheckListItem::QY2CheckListItem( QCheckListItem *           parentItem,
+                                   const QString &             text,
+                                   QCheckListItem::Type        type )
+    : QCheckListItem( parentItem, text, type )
+{
+    _serial = 0;
+    QY2ListView * parentListView = dynamic_cast<QY2ListView *> ( listView() );
+
+    if ( parentListView )
+       _serial = parentListView->nextSerial();
+}
+
+
+QY2CheckListItem::~QY2CheckListItem()
+{
+    // NOP
+}
+
+
+/**
+ * Comparison function used for sorting the list.
+ * Returns:
+ * -1 if this <         other
+ *  0 if this == other
+ * +1 if this >         other
+ **/
+int
+QY2CheckListItem::compare( QListViewItem *     otherListViewItem,
+                          int                  col,
+                          bool                 ascending ) const
+{
+    bool sortByInsertionSequence = false;
+    QY2ListView * parentListView = dynamic_cast<QY2ListView *> (listView());
+
+    if ( parentListView )
+       sortByInsertionSequence = parentListView->sortByInsertionSequence();
+    
+    if ( sortByInsertionSequence )
+    {
+       QY2CheckListItem * other = dynamic_cast<QY2CheckListItem *> (otherListViewItem);
+
+       if ( other )
+       {
+           if ( this->serial() < other->serial() ) return -1;
+           if ( this->serial() > other->serial() ) return  1;
+           return 0;
+       }
+
+
+       // Still here? Try the other version: QY2ListViewItem.
+
+       QY2ListViewItem * otherCheckListItem = dynamic_cast<QY2ListViewItem *> (otherListViewItem);
+
+       if ( otherCheckListItem )
+       {
+           if ( this->serial() < otherCheckListItem->serial() ) return -1;
+           if ( this->serial() > otherCheckListItem->serial() ) return  1;
+           return 0;
+       }
+
+    }
+
+    return QListViewItem::compare( otherListViewItem, col, ascending );
+}
+
+
+void
+QY2CheckListItem::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 );
+
+    QCheckListItem::paintCell( painter, cg, column, width, alignment );
+}
+
+
+void
+QY2ListViewToolTip::maybeTip( const QPoint & pos )
+{
+    QHeader *       header        = _listView->header();
+    QListViewItem * item          = _listView->itemAt( pos );
+
+    if ( ! item )
+       return;
+
+    int x      = _listView->viewportToContents( pos ).x();
+    int column = header->sectionAt(x);
+    int indent = 0;
+
+    if ( column == 0 )
+    {
+       indent  =  item->depth() + ( _listView->rootIsDecorated() ? 1 : 0 );
+       indent *=  _listView->treeStepSize();
+
+       if ( pos.x() < indent )
+           column = -1;
+    }
+
+    QString text = _listView->toolTip( item, column );
+
+    if ( ! text.isEmpty() )
+    {
+       QRect rect( _listView->itemRect( item ) );
+
+       if ( column < 0 )
+       {
+           rect.setX(0);
+           rect.setWidth( indent );
+       }
+       else
+       {
+           QPoint topLeft( header->sectionPos( column ), 0 );
+           topLeft = _listView->contentsToViewport( topLeft );
+           rect.setX( topLeft.x() );
+           rect.setWidth( header->sectionSize( column ) );
+       }
+
+       tip( rect, text );
+    }
+}
+
+
+#include "QY2ListView.moc"
diff --git a/src/QY2ListView.h b/src/QY2ListView.h
new file mode 100644 (file)
index 0000000..a2ebb8f
--- /dev/null
@@ -0,0 +1,475 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt widgets                      |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              QY2ListView.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt widget - it can be used independently of YaST2.
+
+/-*/
+
+
+#ifndef QY2ListView_h
+#define QY2ListView_h
+
+#include <qlistview.h>
+#include <qtooltip.h>
+#include <qpoint.h>
+#include <qcolor.h>
+#include <vector>
+
+
+class QY2ListViewItem;
+class QY2ListViewToolTip;
+
+
+/**
+ * @short Enhanced QListView
+ **/
+class QY2ListView : public QListView
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor
+     **/
+    QY2ListView( QWidget * parent );
+
+    /**
+     * Destructor
+     **/
+    virtual ~QY2ListView();
+
+
+public slots:
+
+    /**
+     * Select a list entry (if there is any).
+     * Usually this will be the first list entry, but don't rely on that - this
+     * might change without notice. Emits signal selectionChanged().
+     **/
+    virtual void selectSomething();
+
+    /**
+     * Reimplemented from QListView:
+     * Adjust header sizes after clearing contents.
+     **/
+    virtual void clear();
+
+    /**
+     * Update the status display of all list entries:
+     * Call QY2ListViewItem::updateStatus() for each item.
+     * This is an expensive operation.
+     **/
+    void updateItemStates();
+
+    /**
+     * Update the status display of all list entries:
+     * Call QY2ListViewItem::updateData() for each item.
+     * This is an expensive operation.
+     **/
+    void updateItemData();
+
+    /**
+     * Save the current column widths.
+     **/
+    void saveColumnWidths();
+
+    /**
+     * Restore the column widths to what was saved previously with
+     * saveColumnWidths().
+     **/
+    void restoreColumnWidths();
+
+
+signals:
+
+    /**
+     * Emitted for mouse clicks on an item
+     **/
+    void columnClicked         ( int                   button,
+                                 QListViewItem *       item,
+                                 int                   col,
+                                 const QPoint &        pos );
+
+    /**
+     * Emitted for mouse double clicks on an item
+     **/
+    void columnDoubleClicked   ( int                   button,
+                                 QListViewItem *       item,
+                                 int                   col,
+                                 const QPoint &        pos );
+
+public:
+
+    /**
+     * Returns a tool tip text for a specific column of a list item.
+     * 'column' is -1 if the mouse pointer is in the tree indentation area.
+     *
+     * This default implementation tries to call
+     * QY2ListViewItem::toolTip( column ) or
+     * QY2CheckListItem::toolTip( column ), respectively
+     * if 'item' is a subclass of either.
+     *
+     * Derived classes may handle this differently.
+     **/
+    virtual QString toolTip( QListViewItem * item, int column );
+
+    /**
+     * Returns 'true' if the sort order should always be the item insertion
+     * order, 'false' if the user can change the sort order by clicking on a
+     * column header.
+     **/
+    bool sortByInsertionSequence() const { return _sortByInsertionSequence; }
+
+    /**
+     * Enforce sorting by item insertion order (true) or let user change
+     * sorting by clicking on a column header (false).
+     **/
+    virtual void setSortByInsertionSequence( bool sortByInsertionSequence );
+
+    /**
+     * Returns the next free serial number for items that want to be ordered in
+     * insertion sequence.
+     **/
+    int nextSerial() { return _nextSerial++; }
+
+    /**
+     * Returns the minimum size required for this widget.
+     * Inherited from QWidget.
+     **/
+    virtual QSize minimumSizeHint() const;
+
+    /**
+     * Event filter - inherited from QWidget
+     **/
+    virtual bool eventFilter( QObject * obj, QEvent * event );
+
+
+protected slots:
+
+    /**
+     * Internal: Handle manual column resize.
+     * Save the user's preferred sizes so they don't get overwritten each time
+     * the list is cleared and filled with new contents.
+     **/
+    void columnWidthChanged( int col, int oldSize, int newSize );
+
+protected:
+
+    /**
+     * Handle mouse clicks.
+     * Reimplemented from QScrollView.
+     **/
+    virtual void contentsMousePressEvent( QMouseEvent * e );
+
+    /**
+     * Handle mouse clicks.
+     * Reimplemented from QScrollView.
+     **/
+    virtual void contentsMouseReleaseEvent( QMouseEvent * );
+
+    /**
+     * Handle mouse clicks.
+     * Reimplemented from QScrollView.
+     **/
+    virtual void contentsMouseDoubleClickEvent( QMouseEvent * );
+
+
+    //
+    // Data members
+    //
+
+    QListViewItem *            _mousePressedItem;
+    int                                _mousePressedCol;
+    int                                _mousePressedButton;
+
+    std::vector<int>           _savedColumnWidth;
+    bool                       _sortByInsertionSequence;
+    int                                _nextSerial;
+
+    QY2ListViewToolTip *       _toolTip;
+    bool                       _mouseButton1PressedInHeader;
+    bool                       _finalSizeChangeExpected;
+};
+
+
+
+/**
+ * Enhanced QListViewItem
+ **/
+class QY2ListViewItem: public QListViewItem
+{
+public:
+
+    /**
+     * Constructor for toplevel items.
+     **/
+    QY2ListViewItem( QY2ListView *     parentListView,
+                    const QString &    text = QString::null );
+
+
+    /**
+     * Constructor for deeper level items.
+     **/
+    QY2ListViewItem( QListViewItem *   parentItem,
+                    const QString &    text = QString::null );
+
+    /**
+     * Destructor
+     **/
+    virtual ~QY2ListViewItem();
+
+    /**
+     * Update this item's status.
+     * Triggered by QY2ListView::updateAllItemStates().
+     * Derived classes should overwrite this.
+     * This default implementation does nothing.
+     **/
+    virtual void updateStatus() {}
+
+    /**
+     * Update this item's data completely.
+     * Triggered by QY2ListView::updateAllItemData().
+     * Derived classes should overwrite this.
+     * This default implementation does nothing.
+     **/
+    virtual void updateData() {}
+
+    /**
+     * Comparison function used for sorting the list.
+     * Returns:
+     * -1 if this <  other
+     * 0 if this == other
+     * +1 if this >  other
+     *
+     * Reimplemented from QListViewItem
+     **/
+    virtual int compare( QListViewItem *       other,
+                        int                    col,
+                        bool                   ascending ) const;
+
+    /**
+     * Return this item's serial number.
+     * Useful for comparison functions that order by insertion sequence.
+     **/
+    int serial() const { return _serial; }
+
+    /**
+     * Set the text foreground color for all columns.
+     * For more specific purposes reimiplement paintCell().
+     **/
+    void setTextColor( const QColor & col )
+       { _textColor = col; }
+
+    /**
+     * Set the text background color for all columns.
+     * For more specific purposes reimiplement paintCell().
+     **/
+    void setBackgroundColor( const QColor & col )
+       { _backgroundColor = col; }
+
+    /**
+     * Returns a tool tip text for a specific column of this item.
+     * 'column' is -1 if the mouse pointer is in the tree indentation area.
+     *
+     * This default implementation does nothing.
+     **/
+    virtual QString toolTip( int column ) { return QString::null; }
+
+
+protected:
+
+    /**
+     * Paint method. Reimplemented from @ref QListViewItem so different
+     * colors can be used.
+     *
+     * Reimplemented from QListViewItem.
+     **/
+    virtual void paintCell( QPainter *         painter,
+                           const QColorGroup & colorGroup,
+                           int                 column,
+                           int                 width,
+                           int                 alignment );
+
+    //
+    // Data members
+    //
+
+    int                _serial;
+
+    QColor     _textColor;
+    QColor     _backgroundColor;
+};
+
+
+
+/**
+ * Enhanced QCheckListItem
+ **/
+class QY2CheckListItem: public QCheckListItem
+{
+public:
+
+    /**
+     * Constructor for toplevel items.
+     **/
+    QY2CheckListItem( QY2ListView *            parentListView,
+                     const QString &           text,
+                     QCheckListItem::Type      type );
+
+
+    /**
+     * Constructor for deeper level items.
+     **/
+    QY2CheckListItem( QListViewItem *          parentItem,
+                     const QString &           text,
+                     QCheckListItem::Type      type );
+
+
+    /**
+     * Constructor for deeper level items for QCheckListItem parents.
+     **/
+    QY2CheckListItem( QCheckListItem *                 parentItem,
+                     const QString &           text,
+                     QCheckListItem::Type      type );
+
+    /**
+     * Destructor
+     **/
+    virtual ~QY2CheckListItem();
+
+    /**
+     * Update this item's status.
+     * Triggered by QY2ListView::updateAllItemStates().
+     * Derived classes should overwrite this.
+     * This default implementation does nothing.
+     **/
+    virtual void updateStatus() {}
+
+    /**
+     * Update this item's data completely.
+     * Triggered by QY2ListView::updateAllItemData().
+     * Derived classes should overwrite this.
+     * This default implementation does nothing.
+     **/
+    virtual void updateData() {}
+
+    /**
+     * Comparison function used for sorting the list.
+     * Returns:
+     * -1 if this <  other
+     * 0 if this == other
+     * +1 if this >  other
+     *
+     * Reimplemented from QListViewItem
+     **/
+    virtual int compare( QListViewItem *       other,
+                        int                    col,
+                        bool                   ascending ) const;
+
+    /**
+     * Return this item's serial number.
+     * Useful for comparison functions that order by insertion sequence.
+     **/
+    int serial() const { return _serial; }
+
+    /**
+     * Set the text foreground color for all columns.
+     * For more specific purposes reimiplement paintCell().
+     **/
+    void setTextColor( const QColor & col )
+       { _textColor = col; }
+
+    /**
+     * Set the text background color for all columns.
+     * For more specific purposes reimiplement paintCell().
+     **/
+    void setBackgroundColor( const QColor & col )
+       { _backgroundColor = col; }
+
+    /**
+     * Returns a tool tip text for a specific column of this item.
+     * 'column' is -1 if the mouse pointer is in the tree indentation area.
+     *
+     * This default implementation does nothing.
+     **/
+    virtual QString toolTip( int column ) { return QString(); }
+
+
+protected:
+
+    /**
+     * Paint method. Reimplemented from @ref QListViewItem so different
+     * colors can be used.
+     *
+     * Reimplemented from QListViewItem.
+     **/
+    virtual void paintCell( QPainter *         painter,
+                           const QColorGroup & colorGroup,
+                           int                 column,
+                           int                 width,
+                           int                 alignment );
+
+    //
+    // Data members
+    //
+
+    int                _serial;
+
+    QColor     _textColor;
+    QColor     _backgroundColor;
+};
+
+
+/**
+ * Tool tip for a QY2ListView widget: Enables individual tool tips specific to
+ * each list item and each column. Overwrite QY2ListViewItem::toolTip() to use
+ * this.
+ **/
+class QY2ListViewToolTip : public QToolTip
+{
+public:
+
+    /**
+     * Constructor.
+     **/
+    QY2ListViewToolTip( QY2ListView * parent )
+       : QToolTip( parent->viewport() ), _listView( parent )  {}
+
+    /**
+     * Destructor (to make gcc 4.x happy)
+     **/
+    virtual ~QY2ListViewToolTip() {}
+
+
+protected:
+
+    /**
+     * Decide if there is a tool tip text at 'p' and display it if there is one.
+     *
+     * Reimplemented from QToolTip.
+     **/
+    virtual void maybeTip( const QPoint & p );
+
+
+    //
+    // Data members
+    //
+
+    QY2ListView * _listView;
+};
+
+#endif // ifndef QY2ListView_h
diff --git a/src/QY2Settings.cc b/src/QY2Settings.cc
new file mode 100644 (file)
index 0000000..73c77bf
--- /dev/null
@@ -0,0 +1,315 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt classes                      |
+|                                                   (C) SuSE Linux AG |
+\----------------------------------------------------------------------/
+
+  File:              QY2Settings.cpp
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt class - it can be used independently of YaST2.
+
+/-*/
+
+
+
+#include "QY2Settings.h"
+
+#include <qfile.h>
+#include <qregexp.h>
+
+#include <iostream>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+
+QY2Settings::QY2Settings( const QString & fileName, AccessMode accessMode )
+    : _fileName( fileName )
+    , _accessMode( accessMode )
+{
+    _sections.setAutoDelete( true );
+
+    if ( _accessMode == ReadOnly || _accessMode == ReadWrite )
+       load();
+    else
+       initSections();
+}
+
+void QY2Settings::initSections()
+{
+    _defaultSection = new Section( "" );
+    CHECK_PTR( _defaultSection );
+
+    _currentSection = _defaultSection;
+    _sections.insert( "", _defaultSection );
+}
+
+
+
+QY2Settings::~QY2Settings()
+{
+    if ( _dirty && _accessMode != ReadOnly )
+       save();
+}
+
+
+bool QY2Settings::selectSection( const QString & sectionName )
+{
+    _currentSection = _sections[ sectionName ];
+
+    if ( _currentSection )
+    {
+       return true;
+    }
+    else
+    {
+       _currentSection = _defaultSection;
+       return false;
+    }
+}
+
+
+void QY2Settings::selectDefaultSection()
+{
+    _currentSection = _defaultSection;
+}
+
+
+QStringList QY2Settings::sections( bool includeUnnamed ) const
+{
+    QStringList sectionList;
+    SectionIterator it( _sections );
+
+    while ( *it )
+    {
+       QString sectionName = (*it)->name();
+
+       if ( includeUnnamed || ! sectionName.isEmpty() )
+           sectionList.append( sectionName );
+
+       ++it;
+    }
+
+    return sectionList;
+}
+
+
+QString QY2Settings::get( const QString & key, const QString & fallback ) const
+{
+    // Can't use operator[] here since we have a pointer
+
+    Section::const_iterator it = _currentSection->find( key );
+
+    if ( it == _currentSection->constEnd() )
+       return fallback;
+
+    return it.data();
+}
+
+
+QString QY2Settings::operator[] ( const QString & key )
+{
+    return get( key );
+}
+
+
+bool QY2Settings::hasKey( const QString & key )
+{
+    return _currentSection->contains( key );
+}
+
+
+QStringList QY2Settings::keys() const
+{
+    QStringList keyList;
+
+    for ( Section::const_iterator it = _currentSection->constBegin();
+         it != _currentSection->constEnd();
+         ++it )
+    {
+       keyList.append( it.key() );
+    }
+
+    return keyList;
+}
+
+
+bool QY2Settings::load()
+{
+    initSections();
+    _readError = false;
+    
+    if ( _accessMode == WriteOnly )
+       return false;
+
+    
+    QFile file( _fileName );
+
+    if ( ! file.open( IO_ReadOnly ) )
+    {
+       cerr << "Can't load settings from " << _fileName
+            << ": " << file.errorString()
+            << endl;
+       
+       _readError = true;
+       
+       return false;
+    }
+    
+    QTextStream str( &file );
+    str.setEncoding( QTextStream::UnicodeUTF8 );
+    QString line;
+    int lineCount = 0;
+
+    while ( ! file.atEnd() )
+    {
+       line = str.readLine().stripWhiteSpace();
+       lineCount++;
+       
+       
+       // Skip empty lines
+       
+       if ( line.isEmpty() ) continue;
+
+       
+       // Skip comment lines
+
+       if ( line.startsWith( "#"  ) ) continue;
+       if ( line.startsWith( ";"  ) ) continue;
+       if ( line.startsWith( "//" ) ) continue;
+
+
+       if ( line.startsWith( "[" ) )
+       {
+           // New section
+
+           line.replace( QRegExp( "^\\[\\s*" ), "" );
+           line.replace( QRegExp( "\\s*\\].*$" ), "" );
+           addSection( line );
+       }
+       else if ( line.contains( "=" ) )
+       {
+           // key=value pair
+
+           QString key   = line.section( "=", 0, 0 ).stripWhiteSpace();
+           QString value = line.section( "=", 1, 1 ).stripWhiteSpace();
+
+           value.replace( QRegExp( "^\"" ), "" );      // strip leading "
+           value.replace( QRegExp( "\"$" ), "" );      // strip trailing "
+           value.replace( "\\\"", "\"" );              // un-escape "
+
+           // qDebug( "Read %s=%s", (const char *) key, (const char *) value );
+           set( key, value );
+       }
+       else
+       {
+           qWarning( "%s:%d: Syntax error: %s",
+                     (const char *) _fileName, lineCount, (const char *) line );
+       }
+    }
+
+    _dirty = false;
+
+    return true;
+}
+
+
+bool QY2Settings::save()
+{
+    if ( _accessMode == ReadOnly )
+       return false;
+
+    QFile file( _fileName );
+
+    if ( ! file.open( IO_WriteOnly ) )
+    {
+       cerr << "Can't save settings to " << _fileName
+            << ": " << file.errorString()
+            << endl;
+       
+       return false;
+    }
+    
+    QTextStream str( &file );
+    str.setEncoding( QTextStream::UnicodeUTF8 );
+
+    // The default section must be saved first since it doesn't have a section
+    // name that could be used for a headline
+    saveSection( str, _defaultSection );
+    
+    SectionIterator sectIt( _sections );
+    
+    while ( *sectIt )
+    {
+       if ( *sectIt != _defaultSection )
+           saveSection( str, *sectIt );
+       ++sectIt;
+    }
+
+    _dirty = false;
+
+    return true;
+}
+
+
+void QY2Settings::saveSection( QTextStream & str, Section * sect )
+{
+    // Section header
+
+    if ( ! sect->name().isEmpty() )
+       str << "[" << sect->name() << "]" << endl;
+
+    // value=key pairs for this section
+
+    for ( Section::iterator it = sect->begin();
+         it != sect->end();
+         ++it )
+    {
+       QString value = it.data();
+       value.replace( "\"", "\\\"" );  // Escape embedded " with \"
+
+       str << it.key() << "= \"" << value << "\"" << endl;
+    }
+
+    str << endl;
+}
+
+
+void QY2Settings::set( const QString & key, const QString & value )
+{
+    _currentSection->insert( key, value );
+    _dirty = true;
+}
+
+
+void QY2Settings::addSection( const QString & sectionName )
+{
+    _currentSection = _sections[ sectionName ]; // already there?
+
+    if ( _currentSection )                     // -> use it
+       return;
+
+    _currentSection = new Section( sectionName );
+    CHECK_PTR( _currentSection );
+
+    _sections.insert( sectionName, _currentSection );
+    _dirty = true;
+}
+
+
+void QY2Settings::clearSection()
+{
+    _currentSection->clear();
+    _dirty = true;
+}
+
+
diff --git a/src/QY2Settings.h b/src/QY2Settings.h
new file mode 100644 (file)
index 0000000..6af312d
--- /dev/null
@@ -0,0 +1,255 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                         contributed Qt classes                      |
+|                                                   (C) SuSE Linux AG |
+\----------------------------------------------------------------------/
+
+  File:              QY2Settings.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+  This is a pure Qt class - it can be used independently of YaST2.
+
+/-*/
+
+
+#ifndef QY2Settings_h
+#define QY2Settings_h
+
+#include <qstring.h>
+#include <qmap.h>
+#include <qdict.h>
+#include <qstringlist.h>
+#include <qtextstream.h>
+
+/**
+ * Utility class that handles program settings in .ini file format:
+ *
+ *     key="value"
+ *     key2 = value
+ *     ; comment
+ *     # comment
+ *
+ *     [section-title]
+ *     key = "value"
+ *      ; comment
+ *     key2="value"
+ *     key3 = _( "message that needs to be translated" )
+ *
+ *     [section-title2]
+ *     key="value"
+ *     key2="value"
+ *
+ * key=value pairs appear one on a line each. Leading and trailing whitespace
+ * is disregarded around both key and value. Value should be quoted (but
+ * doesn't need to). Quotes in value are escaped with \".
+ **/
+class QY2Settings
+{
+public:
+
+    enum AccessMode
+    {
+       ReadOnly,
+       ReadWrite,
+       WriteOnly
+    };
+
+    /**
+     * Constructor. Reads settings from the specified file.
+     *
+     * Use readError() or readOk() afterwards to check for read errors.
+     **/
+    QY2Settings( const QString & fileName, AccessMode accessMode=ReadOnly );
+
+    /**
+     * Destructor.
+     *
+     * Writes any pending changes back to the file if there are any left
+     * if accessMode() is ReadWrite or WriteOnly.
+     **/
+    ~QY2Settings();
+
+    /**
+     * Returns 'true' if the settings couldn't be read from the file specified
+     * in the constructor.
+     **/
+    bool readError() const { return _readError; }
+
+    /**
+     * Returns 'true' if the settings were read without problems from the file
+     * specified in the constructor. This is simply the opposite of
+     * readError().
+     **/
+    bool readOk() const { return ! _readError; }
+
+    /**
+     * Select the specified section in the settings for subsequent get()
+     * calls. Until is used, the unnamed default section is used.
+     *
+     * In the settings file, a section is marked with
+     *
+     * [section-title]
+     *
+     * Using a null string (QString::null) switches back to the unnamed default
+     * section.
+     *
+     * Returns 'true' upon success, 'false' if there is no such section (in
+     * which case the unnamed default section will be selected).
+     **/
+    bool selectSection( const QString & section );
+
+    /**
+     * Select the default (unnamed) section for subsequent get() calls.
+     * This is the default unless selectSection() was called.
+     **/
+    void selectDefaultSection();
+
+    /**
+     * Returns the name of the current section or QString::null if the default
+     * section is used.
+     **/
+    QString currentSection() const { return _currentSectionName; }
+
+    /**
+     * Returns a list of all sections.
+     * 'includeUnnamed' specifies if the unnamed default section should be
+     * included in the list.
+     * The list sort order is undefined.
+     **/
+    QStringList sections( bool includeUnnamed = false ) const;
+
+    /**
+     * Returns the value for the specified key in the current section.
+     * If there is no such key, the specified fallback value is returned.
+     **/
+    QString get( const QString & key,
+                const QString & fallback = "") const;
+
+    /**
+     * Same as get() with fallback always an empty string
+     **/
+    QString operator[] ( const QString & key );
+
+    /**
+     * Checks if the current section has the specified key.
+     **/
+    bool hasKey( const QString & key );
+
+    /**
+     * Returns a list of all keys in the current section.
+     * The list sort order is undefined.
+     **/
+    QStringList keys() const;
+
+    //
+    // Write access
+    //
+    // All write access functions will fail if the current access mode is not
+    // one of ReadWrite / WriteOnly.
+    //
+
+    /**
+     * Set the specified key to the specified value. Overwrites any existing
+     * key-value pair or adds a new one if there is no such key yet.
+     **/
+    void set( const QString & key, const QString & value );
+
+    /**
+     * Add a section with the specified name. If a section with that name
+     * already exists, it will only be selected and its old contents will
+     * remain untouched.
+     * In any case, this section becomes the current section.
+     **/
+    void addSection( const QString & section );
+
+    /**
+     * Clear all key=value pairs from the current section.
+     **/
+    void clearSection();
+
+    /**
+     * Writes changed settings back to the file specified in the constructor if
+     * accessMode() is ReadWrite or WriteOnly.
+     *
+     * Returns 'true' on success.
+     **/
+    bool save();
+
+    /**
+     * Returns 'true' if there are any changes that need to be written.
+     *
+     * Always returns 'false' if accessMode() is ReadOnly.
+     **/
+    bool pendingChanges() const { return _dirty; }
+
+    /**
+     * Returns the file name.
+     **/
+    QString fileName() const { return _fileName; }
+
+    /**
+     * Returns the access mode - one of ReadOnly, ReadWrite, WriteOnly.
+     **/
+    AccessMode accessMode() const { return _accessMode; }
+
+
+protected:
+
+    class Section: public QMap<QString, QString>
+    {
+    public:
+       Section( const QString & name )
+           : QMap<QString, QString>()
+           , _name( name )
+           {}
+       QString name() const { return _name; }
+
+    protected:
+
+       QString _name;
+    };
+    
+
+
+    /**
+     * Initialize the section data
+     **/
+    void initSections();
+
+    /**
+     * Read the settings file. Sets _readError depending on success or failure.
+     * Returns 'true' upon success.
+     **/
+    bool load();
+
+    /**
+     * Save one section to a stream
+     **/
+    void saveSection( QTextStream & stream, Section * section );
+
+    
+    //
+    // Data members
+    //
+
+    QString            _fileName;
+    AccessMode         _accessMode;
+    bool               _readError;
+    QString            _currentSectionName;
+    Section *          _currentSection;
+    bool               _dirty;
+
+    Section *          _defaultSection;
+    QDict<Section>     _sections;
+    
+    typedef QDictIterator<Section>     SectionIterator;
+};
+
+#endif // QY2Settings_h
diff --git a/src/Y2CCQt.cc b/src/Y2CCQt.cc
new file mode 100644 (file)
index 0000000..036dfa8
--- /dev/null
@@ -0,0 +1,29 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              Y2CCQt.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#include "Y2CCQt.h"
+
+// This is very important: We create one global variable of
+// Y2CCQt. Its constructor will register it automatically to
+// the Y2ComponentBroker, so that will be able to find it.
+// This all happens before main() is called!
+
+Y2CCQt g_y2ccqt;
+
+
diff --git a/src/Y2CCQt.h b/src/Y2CCQt.h
new file mode 100644 (file)
index 0000000..4aad419
--- /dev/null
@@ -0,0 +1,71 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              Y2CCQt.h
+
+  Author:     Mathias Kettner <kettner@suse.de>
+  Maintainer: Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+
+#ifndef _Y2CCQt_h
+#define _Y2CCQt_h
+
+#include "YQUIComponent.h"
+#include <yui/Y2CCUI.h>
+
+/**
+ * @short Y2ComponentCreator that can create Qt user interfaces
+ * A Y2ComponentCreator is an object, that can create components.
+ * It is given a component name and - if it knows how to create
+ * such a component - returns a newly created component of this
+ * type. The Y2CCQt can create components with the name "qt".
+ */
+class Y2CCQt : public Y2CCUI
+{
+public:
+    /**
+     * Creates a Qt component creator
+     */
+    Y2CCQt() : Y2CCUI() { };
+
+    /**
+     * Returns true, since the qt component is a
+     * YaST2 server.
+     */
+    bool isServerCreator() const { return true; };
+
+    /**
+     * Creates a new Qt UI component.
+     */
+    Y2Component *create(const char * name) const
+    {
+       if (!strcmp(name, "qt") )
+       {
+           Y2Component* ret = YUIComponent::uiComponent ();
+           if (!ret || ret->name () != name)
+           {
+               ret = new YQUIComponent();
+           }
+           return ret;
+       }
+       else
+           return 0;
+    }
+};
+
+#endif // ifndef _Y2CCQt_h
+
+
+// EOF
diff --git a/src/YFrameBuffer.cc b/src/YFrameBuffer.cc
new file mode 100644 (file)
index 0000000..68aa0f2
--- /dev/null
@@ -0,0 +1,164 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YFrameBuffer.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#define y2log_component "framebuffer"
+#include <ycp/y2log.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+
+#include "YFrameBuffer.h"
+
+
+YFrameBuffer::YFrameBuffer( int width, int height, int depth )
+{
+    _width     = width;
+    _height    = height;
+    _depth     = depth;
+
+    _fb                = 0;
+    _fb_fd     = -1;
+    _fb_len    = 0;
+
+    switch ( _depth )
+    {
+       case 15:
+       case 16: _bytesPerPixel = 2;
+           break;
+
+       case 24:
+       case 32: _bytesPerPixel = 4;
+           break;
+
+       default:
+           y2warning( "Pixel depth %d not supported", _depth );
+           _bytesPerPixel = 0;
+           break;
+    }
+
+    if ( _bytesPerPixel > 0 )
+       mmapFB();
+}
+
+
+YFrameBuffer::~YFrameBuffer()
+{
+    munmapFB();
+}
+
+
+void YFrameBuffer::mmapFB()
+{
+    if ( _fb )
+    {
+       y2error( "Framebuffer already mmap()'ed" );
+       return;
+    }
+
+    _fb_fd = open( "/dev/fb0", O_RDWR );
+
+    if ( _fb_fd < 0 )
+    {
+       y2error( "Can't open /dev/fb0 - errno %d: %s", errno, strerror( errno ) );
+       return;
+    }
+
+    _fb_len    = _width * _height * _bytesPerPixel;
+    _fb                = mmap( 0,                      // start
+                       _fb_len,                // length
+                       PROT_READ | PROT_WRITE, // prot
+                       MAP_SHARED,             // flags
+                       _fb_fd,                 // file descriptor
+                       0 );                    // offset
+
+    if ( _fb == MAP_FAILED )
+    {
+       y2error( "mmap() failed for /dev/fb0 - errno %d: %s", errno, strerror( errno ) );
+       _fb = 0;
+       close( _fb_fd );
+    }
+
+    _fb16 = (UINT16 *) _fb;
+    _fb32 = (UINT32 *) _fb;
+}
+
+
+void YFrameBuffer::munmapFB()
+{
+    if ( ! _fb )
+       return;
+
+    munmap( _fb, _fb_len );
+    close( _fb_fd );
+
+    _fb                = 0;
+    _fb16      = 0;
+    _fb32      = 0;
+    _fb_fd     = -1;
+}
+
+
+void YFrameBuffer::setPixel( int x, int y, FBPixel pixel )
+{
+    if ( ! _fb )
+       return;
+
+    if ( x < _width && y < _height )
+    {
+       if ( _bytesPerPixel == 2 )
+       {
+           pixel &= 0xFFFF;
+           _fb16[ y * _width + x ] = (UINT16) pixel;
+       }
+       else if ( _bytesPerPixel == 4 )
+       {
+           _fb32[ y * _width + x ] = (UINT32) pixel;
+       }
+    }
+}
+
+
+YFrameBuffer::FBPixel
+YFrameBuffer::pixel( int x, int y )
+{
+    if ( ! _fb )
+       return 0;
+
+    if ( x < _width && y < _height )
+    {
+       if ( _bytesPerPixel == 2 )
+       {
+           return (FBPixel) _fb16[ y * _width + x ];
+       }
+       else if ( _bytesPerPixel == 4 )
+       {
+           return (FBPixel) _fb32[ y * _width + x ];
+       }
+    }
+
+    return 0;
+}
+
+
+
+
diff --git a/src/YFrameBuffer.h b/src/YFrameBuffer.h
new file mode 100644 (file)
index 0000000..3e9099e
--- /dev/null
@@ -0,0 +1,92 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQFrameBuffer.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#ifndef YFrameBuffer_h
+#define YFrameBuffer_h
+
+class YFrameBuffer
+{
+public:
+
+    typedef unsigned short UINT16;
+    typedef unsigned long UINT32;
+    typedef UINT32 FBPixel;
+
+    /**
+     * Constructor
+     **/
+    YFrameBuffer( int screenWidth, int screenHeight, int bitDepth );
+
+    /**
+     * Destructor
+     **/
+    virtual ~YFrameBuffer();
+
+    /**
+     * Set the framebuffer pixel at (x, y)
+     **/
+    void setPixel( int x, int y, FBPixel pixel );
+
+    /**
+     * Get the framebuffer pixel value at (x, y)
+     **/
+    FBPixel pixel( int x, int y );
+
+    /**
+     * Returns 'true' if the framebuffer is valid, i.e. can be used.
+     **/
+    bool valid()       const { return _fb != 0; }
+
+    int width()                const { return _width;          }
+    int height()       const { return _height;         }
+    int depth()                const { return _depth;          }
+    int bytesPerPixel() const { return _bytesPerPixel; }
+
+
+protected:
+
+    /**
+     * mmap() the framebuffer device
+     **/
+    void mmapFB();
+
+    /**
+     * release the mmaped framebuffer
+     **/
+    void munmapFB();
+
+    
+    //
+    // Data members
+    //
+
+    int                _width;
+    int                _height;
+    int                _depth;
+
+    void *     _fb;
+    int                _fb_fd;
+    UINT32 *   _fb32;
+    UINT16 *   _fb16;
+    size_t     _fb_len;
+    int                _bytesPerPixel;
+};
+
+
+#endif // ifndef YFrameBuffer_h
diff --git a/src/YQAlignment.cc b/src/YQAlignment.cc
new file mode 100644 (file)
index 0000000..504b353
--- /dev/null
@@ -0,0 +1,96 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQAlignment.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#define y2log_component "qt-ui"
+#include <ycp/y2log.h>
+#include <qpixmap.h>
+#include "YQAlignment.h"
+
+using std::string;
+
+
+YQAlignment::YQAlignment( YWidget *            parent,
+                         YAlignmentType        horAlign,
+                         YAlignmentType        vertAlign )
+    : QWidget( (QWidget *) parent->widgetRep() )
+    , YAlignment( parent, horAlign, vertAlign )
+{
+    setWidgetRep( this );
+}
+
+
+YQAlignment::YQAlignment( YWidget *            yParent,
+                         QWidget *             qParent,
+                         YAlignmentType        horAlign,
+                         YAlignmentType        vertAlign )
+    : QWidget( qParent )
+    , YAlignment( yParent, horAlign, vertAlign )
+{
+    setWidgetRep( this );
+}
+
+
+void YQAlignment::setEnabled( bool enabled )
+{
+    QWidget::setEnabled( enabled );
+    YWidget::setEnabled( enabled );
+}
+
+
+void YQAlignment::moveChild( YWidget * child, int newX, int newY )
+{
+    QWidget * qw = (QWidget *) ( child->widgetRep() );
+    qw->move( newX, newY );
+}
+
+
+void YQAlignment::setSize( int newWidth, int newHeight )
+{
+    resize( newWidth, newHeight );
+    YAlignment::setSize( newWidth, newHeight );
+}
+
+
+void YQAlignment::setBackgroundPixmap( const string & pixmapFileName )
+{
+    string pixmapName = pixmapFileName;
+    
+    YAlignment::setBackgroundPixmap( pixmapName );     // Prepend path etc.
+    pixmapName = YAlignment::backgroundPixmap();
+
+    if ( pixmapName.empty() )  // Delete any old background pixmap
+    {
+       unsetPalette();
+    }
+    else                       // Set a new background pixmap
+    {
+       QPixmap pixmap( pixmapName.c_str() );
+
+       if ( pixmap.isNull() )
+       {
+           y2error( "Can't load background pixmap %s", pixmapName.c_str() );
+       }
+       else
+       {
+           setPaletteBackgroundPixmap( pixmap );
+       }
+    }
+}
+
+#include "YQAlignment.moc"
diff --git a/src/YQAlignment.h b/src/YQAlignment.h
new file mode 100644 (file)
index 0000000..715ca7a
--- /dev/null
@@ -0,0 +1,86 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQAlignment.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#ifndef YQAlignment_h
+#define YQAlignment_h
+
+#include <qwidget.h>
+
+#include "YAlignment.h"
+
+class QWidget;
+
+class YQAlignment : public QWidget, public YAlignment
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor.
+     **/
+    YQAlignment( YWidget *             parent,
+                YAlignmentType         horAlign,
+                YAlignmentType         vertAlign );
+
+    /**
+     * Constructor for cases where the YWidget parent's widgetRep() isn't the
+     * QWidget parent, for example in compound widgets like YQWizard where it
+     * makes sense to pass a child of the YQWizard (the client area) as the
+     * QWidget parent.
+     *
+     * Use this only if you know very well what you are doing.
+     **/
+    YQAlignment( YWidget *             yParent,
+                QWidget *              qParent,
+                YAlignmentType         horAlign,
+                YAlignmentType         vertAlign );
+
+    /**
+     * Move the child widget to a new position.
+     *
+     * Implemented from YAlignment.
+     **/
+    virtual void moveChild( YWidget * child, int newX, int newY );
+
+    /**
+     * Enable or disable this widget and its child.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setEnabled( bool enabled );
+
+    /**
+     * Set the new size of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setSize( int newWidth, int newHeight );
+
+    /**
+     * Set the background pixmap.
+     *
+     * Reimplemented from YAlignment.
+     **/
+    virtual void setBackgroundPixmap( const string & pixmapFileName );
+
+};
+
+
+#endif // YQAlignment_h
diff --git a/src/YQApplication.cc b/src/YQApplication.cc
new file mode 100644 (file)
index 0000000..4e30e5a
--- /dev/null
@@ -0,0 +1,374 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQApplication.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#include <qapp.h>
+#include <qlocale.h>
+#include <qregexp.h>
+
+#define y2log_component "qt-ui"
+#include <ycp/y2log.h>
+
+#include "YQApplication.h"
+
+
+YQApplication::YQApplication()
+    : YApplication()
+    , _currentFont( 0 )
+    , _headingFont( 0 )
+    , _boldFont( 0 )
+    , _fontFamily( "Sans Serif" )
+    , _langFonts( 0 )
+    , _qtTranslations( 0 )
+    , _autoFonts( false )
+    , _autoNormalFontSize( -1 )
+    , _autoHeadingFontSize( -1 )
+{
+    y2debug( "YQApplication constructor start" );
+    
+    setIconBasePath( ICONDIR "/icons/22x22/apps/" );
+    loadPredefinedQtTranslations();
+    
+    y2debug( "YQApplication constructor end" );
+}
+
+
+YQApplication::~YQApplication()
+{
+    if ( _langFonts )
+       delete _langFonts;
+
+    if ( _qtTranslations )
+       delete _qtTranslations;
+
+    deleteFonts();
+}
+
+
+void
+YQApplication::setLanguage( const string & language,
+                           const string & encoding )
+{
+    YApplication::setLanguage( language, encoding );
+    loadPredefinedQtTranslations();
+    setLangFonts( language, encoding );
+}
+
+
+
+void
+YQApplication::loadPredefinedQtTranslations()
+{
+    QString path = QT_LOCALEDIR;
+    QString language = QLocale::system().name();
+
+    QString transFile = QString( "qt_%1.qm")
+              .arg( language.lower().replace('_','-') );
+
+    if ( path.isEmpty() )
+    {
+       y2warning( "Qt locale directory not set - "
+                  "no translations for predefined Qt dialogs" );
+       return;
+    }
+
+    if ( ! _qtTranslations )
+       _qtTranslations = new QTranslator();
+    
+    _qtTranslations->load( transFile, path );
+
+    if ( _qtTranslations->isEmpty() )
+    {
+       // try fallback
+       transFile = QString( "qt_%1.qm").arg( language.lower().left(2) );
+       _qtTranslations->load( transFile, path );
+    }
+
+    if ( _qtTranslations->isEmpty() )
+    {
+       y2warning( "Can't load translations for predefined Qt dialogs from %s/%s",
+                  (const char *) path, (const char *) transFile );
+    }
+    else
+    {
+       y2milestone( "Loaded translations for predefined Qt dialogs from %s/%s",
+                    (const char *) path, (const char *) transFile );
+
+       qApp->installTranslator( _qtTranslations );
+    }
+
+
+    // Force reverse layout for Arabic and Hebrew
+
+    if ( ( language.startsWith( "ar" ) ||      // Arabic
+          language.startsWith( "he" ) )        // Hebrew
+        && ! qApp->reverseLayout() )
+    {
+       y2warning( "Using fallback rule for reverse layout for language '%s'",
+                  (const char *) language );
+
+       qApp->setReverseLayout( true );
+    }
+}
+
+
+void
+YQApplication::setLangFonts( const string & language, const string & encoding )
+{
+    QString oldFontFamily = _fontFamily;
+
+    if ( ! _langFonts )
+    {
+       _langFonts = new QY2Settings( LANG_FONTS_FILE );
+       CHECK_PTR( _langFonts );
+
+       if ( _langFonts->readError() )
+           y2error( "Error reading %s", (const char *) _langFonts->fileName() );
+       else
+           y2milestone( "%s read OK", (const char *) _langFonts->fileName() );
+    }
+
+    QString lang = language.c_str();
+    
+    if ( ! encoding.empty() )
+       lang += QString( "." ) + encoding.c_str();
+    
+    QString key;
+
+    if ( ! _langFonts->hasKey( fontKey( lang ) ) )     // Try with encoding ("zh_CN.UTF8" etc.)
+    {
+       lang = language.c_str();                        // Try without encoding ("zh_CN")
+
+       if ( ! _langFonts->hasKey( fontKey( lang ) ) )  
+           lang.replace( QRegExp( "_.*$" ), "" );      // Cut off trailing country ("_CN")
+    }
+
+    if ( _langFonts->hasKey( fontKey( lang ) ) )
+    {
+       _fontFamily = _langFonts->get( fontKey( lang ), "Sans Serif" );
+       y2milestone( "%s = \"%s\"", (const char *) fontKey( lang ), (const char *) _fontFamily );
+    }
+    else
+    {
+       _fontFamily = _langFonts->get( fontKey( "" ), "Sans Serif" );
+       y2milestone( "Using fallback for %s: font = \"%s\"",
+                    (const char *) lang, (const char *) _fontFamily );
+    }
+
+    if ( _fontFamily != oldFontFamily && ! _fontFamily.isEmpty() )
+    {
+       y2milestone( "New font family: %s", _fontFamily.latin1() );
+       deleteFonts();
+       int size = qApp->font().pointSize();
+       QFont font( _fontFamily );
+       font.setPointSize( size );
+       qApp->setFont( font, true );    // font, informWidgets
+       y2milestone( "Reloading fonts - now using \"%s\"",
+                    (const char *) font.toString() );
+    }
+    else
+    {
+       y2debug( "No font change" );
+    }
+}
+
+
+QString
+YQApplication::fontKey( const QString & lang )
+{
+    if ( lang.isEmpty() )
+       return "font";
+    else
+       return QString( "font[%1]").arg( lang );
+}
+
+
+const QFont &
+YQApplication::currentFont()
+{
+    /**
+     * Brute force approach to make sure we'll really get a complete Unicode font:
+     * Explicitly load the one font that we made sure to contain all required
+     * characters, including Latin1, Latin2, Japanese, Korean, and the
+     * characters used for glyphs.
+     *
+     * There are many fonts that claim to be Unicode, but most of them contain
+     * just a sorry excuse for a complete Unicode character set. Qt can't know
+     * how complete a font is, so it chooses one that might be better in otherf
+     * aspects, but lacks necessary characters.
+     **/
+
+    if ( ! _currentFont )
+    {
+       if ( autoFonts() )
+       {
+           pickAutoFonts();
+
+           _currentFont = new QFont( _fontFamily );
+           _currentFont->setPixelSize( _autoNormalFontSize );
+           _currentFont->setWeight( QFont::Normal );
+
+           y2milestone( "Loaded %d pixel font: %s", _autoNormalFontSize,
+                        (const char *) _currentFont->toString() );
+
+           qApp->setFont( * _currentFont, true );      // font, informWidgets
+       }
+       else
+       {
+           // y2debug( "Copying QApplication::font()" );
+           _currentFont = new QFont( qApp->font() );
+       }
+    }
+
+    return * _currentFont;
+}
+
+
+const QFont &
+YQApplication::boldFont()
+{
+    if ( ! _boldFont )
+    {
+       _boldFont = new QFont( currentFont() );
+       _boldFont->setBold( true );
+    }
+
+    return * _boldFont;
+}
+
+
+const QFont &
+YQApplication::headingFont()
+{
+    /**
+     * Brute force load the heading font - see currentFont() above for more.
+     **/
+
+    if ( ! _headingFont )
+    {
+       if ( autoFonts() )
+       {
+           pickAutoFonts();
+
+           _headingFont = new QFont( _fontFamily );
+           _headingFont->setPixelSize( _autoHeadingFontSize );
+           _headingFont->setWeight( QFont::Bold );
+
+           y2milestone( "Loaded %d pixel bold font: %s", _autoHeadingFontSize,
+                        (const char *) _headingFont->toString() );
+       }
+       else
+       {
+           _headingFont = new QFont( _fontFamily, 14, QFont::Bold );
+       }
+    }
+
+    return * _headingFont;
+}
+
+
+void
+YQApplication::deleteFonts()
+{
+    if ( _currentFont )
+       delete _currentFont;
+
+    if ( _headingFont )
+       delete _headingFont;
+
+    if ( _boldFont )
+       delete _boldFont;
+
+    _currentFont = 0;
+    _headingFont = 0;
+    _boldFont    = 0;
+}
+
+
+void
+YQApplication::setAutoFonts( bool useAutoFonts )
+{
+    _autoFonts = useAutoFonts;
+}
+
+
+void
+YQApplication::pickAutoFonts()
+{
+    if ( _autoNormalFontSize >= 0 )    // Use cached values
+       return;
+
+#warning FIXME: defaultSize
+#if 0
+    int x = _default_size.width();
+    int y = _default_size.height();
+#endif
+    int x = 800;
+    int y = 600;
+       
+
+    int normal  = 10;
+    int heading        = 12;
+
+    if ( x >= 800 && y >= 600 )
+    {
+       normal  = 10;
+       heading = 12;
+    }
+
+    if ( x >= 1024 && y >= 768 )
+    {
+       normal  = 12;
+       heading = 14;
+    }
+
+    if ( x >= 1280 && y >= 1024 )
+    {
+       normal  = 14;
+       heading = 18;
+    }
+
+    if ( x >= 1400 )
+    {
+       normal  = 16;
+       heading = 20;
+    }
+
+    if ( x >= 1600 )
+    {
+       normal  = 18;
+       heading = 24;
+    }
+
+    if ( x >= 2048 )   // Sounds futuristic? Just wait one or two years...
+    {
+       normal  = 20;
+       heading = 28;
+    }
+
+    _autoNormalFontSize  = normal;
+    _autoHeadingFontSize = heading;
+
+    y2milestone( "Selecting auto fonts - normal: %d, heading: %d (bold)",
+                _autoNormalFontSize, _autoHeadingFontSize );
+}
+
+    
+
+
+#include "YQApplication.moc"
diff --git a/src/YQApplication.h b/src/YQApplication.h
new file mode 100644 (file)
index 0000000..aa640f1
--- /dev/null
@@ -0,0 +1,178 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQApplication.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#ifndef YQApplication_h
+#define YQApplication_h
+
+#include <qobject.h>
+#include <qtranslator.h>
+#include <qfont.h>
+
+#include "QY2Settings.h"
+#include "YApplication.h"
+
+
+class YQApplication: public QObject, public YApplication
+{
+    Q_OBJECT
+    
+protected:
+
+    friend class YQUI;
+    
+    /**
+     * Constructor.
+     *
+     * Use YUI::app() to get the singleton for this class.
+     **/
+    YQApplication();
+
+    /**
+     * Destructor.
+     **/
+    virtual ~YQApplication();
+
+    
+public:
+    
+    /**
+     * Set language and encoding for the locale environment ($LANG).
+     *
+     * Load UI-internal translations (e.g. for predefined dialogs like
+     * file selection) and fonts.
+     *
+     * 'language' is the ISO short code ("de_DE", "en_US", ...).
+     *
+     * 'encoding' an (optional) encoding ("utf8", ...) that will be appended if
+     *  present.
+     *
+     * Reimplemented from YApplication.
+     **/
+    virtual void setLanguage( const string & language,
+                             const string & encoding = string() );
+    
+    /**
+     * Load translations for Qt's predefined dialogs like file selection box
+     * etc.
+     **/
+    void loadPredefinedQtTranslations();
+
+    /**
+     * Set fonts according to the specified language and encoding.
+     *
+     * This is most important for some Asian languages that have overlaps in
+     * the Unicode table, like Japanese vs. Chinese.
+     **/
+    void setLangFonts( const string & language,
+                      const string & encoding = string() );
+
+    /**
+     * Returns the application's default font.
+     **/
+    const QFont & currentFont();
+
+    /**
+     * Returns the application's default bold font.
+     **/
+    const QFont & boldFont();
+
+    /**
+     * Returns the application's heading font.
+     **/
+    const QFont & headingFont();
+
+    /**
+     * Delete the fonts so they will be reloaded upon their next usage.
+     **/
+    void deleteFonts();
+
+    /**
+     * Determine good fonts based on defaultsize geometry and set
+     * _auto_normal_font_size and _auto_heading_font_size accordingly.
+     * Caches the values, so it's safe to call this repeatedly.
+     **/
+    void pickAutoFonts();
+
+    /**
+     * Returns 'true' if the UI  automatically picks fonts, disregarding Qt
+     * standard settings.
+     *
+     * This makes sense during system installation system where the display DPI
+     * cannot reliably be retrieved and thus Qt uses random font sizes based on
+     * that random DPI.
+     **/
+    bool autoFonts() const { return _autoFonts; }
+
+    /**
+     * Set whether or not fonts should automatically be picked.
+     **/
+    void setAutoFonts( bool useAutoFonts );
+
+    
+protected:
+
+    /**
+     * Constructs a key for the language specific font file:
+     *     "font[lang]"
+     * for
+     *     font[de_DE] = "Sans Serif"
+     *     font[zh] = "ChineseSpecial, something"
+     *     font[ja_JP] = "JapaneseSpecial, something"
+     *     font = "Sans Serif"
+     **/
+    QString fontKey( const QString & lang );
+
+
+    //
+    // Data members
+    //
+    
+    // Fonts
+    
+    QFont * _currentFont;
+    QFont * _headingFont;
+    QFont * _boldFont;
+
+    /**
+     * Font family or list of font families to use ("Sans Serif" etc.)
+     **/
+    QString _fontFamily;
+
+    /**
+     * Language-specific font settings
+     **/
+    QY2Settings        * _langFonts;
+
+    /**
+     * Translator for the predefined Qt dialogs
+     **/
+    QTranslator * _qtTranslations;
+
+    /**
+     * For auto fonts
+     **/
+    bool _autoFonts;
+    int  _autoNormalFontSize;
+    int  _autoHeadingFontSize;
+
+    
+};
+
+
+#endif // YQApplication_h
diff --git a/src/YQBarGraph.cc b/src/YQBarGraph.cc
new file mode 100644 (file)
index 0000000..ec08532
--- /dev/null
@@ -0,0 +1,249 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQBarGraph.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#define y2log_component "qt-ui"
+#include <ycp/y2log.h>
+
+#include <algorithm>
+#include <qpainter.h>
+#include <qnamespace.h>
+
+#include "utf8.h"
+#include "YQUI.h"
+#include "YQBarGraph.h"
+
+
+#define YQBarGraphOuterMargin          YQWidgetMargin
+#define YQBarGraphLabelHorizontalMargin        1
+#define YQBarGraphLabelVerticalMargin  2
+#define YQBarGraphMinWidth             80
+#define YQBarGraphMinHeight            30
+
+
+
+YQBarGraph::YQBarGraph( YWidget * parent )
+    : QFrame( (QWidget *) parent->widgetRep() )
+    , YBarGraph( parent )
+{
+    setWidgetRep( this );
+}
+
+
+YQBarGraph::~YQBarGraph()
+{
+    // NOP
+}
+
+
+void
+YQBarGraph::doUpdate()
+{
+    QFrame::update(); // triggers drawContents()
+}
+
+
+void
+YQBarGraph::drawContents( QPainter * painter )
+{
+    unsigned nextDefaultColor = 0;
+    int totalWidth     = contentsRect().width()  - 2*YQBarGraphOuterMargin;
+    int segHeight      = contentsRect().height() - 2*YQBarGraphOuterMargin;
+    int x_off          = YQBarGraphOuterMargin;
+    int y_off          = YQBarGraphOuterMargin;
+    int valueTotal     = 0;
+
+    for ( int i=0; i < segments(); i++ )
+       valueTotal += segment(i).value();
+
+    if ( valueTotal == 0 ) // Avoid division by zero
+       return;
+
+    for ( int i=0; i < segments(); i++ )
+    {
+       const YBarGraphSegment & seg = segment(i);
+       int segWidth = ( (long) totalWidth * seg.value() ) / valueTotal;
+
+       if ( i == segments()-1 )
+       {
+           // Compensate for rounding errors:
+           // The last segment gets all leftover pixels from the previous ones.
+
+           segWidth = totalWidth - x_off + YQBarGraphOuterMargin;
+       }
+
+       
+       //
+       // Fill the segment
+       //
+
+       YColor segmentColor = seg.segmentColor();
+       YColor textColor    = seg.textColor();
+
+       if ( segmentColor.isUndefined() || textColor.isUndefined() )
+       {
+           // If any of the colors is undefined, use the next default color
+           // for both so some contrast is ensured.
+           
+           segmentColor = defaultSegmentColor( nextDefaultColor   );
+           textColor    = defaultTextColor   ( nextDefaultColor++ );
+       }
+       
+       painter->setBrush( QColor( segmentColor.red(),
+                                  segmentColor.green(),
+                                  segmentColor.blue() ) );
+       painter->setPen( Qt::NoPen );
+       painter->drawRect( x_off, y_off, segWidth+2, segHeight+2 );
+
+       
+       //
+       // Draw the label
+       //
+
+       painter->setPen( Qt::SolidLine );
+       painter->setPen( QColor( textColor.red(),
+                                textColor.green(),
+                                textColor.blue() ) );
+       QString txt = seg.label();
+
+       if ( txt.contains( "%1" ) )
+           txt = txt.arg( seg.value() );               // substitute variable
+       
+       painter->drawText( x_off + YQBarGraphLabelHorizontalMargin,
+                          y_off + YQBarGraphLabelVerticalMargin,
+                          segWidth  - 2 * YQBarGraphLabelHorizontalMargin + 1,
+                          segHeight - 2 * YQBarGraphLabelVerticalMargin   + 1,
+                          AlignCenter, txt );
+
+       // Prepare for the next segment
+
+       x_off += segWidth;
+    }
+}
+
+
+YColor 
+YQBarGraph::defaultSegmentColor( unsigned index )
+{
+    switch( index % 8 )
+    {
+       case 0: return YColor(   0,   0, 128 ); // dark blue
+       case 1: return YColor(  64, 200, 255 ); // medium blue
+       case 2: return YColor( 255, 255, 255 ); // white
+       case 3: return YColor(   0, 153, 153 ); // cadet blue
+       case 4: return YColor( 150, 255, 255 ); // cyan
+       case 5: return YColor( 100, 100, 100 ); // medium grey
+       case 6: return YColor(   0, 200, 100 ); // medium green
+       case 7: return YColor(   0, 100,  76 ); // dark green
+    }
+
+    return YColor( 255, 255, 255 ); // just to make gcc happy
+}
+
+
+YColor
+YQBarGraph::defaultTextColor( unsigned index )
+{
+    YColor black = YColor(   0,   0,   0 );
+    YColor white = YColor( 255, 255, 255 );
+    
+    switch( index % 8 )
+    {
+       case 0: return white;
+       case 1: return black;
+       case 2: return black;
+       case 3: return black;
+       case 4: return black;
+       case 5: return white;
+       case 6: return black;
+       case 7: return white;
+    }
+
+    return black; // just to make gcc happy
+}
+
+
+void
+YQBarGraph::setEnabled( bool enabled )
+{
+    QFrame::setEnabled( enabled );
+    YWidget::setEnabled( enabled );
+}
+
+
+int
+YQBarGraph::preferredWidth()
+{
+    int width  = 0;
+    QFontMetrics metrics = fontMetrics();
+
+    for ( int i=0; i < segments(); i++ )
+    {
+       QString txt = segment(i).label();
+       
+       if ( txt.contains( "%1" ) )
+           txt = txt.arg( segment(i).value() );
+       
+       QSize segSize = metrics.size( 0, txt );
+       width += segSize.width();
+    }
+
+    width += 2 * YQBarGraphLabelHorizontalMargin;
+    width += frameWidth();
+    width += 2 * YQBarGraphOuterMargin;
+    width  = max( width, YQBarGraphMinWidth );
+
+    return width;
+}
+
+
+int
+YQBarGraph::preferredHeight()
+{
+    int height = YQBarGraphMinHeight;
+    QFontMetrics metrics = fontMetrics();
+
+    for ( int i=0; i < segments(); i++ )
+    {
+       QString txt = segment(i).label();
+       
+       if ( txt.contains( "%1" ) )
+           txt = txt.arg( segment(i).value() );
+       
+       QSize segSize = metrics.size( 0, txt );
+       height = max( height, segSize.height() );
+    }
+
+    height += 2 * YQBarGraphLabelVerticalMargin;
+    height += frameWidth();
+    height += 2 * YQBarGraphOuterMargin;
+    height  = max( height, YQBarGraphMinHeight );
+
+    return height;
+}
+
+
+void
+YQBarGraph::setSize( int newWidth, int newHeight )
+{
+    resize( newWidth, newHeight );
+}
+
+
+
+#include "YQBarGraph.moc"
diff --git a/src/YQBarGraph.h b/src/YQBarGraph.h
new file mode 100644 (file)
index 0000000..91b52ac
--- /dev/null
@@ -0,0 +1,103 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQBarGraph.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#ifndef YQBarGraph_h
+#define YQBarGraph_h
+
+#include "qframe.h"
+#include "YBarGraph.h"
+
+class QPainter;
+
+
+class YQBarGraph : public QFrame, public YBarGraph
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor.
+     **/
+    YQBarGraph( YWidget * parent );
+
+    /**
+     * Destructor.
+     **/
+    virtual ~YQBarGraph();
+
+    /**
+     * Perform a visual update on the screen.
+     *
+     * Implemented from YBarGraph.
+     **/
+    virtual void doUpdate();
+
+    /**
+     * Set enabled/disabled state.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setEnabled( bool enabled );
+
+    /**
+     * Preferred width of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredWidth();
+
+    /**
+     * Preferred height of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredHeight();
+
+    /**
+     * Set the new size of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setSize( int newWidth, int newHeight );
+
+    
+protected:
+
+    /**
+     * Draw the contents.
+     *
+     * Reimplemented from QFrame.
+     **/
+    virtual void drawContents( QPainter * painter );
+
+    /**
+     * Return one from a set of default segment background colors.
+     **/
+    YColor defaultSegmentColor( unsigned index );
+
+    /**
+     * Return one from a set of default text colors. This text color is
+     * guaranteed to contrast with the defaultSegmentColor with the same index.
+     **/
+    YColor defaultTextColor( unsigned index );
+};
+
+
+#endif // YQBarGraph_h
diff --git a/src/YQCheckBox.cc b/src/YQCheckBox.cc
new file mode 100644 (file)
index 0000000..7ee2084
--- /dev/null
@@ -0,0 +1,163 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQCheckBox.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#include <qcheckbox.h>
+#include <qlayout.h>
+#define y2log_component "qt-ui"
+#include <ycp/y2log.h>
+
+#include "utf8.h"
+#include "YQApplication.h"
+#include "YQUI.h"
+#include "YEvent.h"
+#include "YQCheckBox.h"
+
+
+#define SPACING 8
+
+
+YQCheckBox::YQCheckBox( YWidget *      parent,
+                       const string &  label,
+                       bool            checked )
+    : QGroupBox( (QWidget *) parent->widgetRep() )
+    , YCheckBox( parent, label )
+{
+    setWidgetRep( this );
+    setFrameStyle( NoFrame );
+
+    QBoxLayout * layout = new QBoxLayout( this, QBoxLayout::LeftToRight );
+
+    _qt_checkBox = new QCheckBox( fromUTF8( label ), this );
+    YUI_CHECK_NEW( _qt_checkBox );
+    
+    layout->addSpacing( SPACING );
+    layout->addWidget( _qt_checkBox );
+    layout->addSpacing( SPACING );
+
+    _qt_checkBox->setChecked( checked );
+
+    connect( _qt_checkBox,     SIGNAL( stateChanged( int ) ),
+            this,              SLOT  ( stateChanged( int ) ) );
+}
+
+
+YQCheckBox::~YQCheckBox()
+{
+    // NOP
+}
+
+
+YCheckBoxState
+YQCheckBox::value()
+{
+    switch ( _qt_checkBox->state() )
+    {
+       case QButton::On:       return YCheckBox_on;
+       case QButton::Off:      return YCheckBox_off;
+       case QButton::NoChange: return YCheckBox_dont_care;
+    }
+
+    return YCheckBox_off;
+}
+
+
+void
+YQCheckBox::setValue( YCheckBoxState newValue )
+{
+    switch ( newValue )
+    {
+       case YCheckBox_on:
+           _qt_checkBox->setChecked( true );
+           _qt_checkBox->setTristate( false );
+           break;
+
+       case YCheckBox_off:
+           _qt_checkBox->setChecked( false );
+           _qt_checkBox->setTristate( false );
+           break;
+
+       case YCheckBox_dont_care:
+           _qt_checkBox->setTristate( true );
+           _qt_checkBox->setNoChange();
+           break;
+    }
+}
+
+
+void YQCheckBox::setLabel( const string & label )
+{
+    _qt_checkBox->setText( fromUTF8( label ) );
+    YCheckBox::setLabel( label );
+}
+
+
+void YQCheckBox::setUseBoldFont( bool useBold )
+{
+    _qt_checkBox->setFont( useBold ?
+                          YQUI::yqApp()->boldFont() :
+                          YQUI::yqApp()->currentFont() );
+    
+    YCheckBox::setUseBoldFont( useBold );
+}
+
+
+void YQCheckBox::setEnabled( bool enabled )
+{
+    _qt_checkBox->setEnabled( enabled );
+    YWidget::setEnabled( enabled );
+}
+
+
+int YQCheckBox::preferredWidth()
+{
+    return 2*SPACING + _qt_checkBox->sizeHint().width();
+}
+
+
+int YQCheckBox::preferredHeight()
+{
+    return _qt_checkBox->sizeHint().height();
+}
+
+
+void YQCheckBox::setSize( int newWidth, int newHeight )
+{
+    _qt_checkBox->resize( newWidth - 2*SPACING, newHeight );
+    resize( newWidth, newHeight );
+}
+
+
+bool YQCheckBox::setKeyboardFocus()
+{
+    _qt_checkBox->setFocus();
+
+    return true;
+}
+
+
+void YQCheckBox::stateChanged( int newState )
+{
+    // y2milestone( "new state: %d", newState );
+    
+    if ( notify() )
+       YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
+}
+
+
+#include "YQCheckBox.moc"
diff --git a/src/YQCheckBox.h b/src/YQCheckBox.h
new file mode 100644 (file)
index 0000000..9b939dc
--- /dev/null
@@ -0,0 +1,130 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQCheckBox.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#ifndef YQCheckBox_h
+#define YQCheckBox_h
+
+#include <qgroupbox.h>
+#include "YCheckBox.h"
+
+
+class QCheckBox;
+
+class YQCheckBox : public QGroupBox, public YCheckBox
+{
+    Q_OBJECT
+
+public:
+    
+    /**
+     * Constructor.
+     **/
+    YQCheckBox( YWidget *      parent,
+               const string &  label,
+               bool            checked );
+
+    /**
+     * Destructor.
+     **/
+    virtual ~YQCheckBox();
+
+    /**
+     * Get the current value:
+     *
+     * YCheckBox_on            CheckBox is checked
+     * YCheckBox_off           CheckBox is unchecked
+     *
+     * YCheckBox_dont_care     tri-state: CheckBox is greyed out,
+     *                         neither checked nor unchecked
+     *
+     * Reimplemented from YCheckBox.
+     **/
+    virtual YCheckBoxState value();
+       
+    /**
+     * Set the CheckBox value (on/off/don't care).
+     *
+     * Reimplemented from YCheckBox.
+     **/
+    virtual void setValue( YCheckBoxState state );
+
+    /**
+     * Change the label (the text) on the RadioButton.
+     *
+     * Reimplemented from YRadioButton.
+     **/
+    virtual void setLabel( const string & label );
+
+    /**
+     * Use a bold font.
+     *
+     * Reimplemented from YRadioButton.
+     **/
+    virtual void setUseBoldFont( bool bold = true );
+
+    /**
+     * Set enabled / disabled state.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setEnabled( bool enabled );
+
+    /**
+     * Preferred width of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredWidth();
+
+    /**
+     * Preferred height of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredHeight();
+
+    /**
+     * Set the new size of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setSize( int newWidth, int newHeight );
+
+    /**
+     * Accept the keyboard focus.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual bool setKeyboardFocus();
+
+    
+private slots:
+
+    /**
+     * Triggered when the on/off status is changed
+     **/
+    void stateChanged ( int newState );
+
+    
+protected:
+    
+    QCheckBox * _qt_checkBox;
+};
+
+#endif // YQCheckBox_h
diff --git a/src/YQCheckBoxFrame.cc b/src/YQCheckBoxFrame.cc
new file mode 100644 (file)
index 0000000..c13c350
--- /dev/null
@@ -0,0 +1,204 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQCheckBoxFrame.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#define y2log_component "qt-ui"
+#include <ycp/y2log.h>
+#include <qcheckbox.h>
+#include "YQUI.h"
+#include "YEvent.h"
+#include "utf8.h"
+
+using std::max;
+
+#include "YQCheckBoxFrame.h"
+
+#define TOP_MARGIN 6
+
+
+YQCheckBoxFrame::YQCheckBoxFrame( YWidget *            parent,
+                                 const string &        label,
+                                 bool                  checked )
+    : QGroupBox( (QWidget *) parent->widgetRep() )
+    , YCheckBoxFrame( parent, label, checked)
+{
+    setWidgetRep ( this );
+    QGroupBox::setTitle( fromUTF8( label ) );
+    QGroupBox::setCheckable( true );
+    preventQGroupBoxAutoEnablement();
+                          
+    setValue( checked );
+}
+
+
+void YQCheckBoxFrame::setLabel( const string & newLabel )
+{
+    YCheckBoxFrame::setLabel( newLabel );
+    QGroupBox::setTitle( fromUTF8( label() ) );
+}
+
+
+bool YQCheckBoxFrame::value()
+{
+    return _checkBox ? _checkBox->isChecked() : QGroupBox::isChecked();
+}
+
+
+void YQCheckBoxFrame::setValue( bool newValue )
+{
+    if ( _checkBox )
+       _checkBox->setChecked( newValue );
+    else
+       setChecked( newValue );
+}
+
+
+void YQCheckBoxFrame::setEnabled( bool enabled )
+{
+    if ( enabled )
+    {
+       QFrame::setEnabled( true );
+       handleChildrenEnablement( value() );
+    }
+    else
+    {
+       QFrame::setEnabled( true );
+       YWidget::setChildrenEnabled( false );
+    }
+    
+    YWidget::setEnabled( enabled );
+}
+
+
+void YQCheckBoxFrame::preventQGroupBoxAutoEnablement()
+{
+    /*
+     * This is a nasty hack. But it is necessary because QGroupBox handles its
+     * internal check box too nearsightedly: It forces all children to be
+     * enabled or disabled depending on the status of the check box. The
+     * behaviour cannot be inverted or suppressed.
+     *
+     * In some cases, however, it makes sense to let the application decide to
+     * handle that differently. Since the YaST2 UI is a toolkit, we leave this
+     * decision up to the application rather than forcing any specific behaviour.
+     */
+
+    // Find the check box in the child hierarchy (as a direct child)
+
+    _checkBox = dynamic_cast<QCheckBox *>( QObject::child( 0,          // objName
+                                                          "QCheckBox", // inheritsClass
+                                                          false ) );   // recursive
+
+    if ( ! _checkBox )
+    {
+       y2warning( "Can't find QCheckBox child" );
+
+       connect( this, SIGNAL( toggled     ( bool ) ),
+                this, SLOT  ( stateChanged( bool ) ) );
+
+       return;
+    }
+
+    // Disconnect all signals to this object.
+    //
+    // In particular, disconnect the connection from the check box's
+    // 'toggled()' signal to this object's parent class's (private)
+    // setChildrenEnabled() method.
+
+    disconnect( _checkBox,     // sender
+               0,              // signal
+               this,           // receiver
+               0 );            // slot (private method in parent class)
+
+    // Connect the check box directly to this class.
+
+    connect( _checkBox, SIGNAL( toggled     ( bool ) ),
+            this,      SLOT  ( stateChanged( bool ) ) );
+}
+
+
+void YQCheckBoxFrame::stateChanged( bool newState )
+{
+    y2debug( "new state: %d", newState );
+    handleChildrenEnablement( newState );
+
+    if ( notify() )
+       YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
+}
+
+
+void YQCheckBoxFrame::childEvent( QChildEvent * )
+{
+    // Reimplemented to prevent the parent class disabling child widgets
+    // according to its default policy.
+
+    // y2debug( "ChildEvent" );
+}
+
+
+void
+YQCheckBoxFrame::setSize( int newWidth, int newHeight )
+{
+    resize ( newWidth, newHeight );
+
+    if ( hasChildren() )
+    {
+       int newChildWidth  = max ( 0, newWidth  - 2 * frameWidth() - 1 );
+       int newChildHeight = max ( 0, newHeight - frameWidth() - fontMetrics().height() - TOP_MARGIN - 1 );
+
+       firstChild()->setSize( newChildWidth, newChildHeight );
+       
+       QWidget * qChild = (QWidget *) firstChild()->widgetRep();
+       qChild->move( frameWidth(), fontMetrics().height() + TOP_MARGIN );
+    }
+}
+
+
+int YQCheckBoxFrame::preferredWidth()
+{
+    int preferredWidth;
+    int childPreferredWidth = hasChildren() ? firstChild()->preferredWidth() : 0;
+
+    preferredWidth = max( childPreferredWidth,
+                         (10 + fontMetrics().width( title() ) ) );
+    preferredWidth += 2*frameWidth() + 1;
+
+    return preferredWidth;
+}
+
+
+int YQCheckBoxFrame::preferredHeight()
+{
+    int preferredHeight = hasChildren() ? firstChild()->preferredHeight() : 0;
+    preferredHeight += frameWidth() + fontMetrics().height() + TOP_MARGIN + 1;
+    
+    return preferredHeight;
+}
+
+
+bool YQCheckBoxFrame::setKeyboardFocus()
+{
+    QGroupBox::setFocus();
+
+    return true;
+}
+
+
+
+
+#include "YQCheckBoxFrame.moc"
diff --git a/src/YQCheckBoxFrame.h b/src/YQCheckBoxFrame.h
new file mode 100644 (file)
index 0000000..2442ddf
--- /dev/null
@@ -0,0 +1,136 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQCheckBoxFrame.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#ifndef YQCheckBoxFrame_h
+#define YQCheckBoxFrame_h
+
+#include <qgroupbox.h>
+#include "YCheckBoxFrame.h"
+
+
+class QWidget;
+class QCheckBox;
+
+class YQCheckBoxFrame : public QGroupBox, public YCheckBoxFrame
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor.
+     **/
+    YQCheckBoxFrame( YWidget *                 parent,
+                    const string &     label,
+                    bool               checked );
+
+    /**
+     * Change the label text on the CheckBoxFrame.
+     *
+     * Reimplemented from YCheckBoxFrame.
+     **/
+    virtual void setLabel( const string & label );
+
+    /**
+     * Check or uncheck the CheckBoxFrame's check box.
+     *
+     * Reimplemented from YCheckBoxFrame.
+     **/
+    virtual void setValue( bool isChecked );
+
+    /**
+     * Get the status of the CheckBoxFrame's check box.
+     *
+     * Reimplemented from YCheckBoxFrame.
+     **/
+    virtual bool value();
+
+    /**
+     * Set enabled / disabled state.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setEnabled( bool enabled );
+
+    /**
+     * Preferred width of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredWidth();
+
+    /**
+     * Preferred height of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredHeight();
+
+    /**
+     * Set the new size of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setSize( int newWidth, int newHeight );
+
+    /**
+     * Accept the keyboard focus.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual bool setKeyboardFocus();
+
+    
+private slots:
+
+    /**
+     * Triggered when the on/off status is changed
+     **/
+    void stateChanged( bool newState );
+
+
+protected:
+
+    /**
+     * Prevent standard QGroupBox behaviour to always enable or disable all
+     * children according to its check box's status (can't be inverted or left
+     * to the application).
+     *
+     * This is a nasty hack, but it prevents oversights from the Qt designers.
+     * Their view on how that check box should affect the frame content appears
+     * to be somewhat limiting.
+     **/
+    void preventQGroupBoxAutoEnablement();
+
+    /**
+     * Reimplemented from QGroupBox to prevent QGroupBox from disabling
+     * children according to the check box status as the children are inserted.
+     **/
+    virtual void childEvent( QChildEvent * );
+
+
+    //
+    // Data members
+    //
+
+    QCheckBox * _checkBox;
+};
+
+
+#endif // YQCheckBoxFrame_h
diff --git a/src/YQComboBox.cc b/src/YQComboBox.cc
new file mode 100644 (file)
index 0000000..14f0b9a
--- /dev/null
@@ -0,0 +1,253 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQComboBox.cc
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#define SEND_SELECTION_CHANGED_EVENT 0
+
+#include <qstring.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qlineedit.h>
+#include <qpixmap.h>
+#define y2log_component "qt-ui"
+#include <ycp/y2log.h>
+
+#include "utf8.h"
+#include "YQUI.h"
+#include "YEvent.h"
+#include "QY2CharValidator.h"
+#include "YQComboBox.h"
+#include "YQSignalBlocker.h"
+#include "YQWidgetCaption.h"
+
+
+
+YQComboBox::YQComboBox( YWidget *      parent,
+                       const string &  label,
+                       bool            editable )
+    : QVBox( (QWidget *) parent->widgetRep() )
+    , YComboBox( parent, label, editable )
+    , _validator(0)
+{
+    setWidgetRep( this );
+    setSpacing( YQWidgetSpacing );
+    setMargin ( YQWidgetMargin  );
+
+    _caption = new YQWidgetCaption( this, label );
+    YUI_CHECK_NEW( _caption );
+    
+    _qt_comboBox = new QComboBox( editable, this );
+    YUI_CHECK_NEW( _caption );
+    
+    _caption->setBuddy( _qt_comboBox );
+
+#if SEND_SELECTION_CHANGED_EVENT
+    connect( _qt_comboBox,     SIGNAL( highlighted (int) ),
+            this,              SLOT  ( slotSelected(int) ) );
+#endif
+
+    connect( _qt_comboBox,     SIGNAL( activated  ( const QString & ) ),
+            this,              SLOT  ( textChanged( const QString & ) ) );
+
+    connect( _qt_comboBox,     SIGNAL( textChanged( const QString & ) ),
+            this,              SLOT  ( textChanged( const QString & ) ) );
+}
+
+
+YQComboBox::~YQComboBox()
+{
+    // NOP
+}
+
+
+string YQComboBox::text()
+{
+    return toUTF8( _qt_comboBox->currentText() );
+}
+
+
+void YQComboBox::setText( const string & newValue )
+{
+    QString text = fromUTF8( newValue );
+
+    if ( isValidText( text ) )
+    {
+       YQSignalBlocker sigBlocker( _qt_comboBox );
+       _qt_comboBox->setCurrentText( text );
+    }
+    else
+    {
+       y2error( "%s \"%s\": Rejecting invalid value \"%s\"",
+                widgetClass(), debugLabel().c_str(), newValue.c_str() );
+    }
+}
+
+
+void YQComboBox::addItem( YItem * item )
+{
+    YComboBox::addItem( item );
+    QPixmap icon;
+    
+    if ( item->hasIconName() )
+    {
+       string iconName = iconFullPath( item );
+       icon = QPixmap( iconName.c_str() );
+
+       if ( icon.isNull() )
+           y2warning( "Can't load icon %s", iconName.c_str() );
+    }
+
+    if ( icon.isNull() )
+       _qt_comboBox->insertItem( fromUTF8( item->label() ) );
+    else
+       _qt_comboBox->insertItem( icon, fromUTF8( item->label() ) );
+
+    if ( item->selected() )
+    {
+       YQSignalBlocker sigBlocker( _qt_comboBox );
+       setText( item->label() );
+    }
+}
+
+
+void YQComboBox::deleteAllItems()
+{
+    YQSignalBlocker sigBlocker( _qt_comboBox );
+    
+    _qt_comboBox->clear();
+    YComboBox::deleteAllItems();
+}
+
+
+void YQComboBox::setLabel( const string & label )
+{
+    _caption->setText( label );
+    YComboBox::setLabel( label );
+}
+
+
+void YQComboBox::setValidChars( const string & newValidChars )
+{
+    if ( ! _qt_comboBox->editable() )
+    {
+       y2warning( "Setting ValidChars is useless on a combo box that isn't editable! (%s)",
+                  debugLabel().c_str() );
+       return;
+    }
+
+    if ( _validator )
+    {
+       _validator->setValidChars( fromUTF8( newValidChars ) );
+    }
+    else
+    {
+       _validator = new QY2CharValidator( fromUTF8( newValidChars ), this );
+       _qt_comboBox->setValidator( _validator );
+
+       // No need to delete the validator in the destructor - Qt will take
+       // care of that since it's a QObject with a parent!
+    }
+
+    if ( ! isValidText( _qt_comboBox->currentText() ) )
+    {
+       y2error( "Old value \"%s\" of %s \"%s\" invalid according to ValidChars \"%s\" - deleting",
+                (const char *) _qt_comboBox->currentText(),
+                widgetClass(), debugLabel().c_str(),
+                newValidChars.c_str() );
+       _qt_comboBox->setCurrentText( "" );
+    }
+
+    YComboBox::setValidChars( newValidChars );
+}
+
+
+bool YQComboBox::isValidText( const QString & txt ) const
+{
+    if ( ! _validator )
+       return true;
+
+    int pos = 0;
+    QString text( txt );       // need a non-const QString &
+
+    return _validator->validate( text, pos ) == QValidator::Acceptable;
+}
+
+
+void YQComboBox::slotSelected( int i )
+{
+    if ( notify() )
+    {
+       if ( ! YQUI::ui()->eventPendingFor( this ) )
+       {
+           // Avoid overwriting a (more important) ValueChanged event with a SelectionChanged event
+
+           YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::SelectionChanged ) );
+       }
+    }
+}
+
+
+void YQComboBox::textChanged( const QString & new_text )
+{
+    if ( notify() )
+       YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) );
+}
+
+
+void YQComboBox::setInputMaxLength( int len )
+{
+    _qt_comboBox->lineEdit()->setMaxLength( len );
+    YComboBox::setInputMaxLength( len );
+}
+
+
+int YQComboBox::preferredWidth()
+{
+    return sizeHint().width();
+}
+
+
+int YQComboBox::preferredHeight()
+{
+    return sizeHint().height();
+}
+
+
+void YQComboBox::setSize( int newWidth, int newHeight )
+{
+    resize( newWidth, newHeight );
+}
+
+
+void YQComboBox::setEnabled( bool enabled )
+{
+    _caption->setEnabled( enabled );
+    _qt_comboBox->setEnabled( enabled );
+    YWidget::setEnabled( enabled );
+}
+
+
+bool YQComboBox::setKeyboardFocus()
+{
+    _qt_comboBox->setFocus();
+
+    return true;
+}
+
+
+#include "YQComboBox.moc"
diff --git a/src/YQComboBox.h b/src/YQComboBox.h
new file mode 100644 (file)
index 0000000..3c50bfd
--- /dev/null
@@ -0,0 +1,171 @@
+/*---------------------------------------------------------------------\
+|                                                                     |
+|                     __   __    ____ _____ ____                      |
+|                     \ \ / /_ _/ ___|_   _|___ \                     |
+|                      \ V / _` \___ \ | |   __) |                    |
+|                       | | (_| |___) || |  / __/                     |
+|                       |_|\__,_|____/ |_| |_____|                    |
+|                                                                     |
+|                              core system                            |
+|                                                       (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+  File:              YQComboBox.h
+
+  Author:     Stefan Hundhammer <sh@suse.de>
+
+/-*/
+
+
+#ifndef YQComboBox_h
+#define YQComboBox_h
+
+#include <qvbox.h>
+#include "YComboBox.h"
+
+class YQWidgetCaption;
+class QComboBox;
+class QY2CharValidator;
+
+
+class YQComboBox : public QVBox, public YComboBox
+{
+    Q_OBJECT
+
+public:
+    /**
+     * Constructor.
+     **/
+    YQComboBox( YWidget * parent, const string & label, bool editable );
+
+    /**
+     * Destructor.
+     **/
+    ~YQComboBox();
+
+    /**
+     * Add one item. This widget assumes ownership of the item object and will
+     * delete it in its destructor.
+     *
+     * Reimplemented from YComboBox.
+     **/
+    virtual void addItem( YItem * item );
+
+    /**
+     * Delete all items.
+     *
+     * Reimplemented from YSelectionWidget.
+     **/
+    virtual void deleteAllItems();
+
+    /**
+     * Change the label text.
+     *
+     * Reimplemented from YSelectionWidget.
+     **/
+    virtual void setLabel( const string & label );
+
+    /**
+     * Change the valid input characters.
+     *
+     * Reimplemented from YComboBox.
+     **/
+    virtual void setValidChars( const string & validChars );
+
+    /**
+     * Specify the amount of characters which can be inserted.
+     *
+     * Reimplemented from YComboBox.
+     **/
+    virtual void setInputMaxLength( int numberOfChars );
+
+    /**
+     * Returns 'true' if the given text is valid according to the current
+     * setting of ValidChars. 
+     **/
+    bool isValidText( const QString & txt ) const;
+
+    /**
+     * Set enabled / disabled state.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setEnabled( bool enabled );
+
+    /**
+     * Preferred width of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredWidth();
+
+    /**
+     * Preferred height of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual int preferredHeight();
+
+    /**
+     * Set the new size of the widget.
+     *
+     * Reimplemented from YWidget.
+     **/
+    virtual void setSize( int newWidth, int newHeight );
+
+    /**
+     * Accept the keyboard focus.
+     **/
+    virtual bool setKeyboardFocus();
+
+
+protected slots:
+
+    /**
+     * Tells the ui that an item has been selected. This is only
+     * interesting if the `notify option is set.
+     **/
+    void slotSelected( int i );
+
+    /**
+     * Tells the ui that the user has edited the text ( if the
+     * 'editable' option is set ).
+  &nb