Author: dmacvicar
Date: Mon Dec 3 16:59:25 2007
New Revision: 42616
URL: http://svn.opensuse.org/viewcvs/yast?rev=42616&view=rev
Log:
ported everything n pkg selector needed to port the rest of the UI
Modified:
branches/tmp/coolo/qt4-port/src/YQOptionalWidgetFactory.cc
branches/tmp/coolo/qt4-port/src/YQUI_core.cc
branches/tmp/coolo/qt4-port/src/YQWidgetFactory.cc
branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.cc
branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.h
branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.cc
branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.h
branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc
branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h
branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc
branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h
branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.cc
branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.h
Modified: branches/tmp/coolo/qt4-port/src/YQOptionalWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQOptionalWidgetFactory.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQOptionalWidgetFactory.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQOptionalWidgetFactory.cc Mon Dec 3 16:59:25 2007
@@ -16,8 +16,6 @@
/-*/
-#define QT3_SUPPORT
-
#include "YQOptionalWidgetFactory.h"
#include "YQUI.h"
#include "YUIException.h"
Modified: branches/tmp/coolo/qt4-port/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQUI_core.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQUI_core.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQUI_core.cc Mon Dec 3 16:59:25 2007
@@ -16,14 +16,13 @@
/-*/
-#define QT3_SUPPORT
#include // MAXHOSTNAMELEN
#include
#include
-#include
-#include
-#include
+#include <QCursor>
+#include <QMessageBox>
+#include <QSocketNotifier>
#include <QStackedWidget>
#include <QDesktopWidget>
#include <QThread>
@@ -173,7 +172,7 @@
}
}
- _main_win->setCaption( title );
+ _main_win->setWindowTitle( title );
// Hide the main window for now. The first call to UI::OpenDialog() on an
@@ -202,8 +201,8 @@
// and make sure there is no corresponding dlclose().
QString qt_lib_name = QString( QTLIBDIR "/libQtGui.so.%1" ).arg( QT_VERSION >> 16 );;
- void * qt_lib = dlopen( qt_lib_name.utf8().constData(), RTLD_GLOBAL );
- y2milestone( "Forcing %s open %s", qt_lib_name.utf8().constData(),
+ void * qt_lib = dlopen( qt_lib_name.toUtf8().constData(), RTLD_GLOBAL );
+ y2milestone( "Forcing %s open %s", qt_lib_name.toUtf8().constData(),
qt_lib ? "successful" : "failed" );
// Init other stuff
Modified: branches/tmp/coolo/qt4-port/src/YQWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWidgetFactory.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/YQWidgetFactory.cc (original)
+++ branches/tmp/coolo/qt4-port/src/YQWidgetFactory.cc Mon Dec 3 16:59:25 2007
@@ -16,7 +16,6 @@
/-*/
-#define QT3_SUPPORT
#include <QColorGroup>
#include "YQWidgetFactory.h"
#include "YQUI.h"
@@ -25,10 +24,8 @@
#include <string>
-
using std::string;
-
YQWidgetFactory::YQWidgetFactory()
: YWidgetFactory()
{
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.cc (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.cc Mon Dec 3 16:59:25 2007
@@ -28,23 +28,21 @@
#include <fstream>
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-//Added by qt3to4:
-#include
+#include <QAction>
+#include <QShortcut>
+#include <QApplication>
+#include <QCheckBox>
+#include <QDialog>
+#include <QFileDialog>
+#include <QLabel>
+#include <QMap>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QPushButton>
+#include <QSplitter>
+#include <QTabWidget>
+#include <QTimer>
+#include <QMenu>
#define y2log_component "qt-pkg"
#include
@@ -206,6 +204,7 @@
// Fire up the first dependency check in the main loop.
// Don't do this right away - wait until all initializations are finished.
QTimer::singleShot( 0, this, SLOT( resolveDependencies() ) );
+
}
#endif
}
@@ -611,7 +610,7 @@
// File menu
//
- _fileMenu = new Q3PopupMenu( _menuBar );
+ _fileMenu = new QMenu( _menuBar );
Q_CHECK_PTR( _fileMenu );
_menuBar->insertItem( _( "&File" ), _fileMenu );
@@ -630,7 +629,7 @@
// View menu
//
- _viewMenu = new Q3PopupMenu( _menuBar );
+ _viewMenu = new QMenu( _menuBar );
Q_CHECK_PTR( _viewMenu );
_menuBar->insertItem( _( "&View" ), _viewMenu );
@@ -655,7 +654,7 @@
// Package menu
//
- _pkgMenu = new Q3PopupMenu( _menuBar );
+ _pkgMenu = new QMenu( _menuBar );
Q_CHECK_PTR( _pkgMenu );
_menuBar->insertItem( _( "&Package" ), _pkgMenu );
@@ -673,7 +672,7 @@
_pkgList->actionDontInstallSourceRpm->addTo( _pkgMenu );
_pkgMenu->insertSeparator();
- Q3PopupMenu * submenu = _pkgList->addAllInListSubMenu( _pkgMenu );
+ QMenu * submenu = _pkgList->addAllInListSubMenu( _pkgMenu );
Q_CHECK_PTR( submenu );
submenu->insertSeparator();
@@ -685,7 +684,7 @@
// Submenu for all packages
//
- submenu = new Q3PopupMenu( _pkgMenu );
+ submenu = new QMenu( _pkgMenu );
Q_CHECK_PTR( submenu );
// Translators: Unlike the "all in this list" submenu, this submenu
@@ -707,7 +706,7 @@
// Patch menu
//
- _patchMenu = new Q3PopupMenu( _menuBar );
+ _patchMenu = new QMenu( _menuBar );
Q_CHECK_PTR( _patchMenu );
_menuBar->insertItem( _( "&Patch" ), _patchMenu );
@@ -729,7 +728,7 @@
// Extras menu
//
- _extrasMenu = new Q3PopupMenu( _menuBar );
+ _extrasMenu = new QMenu( _menuBar );
Q_CHECK_PTR( _extrasMenu );
_menuBar->insertItem( _( "&Extras" ), _extrasMenu );
@@ -765,7 +764,7 @@
// Help menu
//
- _helpMenu = new Q3PopupMenu( _menuBar );
+ _helpMenu = new QMenu( _menuBar );
Q_CHECK_PTR( _helpMenu );
_menuBar->insertSeparator();
_menuBar->insertItem( _( "&Help" ), _helpMenu );
@@ -916,11 +915,8 @@
// Hotkey to enable "patches" filter view on the fly
//
- Q3Accel * accel = new Q3Accel( this );
+ QShortcut * accel = new QShortcut( Qt::Key_F2, this, SLOT( hotkeyInsertPatchFilterView() ) );
Q_CHECK_PTR( accel );
- accel->connectItem( accel->insertItem( Qt::Key_F2 ),
- this, SLOT( hotkeyInsertPatchFilterView() ) );
-
//
// Update actions just before opening menus
@@ -1113,11 +1109,9 @@
void
YQPackageSelector::pkgImport()
{
- QString filename = Q3FileDialog::getOpenFileName( DEFAULT_EXPORT_FILE_NAME, // startsWith
- "*.xml+;;*", // filter
- this, // parent
- 0, // name
- _( "Load Package List" ) ); // caption
+ QString filename = QFileDialog::getOpenFileName( this, _( "Load Package List" ), DEFAULT_EXPORT_FILE_NAME, // startsWi
+ "*.xml+;;*"// filter
+ );
if ( ! filename.isEmpty() )
{
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.h?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.h (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelector.h Mon Dec 3 16:59:25 2007
@@ -20,11 +20,9 @@
#ifndef YQPackageSelector_h
#define YQPackageSelector_h
-#include
-#include
-//Added by qt3to4:
-#include
-#include
+#include <QColor>
+#include <QLabel>
+#include <QMenu>
#include
#include "YQPackageSelectorBase.h"
@@ -33,12 +31,12 @@
class QCheckBox;
class QComboBox;
class QLabel;
-class Q3ListView;
-class Q3ProgressBar;
+class QListWidget;
+class QProgressBar;
class QPushButton;
class QSplitter;
class QTabWidget;
-class Q3PopupMenu;
+class QMenu;
class QMenuBar;
class QY2ComboTabWidget;
@@ -317,12 +315,12 @@
YQPkgPatchList * _patchList;
QMenuBar * _menuBar;
- Q3PopupMenu * _fileMenu;
- Q3PopupMenu * _viewMenu;
- Q3PopupMenu * _pkgMenu;
- Q3PopupMenu * _patchMenu;
- Q3PopupMenu * _extrasMenu;
- Q3PopupMenu * _helpMenu;
+ QMenu * _fileMenu;
+ QMenu * _viewMenu;
+ QMenu * _pkgMenu;
+ QMenu * _patchMenu;
+ QMenu * _extrasMenu;
+ QMenu * _helpMenu;
int _viewShowDevelID;
int _viewShowDebugInfoID;
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.cc (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.cc Mon Dec 3 16:59:25 2007
@@ -18,14 +18,13 @@
/-*/
-#include
-//Added by qt3to4:
-#include
+#include <QMessageBox>
+#include <QEvent>
#define y2log_component "qt-pkg"
#include
-#include
+#include <QAction>
#include "QY2LayoutUtils.h"
#include "YQPackageSelectorBase.h"
@@ -50,11 +49,16 @@
YQPackageSelectorBase::YQPackageSelectorBase( YWidget * parent,
long modeFlags )
- : Q3VBox( (QWidget *) parent->widgetRep() )
+ : QWidget( (QWidget *) parent->widgetRep() )
, YPackageSelector( parent, modeFlags )
{
setWidgetRep( this );
+// QVBoxLayout *layout = new QVBoxLayout;
+// layout->addWidget(child1);
+// layout->addWidget(child2);
+// setLayout(layout);
+
_showChangesDialog = false;
_pkgConflictDialog = 0;
_diskUsageList = 0;
@@ -68,10 +72,9 @@
Q_CHECK_PTR( _pkgConflictDialog );
QString label = _( "Reset &Ignored Dependency Conflicts" );
- _actionResetIgnoredDependencyProblems = new Q3Action( label, // text
- label, // menu text
- (QKeySequence) 0, // accel
- this ); // parent
+ _actionResetIgnoredDependencyProblems = new QAction( label, this);
+ _actionResetIgnoredDependencyProblems->setShortcut((QKeySequence) 0);
+ //_actionResetIgnoredDependencyProblems->setMenuRole(QAction::TextHeuristicRole);
Q_CHECK_PTR( _actionResetIgnoredDependencyProblems );
connect( _actionResetIgnoredDependencyProblems, SIGNAL( activated() ),
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.h?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.h (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPackageSelectorBase.h Mon Dec 3 16:59:25 2007
@@ -20,15 +20,13 @@
#ifndef YQPackageSelectorBase_h
#define YQPackageSelectorBase_h
-#include
-//Added by qt3to4:
-#include
+#include <QEvent>
#include "YPackageSelector.h"
#include "YQZypp.h"
class QY2ComboTabWidget;
-class Q3Action;
+class QAction;
class YQPkgConflictDialog;
class YQPkgDiskUsageList;
@@ -37,7 +35,7 @@
/**
* Abstract base class for package selectors.
**/
-class YQPackageSelectorBase : public Q3VBox, public YPackageSelector
+class YQPackageSelectorBase : public QWidget, public YPackageSelector
{
Q_OBJECT
@@ -198,7 +196,7 @@
bool _showChangesDialog;
YQPkgConflictDialog * _pkgConflictDialog;
YQPkgDiskUsageList * _diskUsageList;
- Q3Action * _actionResetIgnoredDependencyProblems;
+ QAction * _actionResetIgnoredDependencyProblems;
};
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.cc Mon Dec 3 16:59:25 2007
@@ -22,10 +22,10 @@
#define y2log_component "qt-pkg"
#include
-#include
-#include
-#include
-#include
+#include <QPixmap>
+#include <QAction>
+#include <QMenu>
+#include <QMessageBox>
#include "utf8.h"
@@ -178,12 +178,12 @@
void
YQPkgList::createSourceRpmContextMenu()
{
- _sourceRpmContextMenu = new Q3PopupMenu( this );
+ _sourceRpmContextMenu = new QMenu( this );
actionInstallSourceRpm->addTo( _sourceRpmContextMenu );
actionDontInstallSourceRpm->addTo( _sourceRpmContextMenu );
- Q3PopupMenu * submenu = new Q3PopupMenu( _sourceRpmContextMenu );
+ QMenu * submenu = new QMenu( _sourceRpmContextMenu );
Q_CHECK_PTR( submenu );
_sourceRpmContextMenu->insertItem( _( "&All in This List" ), submenu );
@@ -246,7 +246,7 @@
void
YQPkgList::createNotInstalledContextMenu()
{
- _notInstalledContextMenu = new Q3PopupMenu( this );
+ _notInstalledContextMenu = new QMenu( this );
Q_CHECK_PTR( _notInstalledContextMenu );
actionSetCurrentInstall->addTo( _notInstalledContextMenu );
@@ -265,7 +265,7 @@
void
YQPkgList::createInstalledContextMenu()
{
- _installedContextMenu = new Q3PopupMenu( this );
+ _installedContextMenu = new QMenu( this );
Q_CHECK_PTR( _installedContextMenu );
actionSetCurrentKeepInstalled->addTo( _installedContextMenu );
@@ -281,10 +281,10 @@
}
-Q3PopupMenu *
-YQPkgList::addAllInListSubMenu( Q3PopupMenu * menu )
+QMenu *
+YQPkgList::addAllInListSubMenu( QMenu * menu )
{
- Q3PopupMenu * submenu = new Q3PopupMenu( menu );
+ QMenu * submenu = new QMenu( menu );
Q_CHECK_PTR( submenu );
actionSetListInstall->addTo( submenu );
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgList.h Mon Dec 3 16:59:25 2007
@@ -22,7 +22,7 @@
#include
//Added by qt3to4:
-#include
+#include <QMenu>
class YQPkgListItem;
@@ -65,7 +65,7 @@
*
* Reimplemented from YQPkgObjList.
**/
- virtual Q3PopupMenu * addAllInListSubMenu( Q3PopupMenu * menu );
+ virtual QMenu * addAllInListSubMenu( QMenu * menu );
/**
* Returns 'true' if there are any installed packages.
@@ -198,15 +198,15 @@
// Data members
int _srpmStatusCol;
- Q3PopupMenu * _sourceRpmContextMenu;
+ QMenu * _sourceRpmContextMenu;
public:
- Q3Action * actionInstallSourceRpm;
- Q3Action * actionDontInstallSourceRpm;
- Q3Action * actionInstallListSourceRpms;
- Q3Action * actionDontInstallListSourceRpms;
+ QAction * actionInstallSourceRpm;
+ QAction * actionDontInstallSourceRpm;
+ QAction * actionInstallListSourceRpms;
+ QAction * actionDontInstallListSourceRpms;
};
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.cc Mon Dec 3 16:59:25 2007
@@ -20,10 +20,10 @@
#define y2log_component "qt-pkg"
#include
-#include
-#include
-#include
-#include
+#include <QPixmap>
+#include <QHeaderView>
+#include <QMenu>
+#include <QAction>
//Added by qt3to4:
#include
@@ -145,7 +145,7 @@
{
updateActions( item );
- Q3PopupMenu * contextMenu =
+ QMenu * contextMenu =
item->selectable()->hasInstalledObj() ?
installedContextMenu() : notInstalledContextMenu();
@@ -407,7 +407,7 @@
-Q3Action *
+QAction *
YQPkgObjList::createAction( ZyppStatus status, const QString & key, bool enabled )
{
return createAction( statusText( status ),
@@ -418,7 +418,7 @@
}
-Q3Action *
+QAction *
YQPkgObjList::createAction( const QString & text,
const QPixmap & icon,
const QPixmap & insensitiveIcon,
@@ -440,13 +440,11 @@
QIcon::Disabled );
}
- Q3Action * action = new Q3Action( label, // text
- iconSet, // icon set
- label, // menu text
- 0, // accel key
+ QAction * action = new QAction( label, // text
this ); // parent
Q_CHECK_PTR( action );
action->setEnabled( enabled );
+ action->setIcon( iconSet );
return action;
}
@@ -455,7 +453,7 @@
void
YQPkgObjList::createNotInstalledContextMenu()
{
- _notInstalledContextMenu = new Q3PopupMenu( this );
+ _notInstalledContextMenu = new QMenu( this );
Q_CHECK_PTR( _notInstalledContextMenu );
actionSetCurrentInstall->addTo( _notInstalledContextMenu );
@@ -469,7 +467,7 @@
void
YQPkgObjList::createInstalledContextMenu()
{
- _installedContextMenu = new Q3PopupMenu( this );
+ _installedContextMenu = new QMenu( this );
Q_CHECK_PTR( _installedContextMenu );
actionSetCurrentKeepInstalled->addTo( _installedContextMenu );
@@ -480,10 +478,10 @@
}
-Q3PopupMenu *
-YQPkgObjList::addAllInListSubMenu( Q3PopupMenu * menu )
+QMenu *
+YQPkgObjList::addAllInListSubMenu( QMenu * menu )
{
- Q3PopupMenu * submenu = new Q3PopupMenu( menu );
+ QMenu * submenu = new QMenu( menu );
Q_CHECK_PTR( submenu );
actionSetListInstall->addTo( submenu );
@@ -500,7 +498,7 @@
}
-Q3PopupMenu *
+QMenu *
YQPkgObjList::notInstalledContextMenu()
{
if ( ! _notInstalledContextMenu )
@@ -510,7 +508,7 @@
}
-Q3PopupMenu *
+QMenu *
YQPkgObjList::installedContextMenu()
{
if ( ! _installedContextMenu )
@@ -829,7 +827,7 @@
if ( parentItem )
parentItem->takeItem( item );
else
- Q3ListView::takeItem( item );
+ QTreeWidget::takeItem( item );
_excludedItems->add( item, parentItem );
}
@@ -843,7 +841,7 @@
if ( oldParent )
oldParent->insertItem( item );
else
- Q3ListView::insertItem( item );
+ QTreeWidget::insertItem( item );
}
}
#endif
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgObjList.h Mon Dec 3 16:59:25 2007
@@ -20,11 +20,10 @@
#ifndef YQPkgObjList_h
#define YQPkgObjList_h
-#include
-#include
-//Added by qt3to4:
-#include
-#include
+#include <QPixmap>
+#include <QRegExp>
+#include <QMenu>
+#include <QEvent>
#include <map>
#include <list>
#include
@@ -33,8 +32,8 @@
#include
class YQPkgObjListItem;
-class Q3Action;
-class Q3PopupMenu;
+class QAction;
+class QMenu;
using std::string;
using std::list;
@@ -107,7 +106,7 @@
* Add a submenu "All in this list..." to 'menu'.
* Returns the newly created submenu.
**/
- virtual Q3PopupMenu * addAllInListSubMenu( Q3PopupMenu * menu );
+ virtual QMenu * addAllInListSubMenu( QMenu * menu );
/**
* Returns the suitable icon for a zypp::ResObject status - the regular
@@ -286,13 +285,13 @@
* Returns the context menu for items that are not installed.
* Creates the menu upon the first call.
**/
- virtual Q3PopupMenu * installedContextMenu();
+ virtual QMenu * installedContextMenu();
/**
* Returns the context menu for items that are installed.
* Creates the menu upon the first call.
**/
- virtual Q3PopupMenu * notInstalledContextMenu();
+ virtual QMenu * notInstalledContextMenu();
/**
* Create the context menu for items that are not installed.
@@ -315,7 +314,7 @@
* retrieve the corresponding status icons (both sensitive and insensitive)
* and text. 'key' is only a descriptive text, no true accelerator.
**/
- Q3Action * createAction( ZyppStatus status,
+ QAction * createAction( ZyppStatus status,
const QString & key = QString::null,
bool enabled = false );
@@ -323,7 +322,7 @@
* Low-level: Create an action.
* 'key' is only a descriptive text, no true accelerator.
**/
- Q3Action * createAction( const QString & text,
+ QAction * createAction( const QString & text,
const QPixmap & icon = QPixmap(),
const QPixmap & insensitiveIcon = QPixmap(),
const QString & key = QString::null,
@@ -349,28 +348,28 @@
ExcludeRuleList _excludeRules;
ExcludedItems * _excludedItems;
- Q3PopupMenu * _installedContextMenu;
- Q3PopupMenu * _notInstalledContextMenu;
+ QMenu * _installedContextMenu;
+ QMenu * _notInstalledContextMenu;
public:
- Q3Action * actionSetCurrentInstall;
- Q3Action * actionSetCurrentDontInstall;
- Q3Action * actionSetCurrentKeepInstalled;
- Q3Action * actionSetCurrentDelete;
- Q3Action * actionSetCurrentUpdate;
- Q3Action * actionSetCurrentTaboo;
- Q3Action * actionSetCurrentProtected;
-
- Q3Action * actionSetListInstall;
- Q3Action * actionSetListDontInstall;
- Q3Action * actionSetListKeepInstalled;
- Q3Action * actionSetListDelete;
- Q3Action * actionSetListUpdate;
- Q3Action * actionSetListUpdateForce;
- Q3Action * actionSetListTaboo;
- Q3Action * actionSetListProtected;
+ QAction * actionSetCurrentInstall;
+ QAction * actionSetCurrentDontInstall;
+ QAction * actionSetCurrentKeepInstalled;
+ QAction * actionSetCurrentDelete;
+ QAction * actionSetCurrentUpdate;
+ QAction * actionSetCurrentTaboo;
+ QAction * actionSetCurrentProtected;
+
+ QAction * actionSetListInstall;
+ QAction * actionSetListDontInstall;
+ QAction * actionSetListKeepInstalled;
+ QAction * actionSetListDelete;
+ QAction * actionSetListUpdate;
+ QAction * actionSetListUpdateForce;
+ QAction * actionSetListTaboo;
+ QAction * actionSetListProtected;
public:
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.cc?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.cc (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.cc Mon Dec 3 16:59:25 2007
@@ -22,10 +22,9 @@
#define y2log_component "qt-pkg"
#include
-#include
-#include
-//Added by qt3to4:
-#include
+#include <QMenu>
+#include <QAction>
+#include <QEvent>
#include
#include <set>
@@ -71,7 +70,7 @@
setAllColumnsShowFocus( true );
setColumnAlignment( sizeCol(), Qt::AlignRight );
- connect( this, SIGNAL( selectionChanged ( Q3ListViewItem * ) ),
+ connect( this, SIGNAL( selectionChanged ( QTreeWidgetItem * ) ),
this, SLOT ( filter() ) );
setSorting( categoryCol() );
@@ -356,7 +355,7 @@
YQPkgPatchList::selection() const
{
#if FIXME
- Q3ListViewItem * item = selectedItem();
+ QTreeWidgetItem * item = selectedItem();
if ( ! item )
return 0;
@@ -371,7 +370,7 @@
void
YQPkgPatchList::createNotInstalledContextMenu()
{
- _notInstalledContextMenu = new Q3PopupMenu( this );
+ _notInstalledContextMenu = new QMenu( this );
Q_CHECK_PTR( _notInstalledContextMenu );
actionSetCurrentInstall->addTo( _notInstalledContextMenu );
@@ -385,7 +384,7 @@
void
YQPkgPatchList::createInstalledContextMenu()
{
- _installedContextMenu = new Q3PopupMenu( this );
+ _installedContextMenu = new QMenu( this );
Q_CHECK_PTR( _installedContextMenu );
actionSetCurrentKeepInstalled->addTo( _installedContextMenu );
@@ -401,10 +400,10 @@
}
-Q3PopupMenu *
-YQPkgPatchList::addAllInListSubMenu( Q3PopupMenu * menu )
+QMenu *
+YQPkgPatchList::addAllInListSubMenu( QMenu * menu )
{
- Q3PopupMenu * submenu = new Q3PopupMenu( menu );
+ QMenu * submenu = new QMenu( menu );
Q_CHECK_PTR( submenu );
actionSetListInstall->addTo( submenu );
@@ -434,7 +433,7 @@
#if ! ENABLE_DELETING_PATCHES
if ( event->ascii() == '-' )
{
- Q3ListViewItem * selectedListViewItem = selectedItem();
+ QTreeWidgetItem * selectedListViewItem = currentItem();
if ( selectedListViewItem )
{
Modified: branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.h?rev=42616&r1=42615&r2=42616&view=diff
==============================================================================
--- branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.h (original)
+++ branches/tmp/coolo/qt4-port/src/pkg/YQPkgPatchList.h Mon Dec 3 16:59:25 2007
@@ -24,9 +24,9 @@
#include "YQPkgObjList.h"
#include "YQPkgSelMapper.h"
//Added by qt3to4:
-#include <Q3ListViewItem>
-#include
-#include
+#include <QTreeWidgetItem>
+#include <QEvent>
+#include <QMenu>
#define ENABLE_DELETING_PATCHES 1
@@ -140,7 +140,7 @@
*
* Reimplemented from YQPkgObjList.
**/
- virtual Q3PopupMenu * addAllInListSubMenu( Q3PopupMenu * menu );
+ virtual QMenu * addAllInListSubMenu( QMenu * menu );
/**
* Delayed initialization after the dialog is fully created.
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org