Author: sh-sh-sh
Date: Thu Jul 26 15:47:28 2007
New Revision: 39717
URL: http://svn.opensuse.org/viewcvs/yast?rev=39717&view=rev
Log:
Initial port to Qt4
Removed:
branches/tmp/sh/qt4-port/qt/src/qxembed.cc
branches/tmp/sh/qt4-port/qt/src/qxembed.h
Modified:
branches/tmp/sh/qt4-port/qt/Makefile.cvs
branches/tmp/sh/qt4-port/qt/acinclude.m4
branches/tmp/sh/qt4-port/qt/configure.in.in
branches/tmp/sh/qt4-port/qt/src/Makefile.am
branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.cc
branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.h
branches/tmp/sh/qt4-port/qt/src/QY2CharValidator.cc
branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.cc
branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.h
branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.cc
branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.h
branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.cc
branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.h
branches/tmp/sh/qt4-port/qt/src/QY2LayoutUtils.cc
branches/tmp/sh/qt4-port/qt/src/QY2ListView.cc
branches/tmp/sh/qt4-port/qt/src/QY2ListView.h
branches/tmp/sh/qt4-port/qt/src/QY2Settings.cc
branches/tmp/sh/qt4-port/qt/src/QY2Settings.h
branches/tmp/sh/qt4-port/qt/src/YQCheckBox.cc
branches/tmp/sh/qt4-port/qt/src/YQCheckBox.h
branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.cc
branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.h
branches/tmp/sh/qt4-port/qt/src/YQColoredLabel.cc
branches/tmp/sh/qt4-port/qt/src/YQComboBox.cc
branches/tmp/sh/qt4-port/qt/src/YQComboBox.h
branches/tmp/sh/qt4-port/qt/src/YQDate.cc
branches/tmp/sh/qt4-port/qt/src/YQDate.h
branches/tmp/sh/qt4-port/qt/src/YQDialog.cc
branches/tmp/sh/qt4-port/qt/src/YQDialog.h
branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.cc
branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.h
branches/tmp/sh/qt4-port/qt/src/YQDumbTab.cc
branches/tmp/sh/qt4-port/qt/src/YQDumbTab.h
branches/tmp/sh/qt4-port/qt/src/YQFrame.cc
branches/tmp/sh/qt4-port/qt/src/YQFrame.h
branches/tmp/sh/qt4-port/qt/src/YQGenericButton.cc
branches/tmp/sh/qt4-port/qt/src/YQGenericButton.h
branches/tmp/sh/qt4-port/qt/src/YQIconPool.cc
branches/tmp/sh/qt4-port/qt/src/YQIconPool.h
branches/tmp/sh/qt4-port/qt/src/YQImage.cc
branches/tmp/sh/qt4-port/qt/src/YQImage.h
branches/tmp/sh/qt4-port/qt/src/YQIntField.cc
branches/tmp/sh/qt4-port/qt/src/YQIntField.h
branches/tmp/sh/qt4-port/qt/src/YQLabel.cc
branches/tmp/sh/qt4-port/qt/src/YQLogView.cc
branches/tmp/sh/qt4-port/qt/src/YQLogView.h
branches/tmp/sh/qt4-port/qt/src/YQMenuButton.cc
branches/tmp/sh/qt4-port/qt/src/YQMenuButton.h
branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.cc
branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.h
branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.cc
branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.h
branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.cc
branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.h
branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.cc
branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.h
branches/tmp/sh/qt4-port/qt/src/YQProgressBar.cc
branches/tmp/sh/qt4-port/qt/src/YQProgressBar.h
branches/tmp/sh/qt4-port/qt/src/YQPushButton.cc
branches/tmp/sh/qt4-port/qt/src/YQRadioButton.cc
branches/tmp/sh/qt4-port/qt/src/YQRadioButton.h
branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.cc
branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.h
branches/tmp/sh/qt4-port/qt/src/YQRichText.cc
branches/tmp/sh/qt4-port/qt/src/YQRichText.h
branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.cc
branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.h
branches/tmp/sh/qt4-port/qt/src/YQSlider.cc
branches/tmp/sh/qt4-port/qt/src/YQSlider.h
branches/tmp/sh/qt4-port/qt/src/YQTable.cc
branches/tmp/sh/qt4-port/qt/src/YQTable.h
branches/tmp/sh/qt4-port/qt/src/YQTextEntry.cc
branches/tmp/sh/qt4-port/qt/src/YQTextEntry.h
branches/tmp/sh/qt4-port/qt/src/YQTime.cc
branches/tmp/sh/qt4-port/qt/src/YQTime.h
branches/tmp/sh/qt4-port/qt/src/YQTree.cc
branches/tmp/sh/qt4-port/qt/src/YQTree.h
branches/tmp/sh/qt4-port/qt/src/YQUI.h
branches/tmp/sh/qt4-port/qt/src/YQUI_builtins.cc
branches/tmp/sh/qt4-port/qt/src/YQUI_core.cc
branches/tmp/sh/qt4-port/qt/src/YQUI_widgets.cc
branches/tmp/sh/qt4-port/qt/src/YQUI_x11.cc
branches/tmp/sh/qt4-port/qt/src/YQWizard.cc
branches/tmp/sh/qt4-port/qt/src/YQWizard.h
branches/tmp/sh/qt4-port/qt/src/YQWizardButton.cc
branches/tmp/sh/qt4-port/qt/src/pkg/Makefile.am
branches/tmp/sh/qt4-port/qt/src/pkg/YQPackageSelector.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPackageSelector.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPackageSelectorBase.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPackageSelectorBase.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPatternSelector.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPatternSelector.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgChangesDialog.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgConflictDialog.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgConflictDialog.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgConflictList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgConflictList.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgDescriptionDialog.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgDescriptionView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgDiskUsageList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgDiskUsageList.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgDiskUsageWarningDialog.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgGenericDetailsView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgGenericDetailsView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgLangList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgList.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgObjList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgObjList.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgPatchFilterView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgPatchFilterView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgPatchList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgPatchList.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgPatternList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgPatternList.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgProductDialog.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgRepoFilterView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgRepoFilterView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgRepoList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgRpmGroupTagsFilterView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgRpmGroupTagsFilterView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgSearchFilterView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgSearchFilterView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgSelDescriptionView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgSelList.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgSelList.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgStatusFilterView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgStatusFilterView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgTechnicalDetailsView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgTextDialog.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgTextDialog.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgUpdateProblemFilterView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgUpdateProblemFilterView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgVersionsView.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQPkgVersionsView.h
branches/tmp/sh/qt4-port/qt/src/pkg/YQSimplePatchSelector.cc
branches/tmp/sh/qt4-port/qt/src/pkg/YQSimplePatchSelector.h
branches/tmp/sh/qt4-port/qt/src/utf8.h
branches/tmp/sh/qt4-port/qt/yast2-qt.spec.in
Modified: branches/tmp/sh/qt4-port/qt/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/Makefile.cvs?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/Makefile.cvs (original)
+++ branches/tmp/sh/qt4-port/qt/Makefile.cvs Thu Jul 26 15:47:28 2007
@@ -5,7 +5,7 @@
LIB = $(shell y2tool get-lib)
configure: all
- ./configure --libdir=/usr/$(LIB) --with-qt-dir=/usr/lib/qt3 --with-qt-libdir=/usr/lib/qt3/$(LIB)
+ ./configure --libdir=/usr/$(LIB)
all:
y2tool y2autoconf
Modified: branches/tmp/sh/qt4-port/qt/acinclude.m4
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/acinclude.m4?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/acinclude.m4 (original)
+++ branches/tmp/sh/qt4-port/qt/acinclude.m4 Thu Jul 26 15:47:28 2007
@@ -4,7 +4,7 @@
dnl See file COPYING for license
dnl
dnl Author: Stefan Hundhammer
-dnl Updated: 2001-12-14
+dnl Updated: 2007-07-25
dnl
@@ -14,11 +14,11 @@
AC_DEFUN([AC_MIN_QT_VERSION],
[
AC_MSG_CHECKING([for Qt $2 or higher])
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$QTDIR/include"
+dnl save_CFLAGS="$CFLAGS"
+dnl CFLAGS="$CFLAGS -I$QTDIR/include"
AC_TRY_COMPILE([
-#include
+#include
],
[
#if QT_VERSION < $1
@@ -29,9 +29,26 @@
[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.
+are installed!
])]
)
-CFLAGS="$save_CFLAGS"
+dnl CFLAGS="$save_CFLAGS"
])
+
+dnl AC_QTDIRS
+dnl Sets up directories for Qt
+AC_DEFUN([AC_QTDIRS],
+MOC=/usr/bin/moc
+QT_INCLUDEDIR=/usr/include/Qt
+QT_LIBDIR=/usr/lib
+QT_SHAREDIR=/usr/share/qt4
+QT_TRANSLATIONSDIR=${QT_SHAREDIR}/translations
+QT_PLUGINDIR=/usr/lib/qt4/plugins
+AC_SUBST(MOC)
+AC_SUBST(QT_INCLUDEDIR)
+AC_SUBST(QT_LIBDIR)
+AC_SUBST(QT_SHAREDIR)
+AC_SUBST(QT_TRANSLATIONSDIR)
+AC_SUBST(QT_PLUGINDIR)
+)
\ No newline at end of file
Modified: branches/tmp/sh/qt4-port/qt/configure.in.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/configure.in.in?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/configure.in.in (original)
+++ branches/tmp/sh/qt4-port/qt/configure.in.in Thu Jul 26 15:47:28 2007
@@ -7,14 +7,15 @@
## some common checks
@YAST2-CHECKS-COMMON@
@YAST2-CHECKS-PROGRAM@
-@YAST2-CHECKS-QT@
+@YAST2-CHECKS-QT4@
## special stuff
-AC_MIN_QT_VERSION(301,3.01)
+AC_MIN_QT_VERSION(0x040201,4.2.1)
+AC_QTDIRS
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
+# /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 ;;
Modified: branches/tmp/sh/qt4-port/qt/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/Makefile.am?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/Makefile.am (original)
+++ branches/tmp/sh/qt4-port/qt/src/Makefile.am Thu Jul 26 15:47:28 2007
@@ -5,19 +5,16 @@
SUBDIRS = pkg
AM_CXXFLAGS = -DY2LOG=\"ui-qt\" \
+ -DQT3_SUPPORT \
-DQT_THREAD_SUPPORT \
-DLOCALEDIR=\"${localedir}\" \
- -DQT_LOCALEDIR=\"$(QTDIR)/translations\" \
+ -DQT_LOCALEDIR=\"$(QT_TRANSLATIONSDIR)\" \
-DICONDIR=\"${themedir}/current\" \
-DTHEMEDIR=\"${themedir}/current\" \
- -DHELPIMAGEDIR=\"${imagedir}\" \
-DLANG_FONTS_FILE=\"${lang_fontsdir}/lang_fonts\" \
- -DQTLIBDIR=\"$(QTLIBDIR)\" \
+ -DQTLIBDIR=\"$(QT_LIBDIR)\" \
-fmessage-length=0
-
-MOC = $(QTDIR)/bin/moc
-
serversdir = $(execcompdir)/servers
lang_fontsdir=$(ydatadir)
@@ -31,15 +28,9 @@
libpy2qt_la_LIBADD = \
-L$(libdir) -lyui \
- -L$(QTLIBDIR) -lqt-mt \
+ -L$(QT_LIBDIR) -lQt3Support \
-lX11 -lXext -lSM -lICE
-# libpy2qt_la_LIBADD = \
-# -Lpkg -ly2qt_pkg \
-# -L$(libdir) -lyui \
-# -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)
@@ -107,8 +98,7 @@
QY2CharValidator.cc \
QY2ListView.cc \
QY2Settings.cc \
- QY2LayoutUtils.cc \
- qxembed.cc
+ QY2LayoutUtils.cc
@@ -169,8 +159,7 @@
QY2DiskUsageList.moc \
QY2FloppyMountDialog.moc \
QY2CharValidator.moc \
- QY2ListView.moc \
- qxembed.moc
+ QY2ListView.moc
YQUI_core.o YQUI_core.lo: YQUI.moc
@@ -224,7 +213,6 @@
QY2FloppyMountDialog.o QY2FloppyMountDialog.lo: QY2FloppyMountDialog.cc
QY2CharValidator.o QY2CharValidator.lo: QY2CharValidator.moc
QY2ListView.o QY2ListView.lo: QY2ListView.moc
-qxembed.o qxembed.lo: qxembed.moc
@@ -275,12 +263,10 @@
QY2CharValidator.moc: QY2CharValidator.h
QY2ListView.moc: QY2ListView.h
-qxembed.moc: qxembed.h
-
%.moc: %.h
$(MOC) $< -o $@
CLEANFILES = *.moc
-INCLUDES = -I$(srcdir)/pkg -I$(QTDIR)/include -I$(includedir) -I$(includedir)/yui
+INCLUDES = -I$(srcdir)/pkg -I$(QT_INCLUDEDIR) -I$(includedir) -I$(includedir)/yui
Modified: branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.cc Thu Jul 26 15:47:28 2007
@@ -22,6 +22,8 @@
#include
#include
#include "QY2BarGraph.h"
+//Added by qt3to4:
+#include
using std::max;
@@ -40,10 +42,10 @@
QY2BarGraph::QY2BarGraph( QWidget * parent, const char * name )
- : QFrame( parent, name )
+ : Q3Frame( parent, name )
{
setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
setLineWidth(2);
setMidLineWidth(2);
}
@@ -146,7 +148,7 @@
// Fill the segment
p->setBrush( segmentBackgroundColor(i) );
- p->setPen( NoPen );
+ p->setPen( Qt::NoPen );
p->drawRect( x_off, y_off, segWidth+2, segHeight+2 );
@@ -157,7 +159,7 @@
if ( i < segments()-1 )
{
- p->setPen( SolidLine );
+ p->setPen( Qt::SolidLine );
p->setPen( segmentBackgroundColor( i).light().light() );
p->drawLine( x_off + segWidth-2, y_off,
@@ -172,7 +174,7 @@
// Draw the label
- p->setPen( SolidLine );
+ p->setPen( Qt::SolidLine );
p->setPen( segmentForegroundColor(i) );
QString txt = _labels[i];
@@ -184,7 +186,7 @@
y_off + LabelVerticalMargin,
segWidth - 2 * LabelHorizontalMargin + 1,
segHeight - 2 * LabelVerticalMargin + 1,
- AlignCenter, txt );
+ Qt::AlignCenter, txt );
// Prepare for the next segment
Modified: branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2BarGraph.h Thu Jul 26 15:47:28 2007
@@ -23,14 +23,13 @@
#ifndef QY2BarGraph_h
#define QY2BarGraph_h
-#include
-#include
+#include
#include <vector>
using std::vector;
-class QY2BarGraph : public QFrame
+class QY2BarGraph : public Q3Frame
{
Q_OBJECT
Modified: branches/tmp/sh/qt4-port/qt/src/QY2CharValidator.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2CharValidator.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2CharValidator.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2CharValidator.cc Thu Jul 26 15:47:28 2007
@@ -52,7 +52,7 @@
// 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++ )
+ for ( int i=0; i < fieldContents.length(); i++ )
{
if ( ! validChars().contains( fieldContents[i] ) )
return QValidator::Invalid;
Modified: branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.cc Thu Jul 26 15:47:28 2007
@@ -19,10 +19,12 @@
/-*/
-#include
+#include
#include
#include
-#include
+#include
+//Added by qt3to4:
+#include
#define y2log_component "qt-pkg"
#include
@@ -38,34 +40,34 @@
QY2ComboTabWidget::QY2ComboTabWidget( const QString & label,
QWidget * parent,
const char * name )
- : QVBox( parent, name )
+ : Q3VBox( parent, name )
{
- setFrameStyle( QFrame::Panel | QFrame::Raised );
+ setFrameStyle( Q3Frame::Panel | Q3Frame::Raised );
setLineWidth(2);
setMidLineWidth(2);
setSpacing( SPACING );
setMargin ( MARGIN );
- QHBox * hbox = new QHBox( this );
- CHECK_PTR( hbox );
+ Q3HBox * hbox = new Q3HBox( this );
+ Q_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 );
+ Q_CHECK_PTR( combo_label );
combo_box = new QComboBox( hbox );
- CHECK_PTR( combo_box );
+ Q_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 );
+ widget_stack = new Q3WidgetStack( this );
+ Q_CHECK_PTR( widget_stack );
}
@@ -123,7 +125,7 @@
// Search the dict for this page
- QIntDictIterator<QWidget> it( pages );
+ Q3IntDictIterator<QWidget> it( pages );
while ( it.current() )
{
Modified: branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2ComboTabWidget.h Thu Jul 26 15:47:28 2007
@@ -23,13 +23,13 @@
#ifndef QY2ComboTabWidget_h
#define QY2ComboTabWidget_h
-#include
+#include
#include
-#include
+#include
class QComboBox;
class QLabel;
-class QWidgetStack;
+class Q3WidgetStack;
class QWidget;
@@ -37,7 +37,7 @@
* 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
+class QY2ComboTabWidget : public Q3VBox
{
Q_OBJECT
@@ -98,8 +98,8 @@
QComboBox * combo_box;
QLabel * combo_label;
- QWidgetStack * widget_stack;
- QIntDict<QWidget> pages;
+ Q3WidgetStack * widget_stack;
+ Q3IntDict<QWidget> pages;
};
#endif // QY2ComboTabWidget_h
Modified: branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.cc Thu Jul 26 15:47:28 2007
@@ -62,7 +62,7 @@
}
saveColumnWidths();
- setSelectionMode( QListView::NoSelection );
+ setSelectionMode( Q3ListView::NoSelection );
}
@@ -167,7 +167,7 @@
* +1 if this > other
**/
int
-QY2DiskUsageListItem::compare( QListViewItem * otherListViewItem,
+QY2DiskUsageListItem::compare( Q3ListViewItem * otherListViewItem,
int col,
bool ascending ) const
{
@@ -241,7 +241,7 @@
// 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 );
+ Q3ListViewItem::paintCell( painter, cg, column, width, alignment );
}
}
@@ -276,7 +276,7 @@
QPen pen( painter->pen() );
pen.setWidth(0);
painter->setPen( pen );
- painter->setBrush( NoBrush );
+ painter->setBrush( Qt::NoBrush );
fillWidth = (int) ( ( w - 2 * penWidth ) * percent / 100.0 );
Modified: branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2DiskUsageList.h Thu Jul 26 15:47:28 2007
@@ -180,7 +180,7 @@
* confused which one to use.
**/
void setText( int column, const QString & text )
- { QListViewItem::setText( column, text ); }
+ { Q3ListViewItem::setText( column, text ); }
/**
* Set a column text via FSize.
@@ -196,7 +196,7 @@
*
* Reimplemented from QY2ListViewItem.
**/
- virtual int compare( QListViewItem * other,
+ virtual int compare( Q3ListViewItem * other,
int col,
bool ascending ) const;
Modified: branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.cc Thu Jul 26 15:47:28 2007
@@ -24,6 +24,9 @@
#include "QY2FloppyMountDialog.h"
#include "QY2LayoutUtils.h"
+#include
+#include
+#include
#include "YQi18n.h"
#ifndef NO_YAST2_ENVIRONMENT
@@ -36,16 +39,16 @@
#include
#include
-#include
-#include
-#include
+#include
+#include
+#include
#include
#include
#include
#include
#include
#include
-#include
+#include
#define SPACING 2 // between subwidgets
@@ -67,7 +70,7 @@
, _floppyMounted( false )
, _wantExistingFile( false )
{
- QHBox * hbox;
+ Q3HBox * hbox;
QLabel * label;
QPushButton * button;
@@ -84,51 +87,51 @@
// Layout for the dialog ( can't simply insert a QVBox )
- QVBoxLayout * layout = new QVBoxLayout( this, // parent
+ Q3VBoxLayout * layout = new Q3VBoxLayout( this, // parent
8, // margin
SPACING ); // spacing
- CHECK_PTR( layout );
+ Q_CHECK_PTR( layout );
// Headline
label = new QLabel( "<b>" + headline + "</b>", this );
- CHECK_PTR( label );
+ Q_CHECK_PTR( label );
layout->addWidget( label );
// Radio box for device ( hard disk / floppy )
- QVButtonGroup * bgroup = new QVButtonGroup( _( "Device" ), this );
- CHECK_PTR( bgroup );
+ Q3VButtonGroup * bgroup = new Q3VButtonGroup( _( "Device" ), this );
+ Q_CHECK_PTR( bgroup );
bgroup->setRadioButtonExclusive( true );
layout->addWidget( bgroup );
_useHardDisk = new QRadioButton( _( "&Hard Disk" ), bgroup );
- CHECK_PTR( _useHardDisk );
+ Q_CHECK_PTR( _useHardDisk );
_useHardDisk->setChecked( ! startWithFloppy );
_useFloppy = new QRadioButton( _( "&Floppy" ), bgroup );
- CHECK_PTR( _useFloppy );
+ Q_CHECK_PTR( _useFloppy );
_useFloppy->setChecked( startWithFloppy );
// Box for floppy parameters
- hbox = new QHBox( bgroup );
- CHECK_PTR( hbox );
+ hbox = new Q3HBox( bgroup );
+ Q_CHECK_PTR( hbox );
addHSpacing( hbox, 25 );
- _floppyParams = new QFrame( hbox );
- CHECK_PTR( _floppyParams );
- _floppyParams->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ _floppyParams = new Q3Frame( hbox );
+ Q_CHECK_PTR( _floppyParams );
+ _floppyParams->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
- QGridLayout * grid = new QGridLayout( _floppyParams, // parent
+ Q3GridLayout * grid = new Q3GridLayout( _floppyParams, // parent
2, // rows
2, // cols
MARGIN, // margin
SPACING ); // spacing
- CHECK_PTR( grid );
+ Q_CHECK_PTR( grid );
grid->setColStretch( 0, 0 ); // label column - dont' stretch
grid->setColStretch( 1, 1 ); // input field ( combo box ) column may stretch as desired
@@ -136,11 +139,11 @@
// Input field + caption for "Floppy Device"
label = new QLabel( _( "Floppy &Device:" ), _floppyParams );
- CHECK_PTR( label );
+ Q_CHECK_PTR( label );
grid->addWidget( label, 0, 0 );
_floppyDeviceField = new QComboBox( _floppyParams );
- CHECK_PTR( _floppyDeviceField );
+ Q_CHECK_PTR( _floppyDeviceField );
grid->addWidget( _floppyDeviceField, 0, 1 );
_floppyDeviceField->setEditable( true );
_floppyDeviceField->setAutoCompletion( true );
@@ -152,11 +155,11 @@
// Input field + caption for "Mount Point"
label = new QLabel( _( "&Mount Point:" ), _floppyParams );
- CHECK_PTR( label );
+ Q_CHECK_PTR( label );
grid->addWidget( label, 1, 0 );
_floppyMountPointField = new QComboBox( _floppyParams );
- CHECK_PTR( _floppyMountPointField );
+ Q_CHECK_PTR( _floppyMountPointField );
grid->addWidget( _floppyMountPointField, 1, 1 );
_floppyMountPointField->setEditable( true );
_floppyMountPointField->setAutoCompletion( true );
@@ -172,8 +175,8 @@
// HBox for path field, its caption and the "Browse..." button
- hbox = new QHBox( this );
- CHECK_PTR( hbox );
+ hbox = new Q3HBox( this );
+ Q_CHECK_PTR( hbox );
hbox->setSpacing( SPACING );
hbox->setMargin ( MARGIN );
layout->addWidget( hbox );
@@ -182,10 +185,10 @@
// Input field for path
label = new QLabel( _( "&Path:" ), hbox );
- CHECK_PTR( label );
+ Q_CHECK_PTR( label );
_pathField = new QLineEdit( startWith, hbox );
- CHECK_PTR( _pathField );
+ Q_CHECK_PTR( _pathField );
_pathField->setMinimumSize( 300, _pathField->sizeHint().height() );
label->setBuddy( _pathField );
@@ -194,7 +197,7 @@
addHSpacing( hbox );
button = new QPushButton( _( "Bro&wse..." ), hbox );
- CHECK_PTR( button );
+ Q_CHECK_PTR( button );
connect( button, SIGNAL( clicked() ),
this, SLOT ( browse() ) );
@@ -202,8 +205,8 @@
// Button box
- hbox = new QHBox( this );
- CHECK_PTR( hbox );
+ hbox = new Q3HBox( this );
+ Q_CHECK_PTR( hbox );
hbox->setSpacing( SPACING );
hbox->setMargin ( MARGIN );
layout->addWidget( hbox );
@@ -214,7 +217,7 @@
// "OK" button
button = new QPushButton( _( "&OK" ), hbox );
- CHECK_PTR( button );
+ Q_CHECK_PTR( button );
button->setDefault( true );
connect( button, SIGNAL( clicked() ),
@@ -226,7 +229,7 @@
// "Cancel" button
button = new QPushButton( _( "&Cancel" ), hbox );
- CHECK_PTR( button );
+ Q_CHECK_PTR( button );
connect( button, SIGNAL( clicked() ),
this, SLOT ( reject() ) );
@@ -300,7 +303,7 @@
if ( _wantExistingFile )
{
- filename = QFileDialog::getOpenFileName( startWith,
+ filename = Q3FileDialog::getOpenFileName( startWith,
_filter,
this, // parent
_( "Select File" ) ); // caption
@@ -308,7 +311,7 @@
}
else
{
- filename = QFileDialog::getSaveFileName( startWith,
+ filename = Q3FileDialog::getSaveFileName( startWith,
_filter,
this, // parent
_( "Select File" ) ); // caption
@@ -357,7 +360,7 @@
while ( true )
{
- qApp->setOverrideCursor( waitCursor );
+ qApp->setOverrideCursor( Qt::waitCursor );
int result = system( (const char *) command );
qApp->restoreOverrideCursor();
Modified: branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2FloppyMountDialog.h Thu Jul 26 15:47:28 2007
@@ -25,11 +25,10 @@
#include
-
class QRadioButton;
class QComboBox;
class QLineEdit;
-class QFrame;
+class Q3Frame;
/**
@@ -146,7 +145,7 @@
QRadioButton * _useHardDisk;
QRadioButton * _useFloppy;
- QFrame * _floppyParams;
+ Q3Frame * _floppyParams;
QComboBox * _floppyDeviceField;
QComboBox * _floppyMountPointField;
QLineEdit * _pathField;
Modified: branches/tmp/sh/qt4-port/qt/src/QY2LayoutUtils.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2LayoutUtils.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2LayoutUtils.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2LayoutUtils.cc Thu Jul 26 15:47:28 2007
@@ -44,7 +44,7 @@
QWidget * addVSpacing( QWidget * parent, int height )
{
QWidget * spacer = new QWidget( parent );
- CHECK_PTR( spacer );
+ Q_CHECK_PTR( spacer );
spacer->setFixedHeight( height );
return spacer;
@@ -54,7 +54,7 @@
QWidget * addHSpacing( QWidget * parent, int width )
{
QWidget * spacer = new QWidget( parent );
- CHECK_PTR( spacer );
+ Q_CHECK_PTR( spacer );
spacer->setFixedWidth( width );
return spacer;
Modified: branches/tmp/sh/qt4-port/qt/src/QY2ListView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2ListView.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2ListView.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2ListView.cc Thu Jul 26 15:47:28 2007
@@ -20,22 +20,25 @@
#include
-#include
+#include
#include "QY2ListView.h"
+#include
QY2ListView::QY2ListView( QWidget * parent )
- : QListView( parent )
+ : Q3ListView( parent )
, _mousePressedItem(0)
, _mousePressedCol( -1 )
- , _mousePressedButton( NoButton )
+ , _mousePressedButton( Qt::NoButton )
, _nextSerial(0)
, _mouseButton1PressedInHeader( false )
, _finalSizeChangeExpected( false )
{
- QListView::setShowToolTips( false );
+ Q3ListView::setShowToolTips( false );
+#if FIXME_TOOLTIP
_toolTip = new QY2ListViewToolTip( this );
+#endif
if ( header() )
header()->installEventFilter( this );
@@ -47,15 +50,17 @@
QY2ListView::~QY2ListView()
{
+#if FIXME_TOOLTIP
if ( _toolTip )
delete _toolTip;
+#endif
}
void
QY2ListView::selectSomething()
{
- QListViewItemIterator it( this );
+ Q3ListViewItemIterator it( this );
while ( *it )
{
@@ -75,7 +80,7 @@
void
QY2ListView::clear()
{
- QListView::clear();
+ Q3ListView::clear();
restoreColumnWidths();
}
@@ -83,7 +88,7 @@
void
QY2ListView::updateItemStates()
{
- QListViewItemIterator it( this );
+ Q3ListViewItemIterator it( this );
while ( *it )
{
@@ -100,7 +105,7 @@
void
QY2ListView::updateItemData()
{
- QListViewItemIterator it( this );
+ Q3ListViewItemIterator it( this );
while ( *it )
{
@@ -115,7 +120,7 @@
QString
-QY2ListView::toolTip( QListViewItem * listViewItem, int column )
+QY2ListView::toolTip( Q3ListViewItem * listViewItem, int column )
{
if ( ! listViewItem )
return QString::null;
@@ -176,7 +181,7 @@
void
QY2ListView::contentsMousePressEvent( QMouseEvent * ev )
{
- QListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
+ Q3ListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
if ( item && item->isEnabled() )
{
@@ -192,14 +197,14 @@
}
// Call base class method
- QListView::contentsMousePressEvent( ev );
+ Q3ListView::contentsMousePressEvent( ev );
}
void
QY2ListView::contentsMouseReleaseEvent( QMouseEvent * ev )
{
- QListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
+ Q3ListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
if ( item && item->isEnabled() && item == _mousePressedItem )
{
@@ -218,17 +223,17 @@
_mousePressedItem = 0;
_mousePressedCol = -1;
- _mousePressedButton = NoButton;
+ _mousePressedButton = Qt::NoButton;
// Call base class method
- QListView::contentsMouseReleaseEvent( ev );
+ Q3ListView::contentsMouseReleaseEvent( ev );
}
void
QY2ListView::contentsMouseDoubleClickEvent( QMouseEvent * ev )
{
- QListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
+ Q3ListViewItem * item = itemAt( contentsToViewport( ev->pos() ) );
if ( item && item->isEnabled() )
{
@@ -240,10 +245,10 @@
_mousePressedItem = 0;
_mousePressedCol = -1;
- _mousePressedButton = NoButton;
+ _mousePressedButton = Qt::NoButton;
// Call base class method
- QListView::contentsMouseDoubleClickEvent( ev );
+ Q3ListView::contentsMouseDoubleClickEvent( ev );
}
@@ -299,7 +304,7 @@
}
}
- return QListView::eventFilter( obj, event );
+ return Q3ListView::eventFilter( obj, event );
}
@@ -317,17 +322,17 @@
QY2ListViewItem::QY2ListViewItem( QY2ListView * parentListView,
const QString & text,
bool sortByInsertionSequence )
- : QListViewItem( parentListView, text )
+ : Q3ListViewItem( parentListView, text )
, _sortByInsertionSequence( sortByInsertionSequence )
{
_serial = parentListView->nextSerial();
}
-QY2ListViewItem::QY2ListViewItem( QListViewItem * parentItem,
+QY2ListViewItem::QY2ListViewItem( Q3ListViewItem * parentItem,
const QString & text,
bool sortByInsertionSequence )
- : QListViewItem( parentItem, text )
+ : Q3ListViewItem( parentItem, text )
, _sortByInsertionSequence( sortByInsertionSequence )
{
_serial = 0;
@@ -353,7 +358,7 @@
* +1 if this > other
**/
int
-QY2ListViewItem::compare( QListViewItem * otherListViewItem,
+QY2ListViewItem::compare( Q3ListViewItem * otherListViewItem,
int col,
bool ascending ) const
{
@@ -381,7 +386,7 @@
}
- return QListViewItem::compare( otherListViewItem, col, ascending );
+ return Q3ListViewItem::compare( otherListViewItem, col, ascending );
}
@@ -397,7 +402,7 @@
if ( _textColor.isValid() ) cg.setColor( QColorGroup::Text, _textColor );
if ( _backgroundColor.isValid() ) cg.setColor( QColorGroup::Base, _backgroundColor );
- QListViewItem::paintCell( painter, cg, column, width, alignment );
+ Q3ListViewItem::paintCell( painter, cg, column, width, alignment );
}
@@ -407,9 +412,9 @@
QY2CheckListItem::QY2CheckListItem( QY2ListView * parentListView,
const QString & text,
- QCheckListItem::Type type,
+ Q3CheckListItem::Type type,
bool sortByInsertionSequence )
- : QCheckListItem( parentListView, text, type )
+ : Q3CheckListItem( parentListView, text, type )
, _sortByInsertionSequence( sortByInsertionSequence )
{
_serial = 0;
@@ -419,11 +424,11 @@
}
-QY2CheckListItem::QY2CheckListItem( QListViewItem * parentItem,
+QY2CheckListItem::QY2CheckListItem( Q3ListViewItem * parentItem,
const QString & text,
- QCheckListItem::Type type,
+ Q3CheckListItem::Type type,
bool sortByInsertionSequence )
- : QCheckListItem( parentItem, text, type )
+ : Q3CheckListItem( parentItem, text, type )
, _sortByInsertionSequence( sortByInsertionSequence )
{
_serial = 0;
@@ -438,11 +443,11 @@
}
-QY2CheckListItem::QY2CheckListItem( QCheckListItem * parentItem,
+QY2CheckListItem::QY2CheckListItem( Q3CheckListItem * parentItem,
const QString & text,
- QCheckListItem::Type type,
+ Q3CheckListItem::Type type,
bool sortByInsertionSequence )
- : QCheckListItem( parentItem, text, type )
+ : Q3CheckListItem( parentItem, text, type )
, _sortByInsertionSequence( sortByInsertionSequence )
{
_serial = 0;
@@ -471,7 +476,7 @@
* +1 if this > other
**/
int
-QY2CheckListItem::compare( QListViewItem * otherListViewItem,
+QY2CheckListItem::compare( Q3ListViewItem * otherListViewItem,
int col,
bool ascending ) const
{
@@ -500,7 +505,7 @@
}
- return QListViewItem::compare( otherListViewItem, col, ascending );
+ return Q3ListViewItem::compare( otherListViewItem, col, ascending );
}
@@ -516,15 +521,16 @@
if ( _textColor.isValid() ) cg.setColor( QColorGroup::Text, _textColor );
if ( _backgroundColor.isValid() ) cg.setColor( QColorGroup::Base, _backgroundColor );
- QCheckListItem::paintCell( painter, cg, column, width, alignment );
+ Q3CheckListItem::paintCell( painter, cg, column, width, alignment );
}
+#if FIXME_TOOLTIP
void
QY2ListViewToolTip::maybeTip( const QPoint & pos )
{
- QHeader * header = _listView->header();
- QListViewItem * item = _listView->itemAt( pos );
+ Q3Header * header = _listView->header();
+ Q3ListViewItem * item = _listView->itemAt( pos );
if ( ! item )
return;
@@ -565,5 +571,7 @@
}
}
+#endif
+
#include "QY2ListView.moc"
Modified: branches/tmp/sh/qt4-port/qt/src/QY2ListView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2ListView.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2ListView.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2ListView.h Thu Jul 26 15:47:28 2007
@@ -23,12 +23,14 @@
#ifndef QY2ListView_h
#define QY2ListView_h
-#include
+#include
#include
#include
#include
#include <vector>
+#define FIXME_TOOLTIP 0
+
class QY2ListViewItem;
class QY2ListViewToolTip;
@@ -37,7 +39,7 @@
/**
* @short Enhanced QListView
**/
-class QY2ListView : public QListView
+class QY2ListView : public Q3ListView
{
Q_OBJECT
@@ -101,7 +103,7 @@
* Emitted for mouse clicks on an item
**/
void columnClicked ( int button,
- QListViewItem * item,
+ Q3ListViewItem * item,
int col,
const QPoint & pos );
@@ -109,7 +111,7 @@
* Emitted for mouse double clicks on an item
**/
void columnDoubleClicked ( int button,
- QListViewItem * item,
+ Q3ListViewItem * item,
int col,
const QPoint & pos );
@@ -126,7 +128,7 @@
*
* Derived classes may handle this differently.
**/
- virtual QString toolTip( QListViewItem * item, int column );
+ virtual QString toolTip( Q3ListViewItem * item, int column );
/**
* Returns the next free serial number for items that want to be ordered in
@@ -179,14 +181,17 @@
// Data members
- QListViewItem * _mousePressedItem;
+ Q3ListViewItem * _mousePressedItem;
int _mousePressedCol;
int _mousePressedButton;
std::vector<int> _savedColumnWidth;
int _nextSerial;
+#if FIXME_TOOLTIP
QY2ListViewToolTip * _toolTip;
+#endif
+
bool _mouseButton1PressedInHeader;
bool _finalSizeChangeExpected;
};
@@ -196,7 +201,7 @@
/**
* Enhanced QListViewItem
**/
-class QY2ListViewItem: public QListViewItem
+class QY2ListViewItem: public Q3ListViewItem
{
public:
@@ -219,7 +224,7 @@
* order ( true ) or leaves sorting to the user ( false - sort-by-click on
* column headers ).
**/
- QY2ListViewItem( QListViewItem * parentItem,
+ QY2ListViewItem( Q3ListViewItem * parentItem,
const QString & text = QString::null,
bool sortByInsertionSequence = false );
@@ -253,7 +258,7 @@
*
* Reimplemented from QListViewItem
**/
- virtual int compare( QListViewItem * other,
+ virtual int compare( Q3ListViewItem * other,
int col,
bool ascending ) const;
@@ -326,7 +331,7 @@
/**
* Enhanced QCheckListItem
**/
-class QY2CheckListItem: public QCheckListItem
+class QY2CheckListItem: public Q3CheckListItem
{
public:
@@ -339,7 +344,7 @@
**/
QY2CheckListItem( QY2ListView * parentListView,
const QString & text,
- QCheckListItem::Type type,
+ Q3CheckListItem::Type type,
bool sortByInsertionSequence = false );
@@ -350,9 +355,9 @@
* order ( true ) or leaves sorting to the user ( false - sort-by-click on
* column headers ).
**/
- QY2CheckListItem( QListViewItem * parentItem,
+ QY2CheckListItem( Q3ListViewItem * parentItem,
const QString & text,
- QCheckListItem::Type type,
+ Q3CheckListItem::Type type,
bool sortByInsertionSequence = false );
@@ -363,9 +368,9 @@
* order ( true ) or leaves sorting to the user ( false - sort-by-click on
* column headers ).
**/
- QY2CheckListItem( QCheckListItem * parentItem,
+ QY2CheckListItem( Q3CheckListItem * parentItem,
const QString & text,
- QCheckListItem::Type type,
+ Q3CheckListItem::Type type,
bool sortByInsertionSequence = false );
/**
@@ -398,7 +403,7 @@
*
* Reimplemented from QListViewItem
**/
- virtual int compare( QListViewItem * other,
+ virtual int compare( Q3ListViewItem * other,
int col,
bool ascending ) const;
@@ -467,6 +472,7 @@
};
+#if FIXME_TOOLTIP
/**
* Tool tip for a QY2ListView widget: Enables individual tool tips specific to
* each list item and each column. Overwrite QY2ListViewItem::toolTip() to use
@@ -480,7 +486,8 @@
* Constructor.
**/
QY2ListViewToolTip( QY2ListView * parent )
- : QToolTip( parent->viewport() ), _listView( parent ) {}
+ : QToolTip( parent->viewport() )
+ , _listView( parent ) {}
/**
* Destructor (to make gcc 4.x happy)
@@ -502,5 +509,6 @@
QY2ListView * _listView;
};
+#endif
#endif // ifndef QY2ListView_h
Modified: branches/tmp/sh/qt4-port/qt/src/QY2Settings.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2Settings.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2Settings.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2Settings.cc Thu Jul 26 15:47:28 2007
@@ -47,7 +47,7 @@
void QY2Settings::initSections()
{
_defaultSection = new Section( "" );
- CHECK_PTR( _defaultSection );
+ Q_CHECK_PTR( _defaultSection );
_currentSection = _defaultSection;
_sections.insert( "", _defaultSection );
@@ -154,10 +154,10 @@
QFile file( _fileName );
- if ( ! file.open( IO_ReadOnly ) )
+ if ( ! file.open( QIODevice::ReadOnly ) )
{
- cerr << "Can't load settings from " << _fileName
- << ": " << file.errorString()
+ cerr << "Can't load settings from " << (const char *) _fileName
+ << ": " << (const char *) file.errorString()
<< endl;
_readError = true;
@@ -165,8 +165,8 @@
return false;
}
- QTextStream str( &file );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream str( &file );
+ str.setEncoding( Q3TextStream::UnicodeUTF8 );
QString line;
int lineCount = 0;
@@ -230,17 +230,17 @@
QFile file( _fileName );
- if ( ! file.open( IO_WriteOnly ) )
+ if ( ! file.open( QIODevice::WriteOnly ) )
{
- cerr << "Can't save settings to " << _fileName
- << ": " << file.errorString()
+ cerr << "Can't save settings to " << (const char *) _fileName
+ << ": " << (const char *) file.errorString()
<< endl;
return false;
}
- QTextStream str( &file );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream str( &file );
+ str.setEncoding( Q3TextStream::UnicodeUTF8 );
// The default section must be saved first since it doesn't have a section
// name that could be used for a headline
@@ -261,7 +261,7 @@
}
-void QY2Settings::saveSection( QTextStream & str, Section * sect )
+void QY2Settings::saveSection( Q3TextStream & str, Section * sect )
{
// Section header
@@ -299,7 +299,7 @@
return;
_currentSection = new Section( sectionName );
- CHECK_PTR( _currentSection );
+ Q_CHECK_PTR( _currentSection );
_sections.insert( sectionName, _currentSection );
_dirty = true;
Modified: branches/tmp/sh/qt4-port/qt/src/QY2Settings.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/QY2Settings.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/QY2Settings.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/QY2Settings.h Thu Jul 26 15:47:28 2007
@@ -25,9 +25,9 @@
#include
#include
-#include
+#include
#include
-#include
+#include
/**
* Utility class that handles program settings in .ini file format:
@@ -233,7 +233,7 @@
/**
* Save one section to a stream
**/
- void saveSection( QTextStream & stream, Section * section );
+ void saveSection( Q3TextStream & stream, Section * section );
// Data members
@@ -247,9 +247,9 @@
bool _dirty;
Section * _defaultSection;
- QDict<Section> _sections;
+ Q3Dict<Section> _sections;
- typedef QDictIterator<Section> SectionIterator;
+ typedef Q3DictIterator<Section> SectionIterator;
};
#endif // QY2Settings_h
Modified: branches/tmp/sh/qt4-port/qt/src/YQCheckBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQCheckBox.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQCheckBox.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQCheckBox.cc Thu Jul 26 15:47:28 2007
@@ -19,7 +19,7 @@
#include
-#include
+#include
#define y2log_component "qt-ui"
#include
@@ -36,14 +36,14 @@
const YWidgetOpt & opt,
const YCPString & label,
bool initiallyChecked )
- : QGroupBox( parent )
+ : Q3GroupBox( parent )
, YCheckBox( opt, label )
, _dont_care( false )
{
setWidgetRep( this );
setFrameStyle( NoFrame );
- QBoxLayout * layout = new QBoxLayout( this, QBoxLayout::LeftToRight );
+ Q3BoxLayout * layout = new Q3BoxLayout( this, Q3BoxLayout::LeftToRight );
_qt_checkbox = new QCheckBox( fromUTF8( label->value() ), this );
layout->addSpacing( SPACING );
@@ -79,9 +79,9 @@
{
switch ( _qt_checkbox->state() )
{
- case QButton::On: return YCPBoolean( true );
- case QButton::Off: return YCPBoolean( false );
- case QButton::NoChange: return YCPVoid(); // nil
+ case QCheckBox::On: return YCPBoolean( true );
+ case QCheckBox::Off: return YCPBoolean( false );
+ case QCheckBox::NoChange: return YCPVoid(); // nil
}
y2error( "Unknown QCheckBox state: %d", (int) _qt_checkbox->state() );
Modified: branches/tmp/sh/qt4-port/qt/src/YQCheckBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQCheckBox.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQCheckBox.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQCheckBox.h Thu Jul 26 15:47:28 2007
@@ -22,7 +22,7 @@
#ifndef YQCheckBox_h
#define YQCheckBox_h
-#include
+#include
#include
#include "YCheckBox.h"
@@ -30,7 +30,7 @@
class QCheckBox;
-class YQCheckBox : public QGroupBox, public YCheckBox
+class YQCheckBox : public Q3GroupBox, public YCheckBox
{
Q_OBJECT
Modified: branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.cc Thu Jul 26 15:47:28 2007
@@ -21,6 +21,9 @@
#define y2log_component "qt-ui"
#include
#include
+//Added by qt3to4:
+#include
+#include
#include "YQUI.h"
#include "YEvent.h"
#include "utf8.h"
@@ -36,15 +39,15 @@
const YWidgetOpt & opt,
const YCPString & newLabel,
bool initialValue )
- : QGroupBox( parent )
+ : Q3GroupBox( parent )
, YCheckBoxFrame( opt, newLabel )
{
- QGroupBox::setTitle( fromUTF8( getLabel()->value() ) );
- QGroupBox::setCheckable( true );
+ Q3GroupBox::setTitle( fromUTF8( getLabel()->value() ) );
+ Q3GroupBox::setCheckable( true );
setFont( YQUI::ui()->currentFont() );
setWidgetRep ( this );
preventQGroupBoxAutoEnablement();
- QFrame::setEnabled( ! opt.isDisabled.value() );
+ Q3GroupBox::setEnabled( ! opt.isDisabled.value() );
setValue( initialValue );
}
@@ -52,7 +55,7 @@
bool YQCheckBoxFrame::getValue()
{
- return _checkBox ? _checkBox->isChecked() : QGroupBox::isChecked();
+ return _checkBox ? _checkBox->isChecked() : Q3GroupBox::isChecked();
}
@@ -69,13 +72,13 @@
{
if ( enabled )
{
- QFrame::setEnabled( true );
+ Q3GroupBox::setEnabled( true );
handleChildrenEnablement( getValue() );
}
else
{
setChildrenEnabling( false );
- QFrame::setEnabled( true );
+ Q3GroupBox::setEnabled( true );
}
}
@@ -153,7 +156,7 @@
YQCheckBoxFrame::setLabel( const YCPString & newLabel )
{
YCheckBoxFrame::setLabel( newLabel );
- QGroupBox::setTitle( fromUTF8( getLabel()->value() ) );
+ Q3GroupBox::setTitle( fromUTF8( getLabel()->value() ) );
}
@@ -194,7 +197,7 @@
bool YQCheckBoxFrame::setKeyboardFocus()
{
- QGroupBox::setFocus();
+ Q3GroupBox::setFocus();
return true;
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQCheckBoxFrame.h Thu Jul 26 15:47:28 2007
@@ -21,14 +21,16 @@
#ifndef YQCheckBoxFrame_h
#define YQCheckBoxFrame_h
-#include
+#include
+//Added by qt3to4:
+#include
#include "YCheckBoxFrame.h"
class QWidget;
class QCheckBox;
-class YQCheckBoxFrame : public QGroupBox, public YCheckBoxFrame
+class YQCheckBoxFrame : public Q3GroupBox, public YCheckBoxFrame
{
Q_OBJECT
Modified: branches/tmp/sh/qt4-port/qt/src/YQColoredLabel.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQColoredLabel.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQColoredLabel.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQColoredLabel.cc Thu Jul 26 15:47:28 2007
@@ -23,6 +23,8 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQColoredLabel.h"
+//Added by qt3to4:
+#include
YQColoredLabel::YQColoredLabel( QWidget * parent,
@@ -36,13 +38,13 @@
{
setWidgetRep( this );
- setTextFormat( QLabel::PlainText );
+ setTextFormat( Qt::PlainText );
setText( fromUTF8(text->value() ) );
setIndent(0);
setPaletteForegroundColor( QColor( fg.red, fg.green, fg.blue ) );
setPaletteBackgroundColor( QColor( bg.red, bg.green, bg.blue ) );
setMargin( margin );
- setAlignment( AlignLeft | AlignVCenter );
+ setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
setFont( opt.boldFont.value() ?
YQUI::ui()->boldFont() :
Modified: branches/tmp/sh/qt4-port/qt/src/YQComboBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQComboBox.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQComboBox.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQComboBox.cc Thu Jul 26 15:47:28 2007
@@ -37,7 +37,7 @@
YQComboBox::YQComboBox( QWidget * parent,
const YWidgetOpt & opt,
const YCPString & label )
- : QVBox( parent )
+ : Q3VBox( parent )
, YComboBox( opt, label )
, _validator(0)
{
@@ -46,7 +46,7 @@
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8(label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
if ( _qt_label->text().isEmpty() )
Modified: branches/tmp/sh/qt4-port/qt/src/YQComboBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQComboBox.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQComboBox.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQComboBox.h Thu Jul 26 15:47:28 2007
@@ -20,7 +20,9 @@
#ifndef YQComboBox_h
#define YQComboBox_h
-#include
+#include
+//Added by qt3to4:
+#include
#include
#include "YComboBox.h"
@@ -31,7 +33,7 @@
class QY2CharValidator;
-class YQComboBox : public QVBox, public YComboBox
+class YQComboBox : public Q3VBox, public YComboBox
{
Q_OBJECT
Modified: branches/tmp/sh/qt4-port/qt/src/YQDate.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDate.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDate.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDate.cc Thu Jul 26 15:47:28 2007
@@ -23,6 +23,8 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQDate.h"
+//Added by qt3to4:
+#include
YQDate::YQDate( QWidget * parent,
@@ -30,7 +32,7 @@
const YCPString & label,
const YCPString & date )
//: QDateEdit ( parent )
- : QVBox( parent )
+ : Q3VBox( parent )
, YDate( opt, label )
{
setWidgetRep( this );
@@ -38,15 +40,15 @@
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8(label->value()), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
if ( label->value() == "" )
_qt_label->hide();
- _qt_dateedit = new QDateEdit( this );
- _qt_dateedit->setOrder( QDateEdit::DMY );
- _qt_dateedit->setDate( QDate::fromString(date->value(), Qt::ISODate ));
+ _qt_dateedit = new Q3DateEdit( this );
+ _qt_dateedit->setOrder( Q3DateEdit::DMY );
+ _qt_dateedit->setDate( QDate::fromString(date->value().c_str(), Qt::ISODate ));
_qt_label->setBuddy( _qt_dateedit );
}
@@ -86,7 +88,7 @@
void YQDate::setNewDate( const YCPString & date )
{
- _qt_dateedit->setDate( QDate::fromString(date->value(), Qt::ISODate ));
+ _qt_dateedit->setDate( QDate::fromString( date->value().c_str(), Qt::ISODate ) );
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQDate.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDate.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDate.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDate.h Thu Jul 26 15:47:28 2007
@@ -20,8 +20,8 @@
#ifndef YQDate_h
#define YQDate_h
-#include
-#include
+#include
+#include
#include
#include
#include
@@ -29,7 +29,7 @@
#include "YDate.h"
-class YQDate : public QVBox, public YDate
+class YQDate : public Q3VBox, public YDate
{
Q_OBJECT
@@ -83,7 +83,7 @@
//void setDate( const YCPString & label );
protected:
- QDateEdit * _qt_dateedit;
+ Q3DateEdit * _qt_dateedit;
QLabel * _qt_label;
};
Modified: branches/tmp/sh/qt4-port/qt/src/YQDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDialog.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDialog.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDialog.cc Thu Jul 26 15:47:28 2007
@@ -25,8 +25,10 @@
#define y2log_component "qt-ui"
#include
#include
-#include
+#include
#include
+#include
+#include
#include
#include "YQUI.h"
@@ -42,24 +44,23 @@
QWidget * qt_parent,
bool default_size )
: QWidget( qt_parent,
- 0, // name
- default_size ? 0 : WType_Modal | WStyle_Dialog ) // WFlags
+ default_size ? Qt::Widget : Qt::WType_Dialog ) // WFlags
, YDialog( opt )
{
_userResized = false;
_focusButton = 0;
_defaultButton = 0;
-
setWidgetRep( this );
setCaption( hasDefaultSize() ? "YaST2" : "" );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( Qt::StrongFocus );
+ setWindowModality( Qt::WindowModal );
if ( hasWarnColor() || hasInfoColor() )
{
QColor normalBackground ( 0, 128, 0 );
QColor inputFieldBackground ( 0, 96, 0 );
- QColor text = white;
+ QColor text = Qt::white;
if ( hasInfoColor() )
{
@@ -74,7 +75,7 @@
setPalette( warnPalette );
}
- _qFrame = new QFrame ( this );
+ _qFrame = new Q3Frame ( this );
bool decorate = ! hasDefaultSize() && ! YQUI::ui()->haveWM();
#if 0
@@ -83,20 +84,20 @@
// None of this works (yet). :-((
clearWFlags( getWFlags() );
- setWFlags( WStyle_Customize | WStyle_DialogBorder | WStyle_StaysOnTop );
+ setWFlags( Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_StaysOnTop );
// decorate = true;
}
#endif
if ( decorate )
{
- _qFrame->setFrameStyle ( QFrame::Box | QFrame::Raised );
+ _qFrame->setFrameStyle ( Q3Frame::Box | Q3Frame::Raised );
_qFrame->setLineWidth(2);
_qFrame->setMidLineWidth(3);
}
else
{
- _qFrame->setFrameStyle ( QFrame::NoFrame );
+ _qFrame->setFrameStyle ( Q3Frame::NoFrame );
}
}
@@ -561,7 +562,7 @@
// button mechanism to work. So let's accept the focus and give it to some
// child widget.
- if ( event->reason() == QFocusEvent::Tab )
+ if ( event->reason() == Qt::TabFocusReason )
{
focusNextPrevChild( true );
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDialog.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDialog.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDialog.h Thu Jul 26 15:47:28 2007
@@ -21,13 +21,15 @@
#ifndef YQDialog_h
#define YQDialog_h
+#include
+#include
#include
#include "YDialog.h"
class YQGenericButton;
class YQWizard;
-class QFrame;
+class Q3Frame;
class YQDialog : public QWidget, public YDialog
@@ -202,7 +204,7 @@
// Data members
//
- QFrame * _qFrame;
+ Q3Frame * _qFrame;
bool _userResized;
QSize _userSize;
Modified: branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.cc Thu Jul 26 15:47:28 2007
@@ -18,7 +18,7 @@
#include
-#include
+#include
#include
#define y2log_component "qt-ui"
#include
@@ -33,17 +33,17 @@
const YCPString & label,
const YCPString & filename,
int expectedSize )
- : QVBox( parent )
+ : Q3VBox( parent )
, YDownloadProgress( opt, label, filename, expectedSize )
{
setWidgetRep( this );
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
- _qt_progress = new QProgressBar( this );
+ _qt_progress = new Q3ProgressBar( this );
_qt_progress->setFont( YQUI::ui()->currentFont() );
_qt_progress->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
Modified: branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDownloadProgress.h Thu Jul 26 15:47:28 2007
@@ -20,16 +20,18 @@
#ifndef YQDownloadProgress_h
#define YQDownloadProgress_h
-#include
+#include
+//Added by qt3to4:
+#include
#include
#include "YDownloadProgress.h"
class QLabel;
-class QProgressBar;
+class Q3ProgressBar;
-class YQDownloadProgress : public QVBox, public YDownloadProgress
+class YQDownloadProgress : public Q3VBox, public YDownloadProgress
{
Q_OBJECT
@@ -88,7 +90,7 @@
protected:
QLabel * _qt_label;
- QProgressBar * _qt_progress;
+ Q3ProgressBar * _qt_progress;
QTimer * _timer;
};
Modified: branches/tmp/sh/qt4-port/qt/src/YQDumbTab.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDumbTab.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDumbTab.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDumbTab.cc Thu Jul 26 15:47:28 2007
@@ -20,6 +20,9 @@
#define y2log_component "qt-ui"
#include
#include
+//Added by qt3to4:
+#include
+#include
#include <algorithm>
#include "QY2LayoutUtils.h"
@@ -32,7 +35,7 @@
YQDumbTab::YQDumbTab( QWidget * parent,
const YWidgetOpt & opt )
- : QVBox( parent )
+ : Q3VBox( parent )
, YDumbTab( opt )
{
setWidgetRep( this );
@@ -45,12 +48,12 @@
//
_tabBar = new QTabBar( this );
- CHECK_PTR( _tabBar );
+ Q_CHECK_PTR( _tabBar );
_tabBar->setFont( YQUI::ui()->currentFont() );
_tabBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
setFocusProxy( _tabBar );
- setFocusPolicy( TabFocus );
+ setFocusPolicy( Qt::TabFocus );
connect( _tabBar, SIGNAL( selected( int ) ),
this, SLOT ( sendTabSelectedEvent( int ) ) );
@@ -60,16 +63,16 @@
// Client area for tab page contents
//
- _clientArea = new QVBox( this );
+ _clientArea = new Q3VBox( this );
- CHECK_PTR( _clientArea );
+ Q_CHECK_PTR( _clientArea );
#if 0
- _clientArea->setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ _clientArea->setFrameStyle( Q3Frame::WinPanel | Q3Frame::Raised );
_clientArea->setLineWidth( 1 );
_clientArea->setMidLineWidth( 1 );
#endif
- _clientArea->setFrameStyle( QFrame::TabWidgetPanel | QFrame::Raised );
+ _clientArea->setFrameStyle( Q3Frame::TabWidgetPanel | Q3Frame::Raised );
// _clientArea->setFrameStyle( QFrame::TabWidgetPanel | QFrame::Sunken );
_clientArea->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
@@ -80,18 +83,18 @@
YWidgetOpt widgetOpt;
_contents = new YQAlignment( _clientArea, widgetOpt, YAlignUnchanged, YAlignUnchanged);
- CHECK_PTR( _contents );
+ Q_CHECK_PTR( _contents );
addChild( _contents );
- _contents->setParent( this );
+ _contents->YWidget::setParent( this );
_contents->installEventFilter( this );
}
void YQDumbTab::setEnabling( bool enabled )
{
- QVBox::setEnabled( enabled );
+ Q3VBox::setEnabled( enabled );
}
@@ -178,25 +181,22 @@
void YQDumbTab::addTab( const YCPString & label )
{
- QTab * tab = new QTab( fromUTF8( label->value() ) );
- CHECK_PTR( tab );
-
- tab->setIdentifier( _tabBar->count() );
- _tabBar->addTab( tab );
+ _tabBar->insertTab( _tabBar->count()+1,
+ fromUTF8( label->value() ) );
}
int YQDumbTab::getSelectedTabIndex()
{
- return _tabBar->currentTab();
+ return _tabBar->currentIndex();
}
void YQDumbTab::setSelectedTab( int index )
{
- _tabBar->setCurrentTab( index );
+ _tabBar->setCurrentIndex( index );
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQDumbTab.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQDumbTab.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQDumbTab.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQDumbTab.h Thu Jul 26 15:47:28 2007
@@ -20,7 +20,9 @@
#ifndef YQDumbTab_h
#define YQDumbTab_h
-#include
+#include
+//Added by qt3to4:
+#include
#include "YDumbTab.h"
@@ -28,7 +30,7 @@
class YQAlignment;
class YWidget;
-class YQDumbTab : public QVBox, public YDumbTab
+class YQDumbTab : public Q3VBox, public YDumbTab
{
Q_OBJECT
@@ -113,7 +115,7 @@
//
QTabBar * _tabBar;
- QVBox * _clientArea;
+ Q3VBox * _clientArea;
YQAlignment * _contents;
bool _doingResize;
Modified: branches/tmp/sh/qt4-port/qt/src/YQFrame.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQFrame.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQFrame.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQFrame.cc Thu Jul 26 15:47:28 2007
@@ -22,6 +22,8 @@
#include
#include "YQUI.h"
#include "utf8.h"
+//Added by qt3to4:
+#include
using std::max;
@@ -31,17 +33,17 @@
YQFrame::YQFrame( QWidget * parent,
const YWidgetOpt & opt,
const YCPString & newLabel )
- : QGroupBox( parent )
+ : Q3GroupBox( parent )
, YFrame( opt, newLabel )
{
- QGroupBox::setTitle( fromUTF8( getLabel()->value() ) );
+ Q3GroupBox::setTitle( fromUTF8( getLabel()->value() ) );
setFont( YQUI::ui()->currentFont() );
setWidgetRep ( this );
}
void YQFrame::setEnabling( bool enabled )
{
- QFrame::setEnabled( enabled );
+ Q3GroupBox::setEnabled( enabled );
}
@@ -62,7 +64,7 @@
YQFrame::setLabel( const YCPString & newLabel )
{
YFrame::setLabel( newLabel );
- QGroupBox::setTitle( fromUTF8( getLabel()->value() ) );
+ Q3GroupBox::setTitle( fromUTF8( getLabel()->value() ) );
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQFrame.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQFrame.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQFrame.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQFrame.h Thu Jul 26 15:47:28 2007
@@ -21,13 +21,13 @@
#ifndef YQFrame_h
#define YQFrame_h
-#include
+#include
#include "YFrame.h"
class QWidget;
-class YQFrame : public QGroupBox, public YFrame
+class YQFrame : public Q3GroupBox, public YFrame
{
Q_OBJECT
Modified: branches/tmp/sh/qt4-port/qt/src/YQGenericButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQGenericButton.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQGenericButton.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQGenericButton.cc Thu Jul 26 15:47:28 2007
@@ -20,6 +20,9 @@
#include
#include
#include
+//Added by qt3to4:
+#include
+#include
#define y2log_component "qt-ui"
#include
@@ -95,7 +98,7 @@
if ( icon_name.isEmpty() )
{
- _qPushButton->setIconSet( QIconSet() );
+ _qPushButton->setIconSet( QIcon() );
return;
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQGenericButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQGenericButton.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQGenericButton.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQGenericButton.h Thu Jul 26 15:47:28 2007
@@ -21,6 +21,8 @@
#define YQGenericButton_h
#include
+//Added by qt3to4:
+#include
#include
#include "YPushButton.h"
Modified: branches/tmp/sh/qt4-port/qt/src/YQIconPool.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQIconPool.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQIconPool.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQIconPool.cc Thu Jul 26 15:47:28 2007
@@ -64,6 +64,8 @@
#include "icons/step_current.xpm"
#include "icons/step_todo.xpm"
#include "icons/step_done.xpm"
+//Added by qt3to4:
+#include
YQIconPool * YQIconPool::_iconPool = 0;
Modified: branches/tmp/sh/qt4-port/qt/src/YQIconPool.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQIconPool.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQIconPool.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQIconPool.h Thu Jul 26 15:47:28 2007
@@ -22,7 +22,7 @@
#define YQIconPool_h
#include
-#include
+#include
class YQIconPool
{
@@ -107,7 +107,7 @@
// Data members
static YQIconPool * _iconPool;
- QPtrDict<QPixmap> _iconCache;
+ Q3PtrDict<QPixmap> _iconCache;
};
Modified: branches/tmp/sh/qt4-port/qt/src/YQImage.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQImage.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQImage.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQImage.cc Thu Jul 26 15:47:28 2007
@@ -21,6 +21,8 @@
#include
#include
#include
+//Added by qt3to4:
+#include
#define y2log_component "qt-ui"
#include
@@ -39,9 +41,7 @@
if ( _animated )
{
- QMovie movie( byteblock->size() );
- movie.pushData( byteblock->value(), byteblock->size() );
- setMovie( movie );
+ y2error( "Animations from byte block not supported" );
}
else
{
@@ -72,7 +72,7 @@
}
else
{
- setMovie( movie );
+ setMovie( &movie );
}
}
else
Modified: branches/tmp/sh/qt4-port/qt/src/YQImage.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQImage.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQImage.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQImage.h Thu Jul 26 15:47:28 2007
@@ -22,6 +22,8 @@
#define YQImage_h
#include
+//Added by qt3to4:
+#include
#include
#include "YImage.h"
Modified: branches/tmp/sh/qt4-port/qt/src/YQIntField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQIntField.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQIntField.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQIntField.cc Thu Jul 26 15:47:28 2007
@@ -24,6 +24,8 @@
#include "YQUI.h"
#include "YEvent.h"
#include "YQIntField.h"
+//Added by qt3to4:
+#include
YQIntField::YQIntField( QWidget * parent,
@@ -33,7 +35,7 @@
int maxValue,
int initialValue )
- : QVBox( parent )
+ : Q3VBox( parent )
, YIntField( opt, label, minValue, maxValue, initialValue )
{
setWidgetRep( this );
@@ -41,7 +43,7 @@
setSpacing( YQWidgetSpacing );
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
_qt_label->setAlignment( Qt::AlignLeft );
Modified: branches/tmp/sh/qt4-port/qt/src/YQIntField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQIntField.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQIntField.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQIntField.h Thu Jul 26 15:47:28 2007
@@ -23,7 +23,7 @@
#include
#include
#include
-#include
+#include
#include
#include "YIntField.h"
@@ -33,7 +33,7 @@
class QLabel;
class QIntField;
-class YQIntField : public QVBox, public YIntField
+class YQIntField : public Q3VBox, public YIntField
{
Q_OBJECT
Modified: branches/tmp/sh/qt4-port/qt/src/YQLabel.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQLabel.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQLabel.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQLabel.cc Thu Jul 26 15:47:28 2007
@@ -24,6 +24,9 @@
#include "utf8.h"
#include "YQUI.h"
#include "YQLabel.h"
+//Added by qt3to4:
+#include
+#include
YQLabel::YQLabel( QWidget * parent,
@@ -34,7 +37,7 @@
{
setWidgetRep( this );
- setTextFormat( QLabel::PlainText );
+ setTextFormat( Qt::PlainText );
setText( fromUTF8(text->value() ) );
setIndent(0);
@@ -53,13 +56,13 @@
if ( opt.isOutputField.value() )
{
- setFrameStyle ( QFrame::Panel | QFrame::Sunken );
+ setFrameStyle ( Q3Frame::Panel | Q3Frame::Sunken );
setLineWidth(2);
setMidLineWidth(2);
}
setMargin( YQWidgetMargin );
- setAlignment( AlignLeft | AlignTop );
+ setAlignment( Qt::AlignLeft | Qt::AlignTop );
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQLogView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQLogView.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQLogView.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQLogView.cc Thu Jul 26 15:47:28 2007
@@ -35,7 +35,7 @@
const YCPString & label,
int visLines,
int maxLines )
- : QVBox( parent )
+ : Q3VBox( parent )
, YLogView( opt, label, visLines, maxLines )
{
setWidgetRep( this );
@@ -44,13 +44,13 @@
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
if ( label->value() == "" )
_qt_label->hide();
- _qt_text = new QMultiLineEdit( this );
+ _qt_text = new Q3MultiLineEdit( this );
_qt_text->setFont( YQUI::ui()->currentFont() );
_qt_text->setReadOnly( true );
_qt_text->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
@@ -79,7 +79,11 @@
long minSize = 10;
long hintHeight = _qt_label->sizeHint().height();
hintHeight += visibleLines() * _qt_text->fontMetrics().lineSpacing();
+#ifdef FIXME
hintHeight += _qt_text->style().scrollBarExtent().height();
+#else
+ hintHeight += 20;
+#endif
hintHeight += _qt_text->frameWidth() * 2;
return max( minSize, hintHeight );
Modified: branches/tmp/sh/qt4-port/qt/src/YQLogView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQLogView.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQLogView.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQLogView.h Thu Jul 26 15:47:28 2007
@@ -20,15 +20,15 @@
#ifndef YQLogView_h
#define YQLogView_h
-#include
+#include
#include
-#include
+#include
#include
#include "YLogView.h"
-class YQLogView : public QVBox, public YLogView
+class YQLogView : public Q3VBox, public YLogView
{
Q_OBJECT
@@ -85,7 +85,7 @@
//
QLabel * _qt_label;
- QMultiLineEdit * _qt_text;
+ Q3MultiLineEdit * _qt_text;
};
Modified: branches/tmp/sh/qt4-port/qt/src/YQMenuButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMenuButton.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMenuButton.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMenuButton.cc Thu Jul 26 15:47:28 2007
@@ -19,7 +19,7 @@
#include
#include
-#include
+#include
#include
#include
#define y2log_component "qt-ui"
@@ -121,7 +121,7 @@
void
YQMenuButton::createMenu()
{
- QPopupMenu * popup = new QPopupMenu( _qt_pushbutton );
+ Q3PopupMenu * popup = new Q3PopupMenu( _qt_pushbutton );
_qt_pushbutton->setPopup( popup );
connect( popup, SIGNAL( activated(int) ),
this, SLOT ( menuEntryActivated(int) ) );
@@ -131,7 +131,7 @@
void
-YQMenuButton::createMenu( YMenuItem * ymenu, QPopupMenu * qt_menu )
+YQMenuButton::createMenu( YMenuItem * ymenu, Q3PopupMenu * qt_menu )
{
YMenuItemListIterator it = ymenu->itemList().begin();
@@ -141,7 +141,7 @@
if ( item->isMenu() )
{
- QPopupMenu * sub_menu = new QPopupMenu( qt_menu );
+ Q3PopupMenu * sub_menu = new Q3PopupMenu( qt_menu );
// y2debug( "Inserting sub menu '%s'", item->getLabel()->value().c_str() );
qt_menu->insertItem( fromUTF8( item->getLabel()->value() ), sub_menu );
connect( sub_menu, SIGNAL( activated(int) ),
Modified: branches/tmp/sh/qt4-port/qt/src/YQMenuButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMenuButton.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMenuButton.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMenuButton.h Thu Jul 26 15:47:28 2007
@@ -21,6 +21,8 @@
#define YQMenuButton_h
#include
+//Added by qt3to4:
+#include
#include
#include "YMenuButton.h"
@@ -79,7 +81,7 @@
/**
* Recursively create the menu structure.
*/
- void createMenu( YMenuItem * ymenu, QPopupMenu * _qt_menu );
+ void createMenu( YMenuItem * ymenu, Q3PopupMenu * _qt_menu );
protected slots:
Modified: branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.cc Thu Jul 26 15:47:28 2007
@@ -17,7 +17,7 @@
/-*/
-#include
+#include
#include
#define y2log_component "qt-ui"
#include
@@ -36,7 +36,7 @@
const YWidgetOpt & opt,
const YCPString & label,
const YCPString & initialText )
- : QVBox( parent )
+ : Q3VBox( parent )
, YMultiLineEdit( opt, label )
, InputMaxLength( -1 )
{
@@ -47,13 +47,13 @@
if ( label->value().length() > 0 )
{
_qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
}
else
_qt_label = 0;
- _qt_textedit = new QTextEdit( this );
+ _qt_textedit = new Q3TextEdit( this );
_qt_textedit->setTextFormat( Qt::PlainText );
_qt_textedit->setFont( YQUI::ui()->currentFont() );
_qt_textedit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
Modified: branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMultiLineEdit.h Thu Jul 26 15:47:28 2007
@@ -20,7 +20,7 @@
#ifndef YQMultiLineEdit_h
#define YQMultiLineEdit_h
-#include
+#include
#include
#include
@@ -29,9 +29,9 @@
#define DEFAULT_VISIBLE_LINES 3
-class QTextEdit;
+class Q3TextEdit;
-class YQMultiLineEdit : public QVBox, public YMultiLineEdit
+class YQMultiLineEdit : public Q3VBox, public YMultiLineEdit
{
Q_OBJECT
@@ -108,7 +108,7 @@
protected:
QLabel * _qt_label;
- QTextEdit * _qt_textedit;
+ Q3TextEdit * _qt_textedit;
// specifies how much characters can be inserted. -1 for unlimited input
int InputMaxLength;
Modified: branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.cc Thu Jul 26 15:47:28 2007
@@ -21,6 +21,10 @@
#include
#include
+//Added by qt3to4:
+#include
+#include
+#include
#include "YQUI.h"
#include "YQMultiProgressMeter.h"
@@ -249,7 +253,7 @@
{
if ( fillStart < length )
{
- QPointArray points( 4 );
+ Q3PointArray points( 4 );
int p=0;
points.setPoint( p++, offset + fillStart, border + fillHeight );
@@ -258,7 +262,7 @@
points.setPoint( p++, offset + length, border + indent );
painter.setBrush( palette().active().highlight() );
- painter.setPen( NoPen );
+ painter.setPen( Qt::NoPen );
painter.drawConvexPolygon( points );
}
}
@@ -266,7 +270,7 @@
{
if ( fillStart > 0 )
{
- QPointArray points( 4 );
+ Q3PointArray points( 4 );
int p=0;
points.setPoint( p++, offset, border + thickness );
@@ -275,7 +279,7 @@
points.setPoint( p++, offset + fillStart, border + thickness - fillHeight );
painter.setBrush( palette().active().highlight() );
- painter.setPen( NoPen );
+ painter.setPen( Qt::NoPen );
painter.drawConvexPolygon( points );
}
}
@@ -291,7 +295,7 @@
// Draw arrow base (left)
painter.setPen( dark );
- painter.setPen( SolidLine );
+ painter.setPen( Qt::SolidLine );
painter.drawLine( offset, border,
offset, border + thickness );
@@ -324,7 +328,7 @@
const QColor & color = palette().active().foreground();
painter.setPen( color );
- painter.setPen( SolidLine );
+ painter.setPen( Qt::SolidLine );
painter.setBrush( color );
// painter.setBrush( NoBrush );
@@ -332,7 +336,7 @@
// Draw upper marker triangle
int tri = triThickness();
- QPointArray points( 3 );
+ Q3PointArray points( 3 );
int p=0;
points.setPoint( p++, offset - tri+1, margin() ); // top left (base)
Modified: branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMultiProgressMeter.h Thu Jul 26 15:47:28 2007
@@ -24,6 +24,9 @@
#include "YMultiProgressMeter.h"
#include
#include
+//Added by qt3to4:
+#include
+#include
class QPaintEvent;
Modified: branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.cc Thu Jul 26 15:47:28 2007
@@ -20,7 +20,7 @@
#include
#include
#include
-#include
+#include
#define y2log_component "qt-ui"
#include
@@ -40,7 +40,7 @@
YQMultiSelectionBox::YQMultiSelectionBox( QWidget * parent,
const YWidgetOpt & opt,
const YCPString & label )
- : QVBox( parent )
+ : Q3VBox( parent )
, YMultiSelectionBox( opt, label )
{
setWidgetRep( this );
@@ -49,10 +49,10 @@
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8(label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
- _qt_listview = new QListView( this );
+ _qt_listview = new Q3ListView( this );
_qt_listview->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
_qt_listview->addColumn( "" ); // QListView doesn't have one single column by default!
_qt_listview->setSorting( 0, false );
@@ -135,7 +135,7 @@
YQMultiSelectionBox::getCurrentItem()
{
int index = 0;
- QListViewItem * child = _qt_listview->firstChild();
+ Q3ListViewItem * child = _qt_listview->firstChild();
while ( child )
{
@@ -156,7 +156,7 @@
{
_qt_listview->blockSignals( true );
_qt_listview->clearSelection();
- QListViewItem * child = _qt_listview->firstChild();
+ Q3ListViewItem * child = _qt_listview->firstChild();
for ( int i = 0; i < index; i++ )
{
@@ -196,7 +196,7 @@
bool
YQMultiSelectionBox::itemIsSelected( int index )
{
- QListViewItem * child = _qt_listview->firstChild();
+ Q3ListViewItem * child = _qt_listview->firstChild();
for ( int i = 0; i < index; i++ )
{
@@ -209,7 +209,7 @@
}
}
- QCheckListItem * item = ( QCheckListItem * ) child;
+ Q3CheckListItem * item = ( Q3CheckListItem * ) child;
return item->isOn();
}
@@ -219,7 +219,7 @@
YQMultiSelectionBox::selectItem( int index )
{
_qt_listview->blockSignals( true );
- QListViewItem * child = _qt_listview->firstChild();
+ Q3ListViewItem * child = _qt_listview->firstChild();
for ( int i = 0; i < index; i++ )
{
@@ -232,7 +232,7 @@
}
}
- QCheckListItem * item = ( QCheckListItem * ) child;
+ Q3CheckListItem * item = ( Q3CheckListItem * ) child;
item->setOn( true );
_qt_listview->blockSignals( false );
@@ -244,11 +244,11 @@
{
_qt_listview->blockSignals( true );
- QListViewItem * child = _qt_listview->firstChild();
+ Q3ListViewItem * child = _qt_listview->firstChild();
while ( child )
{
- QCheckListItem * item = ( QCheckListItem * ) child;
+ Q3CheckListItem * item = ( Q3CheckListItem * ) child;
item->setOn( false );
child = child->nextSibling();
}
@@ -293,9 +293,9 @@
YQMultiSelectionBoxItem::YQMultiSelectionBoxItem( YQMultiSelectionBox * parent,
- QListView * listView,
+ Q3ListView * listView,
const QString & text )
- : QCheckListItem( listView, text, QCheckListItem::CheckBox )
+ : Q3CheckListItem( listView, text, Q3CheckListItem::CheckBox )
, _multiSelectionBox( parent )
{
_serial = _item_count++;
@@ -306,7 +306,7 @@
YQMultiSelectionBoxItem::stateChange( bool newState )
{
_multiSelectionBox->sendValueChanged();
- QCheckListItem::stateChange( newState );
+ Q3CheckListItem::stateChange( newState );
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQMultiSelectionBox.h Thu Jul 26 15:47:28 2007
@@ -20,8 +20,10 @@
#ifndef YQMultiSelectionBox_h
#define YQMultiSelectionBox_h
-#include
-#include
+#include
+#include
+//Added by qt3to4:
+#include
#include
#include "YMultiSelectionBox.h"
@@ -29,7 +31,7 @@
class QLabel;
-class YQMultiSelectionBox : public QVBox, public YMultiSelectionBox
+class YQMultiSelectionBox : public Q3VBox, public YMultiSelectionBox
{
Q_OBJECT
@@ -154,21 +156,21 @@
protected:
QLabel * _qt_label;
- QListView * _qt_listview;
+ Q3ListView * _qt_listview;
bool _shrinkable;
};
-class YQMultiSelectionBoxItem: public QCheckListItem
+class YQMultiSelectionBoxItem: public Q3CheckListItem
{
public:
/**
* Constructor.
**/
YQMultiSelectionBoxItem( YQMultiSelectionBox * parent,
- QListView * listView,
+ Q3ListView * listView,
const QString & text );
/**
Modified: branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.cc Thu Jul 26 15:47:28 2007
@@ -24,6 +24,8 @@
#include "YQUI.h"
#include "YEvent.h"
#include "YQPartitionSplitter.h"
+//Added by qt3to4:
+#include
YQPartitionSplitter::YQPartitionSplitter( QWidget * parent,
@@ -38,7 +40,7 @@
const YCPString & arg_newPartLabel,
const YCPString & arg_freeFieldLabel,
const YCPString & arg_newPartFieldLabel )
- : QVBox( parent )
+ : Q3VBox( parent )
, YPartitionSplitter( opt,
arg_usedSize,
arg_totalFreeSize,
@@ -70,7 +72,7 @@
// upper inner HBox for the labels
- _labels_hbox = new QHBox( this );
+ _labels_hbox = new Q3HBox( this );
_labels_hbox->setSpacing( YQWidgetMargin );
@@ -78,7 +80,7 @@
_qt_freeFieldLabel = new QLabel( fromUTF8( freeFieldLabel()->value() ),
_labels_hbox );
- _qt_freeFieldLabel->setTextFormat( QLabel::PlainText );
+ _qt_freeFieldLabel->setTextFormat( Qt::PlainText );
_qt_freeFieldLabel->setFont( YQUI::ui()->currentFont() );
_qt_freeFieldLabel->setAlignment( Qt::AlignLeft );
@@ -87,14 +89,14 @@
_qt_newPartFieldLabel = new QLabel( fromUTF8( newPartFieldLabel()->value() ),
_labels_hbox );
- _qt_newPartFieldLabel->setTextFormat( QLabel::PlainText );
+ _qt_newPartFieldLabel->setTextFormat( Qt::PlainText );
_qt_newPartFieldLabel->setFont( YQUI::ui()->currentFont() );
_qt_newPartFieldLabel->setAlignment( Qt::AlignRight );
// lower inner HBox for the fields and the slider
- _fields_hbox = new QHBox( this );
+ _fields_hbox = new Q3HBox( this );
_fields_hbox->setSpacing( YQWidgetMargin );
@@ -112,7 +114,7 @@
_qt_freeSizeSlider = new QSlider( minFreeSize(), maxFreeSize(),
1, // pageStep
remainingFreeSize(), // initial value
- QSlider::Horizontal, _fields_hbox );
+ Qt::Horizontal, _fields_hbox );
_qt_freeSizeSlider->setFont( YQUI::ui()->currentFont() );
Modified: branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQPartitionSplitter.h Thu Jul 26 15:47:28 2007
@@ -23,15 +23,15 @@
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include "QY2BarGraph.h"
#include "YPartitionSplitter.h"
-class YQPartitionSplitter : public QVBox, public YPartitionSplitter
+class YQPartitionSplitter : public Q3VBox, public YPartitionSplitter
{
Q_OBJECT
@@ -105,10 +105,10 @@
*/
QY2BarGraph * _barGraph;
- QHBox * _labels_hbox;
+ Q3HBox * _labels_hbox;
QLabel * _qt_freeFieldLabel;
QLabel * _qt_newPartFieldLabel;
- QHBox * _fields_hbox;
+ Q3HBox * _fields_hbox;
QSpinBox * _qt_freeSizeField;
QSlider * _qt_freeSizeSlider;
QSpinBox * _qt_newPartSizeField;
Modified: branches/tmp/sh/qt4-port/qt/src/YQProgressBar.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQProgressBar.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQProgressBar.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQProgressBar.cc Thu Jul 26 15:47:28 2007
@@ -18,7 +18,7 @@
/-*/
-#include
+#include
#include
#define y2log_component "qt-ui"
#include
@@ -37,7 +37,7 @@
const YCPString & label,
const YCPInteger & maxProgress,
const YCPInteger & progress )
- : QVBox( parent )
+ : Q3VBox( parent )
, YProgressBar( opt, label, maxProgress, progress )
{
setWidgetRep( this );
@@ -46,13 +46,13 @@
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8(label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
if ( label->value() == "" )
_qt_label->hide();
- _qt_progressbar = new QProgressBar( this );
+ _qt_progressbar = new Q3ProgressBar( this );
_qt_progressbar->setFont( YQUI::ui()->currentFont() );
_qt_progressbar->setTotalSteps( MAX_PROGRESS );
_qt_label->setBuddy( _qt_progressbar );
Modified: branches/tmp/sh/qt4-port/qt/src/YQProgressBar.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQProgressBar.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQProgressBar.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQProgressBar.h Thu Jul 26 15:47:28 2007
@@ -21,7 +21,9 @@
#ifndef YQProgressBar_h
#define YQProgressBar_h
-#include
+#include
+//Added by qt3to4:
+#include
#include
#include "YProgressBar.h"
@@ -29,9 +31,9 @@
class QString;
class QLabel;
-class QProgressBar;
+class Q3ProgressBar;
-class YQProgressBar : public QVBox, public YProgressBar
+class YQProgressBar : public Q3VBox, public YProgressBar
{
Q_OBJECT
@@ -88,7 +90,7 @@
//
QLabel * _qt_label;
- QProgressBar * _qt_progressbar;
+ Q3ProgressBar * _qt_progressbar;
};
#endif // YQProgressBar_h
Modified: branches/tmp/sh/qt4-port/qt/src/YQPushButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQPushButton.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQPushButton.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQPushButton.cc Thu Jul 26 15:47:28 2007
@@ -37,7 +37,7 @@
setWidgetRep( this );
QPushButton * button = new QPushButton( fromUTF8( label->value() ), this );
- CHECK_PTR( button );
+ Q_CHECK_PTR( button );
setQPushButton( button );
Modified: branches/tmp/sh/qt4-port/qt/src/YQRadioButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQRadioButton.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQRadioButton.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQRadioButton.cc Thu Jul 26 15:47:28 2007
@@ -19,7 +19,7 @@
#include
-#include
+#include
#define y2log_component "qt-ui"
#include
@@ -43,13 +43,13 @@
YRadioButtonGroup * rbg,
const YCPString & label,
bool checked )
- : QGroupBox( parent )
+ : Q3GroupBox( parent )
, YRadioButton( opt, label, rbg )
{
setWidgetRep( this );
setFrameStyle( NoFrame );
- QBoxLayout * layout = new QBoxLayout( this, QBoxLayout::LeftToRight );
+ Q3BoxLayout * layout = new Q3BoxLayout( this, Q3BoxLayout::LeftToRight );
_qt_radiobutton = new QRadioButton( fromUTF8( label->value() ), this );
layout->addSpacing( SPACING );
Modified: branches/tmp/sh/qt4-port/qt/src/YQRadioButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQRadioButton.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQRadioButton.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQRadioButton.h Thu Jul 26 15:47:28 2007
@@ -21,7 +21,7 @@
#ifndef YQRadioButton_h
#define YQRadioButton_h
-#include
+#include
#include
#include "YRadioButton.h"
@@ -29,7 +29,7 @@
class QRadioButton;
-class YQRadioButton : public QGroupBox, public YRadioButton
+class YQRadioButton : public Q3GroupBox, public YRadioButton
{
Q_OBJECT
Modified: branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.cc Thu Jul 26 15:47:28 2007
@@ -19,7 +19,7 @@
#include
-#include
+#include
#define y2log_component "qt-ui"
#include
#include
Modified: branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQRadioButtonGroup.h Thu Jul 26 15:47:28 2007
@@ -23,7 +23,7 @@
#include
#include "YRadioButtonGroup.h"
-class QButtonGroup;
+class Q3ButtonGroup;
class YQRadioButtonGroup : public QWidget, public YRadioButtonGroup
{
Modified: branches/tmp/sh/qt4-port/qt/src/YQRichText.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQRichText.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQRichText.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQRichText.cc Thu Jul 26 15:47:28 2007
@@ -21,6 +21,9 @@
#include
#include "qregexp.h"
+//Added by qt3to4:
+#include
+#include
#include "YEvent.h"
#include "utf8.h"
#include "YQUI.h"
@@ -31,7 +34,7 @@
YQRichText::YQRichText( QWidget * parent,
const YWidgetOpt & opt,
const YCPString & text )
- : QVBox( parent )
+ : Q3VBox( parent )
, YRichText( opt, text )
{
setWidgetRep( this );
@@ -46,7 +49,7 @@
if ( opt.plainTextMode.value() )
{
_textBrowser->setTextFormat( Qt::PlainText );
- _textBrowser->setWordWrap( QTextEdit::NoWrap );
+ _textBrowser->setWordWrap( Q3TextEdit::NoWrap );
}
else
{
@@ -63,7 +66,7 @@
QPalette pal( _textBrowser->palette() );
QColorGroup normalColors( pal.normal() );
- normalColors.setColor( QColorGroup::Text, black );
+ normalColors.setColor( QColorGroup::Text, Qt::black );
pal.setNormal( normalColors );
_textBrowser->setPalette( pal );
Modified: branches/tmp/sh/qt4-port/qt/src/YQRichText.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQRichText.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQRichText.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQRichText.h Thu Jul 26 15:47:28 2007
@@ -21,8 +21,10 @@
#ifndef YQRichText_h
#define YQRichText_h
-#include
-#include
+#include
+#include
+//Added by qt3to4:
+#include
#include
#include "YRichText.h"
@@ -30,7 +32,7 @@
class YQTextBrowser;
-class YQRichText : public QVBox, public YRichText
+class YQRichText : public Q3VBox, public YRichText
{
Q_OBJECT
@@ -110,7 +112,7 @@
*
* This class is required only to overwrite setSource().
**/
-class YQTextBrowser: public QTextBrowser
+class YQTextBrowser: public Q3TextBrowser
{
Q_OBJECT
@@ -121,7 +123,7 @@
* Constructor
**/
YQTextBrowser( QWidget * parent = 0 ):
- QTextBrowser( parent ) {}
+ Q3TextBrowser( parent ) {}
public slots:
Modified: branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.cc Thu Jul 26 15:47:28 2007
@@ -20,8 +20,13 @@
#include
#include
-#include
+#include
#include
+//Added by qt3to4:
+#include
+#include
+#include
+#include
#define y2log_component "qt-ui"
#include
@@ -45,7 +50,7 @@
YQSelectionBox::YQSelectionBox( QWidget * parent,
const YWidgetOpt & opt,
const YCPString & label )
- : QVBox( parent )
+ : Q3VBox( parent )
, YSelectionBox( opt, label )
{
setWidgetRep( this );
@@ -54,13 +59,13 @@
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8(label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
if ( _qt_label->text().isEmpty() )
_qt_label->hide();
- _qt_listbox = new QListBox( this );
+ _qt_listbox = new Q3ListBox( this );
_qt_listbox->installEventFilter( this );
_qt_listbox->setVariableHeight( false );
_qt_listbox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
@@ -75,8 +80,8 @@
connect( _qt_listbox, SIGNAL( highlighted ( int ) ),
this, SLOT ( slotSelected( int ) ) );
- connect( _qt_listbox, SIGNAL( doubleClicked( QListBoxItem * ) ),
- this, SLOT ( slotActivated( QListBoxItem * ) ) );
+ connect( _qt_listbox, SIGNAL( doubleClicked( Q3ListBoxItem * ) ),
+ this, SLOT ( slotActivated( Q3ListBoxItem * ) ) );
connect( &_timer, SIGNAL( timeout() ),
this, SLOT ( returnImmediately() ) );
@@ -252,7 +257,7 @@
}
-void YQSelectionBox::slotActivated( QListBoxItem * )
+void YQSelectionBox::slotActivated( Q3ListBoxItem * )
{
YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::Activated ) );
}
Modified: branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.h?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.h (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQSelectionBox.h Thu Jul 26 15:47:28 2007
@@ -21,18 +21,21 @@
#ifndef YQSelectionBox_h
#define YQSelectionBox_h
-#include
+#include
#include
+//Added by qt3to4:
+#include
+#include
#include
#include "YSelectionBox.h"
class QLabel;
-class QListBox;
-class QListBoxItem;
+class Q3ListBox;
+class Q3ListBoxItem;
-class YQSelectionBox : public QVBox, public YSelectionBox
+class YQSelectionBox : public Q3VBox, public YSelectionBox
{
Q_OBJECT
@@ -110,7 +113,7 @@
/**
* Notification that an item has been activated (double clicked).
*/
- void slotActivated( QListBoxItem * item );
+ void slotActivated( Q3ListBoxItem * item );
/**
* Return after some millseconds delay - collect multiple events.
@@ -134,7 +137,7 @@
// Widgets
QLabel * _qt_label;
- QListBox * _qt_listbox;
+ Q3ListBox * _qt_listbox;
// Very small default size if specified
Modified: branches/tmp/sh/qt4-port/qt/src/YQSlider.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/qt4-port/qt/src/YQSlider.cc?rev=39717&r1=39716&r2=39717&view=diff
==============================================================================
--- branches/tmp/sh/qt4-port/qt/src/YQSlider.cc (original)
+++ branches/tmp/sh/qt4-port/qt/src/YQSlider.cc Thu Jul 26 15:47:28 2007
@@ -24,6 +24,8 @@
#include "YQUI.h"
#include "YEvent.h"
#include "YQSlider.h"
+//Added by qt3to4:
+#include
YQSlider::YQSlider( QWidget * parent,
@@ -33,7 +35,7 @@
int maxValue,
int initialValue )
- : QVBox( parent )
+ : Q3VBox( parent )
, YSlider( opt, label, minValue, maxValue, initialValue )
{
setWidgetRep( this );
@@ -41,17 +43,17 @@
setSpacing( YQWidgetSpacing );
setMargin( YQWidgetMargin );
_qt_label = new QLabel( fromUTF8( label->value() ), this );
- _qt_label->setTextFormat( QLabel::PlainText );
+ _qt_label->setTextFormat( Qt::PlainText );
_qt_label->setFont( YQUI::ui()->currentFont() );
_qt_label->setAlignment( Qt::AlignRight );
- _hbox = new QHBox( this );
+ _hbox = new Q3HBox( this );
_hbox->setSpacing( YQWidgetSpacing );
_qt_slider = new QSlider( minValue, maxValue,
1, // pageStep
initialValue,
- QSlider::Horizontal, _hbox );
+ Qt::Horizontal, _hbox );
_qt_slider->setFont( YQUI::ui()->currentFont() );
_qt_spinbox = new QSpinBox( minValue, maxValue,
Modified: branches/tmp/sh/qt4-port/qt/src/YQSlider.h
URL: