summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui
Side-by-side diff
Diffstat (limited to 'microkde/kdeui') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/kaction.cpp75
-rw-r--r--microkde/kdeui/kaction.h26
-rw-r--r--microkde/kdeui/kactionclasses.cpp111
-rw-r--r--microkde/kdeui/kactionclasses.h51
-rw-r--r--microkde/kdeui/kactioncollection.cpp50
-rw-r--r--microkde/kdeui/kactioncollection.h4
-rw-r--r--microkde/kdeui/kbuttonbox.cpp18
-rw-r--r--microkde/kdeui/kbuttonbox.h4
-rw-r--r--microkde/kdeui/kguiitem.cpp14
-rw-r--r--microkde/kdeui/kguiitem.h12
-rw-r--r--microkde/kdeui/kjanuswidget.cpp140
-rw-r--r--microkde/kdeui/kjanuswidget.h56
-rw-r--r--microkde/kdeui/klistbox.cpp56
-rw-r--r--microkde/kdeui/klistbox.h25
-rw-r--r--microkde/kdeui/klistview.cpp337
-rw-r--r--microkde/kdeui/klistview.h121
-rw-r--r--microkde/kdeui/kmainwindow.cpp97
-rw-r--r--microkde/kdeui/kmainwindow.h19
-rw-r--r--microkde/kdeui/knuminput.cpp61
-rw-r--r--microkde/kdeui/knuminput.h15
-rw-r--r--microkde/kdeui/kpopupmenu.cpp5
-rw-r--r--microkde/kdeui/kpopupmenu.h6
-rw-r--r--microkde/kdeui/kseparator.cpp18
-rw-r--r--microkde/kdeui/kseparator.h8
-rw-r--r--microkde/kdeui/ksqueezedtextlabel.cpp3
-rw-r--r--microkde/kdeui/ksqueezedtextlabel.h2
-rw-r--r--microkde/kdeui/kstdaction.cpp2
-rw-r--r--microkde/kdeui/ktoolbar.cpp185
-rw-r--r--microkde/kdeui/ktoolbar.h68
-rw-r--r--microkde/kdeui/ktoolbarbutton.cpp106
-rw-r--r--microkde/kdeui/ktoolbarbutton.h17
-rw-r--r--microkde/kdeui/ktoolbarhandler.cpp26
-rw-r--r--microkde/kdeui/ktoolbarhandler.h10
-rw-r--r--microkde/kdeui/kxmlguiclient.cpp12
-rw-r--r--microkde/kdeui/kxmlguiclient.h6
35 files changed, 950 insertions, 816 deletions
diff --git a/microkde/kdeui/kaction.cpp b/microkde/kdeui/kaction.cpp
index d38a6d5..c2df381 100644
--- a/microkde/kdeui/kaction.cpp
+++ b/microkde/kdeui/kaction.cpp
@@ -30,2 +30,5 @@
#include <qtooltip.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <Q3ValueList>
//US#include <qwhatsthis.h>
@@ -44,5 +47,5 @@
#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
-#include <qiconset.h>
+#include <q3toolbar.h>
+#include <q3popupmenu.h>
+#include <qicon.h>
@@ -89,3 +92,3 @@ public:
KAccel *m_kaccel;
- QValueList<KAccel*> m_kaccelList;
+ Q3ValueList<KAccel*> m_kaccelList;
@@ -109,3 +112,3 @@ public:
- QValueList<Container> m_containers;
+ Q3ValueList<Container> m_containers;
};
@@ -132,3 +135,3 @@ KAction::KAction( const QString& text, const QString& sIconName, const KShortcut
-KAction::KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
@@ -166,3 +169,3 @@ KAction::KAction( const QString& text, const KShortcut& cut,
}
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -184,3 +187,3 @@ KAction::KAction( const QString& text, const QString& pix,
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -508,4 +511,4 @@ void KAction::updateShortcut( int i )
QWidget* w = container( i );
- if ( w->inherits( "QPopupMenu" ) ) {
- QPopupMenu* menu = static_cast<QPopupMenu*>(w);
+ if ( w->inherits( "Q3PopupMenu" ) ) {
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>(w);
updateShortcut( menu, id );
@@ -520,3 +523,3 @@ void KAction::updateShortcut( int i )
-void KAction::updateShortcut( QPopupMenu* menu, int id )
+void KAction::updateShortcut( Q3PopupMenu* menu, int id )
{
@@ -623,3 +626,3 @@ void KAction::updateToolTip( int i )
QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
- else if ( w->inherits( "QToolBar" ) )
+ else if ( w->inherits( "Q3ToolBar" ) )
QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
@@ -648,5 +651,5 @@ int KAction::plug( QWidget *w, int index )
- if ( w->inherits("QPopupMenu") )
+ if ( w->inherits("Q3PopupMenu") )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( w );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( w );
int id;
@@ -723,3 +726,3 @@ int KAction::plug( QWidget *w, int index )
}
- bar->getButton( id_ )->setName( QCString("toolbutton_")+name() );
+ bar->getButton( id_ )->setName( Q3CString("toolbutton_")+name() );
@@ -751,5 +754,5 @@ void KAction::unplug( QWidget *w )
- if ( w->inherits( "QPopupMenu" ) )
+ if ( w->inherits( "Q3PopupMenu" ) )
{
- QPopupMenu *menu = static_cast<QPopupMenu *>( w );
+ Q3PopupMenu *menu = static_cast<Q3PopupMenu *>( w );
menu->removeItem( id );
@@ -864,4 +867,4 @@ void KAction::updateEnabled( int i )
- if ( w->inherits("QPopupMenu") )
- static_cast<QPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
+ if ( w->inherits("Q3PopupMenu") )
+ static_cast<Q3PopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
else if ( w->inherits("QMenuBar") )
@@ -908,6 +911,6 @@ void KAction::updateText( int i )
- if ( w->inherits( "QPopupMenu" ) ) {
+ if ( w->inherits( "Q3PopupMenu" ) ) {
int id = itemId( i );
- static_cast<QPopupMenu*>(w)->changeItem( id, d->text() );
- updateShortcut( static_cast<QPopupMenu*>(w), id );
+ static_cast<Q3PopupMenu*>(w)->changeItem( id, d->text() );
+ updateShortcut( static_cast<Q3PopupMenu*>(w), id );
}
@@ -949,6 +952,6 @@ void KAction::updateIcon( int id )
- if ( w->inherits( "QPopupMenu" ) ) {
+ if ( w->inherits( "Q3PopupMenu" ) ) {
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
+ updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
}
@@ -958,3 +961,3 @@ void KAction::updateIcon( int id )
static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
- else if ( w->inherits( "QToolBar" ) )
+ else if ( w->inherits( "Q3ToolBar" ) )
{
@@ -970,3 +973,3 @@ QString KAction::icon() const
-void KAction::setIconSet( const QIconSet &iconset )
+void KAction::setIconSet( const QIcon &iconset )
{
@@ -984,7 +987,7 @@ void KAction::updateIconSet( int id )
- if ( w->inherits( "QPopupMenu" ) )
+ if ( w->inherits( "Q3PopupMenu" ) )
{
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
+ updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
}
@@ -1001,3 +1004,3 @@ void KAction::updateIconSet( int id )
-QIconSet KAction::iconSet( KIcon::Group group, int size ) const
+QIcon KAction::iconSet( KIcon::Group group, int size ) const
{
@@ -1024,3 +1027,3 @@ void KAction::updateWhatsThis( int i )
qDebug("KAction::updateWhatsThis ...1 has top be fixed");
- QPopupMenu* pm = popupMenu( i );
+ Q3PopupMenu* pm = popupMenu( i );
if ( pm )
@@ -1066,6 +1069,6 @@ KToolBar* KAction::toolBar( int index ) const
-QPopupMenu* KAction::popupMenu( int index ) const
+Q3PopupMenu* KAction::popupMenu( int index ) const
{
//US return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container );
- return (QPopupMenu *)( d->m_containers[ index ].m_container );
+ return (Q3PopupMenu *)( d->m_containers[ index ].m_container );
}
@@ -1157,3 +1160,3 @@ int KAction::findContainer( const QWidget* widget ) const
int pos = 0;
- QValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin();
+ Q3ValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin();
while( it != d->m_containers.end() )
@@ -1172,3 +1175,3 @@ void KAction::removeContainer( int index )
int i = 0;
- QValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin();
+ Q3ValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin();
while( it != d->m_containers.end() )
diff --git a/microkde/kdeui/kaction.h b/microkde/kdeui/kaction.h
index 13e2e1e..5c690ec 100644
--- a/microkde/kdeui/kaction.h
+++ b/microkde/kdeui/kaction.h
@@ -31,4 +31,6 @@
#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <q3valuelist.h>
+#include <qpointer.h>
+//Added by qt3to4:
+#include <Q3PopupMenu>
#include <kguiitem.h>
@@ -42,6 +44,6 @@
class QMenuBar;
-class QPopupMenu;
+class Q3PopupMenu;
//USclass QComboBox;
//USclass QPoint;
-class QIconSet;
+class QIcon;
class QString;
@@ -261,3 +263,3 @@ public:
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
@@ -310,3 +312,3 @@ public:
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -320,3 +322,3 @@ public:
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
@@ -463,6 +465,6 @@ public:
*/
- virtual QIconSet iconSet( KIcon::Group group, int size=0 ) const;
+ virtual QIcon iconSet( KIcon::Group group, int size=0 ) const;
#ifndef KDE_NO_COMPAT
- QIconSet iconSet() const
+ QIcon iconSet() const
{
@@ -520,3 +522,3 @@ public slots:
*/
- virtual void setIconSet( const QIconSet &iconSet );
+ virtual void setIconSet( const QIcon &iconSet );
@@ -548,3 +550,3 @@ protected:
KToolBar* toolBar( int index ) const;
- QPopupMenu* popupMenu( int index ) const;
+ Q3PopupMenu* popupMenu( int index ) const;
void removeContainer( int index );
@@ -557,3 +559,3 @@ protected:
virtual void updateShortcut( int i );
- virtual void updateShortcut( QPopupMenu* menu, int id );
+ virtual void updateShortcut( Q3PopupMenu* menu, int id );
virtual void updateGroup( int id );
diff --git a/microkde/kdeui/kactionclasses.cpp b/microkde/kdeui/kactionclasses.cpp
index 82e6c8b..c611865 100644
--- a/microkde/kdeui/kactionclasses.cpp
+++ b/microkde/kdeui/kactionclasses.cpp
@@ -30,5 +30,7 @@
#include <qfontdatabase.h>
-#include <qobjectlist.h>
+#include <qobject.h>
//US#include <qwhatsthis.h>
#include <qtimer.h>
+//Added by qt3to4:
+#include <Q3ValueList>
@@ -50,9 +52,9 @@
#include <qwidget.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qmenubar.h>
-#include <qmainwindow.h>
-#include <qtoolbar.h>
+#include <q3mainwindow.h>
+#include <q3toolbar.h>
#include <qcombobox.h>
-#include <qmainwindow.h>
-
+#include <q3mainwindow.h>
+#include <qcoreapplication.h>
@@ -85,3 +87,3 @@ static void get_fonts( QStringList &lst )
-static QValueList<int> get_standard_font_sizes()
+static Q3ValueList<int> get_standard_font_sizes()
{
@@ -122,3 +124,3 @@ KToggleAction::KToggleAction( const QString& text, const KShortcut& cut,
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -138,3 +140,3 @@ KToggleAction::KToggleAction( const QString& text, const QString& pix,
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -171,3 +173,3 @@ int KToggleAction::plug( QWidget* widget, int index )
{
- if ( !widget->inherits("QPopupMenu") && !widget->inherits("KToolBar") )
+ if ( !widget->inherits("Q3PopupMenu") && !widget->inherits("KToolBar") )
{
@@ -186,3 +188,3 @@ int KToggleAction::plug( QWidget* widget, int index )
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
@@ -190,3 +192,3 @@ int KToggleAction::plug( QWidget* widget, int index )
- static_cast<QPopupMenu*>(widget)->setItemChecked( id, d->m_checked );
+ static_cast<Q3PopupMenu*>(widget)->setItemChecked( id, d->m_checked );
} else if ( widget->inherits( "KToolBar" ) ) {
@@ -216,9 +218,8 @@ void KToggleAction::setChecked( bool c )
if ( c && parent() && !exclusiveGroup().isEmpty() ) {
- const QObjectList *list = parent()->children();
- if ( list ) {
- QObjectListIt it( *list );
- for( ; it.current(); ++it ) {
- if ( it.current()->inherits( "KToggleAction" ) && it.current() != this &&
- static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) {
- KToggleAction *a = static_cast<KToggleAction*>(it.current());
+ const QObjectList list = parent()->children();
+ if ( !list.empty() ) {
+ for(QObjectList::const_iterator it=list.begin();it!=list.end();++it) {
+ if ( (*it)->inherits( "KToggleAction" ) && (*it) != this &&
+ static_cast<KToggleAction*>((*it))->exclusiveGroup() == exclusiveGroup() ) {
+ KToggleAction *a = static_cast<KToggleAction*>(*it);
if( a->isChecked() ) {
@@ -237,4 +238,4 @@ void KToggleAction::updateChecked( int id )
- if ( w->inherits( "QPopupMenu" ) )
- static_cast<QPopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked );
+ if ( w->inherits( "Q3PopupMenu" ) )
+ static_cast<Q3PopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked );
else if ( w->inherits( "QMenuBar" ) )
@@ -285,3 +286,3 @@ KRadioAction::KRadioAction( const QString& text, const KShortcut& cut,
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -299,3 +300,3 @@ KRadioAction::KRadioAction( const QString& text, const QString& pix,
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -351,3 +352,3 @@ public:
bool m_menuAccelsEnabled;
- QPopupMenu *m_menu;
+ Q3PopupMenu *m_menu;
int m_current;
@@ -389,3 +390,3 @@ KSelectAction::KSelectAction( const QString& text, const KShortcut& cut,
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -405,3 +406,3 @@ KSelectAction::KSelectAction( const QString& text, const QString& pix,
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -441,3 +442,3 @@ void KSelectAction::setCurrentItem( int id )
if ( id >= (int)d->m_list.count() ) {
- ASSERT(id < (int)d->m_list.count());
+ Q_ASSERT(id < (int)d->m_list.count());
return;
@@ -481,3 +482,3 @@ void KSelectAction::setComboWidth( int width )
}
-QPopupMenu* KSelectAction::popupMenu() const
+Q3PopupMenu* KSelectAction::popupMenu() const
{
@@ -487,3 +488,3 @@ QPopupMenu* KSelectAction::popupMenu() const
//US d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()");
- d->m_menu = new QPopupMenu(0L, "QSelectAction::popupMenu()");
+ d->m_menu = new Q3PopupMenu(0L, "QSelectAction::popupMenu()");
setupMenu();
@@ -645,3 +646,3 @@ int KSelectAction::plug( QWidget *widget, int index )
kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
@@ -650,3 +651,3 @@ int KSelectAction::plug( QWidget *widget, int index )
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
int id;
@@ -684,3 +685,3 @@ int KSelectAction::plug( QWidget *widget, int index )
cb->setMaximumHeight( 34 );
- if (!isEditable()) cb->setFocusPolicy(QWidget::NoFocus);
+ if (!isEditable()) cb->setFocusPolicy(Qt::NoFocus);
cb->setMinimumWidth( cb->sizeHint().width() );
@@ -854,3 +855,3 @@ KListAction::KListAction( const QString& text, const KShortcut& cut,
-KListAction::KListAction( const QString& text, const QIconSet& pix,
+KListAction::KListAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -870,3 +871,3 @@ KListAction::KListAction( const QString& text, const QString& pix,
-KListAction::KListAction( const QString& text, const QIconSet& pix,
+KListAction::KListAction( const QString& text, const QIcon& pix,
const KShortcut& cut, const QObject* receiver,
@@ -967,3 +968,3 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+ const QIcon& pix,
const KShortcut& cut,
@@ -993,3 +994,3 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+ const QIcon& pix,
const KShortcut& cut,
@@ -1203,3 +1204,3 @@ KFontAction::KFontAction( const QString& text, const KShortcut& cut,
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -1225,3 +1226,3 @@ KFontAction::KFontAction( const QString& text, const QString& pix,
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -1363,3 +1364,3 @@ KFontSizeAction::KFontSizeAction( const QString& text,
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -1379,3 +1380,3 @@ KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix,
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
@@ -1416,5 +1417,5 @@ void KFontSizeAction::init()
setEditable( true );
- QValueList<int> sizes = get_standard_font_sizes();
+ Q3ValueList<int> sizes = get_standard_font_sizes();
QStringList lst;
- for ( QValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
+ for ( Q3ValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
lst.append( QString::number( *it ) );
@@ -1439,3 +1440,3 @@ void KFontSizeAction::setFontSize( int size )
// Insert at the correct position in the list (to keep sorting)
- QValueList<int> lst;
+ Q3ValueList<int> lst;
// Convert to list of ints
@@ -1452,3 +1453,3 @@ qDebug("KFontSizeAction::setFontSize heapsort not found.");
QStringList strLst;
- for (QValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
+ for (Q3ValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
strLst.append( QString::number(*it) );
@@ -1494,3 +1495,3 @@ public:
//US m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate");
- m_popup = new QPopupMenu(0L,"KActionMenu::KActionMenuPrivate");
+ m_popup = new Q3PopupMenu(0L,"KActionMenu::KActionMenuPrivate");
m_delayed = true;
@@ -1504,3 +1505,3 @@ public:
//US KPopupMenu *m_popup;
- QPopupMenu *m_popup;
+ Q3PopupMenu *m_popup;
bool m_delayed;
@@ -1524,3 +1525,3 @@ KActionMenu::KActionMenu( const QString& text, QObject* parent,
-KActionMenu::KActionMenu( const QString& text, const QIconSet& icon,
+KActionMenu::KActionMenu( const QString& text, const QIcon& icon,
QObject* parent, const char* name )
@@ -1554,3 +1555,3 @@ void KActionMenu::popup( const QPoint& global )
//US KPopupMenu* KActionMenu::popupMenu() const
-QPopupMenu* KActionMenu::popupMenu() const
+Q3PopupMenu* KActionMenu::popupMenu() const
{
@@ -1594,5 +1595,5 @@ int KActionMenu::plug( QWidget* widget, int index )
kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
int id;
@@ -1783,3 +1784,3 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
//US KPopupMenu *KToolBarPopupAction::popupMenu() const
-QPopupMenu *KToolBarPopupAction::popupMenu() const
+Q3PopupMenu *KToolBarPopupAction::popupMenu() const
{
@@ -1788,3 +1789,3 @@ QPopupMenu *KToolBarPopupAction::popupMenu() const
//US that->m_popup = new KPopupMenu;
- that->m_popup = new QPopupMenu;
+ that->m_popup = new Q3PopupMenu;
}
@@ -1955,3 +1956,3 @@ void KWidgetAction::slotToolbarDestroyed()
- ASSERT( isPlugged() );
+ Q_ASSERT( isPlugged() );
if( !m_widget || !isPlugged() )
@@ -1976,5 +1977,5 @@ int KActionSeparator::plug( QWidget *widget, int index )
{
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
diff --git a/microkde/kdeui/kactionclasses.h b/microkde/kdeui/kactionclasses.h
index f6e7a0f..a9b9104 100644
--- a/microkde/kdeui/kactionclasses.h
+++ b/microkde/kdeui/kactionclasses.h
@@ -36,2 +36,5 @@
#include <kshortcut.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <Q3PopupMenu>
//US#include <kstdaction.h>
@@ -40,3 +43,3 @@
class QMenuBar;
-class QPopupMenu;
+class Q3PopupMenu;
//USclass QComboBox;
@@ -56,3 +59,3 @@ class KURL;
//US class KToolBar needs to be replaced
-class KToolBar;
+#include "ktoolbar.h"
class KActionCollection;
@@ -107,3 +110,3 @@ public:
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -129,3 +132,3 @@ public:
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
@@ -248,3 +251,3 @@ public:
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -270,3 +273,3 @@ public:
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
@@ -354,3 +357,3 @@ public:
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -376,3 +379,3 @@ public:
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
@@ -440,3 +443,3 @@ public:
- QPopupMenu* popupMenu() const;
+ Q3PopupMenu* popupMenu() const;
@@ -569,3 +572,3 @@ public:
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KListAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -591,3 +594,3 @@ public:
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KListAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent,
@@ -687,3 +690,3 @@ public:
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut,
QObject* parent, const char* name = 0,
@@ -714,3 +717,3 @@ public:
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
@@ -836,3 +839,3 @@ public:
const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -840,3 +843,3 @@ public:
QObject* parent = 0, const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent,
@@ -875,3 +878,3 @@ public:
const char* slot, QObject* parent, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -879,3 +882,3 @@ public:
QObject* parent = 0, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
@@ -933,3 +936,3 @@ public:
const char* name = 0 );
- KActionMenu( const QString& text, const QIconSet& icon,
+ KActionMenu( const QString& text, const QIcon& icon,
QObject* parent = 0, const char* name = 0 );
@@ -944,3 +947,3 @@ public:
//US KPopupMenu* popupMenu() const;
- QPopupMenu* popupMenu() const;
+ Q3PopupMenu* popupMenu() const;
void popup( const QPoint& global );
@@ -1069,3 +1072,3 @@ public:
//US KPopupMenu *popupMenu() const;
- QPopupMenu *popupMenu() const;
+ Q3PopupMenu *popupMenu() const;
@@ -1100,3 +1103,3 @@ private:
//US KPopupMenu *m_popup;
- QPopupMenu *m_popup;
+ Q3PopupMenu *m_popup;
bool m_delayed:1;
@@ -1149,4 +1152,4 @@ public slots:
private:
- QCString m_toolBarName;
- QGuardedPtr<KToolBar> m_toolBar;
+ Q3CString m_toolBarName;
+ QPointer<KToolBar> m_toolBar;
protected:
@@ -1197,3 +1200,3 @@ protected slots:
private:
- QGuardedPtr<QWidget> m_widget;
+ QPointer<QWidget> m_widget;
bool m_autoSized;
diff --git a/microkde/kdeui/kactioncollection.cpp b/microkde/kdeui/kactioncollection.cpp
index 69e5d02..4d66c7f 100644
--- a/microkde/kdeui/kactioncollection.cpp
+++ b/microkde/kdeui/kactioncollection.cpp
@@ -28,3 +28,5 @@
-#include <qptrdict.h>
+#include <q3ptrdict.h>
+//Added by qt3to4:
+#include <Q3ValueList>
//US#include <qvariant.h>
@@ -38,4 +40,4 @@
//US I included the following files
-#include <qasciidict.h>
-#include <qptrlist.h>
+#include <q3asciidict.h>
+#include <q3ptrlist.h>
#include "kaction.h"
@@ -69,3 +71,3 @@ public:
//QValueList<KAccel*> m_kaccelList;
- QValueList<KActionCollection*> m_docList;
+ Q3ValueList<KActionCollection*> m_docList;
QWidget *m_widget;
@@ -74,4 +76,4 @@ public:
- QAsciiDict<KAction> m_actionDict;
- QPtrDict< QPtrList<KAction> > m_dctHighlightContainers;
+ Q3AsciiDict<KAction> m_actionDict;
+ Q3PtrDict< Q3PtrList<KAction> > m_dctHighlightContainers;
bool m_highlight;
@@ -135,3 +137,3 @@ KActionCollection::~KActionCollection()
kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl;
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( Q3AsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
@@ -367,3 +369,3 @@ void KActionCollection::_clear()
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
while ( it.current() )
@@ -388,3 +390,3 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
else {
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
@@ -409,3 +411,3 @@ KAction* KActionCollection::action( int index ) const
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
it += index;
@@ -434,3 +436,3 @@ QStringList KActionCollection::groups() const
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
@@ -446,3 +448,3 @@ KActionPtrList KActionCollection::actions( const QString& group ) const
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
@@ -460,3 +462,3 @@ KActionPtrList KActionCollection::actions() const
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
@@ -510,3 +512,3 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
@@ -514,5 +516,5 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
{
- actionList = new QPtrList<KAction>;
+ actionList = new Q3PtrList<KAction>;
- if ( container->inherits( "QPopupMenu" ) )
+ if ( container->inherits( "Q3PopupMenu" ) )
{
@@ -524,3 +526,3 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
//US else if ( container->inherits( "KToolBar" ) )
- else if ( container->inherits( "QToolBar" ) )
+ else if ( container->inherits( "Q3ToolBar" ) )
{
@@ -544,3 +546,3 @@ void KActionCollection::disconnectHighlight( QWidget *container, KAction *action
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
@@ -627,3 +629,3 @@ KAction *KActionCollection::findAction( QWidget *container, int id )
{
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
+ Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
@@ -632,3 +634,3 @@ KAction *KActionCollection::findAction( QWidget *container, int id )
- QPtrListIterator<KAction> it( *actionList );
+ Q3PtrListIterator<KAction> it( *actionList );
for (; it.current(); ++it )
@@ -646,5 +648,5 @@ KActionCollection KActionCollection::operator+(const KActionCollection &c ) cons
- QValueList<KAction *> actions = c.actions();
- QValueList<KAction *>::ConstIterator it = actions.begin();
- QValueList<KAction *>::ConstIterator end = actions.end();
+ Q3ValueList<KAction *> actions = c.actions();
+ Q3ValueList<KAction *>::ConstIterator it = actions.begin();
+ Q3ValueList<KAction *>::ConstIterator end = actions.end();
for (; it != end; ++it )
@@ -672,3 +674,3 @@ KActionCollection &KActionCollection::operator+=( const KActionCollection &c )
kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl;
- QAsciiDictIterator<KAction> it(c.d->m_actionDict);
+ Q3AsciiDictIterator<KAction> it(c.d->m_actionDict);
for ( ; it.current(); ++it )
diff --git a/microkde/kdeui/kactioncollection.h b/microkde/kdeui/kactioncollection.h
index b9466d0..50cb02a 100644
--- a/microkde/kdeui/kactioncollection.h
+++ b/microkde/kdeui/kactioncollection.h
@@ -32,2 +32,4 @@
#include <qobject.h>
+//Added by qt3to4:
+#include <Q3ValueList>
//US#include <qvaluelist.h>
@@ -62,3 +64,3 @@ class QWidget;
-typedef QValueList<KAction *> KActionPtrList;
+typedef Q3ValueList<KAction *> KActionPtrList;
diff --git a/microkde/kdeui/kbuttonbox.cpp b/microkde/kdeui/kbuttonbox.cpp
index 83d622a..3ea6703 100644
--- a/microkde/kdeui/kbuttonbox.cpp
+++ b/microkde/kdeui/kbuttonbox.cpp
@@ -51,3 +51,5 @@
#include <qpushbutton.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QResizeEvent>
#include <assert.h>
@@ -64,3 +66,3 @@ public:
-template class QPtrList<KButtonBox::Item>;
+template class Q3PtrList<KButtonBox::Item>;
@@ -72,6 +74,6 @@ public:
bool activated;
- QPtrList<KButtonBox::Item> buttons;
+ Q3PtrList<KButtonBox::Item> buttons;
};
-KButtonBox::KButtonBox(QWidget *parent, Orientation _orientation,
+KButtonBox::KButtonBox(QWidget *parent, Qt::Orientation _orientation,
int border, int autoborder)
@@ -151,3 +153,3 @@ void KButtonBox::placeButtons() {
- if(data->orientation == Horizontal) {
+ if(data->orientation == Qt::Horizontal) {
// calculate free size and stretches
@@ -253,3 +255,3 @@ QSize KButtonBox::sizeHint() const {
- if(data->orientation == Horizontal)
+ if(data->orientation == Qt::Horizontal)
dw += s.width();
@@ -263,3 +265,3 @@ QSize KButtonBox::sizeHint() const {
- if(data->orientation == Horizontal)
+ if(data->orientation == Qt::Horizontal)
return QSize(dw, bs.height() + 2 * data->border);
@@ -272,3 +274,3 @@ QSizePolicy KButtonBox::sizePolicy() const
{
- return data->orientation == Horizontal?
+ return data->orientation == Qt::Horizontal?
QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) :
diff --git a/microkde/kdeui/kbuttonbox.h b/microkde/kdeui/kbuttonbox.h
index 1104366..2e0f41d 100644
--- a/microkde/kdeui/kbuttonbox.h
+++ b/microkde/kdeui/kbuttonbox.h
@@ -23,2 +23,4 @@
#include <qwidget.h>
+//Added by qt3to4:
+#include <QResizeEvent>
class QPushButton;
@@ -50,3 +52,3 @@ public:
*/
- KButtonBox(QWidget *parent, Orientation _orientation = Horizontal,
+ KButtonBox(QWidget *parent, Qt::Orientation _orientation = Qt::Horizontal,
int border = 0, int _autoborder = 6);
diff --git a/microkde/kdeui/kguiitem.cpp b/microkde/kdeui/kguiitem.cpp
index 828c5e6..c91ffb7 100644
--- a/microkde/kdeui/kguiitem.cpp
+++ b/microkde/kdeui/kguiitem.cpp
@@ -22,3 +22,3 @@
#include <qstring.h>
-#include <qiconset.h>
+#include <qicon.h>
#include <qpixmap.h>
@@ -64,3 +64,3 @@ public:
QString m_iconName;
- QIconSet m_iconSet;
+ QIcon m_iconSet;
bool m_hasIcon : 1;
@@ -84,3 +84,3 @@ KGuiItem::KGuiItem( const QString &text, const QString &iconName,
-KGuiItem::KGuiItem( const QString &text, const QIconSet &iconSet,
+KGuiItem::KGuiItem( const QString &text, const QIcon &iconSet,
const QString &toolTip, const QString &whatsThis )
@@ -126,3 +126,3 @@ QString KGuiItem::plainText() const {
-QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const
+QIcon KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const
{
@@ -150,3 +150,3 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instan
else
- return QIconSet();
+ return QIcon();
}
@@ -179,3 +179,3 @@ void KGuiItem::setText( const QString &text ) {
-void KGuiItem::setIconSet( const QIconSet &iconset )
+void KGuiItem::setIconSet( const QIcon &iconset )
{
@@ -189,3 +189,3 @@ void KGuiItem::setIconName( const QString &iconName )
d->m_iconName = iconName;
- d->m_iconSet = QIconSet();
+ d->m_iconSet = QIcon();
d->m_hasIcon = !iconName.isEmpty();
diff --git a/microkde/kdeui/kguiitem.h b/microkde/kdeui/kguiitem.h
index 0079bb4..6f92137 100644
--- a/microkde/kdeui/kguiitem.h
+++ b/microkde/kdeui/kguiitem.h
@@ -25,5 +25,5 @@
#include <qstring.h>
-#include <qiconset.h>
+#include <qicon.h>
#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
//US#include <kicontheme.h>
@@ -44,3 +44,3 @@ public:
- KGuiItem( const QString &text, const QIconSet &iconSet,
+ KGuiItem( const QString &text, const QIcon &iconSet,
const QString &toolTip = QString::null,
@@ -55,6 +55,6 @@ public:
QString plainText() const;
- QIconSet iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const;
+ QIcon iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const;
#ifndef KDE_NO_COMPAT
- QIconSet iconSet() const { return iconSet( KIcon::Small); }
+ QIcon iconSet() const { return iconSet( KIcon::Small); }
#endif
@@ -71,3 +71,3 @@ public:
void setText( const QString &text );
- void setIconSet( const QIconSet &iconset );
+ void setIconSet( const QIcon &iconset );
void setIconName( const QString &iconName );
diff --git a/microkde/kdeui/kjanuswidget.cpp b/microkde/kdeui/kjanuswidget.cpp
index 462c44f..3d9173d 100644
--- a/microkde/kdeui/kjanuswidget.cpp
+++ b/microkde/kdeui/kjanuswidget.cpp
@@ -24,11 +24,19 @@
#include <qlabel.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
#include <qtabwidget.h>
-#include <qlistview.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qgrid.h>
+#include <q3listview.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
+#include <q3grid.h>
#include <qpainter.h>
-#include <qobjectlist.h>
+#include <qobject.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3PtrList>
+#include <Q3Frame>
+#include <QEvent>
+#include <Q3VBoxLayout>
+#include <QShowEvent>
/*US
@@ -67,9 +75,9 @@
-class KJanusWidget::IconListItem : public QListBoxItem
+class KJanusWidget::IconListItem : public Q3ListBoxItem
{
public:
- IconListItem( QListBox *listbox, const QPixmap &pixmap,
+ IconListItem( Q3ListBox *listbox, const QPixmap &pixmap,
const QString &text );
- virtual int height( const QListBox *lb ) const;
- virtual int width( const QListBox *lb ) const;
+ virtual int height( const Q3ListBox *lb ) const;
+ virtual int width( const Q3ListBox *lb ) const;
int expandMinimumWidth( int width );
@@ -100,3 +108,3 @@ public:
-template class QPtrList<QListViewItem>;
+template class Q3PtrList<Q3ListViewItem>;
@@ -109,3 +117,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this );
if( mFace == TreeList || mFace == IconList )
@@ -114,3 +122,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
- QFrame *page = 0;
+ Q3Frame *page = 0;
if( mFace == TreeList )
@@ -147,3 +155,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
{
- QHBoxLayout *hbox = new QHBoxLayout( topLayout );
+ Q3HBoxLayout *hbox = new Q3HBoxLayout( topLayout );
mIconList = new IconListBox( this );
@@ -158,3 +166,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
hbox->addSpacing( KDialog::marginHint() );
- page = new QFrame( this );
+ page = new Q3Frame( this );
hbox->addWidget( page, 10 );
@@ -167,3 +175,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
- QVBoxLayout *vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ Q3VBoxLayout *vbox = new Q3VBoxLayout( page, 0, KDialog::spacingHint() );
@@ -177,6 +185,6 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
mTitleSep = new KSeparator( page );
- mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain );
+ mTitleSep->setFrameStyle( Q3Frame::HLine|Q3Frame::Plain );
vbox->addWidget( mTitleSep );
- mPageStack = new QWidgetStack( page );
+ mPageStack = new Q3WidgetStack( page );
connect(mPageStack, SIGNAL(aboutToShow(QWidget *)),
@@ -201,3 +209,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
mFace = Plain;
- mPlainPage = new QFrame( this );
+ mPlainPage = new Q3Frame( this );
topLayout->addWidget( mPlainPage, 10 );
@@ -247,3 +255,3 @@ bool KJanusWidget::isValid() const
-QFrame *KJanusWidget::plainPage()
+Q3Frame *KJanusWidget::plainPage()
{
@@ -268,3 +276,3 @@ QWidget *KJanusWidget::FindParent()
-QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
+Q3Frame *KJanusWidget::addPage( const QStringList &items, const QString &header,
const QPixmap &pixmap )
@@ -277,3 +285,3 @@ QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
- QFrame *page = new QFrame( FindParent(), "page" );
+ Q3Frame *page = new Q3Frame( FindParent(), "page" );
addPageWidget( page, items, header, pixmap );
@@ -289,3 +297,3 @@ void KJanusWidget::pageGone( QObject *obj )
-void KJanusWidget::slotReopen( QListViewItem * item )
+void KJanusWidget::slotReopen( Q3ListViewItem * item )
{
@@ -295,3 +303,3 @@ void KJanusWidget::slotReopen( QListViewItem * item )
-QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
+Q3Frame *KJanusWidget::addPage( const QString &itemName, const QString &header,
const QPixmap &pixmap )
@@ -306,3 +314,3 @@ QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
-QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
+Q3VBox *KJanusWidget::addVBoxPage( const QStringList &items,
const QString &header,
@@ -317,3 +325,3 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
- QVBox *page = new QVBox(FindParent() , "vbox_page" );
+ Q3VBox *page = new Q3VBox(FindParent() , "vbox_page" );
page->setSpacing( KDialog::spacingHintSmall() );
@@ -324,3 +332,3 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
-QVBox *KJanusWidget::addVBoxPage( const QString &itemName,
+Q3VBox *KJanusWidget::addVBoxPage( const QString &itemName,
const QString &header,
@@ -333,3 +341,3 @@ QVBox *KJanusWidget::addVBoxPage( const QString &itemName,
-QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
+Q3HBox *KJanusWidget::addHBoxPage( const QStringList &items,
const QString &header,
@@ -342,3 +350,3 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
- QHBox *page = new QHBox(FindParent(), "hbox_page");
+ Q3HBox *page = new Q3HBox(FindParent(), "hbox_page");
page->setSpacing( KDialog::spacingHint() );
@@ -349,3 +357,3 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
-QHBox *KJanusWidget::addHBoxPage( const QString &itemName,
+Q3HBox *KJanusWidget::addHBoxPage( const QString &itemName,
const QString &header,
@@ -358,3 +366,3 @@ QHBox *KJanusWidget::addHBoxPage( const QString &itemName,
-QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
+Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir,
const QStringList &items,
@@ -369,3 +377,3 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
- QGrid *page = new QGrid( n, dir, FindParent(), "page" );
+ Q3Grid *page = new Q3Grid( n, dir, FindParent(), "page" );
page->setSpacing( KDialog::spacingHint() );
@@ -377,3 +385,3 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
-QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
+Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir,
const QString &itemName,
@@ -387,6 +395,6 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
-void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page)
+void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page)
{
bool isTop = true;
- QListViewItem *curTop = 0, *child, *last, *newChild;
+ Q3ListViewItem *curTop = 0, *child, *last, *newChild;
unsigned int index = 1;
@@ -414,5 +422,5 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
if (isTop)
- newChild = new QListViewItem(mTreeList, name);
+ newChild = new Q3ListViewItem(mTreeList, name);
else
- newChild = new QListViewItem(curTop, name);
+ newChild = new Q3ListViewItem(curTop, name);
@@ -433,5 +441,5 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
if (isTop)
- newChild = new QListViewItem(mTreeList, last, name);
+ newChild = new Q3ListViewItem(mTreeList, last, name);
else
- newChild = new QListViewItem(curTop, last, name);
+ newChild = new Q3ListViewItem(curTop, last, name);
}
@@ -461,3 +469,3 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
-void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
+void KJanusWidget::addPageWidget( Q3Frame *page, const QStringList &items,
const QString &header,const QPixmap &pixmap )
@@ -552,3 +560,3 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
}
- QGridLayout *gbox = new QGridLayout( mSwallowPage, 1, 1, 0 );
+ Q3GridLayout *gbox = new Q3GridLayout( mSwallowPage, 1, 1, 0 );
@@ -557,6 +565,6 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
//
- QObjectList *l = (QObjectList*)mSwallowPage->children(); // silence please
- for( uint i=0; i < l->count(); i++ )
+ QObjectList l = mSwallowPage->children(); // silence please
+ for( uint i=0; i < l.count(); i++ )
{
- QObject *o = l->at(i);
+ QObject *o = l.at(i);
if( o->isWidgetType() )
@@ -599,3 +607,3 @@ bool KJanusWidget::slotShowPage()
{
- QListViewItem *node = mTreeList->selectedItem();
+ Q3ListViewItem *node = mTreeList->selectedItem();
if( node == 0 ) { return( false ); }
@@ -608,3 +616,3 @@ bool KJanusWidget::slotShowPage()
{
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( node == 0 ) { return( false ); }
@@ -648,5 +656,5 @@ bool KJanusWidget::showPage( QWidget *w )
{
- QMap<QListViewItem *, QWidget *>::Iterator it;
+ QMap<Q3ListViewItem *, QWidget *>::Iterator it;
for (it = mTreeListToPageStack.begin(); it != mTreeListToPageStack.end(); ++it){
- QListViewItem *key = it.key();
+ Q3ListViewItem *key = it.key();
QWidget *val = it.data();
@@ -660,5 +668,5 @@ bool KJanusWidget::showPage( QWidget *w )
{
- QMap<QListBoxItem *, QWidget *>::Iterator it;
+ QMap<Q3ListBoxItem *, QWidget *>::Iterator it;
for (it = mIconListToPageStack.begin(); it != mIconListToPageStack.end(); ++it){
- QListBoxItem *key = it.key();
+ Q3ListBoxItem *key = it.key();
QWidget *val = it.data();
@@ -688,3 +696,3 @@ int KJanusWidget::activePageIndex() const
if( mFace == TreeList) {
- QListViewItem *node = mTreeList->selectedItem();
+ Q3ListViewItem *node = mTreeList->selectedItem();
if( node == 0 ) { return -1; }
@@ -694,3 +702,3 @@ int KJanusWidget::activePageIndex() const
else if (mFace == IconList) {
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( node == 0 ) { return( false ); }
@@ -763,3 +771,3 @@ void KJanusWidget::slotFontChanged()
// makes the treelist behave like the list of kcontrol
-void KJanusWidget::slotItemClicked(QListViewItem *it)
+void KJanusWidget::slotItemClicked(Q3ListViewItem *it)
{
@@ -897,7 +905,7 @@ void KJanusWidget::unfoldTreeList( bool persist )
if( persist )
- connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ connect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) );
else
- disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ disconnect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) );
- for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
+ for( Q3ListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
item->setOpen( true );
@@ -955,3 +963,3 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
- WFlags f )
+ Qt::WFlags f )
:KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
@@ -967,3 +975,3 @@ void KJanusWidget::IconListBox::updateMinimumHeight()
int h = frameWidth()*2;
- for( QListBoxItem *i = item(0); i != 0; i = i->next() )
+ for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
{
@@ -982,3 +990,3 @@ void KJanusWidget::IconListBox::updateWidth()
int maxWidth = 10;
- for( QListBoxItem *i = item(0); i != 0; i = i->next() )
+ for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
{
@@ -988,3 +996,3 @@ void KJanusWidget::IconListBox::updateWidth()
- for( QListBoxItem *i = item(0); i != 0; i = i->next() )
+ for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
{
@@ -1024,5 +1032,5 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll )
-KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap,
+KJanusWidget::IconListItem::IconListItem( Q3ListBox *listbox, const QPixmap &pixmap,
const QString &text )
- : QListBoxItem( listbox )
+ : Q3ListBoxItem( listbox )
{
@@ -1085,3 +1093,3 @@ void KJanusWidget::IconListItem::paint( QPainter *painter )
-int KJanusWidget::IconListItem::height( const QListBox *lb ) const
+int KJanusWidget::IconListItem::height( const Q3ListBox *lb ) const
{
@@ -1098,3 +1106,3 @@ int KJanusWidget::IconListItem::height( const QListBox *lb ) const
-int KJanusWidget::IconListItem::width( const QListBox *lb ) const
+int KJanusWidget::IconListItem::width( const Q3ListBox *lb ) const
{
@@ -1124,3 +1132,3 @@ void KJanusWidget::removePage( QWidget *page )
{
- QMap<QListViewItem*, QWidget *>::Iterator i;
+ QMap<Q3ListViewItem*, QWidget *>::Iterator i;
for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i )
@@ -1139,3 +1147,3 @@ void KJanusWidget::removePage( QWidget *page )
{
- QMap<QListBoxItem*, QWidget *>::Iterator i;
+ QMap<Q3ListBoxItem*, QWidget *>::Iterator i;
for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i )
diff --git a/microkde/kdeui/kjanuswidget.h b/microkde/kdeui/kjanuswidget.h
index 6d3f23d..72465ea 100644
--- a/microkde/kdeui/kjanuswidget.h
+++ b/microkde/kdeui/kjanuswidget.h
@@ -22,6 +22,12 @@
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qwidget.h>
#include <qmap.h>
-#include <qgrid.h>
+#include <q3grid.h>
+//Added by qt3to4:
+#include <QShowEvent>
+#include <Q3Frame>
+#include <QPixmap>
+#include <QLabel>
+#include <QEvent>
#include <klistbox.h>
@@ -40,8 +46,8 @@ class KSeparator;
class KListView;
-class QWidgetStack;
+class Q3WidgetStack;
class QLabel;
class QTabWidget;
-class QListViewItem;
-class QVBox;
-class QHBox;
+class Q3ListViewItem;
+class Q3VBox;
+class Q3HBox;
@@ -104,3 +110,3 @@ class KJanusWidget : public QWidget
public:
- IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 );
+ IconListBox( QWidget *parent=0, const char *name=0, Qt::WFlags f=0 );
void updateMinimumHeight();
@@ -195,3 +201,3 @@ class KJanusWidget : public QWidget
*/
- virtual QFrame *plainPage();
+ virtual Q3Frame *plainPage();
@@ -216,3 +222,3 @@ class KJanusWidget : public QWidget
*/
- virtual QFrame *addPage(const QString &item,const QString &header=QString::null,
+ virtual Q3Frame *addPage(const QString &item,const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -233,3 +239,3 @@ class KJanusWidget : public QWidget
**/
- virtual QFrame *addPage(const QStringList &items, const QString &header=QString::null,
+ virtual Q3Frame *addPage(const QStringList &items, const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -255,3 +261,3 @@ class KJanusWidget : public QWidget
* Tabbed. */
- virtual QVBox *addVBoxPage( const QString &item,
+ virtual Q3VBox *addVBoxPage( const QString &item,
const QString &header=QString::null,
@@ -271,3 +277,3 @@ class KJanusWidget : public QWidget
**/
- virtual QVBox *addVBoxPage( const QStringList &items,
+ virtual Q3VBox *addVBoxPage( const QStringList &items,
const QString &header=QString::null,
@@ -295,3 +301,3 @@ class KJanusWidget : public QWidget
*/
- virtual QHBox *addHBoxPage( const QString &itemName,
+ virtual Q3HBox *addHBoxPage( const QString &itemName,
const QString &header=QString::null,
@@ -311,3 +317,3 @@ class KJanusWidget : public QWidget
**/
- virtual QHBox *addHBoxPage( const QStringList &items,
+ virtual Q3HBox *addHBoxPage( const QStringList &items,
const QString &header=QString::null,
@@ -339,3 +345,3 @@ class KJanusWidget : public QWidget
//US changed Orientation into Direction for compatibility
- virtual QGrid *addGridPage( int n, QGrid::Direction dir,
+ virtual Q3Grid *addGridPage( int n, Qt::Orientation dir,
const QString &itemName,
@@ -357,3 +363,3 @@ class KJanusWidget : public QWidget
//US changed Orientation into Direction for compatibility
- virtual QGrid *addGridPage( int n, QGrid::Direction dir,
+ virtual Q3Grid *addGridPage( int n, Qt::Orientation dir,
const QStringList &items,
@@ -519,5 +525,5 @@ class KJanusWidget : public QWidget
//US not yet implemented void slotFontChanged();
- void slotItemClicked(QListViewItem *it);
+ void slotItemClicked(Q3ListViewItem *it);
void pageGone( QObject *obj); // signal from the added page's "destroyed" signal
- void slotReopen(QListViewItem *item);
+ void slotReopen(Q3ListViewItem *item);
@@ -525,5 +531,5 @@ class KJanusWidget : public QWidget
bool showPage( QWidget *w );
- void addPageWidget( QFrame *page, const QStringList &items,
+ void addPageWidget( Q3Frame *page, const QStringList &items,
const QString &header, const QPixmap &pixmap );
- void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page);
+ void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page);
QWidget *FindParent();
@@ -534,3 +540,3 @@ class KJanusWidget : public QWidget
// Obsolete members. Remove in KDE 4.
- QPtrList<QWidget> *mPageList;
+ Q3PtrList<QWidget> *mPageList;
QStringList *mTitleList;
@@ -540,6 +546,6 @@ class KJanusWidget : public QWidget
IconListBox *mIconList;
- QWidgetStack *mPageStack;
+ Q3WidgetStack *mPageStack;
QLabel *mTitleLabel;
QTabWidget *mTabControl;
- QFrame *mPlainPage;
+ Q3Frame *mPlainPage;
QWidget *mSwallowPage;
@@ -549,4 +555,4 @@ class KJanusWidget : public QWidget
bool mShowIconsInTreeList;
- QMap<QListViewItem *, QWidget *> mTreeListToPageStack;
- QMap<QListBoxItem *, QWidget *> mIconListToPageStack;
+ QMap<Q3ListViewItem *, QWidget *> mTreeListToPageStack;
+ QMap<Q3ListBoxItem *, QWidget *> mIconListToPageStack;
QMap<QString, QPixmap> mFolderIconMap;
diff --git a/microkde/kdeui/klistbox.cpp b/microkde/kdeui/klistbox.cpp
index c65b892..71020b3 100644
--- a/microkde/kdeui/klistbox.cpp
+++ b/microkde/kdeui/klistbox.cpp
@@ -18,2 +18,7 @@
#include <qtimer.h>
+//Added by qt3to4:
+#include <QEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QFocusEvent>
@@ -28,2 +33,3 @@
#ifdef Q_WS_X11
+#include <QX11Info>
#include <X11/Xlib.h>
@@ -33,4 +39,4 @@
#endif
-KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
- : QListBox( parent, name, f )
+KListBox::KListBox( QWidget *parent, const char *name, Qt::WFlags f )
+ : Q3ListBox( parent, name, f )
{
@@ -38,8 +44,8 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListBoxItem * ) ),
- this, SLOT( slotOnItem( QListBoxItem * ) ) );
+ connect( this, SIGNAL( onItem( Q3ListBoxItem * ) ),
+ this, SLOT( slotOnItem( Q3ListBoxItem * ) ) );
- connect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *,
+ connect( this, SIGNAL( mouseButtonClicked( int, Q3ListBoxItem *,
const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QListBoxItem *,
+ this, SLOT( slotMouseButtonClicked( int, Q3ListBoxItem *,
const QPoint & ) ) );
@@ -62,3 +68,3 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
-void KListBox::slotOnItem( QListBoxItem *item )
+void KListBox::slotOnItem( Q3ListBoxItem *item )
{
@@ -141,3 +147,3 @@ void KListBox::slotAutoSelect()
uint keybstate;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
@@ -145,3 +151,3 @@ void KListBox::slotAutoSelect()
- QListBoxItem* previousItem = item( currentItem() );
+ Q3ListBoxItem* previousItem = item( currentItem() );
setCurrentItem( m_pCurrentItem );
@@ -169,3 +175,3 @@ void KListBox::slotAutoSelect()
bool down = index( previousItem ) < index( m_pCurrentItem );
- QListBoxItem* it = down ? previousItem : m_pCurrentItem;
+ Q3ListBoxItem* it = down ? previousItem : m_pCurrentItem;
for (;it ; it = it->next() ) {
@@ -188,3 +194,3 @@ void KListBox::slotAutoSelect()
- if( selectionMode() == QListBox::Single )
+ if( selectionMode() == Q3ListBox::Single )
emit selectionChanged( m_pCurrentItem );
@@ -215,3 +221,3 @@ void KListBox::slotAutoSelect()
-void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
+void KListBox::emitExecute( Q3ListBoxItem *item, const QPoint &pos )
{
@@ -222,3 +228,3 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
uint keybstate;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
@@ -248,3 +254,3 @@ void KListBox::keyPressEvent(QKeyEvent *e)
{
- if( e->key() == Key_Escape )
+ if( e->key() == Qt::Key_Escape )
{
@@ -252,3 +258,3 @@ void KListBox::keyPressEvent(QKeyEvent *e)
}
- else if( e->key() == Key_F1 )
+ else if( e->key() == Qt::Key_F1 )
{
@@ -258,3 +264,3 @@ void KListBox::keyPressEvent(QKeyEvent *e)
{
- QListBox::keyPressEvent(e);
+ Q3ListBox::keyPressEvent(e);
}
@@ -266,3 +272,3 @@ void KListBox::focusOutEvent( QFocusEvent *fe )
- QListBox::focusOutEvent( fe );
+ Q3ListBox::focusOutEvent( fe );
}
@@ -273,3 +279,3 @@ void KListBox::leaveEvent( QEvent *e )
- QListBox::leaveEvent( e );
+ Q3ListBox::leaveEvent( e );
}
@@ -278,3 +284,3 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
{
- if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
+ if( (selectionMode() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) ) {
bool block = signalsBlocked();
@@ -287,3 +293,3 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
- QListBox::contentsMousePressEvent( e );
+ Q3ListBox::contentsMousePressEvent( e );
}
@@ -292,5 +298,5 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
{
- QListBox::contentsMouseDoubleClickEvent( e );
+ Q3ListBox::contentsMouseDoubleClickEvent( e );
- QListBoxItem* item = itemAt( e->pos() );
+ Q3ListBoxItem* item = itemAt( e->pos() );
@@ -299,3 +305,3 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
- if( (e->button() == LeftButton) && !m_bUseSingle )
+ if( (e->button() == Qt::LeftButton) && !m_bUseSingle )
emitExecute( item, e->globalPos() );
@@ -304,5 +310,5 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
-void KListBox::slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos )
+void KListBox::slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos )
{
- if( (btn == LeftButton) && item )
+ if( (btn == Qt::LeftButton) && item )
emitExecute( item, pos );
diff --git a/microkde/kdeui/klistbox.h b/microkde/kdeui/klistbox.h
index 8023780..5ec514b 100644
--- a/microkde/kdeui/klistbox.h
+++ b/microkde/kdeui/klistbox.h
@@ -20,3 +20,8 @@
-#include <qlistbox.h>
+#include <q3listbox.h>
+//Added by qt3to4:
+#include <QMouseEvent>
+#include <QFocusEvent>
+#include <QKeyEvent>
+#include <QEvent>
@@ -37,3 +42,3 @@
**/
-class KListBox : public QListBox
+class KListBox : public Q3ListBox
{
@@ -42,3 +47,3 @@ class KListBox : public QListBox
public:
- KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KListBox( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
@@ -56,3 +61,3 @@ signals:
*/
- void executed( QListBoxItem *item );
+ void executed( Q3ListBoxItem *item );
@@ -69,3 +74,3 @@ signals:
*/
- void executed( QListBoxItem *item, const QPoint &pos );
+ void executed( Q3ListBoxItem *item, const QPoint &pos );
@@ -85,6 +90,6 @@ signals:
*/
- void doubleClicked( QListBoxItem *item, const QPoint &pos );
+ void doubleClicked( Q3ListBoxItem *item, const QPoint &pos );
protected slots:
- void slotOnItem( QListBoxItem *item );
+ void slotOnItem( Q3ListBoxItem *item );
void slotOnViewport();
@@ -99,3 +104,3 @@ protected slots:
protected:
- void emitExecute( QListBoxItem *item, const QPoint &pos );
+ void emitExecute( Q3ListBoxItem *item, const QPoint &pos );
@@ -125,3 +130,3 @@ protected:
- QListBoxItem* m_pCurrentItem;
+ Q3ListBoxItem* m_pCurrentItem;
@@ -131,3 +136,3 @@ protected:
private slots:
- void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos );
+ void slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos );
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 60f3084..0e98160 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -20,5 +20,5 @@
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qtimer.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qcursor.h>
@@ -27,2 +27,16 @@
#include <qpainter.h>
+//Added by qt3to4:
+#include <QDragLeaveEvent>
+#include <QKeyEvent>
+#include <Q3ValueList>
+#include <Q3PtrList>
+#include <QPixmap>
+#include <QDragEnterEvent>
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QEvent>
+#include <QPaintEvent>
@@ -40,3 +54,3 @@
#define private public
-#include <qlistview.h>
+#include <q3listview.h>
#undef private
@@ -48,5 +62,6 @@
#endif
+#include <Q3Action>
// /*US
-class KListView::Tooltip : public QToolTip
+class KListView::Tooltip /* TODO:hacker:TODO: : public QToolTip */
{
@@ -69,3 +84,3 @@ private:
KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group)
- : QToolTip (parent, group),
+ : /* XXX:hacker:XXX: QToolTip (parent, group), */
mParent (parent)
@@ -125,3 +140,3 @@ public:
- QListViewItem* pCurrentItem;
+ Q3ListViewItem* pCurrentItem;
@@ -131,3 +146,3 @@ public:
QTimer dragExpand;
- QListViewItem* dragOverItem;
+ Q3ListViewItem* dragOverItem;
QPoint dragOverPoint;
@@ -138,3 +153,3 @@ public:
//US KListViewLineEdit *editor;
- QValueList<int> renameable;
+ Q3ValueList<int> renameable;
@@ -172,4 +187,4 @@ public:
QRect mOldDropHighlighter;
- QListViewItem *afterItemDrop;
- QListViewItem *parentItemDrop;
+ Q3ListViewItem *afterItemDrop;
+ Q3ListViewItem *parentItemDrop;
@@ -228,3 +243,3 @@ void KListViewLineEdit::load(QListViewItem *i, int c)
-static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
+static int nextCol (KListView *pl, Q3ListViewItem *pi, int start, int dir)
{
@@ -241,5 +256,5 @@ static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
-static QListViewItem *prevItem (QListViewItem *pi)
+static Q3ListViewItem *prevItem (Q3ListViewItem *pi)
{
- QListViewItem *pa = pi->itemAbove();
+ Q3ListViewItem *pa = pi->itemAbove();
@@ -254,3 +269,3 @@ static QListViewItem *prevItem (QListViewItem *pi)
-static QListViewItem *lastQChild (QListViewItem *pi)
+static Q3ListViewItem *lastQChild (Q3ListViewItem *pi)
{
@@ -262,3 +277,3 @@ static QListViewItem *lastQChild (QListViewItem *pi)
*/
- for (QListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
+ for (Q3ListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
pi = pt;
@@ -330,6 +345,6 @@ bool KListViewLineEdit::event (QEvent *pe)
p->tabOrderedRenaming() && p->itemsRenameable() &&
- !(k->state() & ControlButton || k->state() & AltButton))
+ !(k->state() & Qt::ControlButton || k->state() & AltButton))
{
selectNextCell(item, col,
- (k->key() == Key_Tab && !(k->state() & ShiftButton)));
+ (k->key() == Key_Tab && !(k->state() & Qt::ShiftButton)));
return true;
@@ -408,3 +423,3 @@ void KListViewLineEdit::slotSelectionChanged()
KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse )
- : QListView( parent, name ),
+ : Q3ListView( parent, name ),
d (new KListViewPrivate (this))
@@ -419,4 +434,4 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListViewItem * ) ),
- this, SLOT( slotOnItem( QListViewItem * ) ) );
+ connect( this, SIGNAL( onItem( Q3ListViewItem * ) ),
+ this, SLOT( slotOnItem( Q3ListViewItem * ) ) );
@@ -447,4 +462,4 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
{
- connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, SIGNAL (rightButtonPressed (Q3ListViewItem*, const QPoint&, int)),
+ this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int)));
}
@@ -452,8 +467,8 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
{
- connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, SIGNAL (rightButtonClicked (Q3ListViewItem*, const QPoint&, int)),
+ this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int)));
}
- connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)),
- this, SLOT (emitContextMenu (KListView*, QListViewItem*)));
+ connect (this, SIGNAL (menuShortCutPressed (KListView*, Q3ListViewItem*)),
+ this, SLOT (emitContextMenu (KListView*, Q3ListViewItem*)));
@@ -482,3 +497,3 @@ QSize KListView::sizeHint() const
#ifdef DESKTOP_VERSION
- return QListView::sizeHint();
+ return Q3ListView::sizeHint();
#else
@@ -505,3 +520,3 @@ bool KListView::isExecuteArea( int x )
-void KListView::slotOnItem( QListViewItem *item )
+void KListView::slotOnItem( Q3ListViewItem *item )
{
@@ -536,8 +551,8 @@ void KListView::slotSettingsChanged(int category)
- disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int)));
+ disconnect(this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)),
+ this, SLOT (slotMouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)));
if( d->bUseSingle )
- connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int)));
+ connect (this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)),
+ this, SLOT (slotMouseButtonClicked( int, Q3ListViewItem*, const QPoint &, int)));
@@ -613,3 +628,3 @@ void KListView::slotAutoSelect()
- QListViewItem* previousItem = currentItem();
+ Q3ListViewItem* previousItem = currentItem();
setCurrentItem( d->pCurrentItem );
@@ -634,3 +649,3 @@ void KListView::slotAutoSelect()
bool down = previousItem->itemPos() < d->pCurrentItem->itemPos();
- QListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
+ Q3ListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
for ( ; lit.current(); ++lit ) {
@@ -653,3 +668,3 @@ void KListView::slotAutoSelect()
- if( selectionMode() == QListView::Single )
+ if( selectionMode() == Q3ListView::Single )
emit selectionChanged( d->pCurrentItem );
@@ -686,3 +701,3 @@ void KListView::slotHeaderChanged()
-void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c)
+void KListView::emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c)
{
@@ -703,3 +718,3 @@ void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint
//Dont emit executed if in SC mode and Shift or Ctrl are pressed
- if( !( (buttonstate==ShiftButton) || (buttonstate==ControlButton) )) {
+ if( !( (buttonstate==Qt::ShiftButton) || (buttonstate==Qt::ControlButton) )) {
// if( !( ((keybstate & ShiftMask) || (keybstate & ControlMask)) ) ) {
@@ -716,3 +731,3 @@ void KListView::focusInEvent( QFocusEvent *fe )
// kdDebug()<<"KListView::focusInEvent()"<<endl;
- QListView::focusInEvent( fe );
+ Q3ListView::focusInEvent( fe );
if ((d->selectedBySimpleMove)
@@ -749,3 +764,3 @@ void KListView::focusOutEvent( QFocusEvent *fe )
- QListView::focusOutEvent( fe );
+ Q3ListView::focusOutEvent( fe );
}
@@ -756,3 +771,3 @@ void KListView::leaveEvent( QEvent *e )
- QListView::leaveEvent( e );
+ Q3ListView::leaveEvent( e );
}
@@ -767,3 +782,3 @@ bool KListView::event( QEvent *e )
- return QListView::event(e);
+ return Q3ListView::event(e);
}
@@ -773,3 +788,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
//qDebug("KListView::contentsMousePressEvent");
- if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) )
+ if( (selectionModeExt() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) )
{
@@ -795,3 +810,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ Q3ListViewItem *at = itemAt (p);
@@ -803,3 +818,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
- if (e->button() == LeftButton && !rootDecoClicked)
+ if (e->button() == Qt::LeftButton && !rootDecoClicked)
{
@@ -815,3 +830,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
- QListView::contentsMousePressEvent( e );
+ Q3ListView::contentsMousePressEvent( e );
}
@@ -821,3 +836,3 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) {
- QListView::contentsMouseMoveEvent (e);
+ Q3ListView::contentsMouseMoveEvent (e);
return;
@@ -826,3 +841,3 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
+ Q3ListViewItem *item = itemAt( vp );
@@ -855,3 +870,3 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
{
- QListView::contentsMouseReleaseEvent( 0 );
+ Q3ListView::contentsMouseReleaseEvent( 0 );
startDrag();
@@ -864,3 +879,3 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
{
- if (e->button() == LeftButton)
+ if (e->button() == Qt::LeftButton)
{
@@ -870,3 +885,3 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ Q3ListViewItem *at = itemAt (p);
if ( at )
@@ -892,3 +907,3 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
}
- QListView::contentsMouseReleaseEvent( e );
+ Q3ListView::contentsMouseReleaseEvent( e );
}
@@ -903,4 +918,4 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
- emit QListView::doubleClicked( item ); // we do it now
+ Q3ListViewItem *item = itemAt( vp );
+ emit Q3ListView::doubleClicked( item ); // we do it now
@@ -913,3 +928,3 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
- if( (e->button() == LeftButton) && !d->bUseSingle ) {
+ if( (e->button() == Qt::LeftButton) && !d->bUseSingle ) {
//qDebug("KListView::contentsMouseDoubleClickEvent: emitExecute");
@@ -921,3 +936,3 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
-void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c )
+void KListView::slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c )
{
@@ -925,3 +940,3 @@ void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoi
- if( (btn == LeftButton) && item ) {
+ if( (btn == Qt::LeftButton) && item ) {
//qDebug("KListView::slotMouseButtonClicked: emitExecute");
@@ -963,8 +978,8 @@ qDebug("KListView::contentsDropEvent drag&drop not supported yet");
-void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
+void KListView::movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme)
{
- QPtrList<QListViewItem> items, afterFirsts, afterNows;
- QListViewItem *current=currentItem();
+ Q3PtrList<Q3ListViewItem> items, afterFirsts, afterNows;
+ Q3ListViewItem *current=currentItem();
bool hasMoved=false;
- for (QListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext)
+ for (Q3ListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext)
{
@@ -981,3 +996,3 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
- QListViewItem *afterFirst = i->itemAbove();
+ Q3ListViewItem *afterFirst = i->itemAbove();
@@ -1002,3 +1017,3 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
clearSelection();
- for (QListViewItem *i=items.first(); i != 0; i=items.next() )
+ for (Q3ListViewItem *i=items.first(); i != 0; i=items.next() )
i->setSelected(true);
@@ -1088,3 +1103,3 @@ int KListView::depthToPixels( int depth )
-void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void KListView::findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after)
{
@@ -1093,5 +1108,5 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
// Get the position to put it in
- QListViewItem *atpos = itemAt(p);
+ Q3ListViewItem *atpos = itemAt(p);
- QListViewItem *above;
+ Q3ListViewItem *above;
if (!atpos) // put it at the end
@@ -1125,4 +1140,4 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
// sibling, but of an upper-level group, rather than the "above" item
- QListViewItem * betterAbove = above->parent();
- QListViewItem * last = above;
+ Q3ListViewItem * betterAbove = above->parent();
+ Q3ListViewItem * last = above;
while ( betterAbove )
@@ -1148,5 +1163,5 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
-QListViewItem* KListView::lastChild () const
+Q3ListViewItem* KListView::lastChild () const
{
- QListViewItem* lastchild = firstChild();
+ Q3ListViewItem* lastchild = firstChild();
@@ -1158,7 +1173,7 @@ QListViewItem* KListView::lastChild () const
-QListViewItem *KListView::lastItem() const
+Q3ListViewItem *KListView::lastItem() const
{
- QListViewItem* last = lastChild();
+ Q3ListViewItem* last = lastChild();
- for (QListViewItemIterator it (last); it.current(); ++it)
+ for (Q3ListViewItemIterator it (last); it.current(); ++it)
last = it.current();
@@ -1189,3 +1204,3 @@ qDebug("KListView::startDrag drag&drop not supported yet.");
-QDragObject *KListView::dragObject()
+Q3DragObject *KListView::dragObject()
{
@@ -1194,3 +1209,3 @@ QDragObject *KListView::dragObject()
- return new QStoredDrag("application/x-qlistviewitem", viewport());
+ return new Q3StoredDrag("application/x-qlistviewitem", viewport());
}
@@ -1248,6 +1263,6 @@ void KListView::setDropVisualizer(bool b)
-QPtrList<QListViewItem> KListView::selectedItems() const
+Q3PtrList<Q3ListViewItem> KListView::selectedItems() const
{
- QPtrList<QListViewItem> list;
- for (QListViewItem *i=firstChild(); i!=0; i=i->itemBelow())
+ Q3PtrList<Q3ListViewItem> list;
+ for (Q3ListViewItem *i=firstChild(); i!=0; i=i->itemBelow())
if (i->isSelected()) list.append(i);
@@ -1257,6 +1272,6 @@ QPtrList<QListViewItem> KListView::selectedItems() const
-void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after)
+void KListView::moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after)
{
// sanity check - don't move a item into it's own child structure
- QListViewItem *i = parent;
+ Q3ListViewItem *i = parent;
while(i)
@@ -1298,4 +1313,4 @@ void KListView::setDropVisualizerWidth (int w)
-QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
- QListViewItem *after)
+QRect KListView::drawDropVisualizer(QPainter *p, Q3ListViewItem *parent,
+ Q3ListViewItem *after)
{
@@ -1310,3 +1325,3 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
{
- QListViewItem* it = 0L;
+ Q3ListViewItem* it = 0L;
if (after->isOpen())
@@ -1340,3 +1355,3 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
if (p)
- p->fillRect(insertmarker, Dense4Pattern);
+ p->fillRect(insertmarker, Qt::Dense4Pattern);
@@ -1345,3 +1360,3 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
-QRect KListView::drawItemHighlighter(QPainter *painter, QListViewItem *item)
+QRect KListView::drawItemHighlighter(QPainter *painter, Q3ListViewItem *item)
{
@@ -1378,3 +1393,3 @@ void KListView::cleanItemHighlighter ()
-void KListView::rename(QListViewItem *item, int c)
+void KListView::rename(Q3ListViewItem *item, int c)
{
@@ -1405,3 +1420,3 @@ void KListView::setRenameable (int col, bool yesno)
-void KListView::doneEditing(QListViewItem *item, int row)
+void KListView::doneEditing(Q3ListViewItem *item, int row)
{
@@ -1449,3 +1464,3 @@ bool KListView::dropHighlighter() const
-bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) const
+bool KListView::showTooltip(Q3ListViewItem *item, const QPoint &, int column) const
{
@@ -1454,3 +1469,3 @@ bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) con
-QString KListView::tooltip(QListViewItem *item, int column) const
+QString KListView::tooltip(Q3ListViewItem *item, int column) const
{
@@ -1484,3 +1499,3 @@ void KListView::keyPressEvent (QKeyEvent* e)
if (d->selectionMode != FileManager)
- QListView::keyPressEvent (e);
+ Q3ListView::keyPressEvent (e);
else
@@ -1515,3 +1530,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
//don't care whether it's on the keypad or not
- int e_state=(e->state() & ~Keypad);
+ int e_state=(e->state() & ~Qt::Keypad);
@@ -1519,27 +1534,27 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- if ((e->key()!=Key_Shift) && (e->key()!=Key_Control)
- && (e->key()!=Key_Meta) && (e->key()!=Key_Alt))
+ if ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control)
+ && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt))
{
- if ((e_state==ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove))
+ if ((e_state==Qt::ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove))
selectAll(FALSE);
d->selectionDirection=0;
- d->wasShiftEvent = (e_state == ShiftButton);
+ d->wasShiftEvent = (e_state == Qt::ShiftButton);
};
- //d->wasShiftEvent = (e_state == ShiftButton);
+ //d->wasShiftEvent = (e_state == Qt::ShiftButton);
- QListViewItem* item = currentItem();
+ Q3ListViewItem* item = currentItem();
if (item==0) return;
- QListViewItem* repaintItem1 = item;
- QListViewItem* repaintItem2 = 0L;
- QListViewItem* visItem = 0L;
+ Q3ListViewItem* repaintItem1 = item;
+ Q3ListViewItem* repaintItem2 = 0L;
+ Q3ListViewItem* visItem = 0L;
- QListViewItem* nextItem = 0L;
+ Q3ListViewItem* nextItem = 0L;
int items = 0;
- bool shiftOrCtrl((e_state==ControlButton) || (e_state==ShiftButton));
+ bool shiftOrCtrl((e_state==Qt::ControlButton) || (e_state==Qt::ShiftButton));
int selectedItems(0);
- for (QListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling())
+ for (Q3ListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling())
if (tmpItem->isSelected()) selectedItems++;
@@ -1547,9 +1562,9 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
if (((selectedItems==0) || ((selectedItems==1) && (d->selectedUsingMouse)))
- && (e_state==NoButton)
- && ((e->key()==Key_Down)
- || (e->key()==Key_Up)
- || (e->key()==Key_Next)
- || (e->key()==Key_Prior)
- || (e->key()==Key_Home)
- || (e->key()==Key_End)))
+ && (e_state==Qt::NoButton)
+ && ((e->key()==Qt::Key_Down)
+ || (e->key()==Qt::Key_Up)
+ || (e->key()==Qt::Key_Next)
+ || (e->key()==Qt::Key_Prior)
+ || (e->key()==Qt::Key_Home)
+ || (e->key()==Qt::Key_End)))
{
@@ -1565,3 +1580,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
{
- case Key_Escape:
+ case Qt::Key_Escape:
selectAll(FALSE);
@@ -1570,3 +1585,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Space:
+ case Qt::Key_Space:
//toggle selection of current item
@@ -1578,3 +1593,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Insert:
+ case Qt::Key_Insert:
//toggle selection of current item and move to the next item
@@ -1602,3 +1617,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Down:
+ case Qt::Key_Down:
nextItem=item->itemBelow();
@@ -1635,3 +1650,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Up:
+ case Qt::Key_Up:
nextItem=item->itemAbove();
@@ -1670,3 +1685,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_End:
+ case Qt::Key_End:
//move to the last item and toggle selection of all items inbetween
@@ -1695,3 +1710,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Home:
+ case Qt::Key_Home:
// move to the first item and toggle selection of all items inbetween
@@ -1717,3 +1732,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Next:
+ case Qt::Key_Next:
items=visibleHeight()/item->height();
@@ -1753,3 +1768,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Prior:
+ case Qt::Key_Prior:
items=visibleHeight()/item->height();
@@ -1787,3 +1802,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
- case Key_Minus:
+ case Qt::Key_Minus:
if ( item->isOpen() )
@@ -1791,3 +1806,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Plus:
+ case Qt::Key_Plus:
if ( !item->isOpen() && (item->isExpandable() || item->childCount()) )
@@ -1796,4 +1811,4 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
default:
- bool realKey = ((e->key()!=Key_Shift) && (e->key()!=Key_Control)
- && (e->key()!=Key_Meta) && (e->key()!=Key_Alt));
+ bool realKey = ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control)
+ && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt));
@@ -1803,5 +1818,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
//this is mainly for the "goto filename beginning with pressed char" feature (aleXXX)
- QListView::SelectionMode oldSelectionMode = selectionMode();
- setSelectionMode (QListView::Multi);
- QListView::keyPressEvent (e);
+ Q3ListView::SelectionMode oldSelectionMode = selectionMode();
+ setSelectionMode (Q3ListView::Multi);
+ Q3ListView::keyPressEvent (e);
setSelectionMode (oldSelectionMode);
@@ -1852,3 +1867,3 @@ void KListView::setSelectionModeExt (SelectionModeExt mode)
case NoSelection:
- setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode)));
+ setSelectionMode (static_cast<Q3ListView::SelectionMode>(static_cast<int>(mode)));
break;
@@ -1856,3 +1871,3 @@ void KListView::setSelectionModeExt (SelectionModeExt mode)
case FileManager:
- setSelectionMode (QListView::Extended);
+ setSelectionMode (Q3ListView::Extended);
break;
@@ -1870,3 +1885,3 @@ KListView::SelectionModeExt KListView::selectionModeExt () const
-int KListView::itemIndex( const QListViewItem *item ) const
+int KListView::itemIndex( const Q3ListViewItem *item ) const
{
@@ -1878,3 +1893,3 @@ int KListView::itemIndex( const QListViewItem *item ) const
else {
- QListViewItemIterator it(firstChild());
+ Q3ListViewItemIterator it(firstChild());
uint j = 0;
@@ -1889,3 +1904,3 @@ int KListView::itemIndex( const QListViewItem *item ) const
-QListViewItem* KListView::itemAtIndex(int index)
+Q3ListViewItem* KListView::itemAtIndex(int index)
{
@@ -1895,3 +1910,3 @@ QListViewItem* KListView::itemAtIndex(int index)
int j(0);
- for (QListViewItemIterator it=firstChild(); it.current(); it++)
+ for (Q3ListViewItemIterator it=firstChild(); it.current(); it++)
{
@@ -1905,3 +1920,3 @@ QListViewItem* KListView::itemAtIndex(int index)
-void KListView::emitContextMenu (KListView*, QListViewItem* i)
+void KListView::emitContextMenu (KListView*, Q3ListViewItem* i)
{
@@ -1918,5 +1933,5 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i)
-void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col)
+void KListView::emitContextMenu (Q3ListViewItem* i, const QPoint& p, int col)
{
- QListViewItem* item = i;
+ Q3ListViewItem* item = i;
int c = col;
@@ -1935,3 +1950,3 @@ void KListView::setAcceptDrops (bool val)
{
- QListView::setAcceptDrops (val);
+ Q3ListView::setAcceptDrops (val);
viewport()->setAcceptDrops (val);
@@ -1947,3 +1962,3 @@ void KListView::viewportPaintEvent(QPaintEvent *e)
{
- QListView::viewportPaintEvent(e);
+ Q3ListView::viewportPaintEvent(e);
@@ -1954,3 +1969,3 @@ void KListView::viewportPaintEvent(QPaintEvent *e)
// This is where we actually draw the drop-visualizer
- painter.fillRect(d->mOldDropVisualizer, Dense4Pattern);
+ painter.fillRect(d->mOldDropVisualizer, Qt::Dense4Pattern);
}
@@ -1990,3 +2005,3 @@ int KListView::addColumn(const QString& label, int width)
{
- int result = QListView::addColumn(label, width);
+ int result = Q3ListView::addColumn(label, width);
if (d->fullWidth) {
@@ -1998,5 +2013,5 @@ int KListView::addColumn(const QString& label, int width)
-int KListView::addColumn(const QIconSet& iconset, const QString& label, int width)
+int KListView::addColumn(const QIcon& iconset, const QString& label, int width)
{
- int result = QListView::addColumn(iconset, label, width);
+ int result = Q3ListView::addColumn(iconset, label, width);
if (d->fullWidth) {
@@ -2010,3 +2025,3 @@ void KListView::removeColumn(int index)
{
- QListView::removeColumn(index);
+ Q3ListView::removeColumn(index);
//US if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1);
@@ -2016,3 +2031,3 @@ void KListView::viewportResizeEvent(QResizeEvent* e)
{
- QListView::viewportResizeEvent(e);
+ Q3ListView::viewportResizeEvent(e);
}
@@ -2072,3 +2087,3 @@ void KListView::setSorting(int column, bool ascending)
d->sortAscending = ascending;
- QListView::setSorting(column, ascending);
+ Q3ListView::setSorting(column, ascending);
}
@@ -2085,4 +2100,4 @@ bool KListView::ascendingSort(void) const
-KListViewItem::KListViewItem(QListView *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(Q3ListView *parent)
+ : Q3ListViewItem(parent)
{
@@ -2091,4 +2106,4 @@ KListViewItem::KListViewItem(QListView *parent)
-KListViewItem::KListViewItem(QListViewItem *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(Q3ListViewItem *parent)
+ : Q3ListViewItem(parent)
{
@@ -2097,4 +2112,4 @@ KListViewItem::KListViewItem(QListViewItem *parent)
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after)
+ : Q3ListViewItem(parent, after)
{
@@ -2103,4 +2118,4 @@ KListViewItem::KListViewItem(QListView *parent, QListViewItem *after)
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after)
+ : Q3ListViewItem(parent, after)
{
@@ -2109,6 +2124,6 @@ KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after)
-KListViewItem::KListViewItem(QListView *parent,
+KListViewItem::KListViewItem(Q3ListView *parent,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
{
@@ -2117,6 +2132,6 @@ KListViewItem::KListViewItem(QListView *parent,
-KListViewItem::KListViewItem(QListViewItem *parent,
+KListViewItem::KListViewItem(Q3ListViewItem *parent,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
{
@@ -2125,6 +2140,6 @@ KListViewItem::KListViewItem(QListViewItem *parent,
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after,
+KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
{
@@ -2133,6 +2148,6 @@ KListViewItem::KListViewItem(QListView *parent, QListViewItem *after,
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after,
+KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
{
@@ -2214,3 +2229,3 @@ void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in
//US if (listView()->viewport()->backgroundMode()==Qt::FixedColor)
- if (listView()->viewport()->backgroundMode()==QWidget::PaletteBackground)
+ if (listView()->viewport()->backgroundMode()==Qt::PaletteBackground)
_cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
@@ -2219,3 +2234,3 @@ void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in
}
- QListViewItem::paintCell(p, _cg, column, width, alignment);
+ Q3ListViewItem::paintCell(p, _cg, column, width, alignment);
}
diff --git a/microkde/kdeui/klistview.h b/microkde/kdeui/klistview.h
index 9f0d9fd..2176525 100644
--- a/microkde/kdeui/klistview.h
+++ b/microkde/kdeui/klistview.h
@@ -22,5 +22,16 @@
-#include <qlistview.h>
-
-#include <qptrlist.h>
+#include <q3listview.h>
+
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QDragLeaveEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
+#include <QDragEnterEvent>
@@ -32,3 +43,3 @@ class QDragEnterEvent;
-class QDragObject;
+class Q3DragObject;
class KConfig;
@@ -59,3 +70,3 @@ class KLineEdit;
*/
-class KListView : public QListView
+class KListView : public Q3ListView
{
@@ -108,6 +119,6 @@ public:
enum SelectionModeExt {
- Single = QListView::Single,
- Multi = QListView::Multi,
- Extended = QListView::Extended,
- NoSelection = QListView::NoSelection,
+ Single = Q3ListView::Single,
+ Multi = Q3ListView::Multi,
+ Extended = Q3ListView::Extended,
+ NoSelection = Q3ListView::NoSelection,
FileManager
@@ -116,3 +127,3 @@ public:
{
- QScrollView::repaintContents( contentsX(), contentsY(),
+ Q3ScrollView::repaintContents( contentsX(), contentsY(),
visibleWidth(), visibleHeight(), erase );
@@ -163,3 +174,3 @@ public:
*/
- QPtrList<QListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?)
+ Q3PtrList<Q3ListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?)
@@ -168,3 +179,3 @@ public:
*/
- void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after);
+ void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after);
@@ -175,3 +186,3 @@ public:
*/
- QListViewItem *lastItem() const;
+ Q3ListViewItem *lastItem() const;
@@ -182,3 +193,3 @@ public:
*/
- QListViewItem* lastChild () const;
+ Q3ListViewItem* lastChild () const;
@@ -278,3 +289,3 @@ public:
*/
- int itemIndex( const QListViewItem *item ) const;
+ int itemIndex( const Q3ListViewItem *item ) const;
@@ -285,3 +296,3 @@ public:
*/
- QListViewItem* itemAtIndex(int index);
+ Q3ListViewItem* itemAtIndex(int index);
@@ -316,3 +327,3 @@ public:
*/
- virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1);
+ virtual int addColumn(const QIcon& iconset, const QString& label, int width = -1);
/**
@@ -390,3 +401,3 @@ signals:
*/
- void executed( QListViewItem *item );
+ void executed( Q3ListViewItem *item );
@@ -403,3 +414,3 @@ signals:
*/
- void executed( QListViewItem *item, const QPoint &pos, int c );
+ void executed( Q3ListViewItem *item, const QPoint &pos, int c );
@@ -419,4 +430,4 @@ signals:
*/
- void doubleClicked( QListViewItem *item, const QPoint &pos, int c );
- void contextRequest( QListViewItem *item, const QPoint &pos, int c );
+ void doubleClicked( Q3ListViewItem *item, const QPoint &pos, int c );
+ void contextRequest( Q3ListViewItem *item, const QPoint &pos, int c );
@@ -432,3 +443,3 @@ signals:
*/
- void dropped (QDropEvent * e, QListViewItem *after);
+ void dropped (QDropEvent * e, Q3ListViewItem *after);
@@ -446,3 +457,3 @@ signals:
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* after);
+ void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after);
@@ -460,3 +471,3 @@ signals:
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
@@ -473,3 +484,3 @@ signals:
*/
- void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
@@ -504,3 +515,3 @@ signals:
*/
- void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow);
+ void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow);
@@ -512,3 +523,3 @@ signals:
*/
- void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow);
+ void moved(Q3PtrList<Q3ListViewItem> &items, Q3PtrList<Q3ListViewItem> &afterFirst, Q3PtrList<Q3ListViewItem> &afterNow);
@@ -521,3 +532,3 @@ signals:
*/
- void itemRenamed(QListViewItem* item, const QString &str, int col);
+ void itemRenamed(Q3ListViewItem* item, const QString &str, int col);
@@ -526,3 +537,3 @@ signals:
*/
- void itemRenamed(QListViewItem* item);
+ void itemRenamed(Q3ListViewItem* item);
void signalDelete();
@@ -539,3 +550,3 @@ signals:
*/
- void menuShortCutPressed (KListView* list, QListViewItem* item);
+ void menuShortCutPressed (KListView* list, Q3ListViewItem* item);
@@ -549,3 +560,3 @@ signals:
*/
- void contextMenu (KListView* l, QListViewItem* i, const QPoint& p);
+ void contextMenu (KListView* l, Q3ListViewItem* i, const QPoint& p);
@@ -555,3 +566,3 @@ public slots:
*/
- virtual void rename(QListViewItem *item, int c);
+ virtual void rename(Q3ListViewItem *item, int c);
@@ -675,3 +686,3 @@ protected:
*/
- inline bool below (QListViewItem* i, const QPoint& p)
+ inline bool below (Q3ListViewItem* i, const QPoint& p)
{
@@ -691,3 +702,3 @@ protected:
//US I added buttonstate to pass the current keyboard status
- void emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c);
+ void emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c);
@@ -723,3 +734,3 @@ protected:
*/
- virtual QString tooltip(QListViewItem* item, int column) const;
+ virtual QString tooltip(Q3ListViewItem* item, int column) const;
@@ -728,3 +739,3 @@ protected:
*/
- virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const;
+ virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const;
@@ -807,3 +818,3 @@ protected:
*/
- virtual QDragObject *dragObject();
+ virtual Q3DragObject *dragObject();
@@ -823,3 +834,3 @@ protected:
*/
- virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after);
+ virtual QRect drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after);
@@ -831,3 +842,3 @@ protected:
*/
- virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item);
+ virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item);
@@ -888,4 +899,4 @@ protected slots:
- void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c );
- void doneEditing(QListViewItem *item, int row);
+ void slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c );
+ void doneEditing(Q3ListViewItem *item, int row);
@@ -904,3 +915,3 @@ protected slots:
*/
- void emitContextMenu (QListViewItem*, const QPoint&, int);
+ void emitContextMenu (Q3ListViewItem*, const QPoint&, int);
@@ -909,3 +920,3 @@ protected slots:
*/
- void emitContextMenu (KListView*, QListViewItem*);
+ void emitContextMenu (KListView*, Q3ListViewItem*);
@@ -915,3 +926,3 @@ protected slots:
*/
- void slotOnItem( QListViewItem *item );
+ void slotOnItem( Q3ListViewItem *item );
@@ -941,3 +952,3 @@ protected:
*/
- virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
+ virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme);
@@ -949,3 +960,3 @@ protected:
*/
- virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after);
@@ -976,3 +987,3 @@ private:
*/
-class KListViewItem : public QListViewItem
+class KListViewItem : public Q3ListViewItem
{
@@ -985,8 +996,8 @@ public:
*/
- KListViewItem(QListView *parent);
- KListViewItem(QListViewItem *parent);
- KListViewItem(QListView *parent, QListViewItem *after);
- KListViewItem(QListViewItem *parent, QListViewItem *after);
+ KListViewItem(Q3ListView *parent);
+ KListViewItem(Q3ListViewItem *parent);
+ KListViewItem(Q3ListView *parent, Q3ListViewItem *after);
+ KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after);
- KListViewItem(QListView *parent,
+ KListViewItem(Q3ListView *parent,
QString, QString = QString::null,
@@ -996,3 +1007,3 @@ public:
- KListViewItem(QListViewItem *parent,
+ KListViewItem(Q3ListViewItem *parent,
QString, QString = QString::null,
@@ -1002,3 +1013,3 @@ public:
- KListViewItem(QListView *parent, QListViewItem *after,
+ KListViewItem(Q3ListView *parent, Q3ListViewItem *after,
QString, QString = QString::null,
@@ -1008,3 +1019,3 @@ public:
- KListViewItem(QListViewItem *parent, QListViewItem *after,
+ KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after,
QString, QString = QString::null,
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index fa678f2..bac0db8 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -23,3 +23,3 @@
*/
-#include <qobjectlist.h>
+#include <qobject.h>
#include <qstringlist.h>
@@ -29,2 +29,8 @@
#include <qapplication.h>
+//Added by qt3to4:
+#include <QCloseEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QChildEvent>
+#include <Q3PtrList>
@@ -56,3 +62,3 @@ static bool no_query_exit = false;
KMainWindow::KMainWindow( QWidget* parent, const char *name )
- : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
+ : Q3MainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
{
@@ -278,3 +284,3 @@ void KMainWindow::setPlainCaption( const QString &caption )
{
- QMainWindow::setCaption( caption );
+ Q3MainWindow::setCaption( caption );
#ifndef Q_WS_QWS
@@ -423,6 +429,6 @@ void KMainWindow::createStandardStatusBarAction(){
-QToolBar *KMainWindow::tBar( )
+Q3ToolBar *KMainWindow::tBar( )
{
if ( ! mQToolBar )
- mQToolBar = new QToolBar( this );
+ mQToolBar = new Q3ToolBar( this );
return mQToolBar;
@@ -445,12 +451,13 @@ KToolBar *KMainWindow::toolBar( const char * name )
*/
- return new KToolBar(this, Top, false, name, honor_mode ); // non-XMLGUI
+ return new KToolBar(this, Qt::Top, false, name, honor_mode ); // non-XMLGUI
}
-QPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
+Q3PtrListIterator<KToolBar> KMainWindow::toolBarIterator()
{
toolbarList.clear();
- QPtrList<QToolBar> lst;
- for ( int i = (int)QMainWindow::Unmanaged; i <= (int)Minimized; ++i ) {
- lst = toolBars( (ToolBarDock)i );
- for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) {
+ QList<Q3ToolBar*> lst;
+ for ( int i = (int)Qt::Unmanaged; i <= (int)Qt::Minimized; ++i ) {
+ lst = toolBars( (Qt::ToolBarDock)i );
+ for(QList<Q3ToolBar*>::iterator i=lst.begin();i!=lst.end();++i) {
+ Q3ToolBar *tb = *i;
if ( !tb->inherits( "KToolBar" ) )
@@ -460,3 +467,3 @@ QPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
}
- return QPtrListIterator<KToolBar>( toolbarList );
+ return Q3PtrListIterator<KToolBar>( toolbarList );
}
@@ -471,3 +478,3 @@ void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindo
//US this, SLOT( setSettingsDirty() ) );
- connect( this, SIGNAL( toolBarPositionChanged(QToolBar *) ),
+ connect( this, SIGNAL( toolBarPositionChanged(Q3ToolBar *) ),
this, SLOT( setSettingsDirty() ) );
@@ -505,3 +512,3 @@ void KMainWindow::saveAutoSaveSettings()
{
- ASSERT( d->autoSaveSettings );
+ Q_ASSERT( d->autoSaveSettings );
//kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl;
@@ -641,3 +648,3 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
KToolBar *toolbar = 0;
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ Q3PtrListIterator<KToolBar> it( toolBarIterator() );
while ( ( toolbar = it.current() ) ) {
@@ -716,10 +723,12 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
entryList = config->readListEntry (QString::fromLatin1("MenuBar"));
- entry = entryList.first();
- if (entry==QString::fromLatin1("Disabled"))
- {
- mb->hide();
- } else
- {
- mb->show();
- }
+ if(!entryList.empty()) {
+ entry = entryList.first();
+ if (entry==QString::fromLatin1("Disabled"))
+ {
+ mb->hide();
+ } else
+ {
+ mb->show();
+ }
+ }
}
@@ -728,3 +737,3 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
KToolBar *toolbar;
- QPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
+ Q3PtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
@@ -758,3 +767,3 @@ void KMainWindow::finalizeGUI( bool force )
// Both the XMLGUI and applySettings call this, hence "force" for the latter.
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ Q3PtrListIterator<KToolBar> it( toolBarIterator() );
for ( ; it.current() ; ++ it )
@@ -853,3 +862,3 @@ void KMainWindow::resizeEvent( QResizeEvent * e)
setSettingsDirty();
- QMainWindow::resizeEvent( e );
+ Q3MainWindow::resizeEvent( e );
}
@@ -871,3 +880,3 @@ QMenuBar *KMainWindow::menuBar()
// setMenuBar method.
- QMainWindow::menuBar();
+ Q3MainWindow::menuBar();
}
@@ -886,3 +895,3 @@ QStatusBar *KMainWindow::statusBar()
// setStatusBar method.
- QMainWindow::statusBar();
+ Q3MainWindow::statusBar();
}
@@ -910,12 +919,6 @@ QMenuBar *KMainWindow::internalMenuBar()
//US QObjectList *l = queryList( "KMenuBar", 0, false, false );
- QObjectList *l = queryList( "QMenuBar", 0, false, false );
- if ( !l || !l->first() ) {
- delete l;
- return 0;
- }
-
-//US KMenuBar *m = (KMenuBar*)l->first();
- QMenuBar *m = (QMenuBar*)l->first();
- delete l;
- return m;
+ QObjectList l = queryList( "QMenuBar", 0, false, false );
+ if(l.empty())
+ return 0;
+ return (QMenuBar*)l.front();
}
@@ -926,12 +929,6 @@ QStatusBar *KMainWindow::internalStatusBar()
//US QObjectList *l = queryList( "KStatusBar", 0, false, false );
- QObjectList *l = queryList( "QStatusBar", 0, false, false );
- if ( !l || !l->first() ) {
- delete l;
- return 0;
- }
-
-//US KStatusBar *s = (KStatusBar*)l->first();
- QStatusBar *s = (QStatusBar*)l->first();
- delete l;
- return s;
+ QObjectList l = queryList( "QStatusBar", 0, false, false );
+ if(l.empty())
+ return 0;
+ return (QStatusBar*)l.front();
}
@@ -940,3 +937,3 @@ void KMainWindow::childEvent( QChildEvent* e)
{
- QMainWindow::childEvent( e );
+ Q3MainWindow::childEvent( e );
}
@@ -945,3 +942,3 @@ void KMainWindow::paintEvent( QPaintEvent * e)
{
- QMainWindow::paintEvent( e );
+ Q3MainWindow::paintEvent( e );
}
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index 2dc8033..a3ac82f 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -1 +1,6 @@
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QChildEvent>
+#include <QCloseEvent>
+#include <QPaintEvent>
/*
@@ -52,4 +57,4 @@ class KAction;
#include <kxmlguiclient.h>
-#include <qmainwindow.h>
-#include <qptrlist.h>
+#include <q3mainwindow.h>
+#include <q3ptrlist.h>
@@ -57,3 +62,3 @@ class KActionCollection;
-class KMainWindow : public QMainWindow, virtual public KXMLGUIClient
+class KMainWindow : public Q3MainWindow, virtual public KXMLGUIClient
{
@@ -322,3 +327,3 @@ public:
// method for getting rid of KDE-Crap
- QToolBar *tBar( );
+ Q3ToolBar *tBar( );
@@ -327,3 +332,3 @@ public:
*/
- QPtrListIterator<KToolBar> toolBarIterator();
+ Q3PtrListIterator<KToolBar> toolBarIterator();
@@ -760,3 +765,3 @@ private slots:
private:
- QToolBar * mQToolBar;
+ Q3ToolBar * mQToolBar;
//US KMenuBar *internalMenuBar();
@@ -769,3 +774,3 @@ private:
- QPtrList<KToolBar> toolbarList;
+ Q3PtrList<KToolBar> toolbarList;
diff --git a/microkde/kdeui/knuminput.cpp b/microkde/kdeui/knuminput.cpp
index 335d6f4..da01a20 100644
--- a/microkde/kdeui/knuminput.cpp
+++ b/microkde/kdeui/knuminput.cpp
@@ -44,2 +44,5 @@
#include <qstyle.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QEvent>
@@ -108,7 +111,7 @@ void KNumInput::setLabel(const QString & label, int a)
else m_label = new QLabel(label, this, "KNumInput::QLabel");
- m_label->setAlignment((a & (~(AlignTop|AlignBottom|AlignVCenter)))
- | AlignVCenter);
+ m_label->setAlignment((a & (~(Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter)))
+ | Qt::AlignVCenter);
// if no vertical alignment set, use Top alignment
- if(!(a & (AlignTop|AlignBottom|AlignVCenter)))
- a |= AlignTop;
+ if(!(a & (Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter)))
+ a |= Qt::AlignTop;
m_alignment = a;
@@ -133,3 +136,3 @@ void KNumInput::layout(bool deep)
- if(m_label && (m_alignment & AlignVCenter))
+ if(m_label && (m_alignment & Qt::AlignVCenter))
m_colw1 = m_sizeLabel.width() + 4;
@@ -204,3 +207,3 @@ KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name)
{
- editor()->setAlignment(AlignRight);
+ setAlignment(Qt::AlignRight);
val_base = 10;
@@ -217,3 +220,3 @@ KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base,
{
- editor()->setAlignment(AlignRight);
+ setAlignment(Qt::AlignRight);
val_base = base;
@@ -245,5 +248,5 @@ void KIntSpinBox::setEditFocus(bool mark)
{
- editor()->setFocus();
+ setFocus();
if(mark)
- editor()->selectAll();
+ selectAll();
}
@@ -327,3 +330,3 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
- step = m_spin->lineStep(); // maybe QRangeControl didn't like out lineStep?
+ step = m_spin->singleStep(); // maybe QRangeControl didn't like out lineStep?
@@ -334,3 +337,3 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
m_slider = new QSlider(lower, upper, step, m_spin->value(),
- QSlider::Horizontal, this);
+ Qt::Horizontal, this);
m_slider->setTickmarks(QSlider::Below);
@@ -360,3 +363,3 @@ void KIntNumInput::setMinValue(int min)
{
- setRange(min, m_spin->maxValue(), m_spin->lineStep(), m_slider);
+ setRange(min, m_spin->maxValue(), m_spin->singleStep(), m_slider);
}
@@ -370,3 +373,3 @@ void KIntNumInput::setMaxValue(int max)
{
- setRange(m_spin->minValue(), max, m_spin->lineStep(), m_slider);
+ setRange(m_spin->minValue(), max, m_spin->singleStep(), m_slider);
}
@@ -417,3 +420,3 @@ QSize KIntNumInput::minimumSizeHint() const
// if in extra row, then count it here
- if(m_label && (m_alignment & (AlignBottom|AlignTop)))
+ if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop)))
h += 4 + m_sizeLabel.height();
@@ -426,3 +429,3 @@ QSize KIntNumInput::minimumSizeHint() const
- if(m_alignment & (AlignTop|AlignBottom))
+ if(m_alignment & (Qt::AlignTop|Qt::AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
@@ -446,3 +449,3 @@ void KIntNumInput::resizeEvent(QResizeEvent* e)
- if(m_label && (m_alignment & AlignTop)) {
+ if(m_label && (m_alignment & Qt::AlignTop)) {
m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height());
@@ -451,3 +454,3 @@ void KIntNumInput::resizeEvent(QResizeEvent* e)
- if(m_label && (m_alignment & AlignVCenter))
+ if(m_label && (m_alignment & Qt::AlignVCenter))
m_label->setGeometry(0, 0, w, m_sizeSpin.height());
@@ -462,3 +465,3 @@ void KIntNumInput::resizeEvent(QResizeEvent* e)
- if(m_label && (m_alignment & AlignBottom))
+ if(m_label && (m_alignment & Qt::AlignBottom))
m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height());
@@ -648,3 +651,3 @@ QSize KDoubleNumInput::minimumSizeHint() const
// if in extra row, then count it here
- if(m_label && (m_alignment & (AlignBottom|AlignTop)))
+ if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop)))
h += 4 + m_sizeLabel.height();
@@ -657,3 +660,3 @@ QSize KDoubleNumInput::minimumSizeHint() const
- if(m_alignment & (AlignTop|AlignBottom))
+ if(m_alignment & (Qt::AlignTop|Qt::AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
@@ -668,3 +671,3 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e)
- if(m_label && (m_alignment & AlignTop)) {
+ if(m_label && (m_alignment & Qt::AlignTop)) {
m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height());
@@ -673,3 +676,3 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e)
- if(m_label && (m_alignment & AlignVCenter))
+ if(m_label && (m_alignment & Qt::AlignVCenter))
m_label->setGeometry(0, 0, w, m_sizeEdit.height());
@@ -685,3 +688,3 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e)
- if(m_label && (m_alignment & AlignBottom))
+ if(m_label && (m_alignment & Qt::AlignBottom))
m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height());
@@ -732,3 +735,3 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
int slvalue = spin->value();
- int slstep = spin->lineStep();
+ int slstep = spin->singleStep();
if (m_slider) {
@@ -739,3 +742,3 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
m_slider = new QSlider(slmin, slmax, slstep, slvalue,
- QSlider::Horizontal, this);
+ Qt::Horizontal, this);
m_slider->setTickmarks(QSlider::Below);
@@ -914,3 +917,3 @@ KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name )
{
- editor()->setAlignment( Qt::AlignRight );
+ setAlignment( Qt::AlignRight );
d = new Private();
@@ -924,3 +927,3 @@ KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step,
{
- editor()->setAlignment( Qt::AlignRight );
+ setAlignment( Qt::AlignRight );
d = new Private();
@@ -1029,3 +1032,3 @@ void KDoubleSpinBox::setMaxValue( double value ) {
double KDoubleSpinBox::lineStep() const {
- return d->mapToDouble( base::lineStep() );
+ return d->mapToDouble( base::singleStep() );
}
@@ -1074,3 +1077,3 @@ void KDoubleSpinBox::updateValidator() {
this, "d->mValidator" );
- base::setValidator( d->mValidator );
+ lineEdit()->setValidator( d->mValidator );
} else
diff --git a/microkde/kdeui/knuminput.h b/microkde/kdeui/knuminput.h
index 123fefa..9f9e200 100644
--- a/microkde/kdeui/knuminput.h
+++ b/microkde/kdeui/knuminput.h
@@ -31,2 +31,7 @@
#include <qspinbox.h>
+#include <QLineEdit>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
+#include <QEvent>
@@ -83,3 +88,3 @@ public:
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
@@ -304,3 +309,3 @@ public:
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
@@ -590,3 +595,3 @@ public:
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
/**
@@ -760,2 +765,6 @@ public:
+ void setValidator(const QValidator *v) {
+ lineEdit()->setValidator(v);
+ }
+
protected:
diff --git a/microkde/kdeui/kpopupmenu.cpp b/microkde/kdeui/kpopupmenu.cpp
index 96d2a87..7e1503c 100644
--- a/microkde/kdeui/kpopupmenu.cpp
+++ b/microkde/kdeui/kpopupmenu.cpp
@@ -3,2 +3,5 @@
#include <qtimer.h>
+//Added by qt3to4:
+#include <QFocusEvent>
+#include <Q3PopupMenu>
@@ -6,3 +9,3 @@
KPopupMenu::KPopupMenu ( QWidget * parent, const char * name )
- : QPopupMenu ( parent, name ) {;}
+ : Q3PopupMenu ( parent, name ) {;}
diff --git a/microkde/kdeui/kpopupmenu.h b/microkde/kdeui/kpopupmenu.h
index fd00f36..1c903ad 100644
--- a/microkde/kdeui/kpopupmenu.h
+++ b/microkde/kdeui/kpopupmenu.h
@@ -3,3 +3,5 @@
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <QFocusEvent>
#ifdef DESKTOP_VERSION
@@ -11,3 +13,3 @@
-class KPopupMenu : public QPopupMenu
+class KPopupMenu : public Q3PopupMenu
{
diff --git a/microkde/kdeui/kseparator.cpp b/microkde/kdeui/kseparator.cpp
index d028420..66000f0 100644
--- a/microkde/kdeui/kseparator.cpp
+++ b/microkde/kdeui/kseparator.cpp
@@ -20,2 +20,4 @@
#include <qstyle.h>
+//Added by qt3to4:
+#include <Q3Frame>
@@ -28,4 +30,4 @@
-KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(QWidget* parent, const char* name, Qt::WFlags f)
+ : Q3Frame(parent, name, f)
{
@@ -38,4 +40,4 @@ KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
-KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, Qt::WFlags f)
+ : Q3Frame(parent, name, f)
{
@@ -52,5 +54,5 @@ void KSeparator::setOrientation(int orientation)
{
- case Vertical:
+ case Qt::Vertical:
case VLine:
- setFrameStyle( QFrame::VLine | QFrame::Sunken );
+ setFrameStyle( Q3Frame::VLine | Q3Frame::Sunken );
setMinimumSize(2, 0);
@@ -61,5 +63,5 @@ void KSeparator::setOrientation(int orientation)
- case Horizontal:
+ case Qt::Horizontal:
case HLine:
- setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ setFrameStyle( Q3Frame::HLine | Q3Frame::Sunken );
setMinimumSize(0, 2);
diff --git a/microkde/kdeui/kseparator.h b/microkde/kdeui/kseparator.h
index 6d2712a..c673475 100644
--- a/microkde/kdeui/kseparator.h
+++ b/microkde/kdeui/kseparator.h
@@ -22,3 +22,3 @@
-#include <qframe.h>
+#include <q3frame.h>
@@ -30,3 +30,3 @@
*/
-class KSeparator : public QFrame
+class KSeparator : public Q3Frame
{
@@ -38,3 +38,3 @@ class KSeparator : public QFrame
**/
- KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0);
+ KSeparator(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
/**
@@ -46,3 +46,3 @@ class KSeparator : public QFrame
KSeparator(int orientation, QWidget* parent=0, const char* name=0,
- WFlags f=0);
+ Qt::WFlags f=0);
diff --git a/microkde/kdeui/ksqueezedtextlabel.cpp b/microkde/kdeui/ksqueezedtextlabel.cpp
index 37fa29a..e2c61fd 100644
--- a/microkde/kdeui/ksqueezedtextlabel.cpp
+++ b/microkde/kdeui/ksqueezedtextlabel.cpp
@@ -20,2 +20,5 @@
#include <qtooltip.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
diff --git a/microkde/kdeui/ksqueezedtextlabel.h b/microkde/kdeui/ksqueezedtextlabel.h
index 1634adc..487d0b0 100644
--- a/microkde/kdeui/ksqueezedtextlabel.h
+++ b/microkde/kdeui/ksqueezedtextlabel.h
@@ -22,2 +22,4 @@
#include <qlabel.h>
+//Added by qt3to4:
+#include <QResizeEvent>
diff --git a/microkde/kdeui/kstdaction.cpp b/microkde/kdeui/kstdaction.cpp
index cfd7b54..f0d162d 100644
--- a/microkde/kdeui/kstdaction.cpp
+++ b/microkde/kdeui/kstdaction.cpp
@@ -21,3 +21,3 @@
#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 027e5e9..02db316 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -27,5 +27,16 @@
#undef Always
-#include <qdockwindow.h>
+#include <q3dockwindow.h>
#endif
-
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3PtrList>
+#include <QPixmap>
+#include <Q3Frame>
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <QChildEvent>
+#include <QEvent>
+#include <QShowEvent>
+#include <QDesktopWidget>
+#include <QBoxLayout>
@@ -42,3 +53,3 @@
#include <qrect.h>
-#include <qobjectlist.h>
+#include <qobject.h>
#include <qtimer.h>
@@ -71,4 +82,4 @@
-#include <qpopupmenu.h>
-#include <qmainwindow.h>
+#include <q3popupmenu.h>
+#include <q3mainwindow.h>
@@ -104,3 +115,3 @@ public:
//US oldPos = Qt::DockUnmanaged;
- oldPos = QMainWindow::Unmanaged;
+ oldPos = Qt::Unmanaged;
@@ -131,3 +142,3 @@ public:
- QMainWindow::ToolBarDock oldPos;
+ Qt::ToolBarDock oldPos;
@@ -138,5 +149,5 @@ public:
//US ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {}
- ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( QMainWindow::Top ) {}
+ ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {}
//US ToolBarInfo( Qt::Dock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
- ToolBarInfo( QMainWindow::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
+ ToolBarInfo( Qt::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
int index, offset;
@@ -144,3 +155,3 @@ public:
//US Qt::Dock dock;
- QMainWindow::ToolBarDock dock;
+ Qt::ToolBarDock dock;
};
@@ -148,3 +159,3 @@ public:
ToolBarInfo toolBarInfo;
- QValueList<int> iconSizes;
+ Q3ValueList<int> iconSizes;
QTimer repaintTimer;
@@ -160,11 +171,11 @@ public:
- QPtrList<QWidget> idleButtons;
+ Q3PtrList<QWidget> idleButtons;
};
-KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent,
+KToolBarSeparator::KToolBarSeparator(Qt::Orientation o , bool l, Q3ToolBar *parent,
const char* name )
- :QFrame( parent, name ), line( l )
+ :Q3Frame( parent, name ), line( l )
{
- connect( parent, SIGNAL(orientationChanged(Orientation)),
- this, SLOT(setOrientation(Orientation)) );
+ connect( parent, SIGNAL(orientationChanged(Qt::Orientation)),
+ this, SLOT(setOrientation(Qt::Orientation)) );
setOrientation( o );
@@ -174,3 +185,3 @@ KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent,
-void KToolBarSeparator::setOrientation( Orientation o )
+void KToolBarSeparator::setOrientation( Qt::Orientation o )
{
@@ -178,3 +189,3 @@ void KToolBarSeparator::setOrientation( Orientation o )
if ( line ) {
- if ( orientation() == Vertical )
+ if ( orientation() == Qt::Vertical )
setFrameStyle( HLine + Sunken );
@@ -194,3 +205,3 @@ QSize KToolBarSeparator::sizeHint() const
{
- return orientation() == Vertical ? QSize( 0, 6 ) : QSize( 6, 0 );
+ return orientation() == Qt::Vertical ? QSize( 0, 6 ) : QSize( 6, 0 );
}
@@ -204,4 +215,4 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea
#ifdef DESKTOP_VERSION
- : QToolBar( QString::fromLatin1( name ),
- parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0,
+ : Q3ToolBar( QString::fromLatin1( name ),
+ parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0,
parent, FALSE,
@@ -209,3 +220,3 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea
#else
- : QPEToolBar( parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0,
+ : QPEToolBar( parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0,
QString::fromLatin1( name ))
@@ -218,5 +229,5 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea
-KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+KToolBar::KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
#ifdef DESKTOP_VERSION
- : QToolBar( QString::fromLatin1( name ),
+ : Q3ToolBar( QString::fromLatin1( name ),
parentWindow, dock, newLine,
@@ -233,5 +244,5 @@ KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bo
-KToolBar::KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+KToolBar::KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
#ifdef DESKTOP_VERSION
- : QToolBar( QString::fromLatin1( name ),
+ : Q3ToolBar( QString::fromLatin1( name ),
parentWindow, dock, newLine,
@@ -282,4 +293,4 @@ void KToolBar::init( bool readConfig, bool honorStyle )
if ( mainWindow() )
- connect( mainWindow(), SIGNAL( toolBarPositionChanged( QToolBar * ) ),
- this, SLOT( toolBarPosChanged( QToolBar * ) ) );
+ connect( mainWindow(), SIGNAL( toolBarPositionChanged( Q3ToolBar * ) ),
+ this, SLOT( toolBarPosChanged( Q3ToolBar * ) ) );
@@ -343,3 +354,3 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal,
-int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
+int KToolBar::insertButton(const QString& icon, int id, Q3PopupMenu *popup,
bool enabled, const QString &text, int index )
@@ -355,3 +366,3 @@ int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
-int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
+int KToolBar::insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup,
bool enabled, const QString &text, int index )
@@ -542,3 +553,3 @@ void KToolBar::setButtonIcon( int id, const QString& _icon )
-void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
+void KToolBar::setButtonIconSet( int id, const QIcon& iconset )
{
@@ -554,3 +565,3 @@ void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
-void KToolBar::setDelayedPopup (int id , QPopupMenu *_popup, bool toggle )
+void KToolBar::setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle )
{
@@ -789,3 +800,3 @@ void KToolBar::clear ()
{
- QToolBar::clear();
+ Q3ToolBar::clear();
widget2id.clear();
@@ -878,3 +889,3 @@ void KToolBar::setBarPos (BarPosition bpos)
//US mainWindow()->moveDockWindow( this, (Dock)bpos );
- mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos );
+ mainWindow()->moveToolBar( this, (Qt::ToolBarDock)bpos );
}
@@ -884,11 +895,11 @@ const KToolBar::BarPosition KToolBar::barPos()
{
- if ( !(QMainWindow*)mainWindow() )
+ if ( !(Q3MainWindow*)mainWindow() )
return KToolBar::Top;
//US Dock dock;
- QMainWindow::ToolBarDock dock;
+ Qt::ToolBarDock dock;
int dm1, dm2;
bool dm3;
- ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 );
+ ((Q3MainWindow*)mainWindow())->getLocation( (Q3ToolBar*)this, dock, dm1, dm3, dm2 );
//US if ( dock == DockUnmanaged ) {
- if ( dock == QMainWindow::Unmanaged ) {
+ if ( dock == Qt::Unmanaged ) {
return (KToolBar::BarPosition)Top;
@@ -969,3 +980,3 @@ void KToolBar::setIconText(IconText icontext, bool update)
if ( mainWindow() ) {
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
mw->setUpdatesEnabled( FALSE );
@@ -1006,3 +1017,3 @@ void KToolBar::setIconSize(int size, bool update)
if ( mainWindow() ) {
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
mw->setUpdatesEnabled( FALSE );
@@ -1064,6 +1075,6 @@ void KToolBar::setFlat (bool flag)
//US mainWindow()->moveDockWindow( this, DockMinimized );
- mainWindow()->moveToolBar( this, QMainWindow::Minimized );
+ mainWindow()->moveToolBar( this, Qt::Minimized );
else
//US mainWindow()->moveDockWindow( this, DockTop );
- mainWindow()->moveToolBar( this, QMainWindow::Top );
+ mainWindow()->moveToolBar( this, Qt::Top );
// And remember to save the new look later
@@ -1251,5 +1262,5 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
return;
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
if ( mw->toolBarsMovable() && d->m_enableContext ) {
- if ( m->button() == RightButton ) {
+ if ( m->button() == Qt::RightButton ) {
int i = contextMenu()->exec( m->globalPos(), 0 );
@@ -1260,3 +1271,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
//US mw->moveDockWindow( this, DockLeft );
- mw->moveToolBar( this, QMainWindow::Left );
+ mw->moveToolBar( this, Qt::Left );
break;
@@ -1264,3 +1275,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
//US mw->moveDockWindow( this, DockRight );
- mw->moveToolBar( this, QMainWindow::Right );
+ mw->moveToolBar( this, Qt::Right );
break;
@@ -1268,3 +1279,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
//US mw->moveDockWindow( this, DockTop );
- mw->moveToolBar( this, QMainWindow::Top );
+ mw->moveToolBar( this, Qt::Top );
break;
@@ -1272,3 +1283,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
//US mw->moveDockWindow( this, DockBottom );
- mw->moveToolBar( this, QMainWindow::Bottom );
+ mw->moveToolBar( this, Qt::Bottom );
break;
@@ -1278,3 +1289,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
//US mw->moveDockWindow( this, DockMinimized );
- mw->moveToolBar( this, QMainWindow::Minimized );
+ mw->moveToolBar( this, Qt::Minimized );
break;
@@ -1334,3 +1345,3 @@ void KToolBar::rebuildLayout()
}
- if ( w->inherits( "QPopupMenu" ) )
+ if ( w->inherits( "Q3PopupMenu" ) )
continue;
@@ -1366,3 +1377,3 @@ void KToolBar::childEvent( QChildEvent *e )
if ( e->type() == QEvent::ChildInserted ) {
- if ( !e->child()->inherits( "QPopupMenu" ) &&
+ if ( !e->child()->inherits( "Q3PopupMenu" ) &&
::qstrcmp( "qt_dockwidget_internal", e->child()->name() ) != 0 ) {
@@ -1377,6 +1388,6 @@ void KToolBar::childEvent( QChildEvent *e )
}
- } else {
+ } else if( e->type() == QEvent::ChildRemoved ) {
removeWidgetInternal( w );
}
- if ( isVisibleTo( 0 ) )
+ /* TODO:hacker: if ( isVisibleTo( 0 ) )
{
@@ -1392,5 +1403,5 @@ void KToolBar::childEvent( QChildEvent *e )
layoutTimer->start( 50, TRUE );
- }
+ } */
}
- QToolBar::childEvent( e );
+ Q3ToolBar::childEvent( e );
}
@@ -1418,3 +1429,3 @@ void KToolBar::repaintMe()
setUpdatesEnabled( true );
- QToolBar::repaint( true );
+ Q3ToolBar::repaint( true );
qDebug(" KToolBar::repaintMe() ");
@@ -1425,3 +1436,3 @@ void KToolBar::showEvent( QShowEvent *e )
rebuildLayout();
- QToolBar::showEvent( e );
+ Q3ToolBar::showEvent( e );
}
@@ -1430,3 +1441,3 @@ void KToolBar::setStretchableWidget( QWidget *w )
{
- QToolBar::setStretchableWidget( w );
+ Q3ToolBar::setStretchableWidget( w );
stretchableWidget = w;
@@ -1436,3 +1447,3 @@ QSizePolicy KToolBar::sizePolicy() const
{
- if ( orientation() == Horizontal )
+ if ( orientation() == Qt::Horizontal )
return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
@@ -1444,3 +1455,3 @@ QSize KToolBar::sizeHint() const
{
- QSize sh = QToolBar::sizeHint();
+ QSize sh = Q3ToolBar::sizeHint();
//qDebug("%x KToolBar::sizeHint() %d %d ",this, QToolBar::sizeHint().width(),QToolBar::sizeHint().height() );
@@ -1510,3 +1521,3 @@ QSize KToolBar::sizeHint() const
default:
- minSize = QToolBar::sizeHint();
+ minSize = Q3ToolBar::sizeHint();
break;
@@ -1534,3 +1545,3 @@ void KToolBar::hide()
{
- QToolBar::hide();
+ Q3ToolBar::hide();
}
@@ -1539,3 +1550,3 @@ void KToolBar::show()
{
- QToolBar::show();
+ Q3ToolBar::show();
}
@@ -1546,3 +1557,3 @@ void KToolBar::resizeEvent( QResizeEvent *e )
setUpdatesEnabled( FALSE );
- QToolBar::resizeEvent( e );
+ Q3ToolBar::resizeEvent( e );
if (b)
@@ -1728,3 +1739,3 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
@@ -1807,15 +1818,15 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
*/
- QMainWindow::ToolBarDock pos(QMainWindow::Top);
+ Qt::ToolBarDock pos(Qt::DockTop);
if ( position == "Top" )
- pos = QMainWindow::Top;
+ pos = Qt::Top;
else if ( position == "Bottom" )
- pos = QMainWindow::Bottom;
+ pos = Qt::Bottom;
else if ( position == "Left" )
- pos = QMainWindow::Left;
+ pos = Qt::Left;
else if ( position == "Right" )
- pos = QMainWindow::Right;
+ pos = Qt::Right;
else if ( position == "Floating" )
- pos = QMainWindow::TornOff;
+ pos = Qt::TornOff;
else if ( position == "Flat" )
- pos = QMainWindow::Minimized;
+ pos = Qt::Minimized;
@@ -1829,3 +1840,3 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
{
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
@@ -1864,3 +1875,3 @@ bool KToolBar::event( QEvent *e )
- return QToolBar::event( e );
+ return Q3ToolBar::event( e );
}
@@ -1882,3 +1893,3 @@ void KToolBar::slotRepaint()
-void KToolBar::toolBarPosChanged( QToolBar *tb )
+void KToolBar::toolBarPosChanged( Q3ToolBar *tb )
{
@@ -1887,5 +1898,5 @@ void KToolBar::toolBarPosChanged( QToolBar *tb )
//US if ( d->oldPos == DockMinimized )
- if ( d->oldPos == QMainWindow::Minimized )
+ if ( d->oldPos == Qt::Minimized )
rebuildLayout();
- d->oldPos = (QMainWindow::ToolBarDock)barPos();
+ d->oldPos = (Qt::ToolBarDock)barPos();
/*US
@@ -2033,3 +2044,3 @@ void KToolBar::getAttributes( QString &position, QString &icontext, int &index )
if ( mainWindow() ) {
- QMainWindow::ToolBarDock dock;
+ Qt::ToolBarDock dock;
bool newLine;
@@ -2102,3 +2113,3 @@ void KToolBar::positionYourself( bool force )
//US KPopupMenu *KToolBar::contextMenu()
-QPopupMenu *KToolBar::contextMenu()
+Q3PopupMenu *KToolBar::contextMenu()
{
@@ -2110,3 +2121,3 @@ QPopupMenu *KToolBar::contextMenu()
//US context = new KPopupMenu( this, "qt_dockwidget_internal" );
- context = new QPopupMenu( this, "qt_dockwidget_internal" );
+ context = new Q3PopupMenu( this, "qt_dockwidget_internal" );
//US context->insertTitle(i18n("Toolbar Menu"));
@@ -2114,3 +2125,3 @@ QPopupMenu *KToolBar::contextMenu()
//US KPopupMenu *orient = new KPopupMenu( context, "orient" );
- QPopupMenu *orient = new QPopupMenu( context, "orient" );
+ Q3PopupMenu *orient = new Q3PopupMenu( context, "orient" );
orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP );
@@ -2124,3 +2135,3 @@ QPopupMenu *KToolBar::contextMenu()
//US KPopupMenu *mode = new KPopupMenu( context, "mode" );
- QPopupMenu *mode = new QPopupMenu( context, "mode" );
+ Q3PopupMenu *mode = new Q3PopupMenu( context, "mode" );
mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS );
@@ -2131,6 +2142,6 @@ QPopupMenu *KToolBar::contextMenu()
//US KPopupMenu *size = new KPopupMenu( context, "size" );
- QPopupMenu *size = new QPopupMenu( context, "size" );
+ Q3PopupMenu *size = new Q3PopupMenu( context, "size" );
size->insertItem( i18n("Default"), CONTEXT_ICONSIZES );
// Query the current theme for available sizes
- QValueList<int> avSizes;
+ Q3ValueList<int> avSizes;
/*US
@@ -2147,3 +2158,3 @@ QPopupMenu *KToolBar::contextMenu()
- QValueList<int>::Iterator it;
+ Q3ValueList<int>::Iterator it;
for (it=avSizes.begin(); it!=avSizes.end(); it++) {
@@ -2220,4 +2231,4 @@ void KToolBar::slotContextAboutToShow()
- QValueList<int>::ConstIterator iIt = d->iconSizes.begin();
- QValueList<int>::ConstIterator iEnd = d->iconSizes.end();
+ Q3ValueList<int>::ConstIterator iIt = d->iconSizes.begin();
+ Q3ValueList<int>::ConstIterator iEnd = d->iconSizes.end();
for (; iIt != iEnd; ++iIt )
diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h
index 3319fa8..4e00abd 100644
--- a/microkde/kdeui/ktoolbar.h
+++ b/microkde/kdeui/ktoolbar.h
@@ -28,3 +28,3 @@
#define private public
-#include <qtoolbar.h>
+#include <q3toolbar.h>
#undef private
@@ -32,3 +32,3 @@
#else
-#include <qtoolbar.h>
+#include <q3toolbar.h>
#endif
@@ -36,10 +36,18 @@
-#include <qmainwindow.h>
+#include <q3mainwindow.h>
#include <qcombobox.h>
#include <qmap.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QResizeEvent>
+#include <Q3PopupMenu>
+#include <QMouseEvent>
+#include <QChildEvent>
+#include <QEvent>
+#include <QShowEvent>
#include <kglobal.h>
-#include <qguardedptr.h>
-#include <qframe.h>
-#include <qiconset.h>
+#include <qpointer.h>
+#include <q3frame.h>
+#include <qicon.h>
@@ -48,3 +56,3 @@ class QSize;
class QPixmap;
-class QPopupMenu;
+class Q3PopupMenu;
class QStringList;
@@ -65,3 +73,3 @@ class KToolBarPrivate;
-class KToolBarSeparator : public QFrame
+class KToolBarSeparator : public Q3Frame
{
@@ -69,6 +77,6 @@ class KToolBarSeparator : public QFrame
public:
- KToolBarSeparator( Orientation, bool l, QToolBar *parent, const char* name=0 );
+ KToolBarSeparator( Qt::Orientation, bool l, Q3ToolBar *parent, const char* name=0 );
QSize sizeHint() const;
- Orientation orientation() const { return orient; }
+ Qt::Orientation orientation() const { return orient; }
QSizePolicy sizePolicy() const;
@@ -76,3 +84,3 @@ public:
public slots:
- void setOrientation( Orientation );
+ void setOrientation( Qt::Orientation );
protected:
@@ -80,3 +88,3 @@ protected:
private:
- Orientation orient;
+ Qt::Orientation orient;
bool line;
@@ -113,6 +121,6 @@ private:
#ifndef DESKTOP_VERSION
-#define QToolBar QPEToolBar
+#define Q3ToolBar QPEToolBar
#endif
- class KToolBar : public QToolBar
+ class KToolBar : public Q3ToolBar
{
@@ -129,3 +137,3 @@ private:
#ifndef DESKTOP_VERSION
-#undef QToolBar
+#undef Q3ToolBar
#endif
@@ -177,3 +185,3 @@ public:
*/
- KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false,
+ KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false,
const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE );
@@ -195,3 +203,3 @@ public:
*/
- KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine = false,
+ KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine = false,
const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE );
@@ -305,3 +313,3 @@ public:
*/
- int insertButton(const QString& icon, int id, QPopupMenu *popup,
+ int insertButton(const QString& icon, int id, Q3PopupMenu *popup,
bool enabled, const QString&_text, int index=-1);
@@ -320,3 +328,3 @@ public:
*/
- int insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
+ int insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup,
bool enabled, const QString&_text, int index=-1);
@@ -361,3 +369,3 @@ public:
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ QComboBox::Policy policy = QComboBox::InsertAtBottom);
@@ -377,3 +385,3 @@ public:
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ QComboBox::Policy policy = QComboBox::InsertAtBottom);
@@ -467,3 +475,3 @@ public:
*/
- void setButtonIconSet( int id, const QIconSet& iconset );
+ void setButtonIconSet( int id, const QIcon& iconset );
@@ -493,3 +501,3 @@ public:
*/
- void setDelayedPopup (int id , QPopupMenu *_popup, bool toggle = false);
+ void setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle = false);
@@ -1062,3 +1070,3 @@ public slots:
virtual void setIconText( const QString &txt )
- { QToolBar::setIconText( txt ); }
+ { Q3ToolBar::setIconText( txt ); }
void slotRepaint();
@@ -1079,3 +1087,3 @@ private slots:
void slotIconChanged(int);
- void toolBarPosChanged( QToolBar *tb );
+ void toolBarPosChanged( Q3ToolBar *tb );
void slotContextAboutToShow();
@@ -1092,3 +1100,3 @@ private:
//US KPopupMenu *contextMenu();
- QPopupMenu *contextMenu();
+ Q3PopupMenu *contextMenu();
@@ -1098,6 +1106,6 @@ private:
//US KPopupMenu *context;
- QPopupMenu *context;
- QPtrList<QWidget> widgets;
+ Q3PopupMenu *context;
+ Q3PtrList<QWidget> widgets;
QTimer *layoutTimer;
- QGuardedPtr<QWidget> stretchableWidget, rightAligned;
+ QPointer<QWidget> stretchableWidget, rightAligned;
protected:
diff --git a/microkde/kdeui/ktoolbarbutton.cpp b/microkde/kdeui/ktoolbarbutton.cpp
index 1d5d0e5..7b98b32 100644
--- a/microkde/kdeui/ktoolbarbutton.cpp
+++ b/microkde/kdeui/ktoolbarbutton.cpp
@@ -35,3 +35,3 @@
#include <qbitmap.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qcursor.h>
@@ -39,2 +39,6 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QEvent>
@@ -50,3 +54,3 @@
-template class QIntDict<KToolBarButton>;
+template class Q3IntDict<KToolBarButton>;
@@ -117,3 +121,3 @@ KToolBarButton::KToolBarButton( const QString& _icon, int _id,
- setFocusPolicy( NoFocus );
+ setFocusPolicy( Qt::NoFocus );
@@ -148,3 +152,3 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
- setFocusPolicy( NoFocus );
+ setFocusPolicy( Qt::NoFocus );
@@ -163,3 +167,3 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
// set our pixmap and do our initial setup
- setIconSet( QIconSet( pixmap ));
+ setIconSet( QIcon( pixmap ));
modeChange();
@@ -294,3 +298,3 @@ void KToolBarButton::setIcon( const QString &icon )
-void KToolBarButton::setIconSet( const QIconSet &iconset )
+void KToolBarButton::setIconSet( const QIcon &iconset )
{
@@ -307,4 +311,4 @@ void KToolBarButton::setPixmap( const QPixmap &pixmap )
}
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Active );
+ QIcon set = iconSet();
+ set.setPixmap( pixmap, QIcon::Automatic, QIcon::Active );
QToolButton::setIconSet( set );
@@ -314,4 +318,4 @@ void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Normal );
+ QIcon set = iconSet();
+ set.setPixmap( pixmap, QIcon::Automatic, QIcon::Normal );
QToolButton::setIconSet( set );
@@ -321,4 +325,4 @@ void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Disabled );
+ QIcon set = iconSet();
+ set.setPixmap( pixmap, QIcon::Automatic, QIcon::Disabled );
QToolButton::setIconSet( set );
@@ -328,3 +332,3 @@ void KToolBarButton::setDefaultIcon( const QString& icon )
{
- QIconSet set = iconSet();
+ QIcon set = iconSet();
QPixmap pm;
@@ -336,3 +340,3 @@ void KToolBarButton::setDefaultIcon( const QString& icon )
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Normal );
+ set.setPixmap( pm, QIcon::Automatic, QIcon::Normal );
QToolButton::setIconSet( set );
@@ -342,3 +346,3 @@ void KToolBarButton::setDisabledIcon( const QString& icon )
{
- QIconSet set = iconSet();
+ QIcon set = iconSet();
QPixmap pm;
@@ -350,3 +354,3 @@ void KToolBarButton::setDisabledIcon( const QString& icon )
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Disabled );
+ set.setPixmap( pm, QIcon::Automatic, QIcon::Disabled );
QToolButton::setIconSet( set );
@@ -354,3 +358,3 @@ void KToolBarButton::setDisabledIcon( const QString& icon )
-QPopupMenu *KToolBarButton::popup()
+QMenu *KToolBarButton::popup()
{
@@ -361,3 +365,3 @@ QPopupMenu *KToolBarButton::popup()
-void KToolBarButton::setPopup(QPopupMenu *p, bool)
+void KToolBarButton::setPopup(Q3PopupMenu *p, bool)
{
@@ -368,3 +372,3 @@ void KToolBarButton::setPopup(QPopupMenu *p, bool)
-void KToolBarButton::setDelayedPopup (QPopupMenu *p, bool)
+void KToolBarButton::setDelayedPopup (Q3PopupMenu *p, bool)
{
@@ -453,17 +457,23 @@ void KToolBarButton::drawButton( QPainter *_painter )
#ifdef DESKTOP_VERSION
- QStyle::SFlags flags = QStyle::Style_Default;
- QStyle::SCFlags active = QStyle::SC_None;
+ QStyle::State flags = QStyle::State_None;
+ QStyle::SubControls active = QStyle::SC_None;
if (isDown()) {
- flags |= QStyle::Style_Down;
+ flags |= QStyle::State_DownArrow;
active |= QStyle::SC_ToolButton;
}
- if (isEnabled()) flags |= QStyle::Style_Enabled;
- if (isOn()) flags |= QStyle::Style_On;
- if (isEnabled() && d->m_isRaised) flags |= QStyle::Style_Raised;
- if (hasFocus()) flags |= QStyle::Style_HasFocus;
+ if (isEnabled()) flags |= QStyle::State_Enabled;
+ if (isOn()) flags |= QStyle::State_On;
+ if (isEnabled() && d->m_isRaised) flags |= QStyle::State_Raised;
+ if (hasFocus()) flags |= QStyle::State_HasFocus;
+
+ QStyleOptionToolButton qsotb;
+ qsotb.initFrom(this);
+ qsotb.state = flags;
+ qsotb.activeSubControls = active;
+ qsotb.rect = rect();
+ qsotb.palette = palette();
// Draw a styled toolbutton
- style().drawComplexControl(QStyle::CC_ToolButton, _painter, this, rect(),
- colorGroup(), flags, QStyle::SC_ToolButton, active, QStyleOption());
+ style()->drawComplexControl(QStyle::CC_ToolButton, &qsotb, _painter, this);
@@ -486,5 +496,5 @@ void KToolBarButton::drawButton( QPainter *_painter )
*/
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled);
+ QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
+ isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
+ QIcon::Disabled);
@@ -510,5 +520,5 @@ void KToolBarButton::drawButton( QPainter *_painter )
*/
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled);
+ QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
+ isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
+ QIcon::Disabled);
@@ -528,3 +538,3 @@ void KToolBarButton::drawButton( QPainter *_painter )
{
- textFlags = AlignVCenter|AlignLeft;
+ textFlags = Qt::AlignVCenter|Qt::AlignLeft;
if (!pixmap.isNull())
@@ -546,3 +556,3 @@ void KToolBarButton::drawButton( QPainter *_painter )
{
- textFlags = AlignVCenter|AlignLeft;
+ textFlags = Qt::AlignVCenter|Qt::AlignLeft;
dx = (width() - fm.width(textLabel())) / 2;
@@ -565,5 +575,5 @@ void KToolBarButton::drawButton( QPainter *_painter )
*/
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled);
+ QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
+ isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
+ QIcon::Disabled);
@@ -583,3 +593,3 @@ void KToolBarButton::drawButton( QPainter *_painter )
{
- textFlags = AlignBottom|AlignHCenter;
+ textFlags = Qt::AlignBottom|Qt::AlignHCenter;
dx = (width() - fm.width(textLabel())) / 2;
@@ -612,10 +622,14 @@ void KToolBarButton::drawButton( QPainter *_painter )
#ifdef DESKTOP_VERSION
- QStyle::SFlags arrowFlags = QStyle::Style_Default;
+ QStyle::State arrowFlags = QStyle::State_None;
+
+ if (isDown()) arrowFlags |= QStyle::State_DownArrow;
+ if (isEnabled()) arrowFlags |= QStyle::State_Enabled;
- if (isDown()) arrowFlags |= QStyle::Style_Down;
- if (isEnabled()) arrowFlags |= QStyle::Style_Enabled;
+ QStyleOption qso;
+ qso.initFrom(this);
+ qso.state = arrowFlags;
+ qso.rect = QRect(width()-7, height()-7, 7, 7);
+ qso.palette = palette();
- style().drawPrimitive(QStyle::PE_ArrowDown, _painter,
- QRect(width()-7, height()-7, 7, 7), colorGroup(),
- arrowFlags, QStyleOption() );
+ style()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &qso, _painter);
#else
diff --git a/microkde/kdeui/ktoolbarbutton.h b/microkde/kdeui/ktoolbarbutton.h
index 9aaa13c..ad02e4e 100644
--- a/microkde/kdeui/ktoolbarbutton.h
+++ b/microkde/kdeui/ktoolbarbutton.h
@@ -28,4 +28,7 @@
#include <qtoolbutton.h>
-#include <qintdict.h>
+#include <q3intdict.h>
#include <qstring.h>
+//Added by qt3to4:
+#include <QEvent>
+#include <Q3PopupMenu>
#include <kglobal.h>
@@ -36,3 +39,3 @@ class KToolBarButtonPrivate;
class QEvent;
-class QPopupMenu;
+class Q3PopupMenu;
class QPainter;
@@ -152,3 +155,3 @@ public:
*/
- virtual void setIconSet( const QIconSet &iconset );
+ virtual void setIconSet( const QIcon &iconset );
@@ -211,3 +214,3 @@ public:
*/
- QPopupMenu *popup();
+ QMenu *popup();
@@ -226,3 +229,3 @@ public:
*/
- void setPopup (QPopupMenu *p, bool unused = false);
+ void setPopup (Q3PopupMenu *p, bool unused = false);
@@ -237,3 +240,3 @@ public:
*/
- void setDelayedPopup(QPopupMenu *p, bool unused = false);
+ void setDelayedPopup(Q3PopupMenu *p, bool unused = false);
@@ -305,3 +308,3 @@ private:
*/
-class KToolBarButtonList : public QIntDict<KToolBarButton>
+class KToolBarButtonList : public Q3IntDict<KToolBarButton>
{
diff --git a/microkde/kdeui/ktoolbarhandler.cpp b/microkde/kdeui/ktoolbarhandler.cpp
index 7b97233..4d3ace7 100644
--- a/microkde/kdeui/ktoolbarhandler.cpp
+++ b/microkde/kdeui/ktoolbarhandler.cpp
@@ -20,3 +20,5 @@
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <Q3PtrList>
#include <kapplication.h>
@@ -46,3 +48,3 @@ namespace
public:
- BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList<KToolBar> &oldToolBarList )
+ BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, Q3PtrList<KToolBar> &oldToolBarList )
: m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
@@ -72,8 +74,8 @@ namespace
- QPtrList<KAction> create()
+ Q3PtrList<KAction> create()
{
if ( !m_needsRebuild )
- return QPtrList<KAction>();
+ return Q3PtrList<KAction>();
- QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ Q3PtrListIterator<KToolBar> toolBarIt( m_toolBars );
for ( ; toolBarIt.current(); ++toolBarIt )
@@ -81,3 +83,3 @@ namespace
- QPtrList<KAction> actions;
+ Q3PtrList<KAction> actions;
@@ -93,3 +95,3 @@ namespace
- QPtrListIterator<KAction> actionIt( m_toolBarActions );
+ Q3PtrListIterator<KAction> actionIt( m_toolBarActions );
for ( ; actionIt.current(); ++actionIt )
@@ -101,3 +103,3 @@ namespace
- const QPtrList<KToolBar> &toolBars() const { return m_toolBars; }
+ const Q3PtrList<KToolBar> &toolBars() const { return m_toolBars; }
@@ -117,4 +119,4 @@ namespace
- QPtrList<KToolBar> m_toolBars;
- QPtrList<KAction> m_toolBarActions;
+ Q3PtrList<KToolBar> m_toolBars;
+ Q3PtrList<KAction> m_toolBarActions;
@@ -226,3 +228,3 @@ void ToolBarHandler::connectToActionContainers()
{
- QPtrListIterator<KAction> actionIt( m_actions );
+ Q3PtrListIterator<KAction> actionIt( m_actions );
for ( ; actionIt.current(); ++actionIt )
@@ -241,3 +243,3 @@ void ToolBarHandler::connectToActionContainer( QWidget *container )
//US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container );
- QPopupMenu *popupMenu = (QPopupMenu *)( container );
+ Q3PopupMenu *popupMenu = (Q3PopupMenu *)( container );
if ( !popupMenu )
diff --git a/microkde/kdeui/ktoolbarhandler.h b/microkde/kdeui/ktoolbarhandler.h
index a1340ae..35f0d18 100644
--- a/microkde/kdeui/ktoolbarhandler.h
+++ b/microkde/kdeui/ktoolbarhandler.h
@@ -22,4 +22,4 @@
#include <qobject.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <qpointer.h>
+#include <q3ptrlist.h>
#include <kxmlguiclient.h>
@@ -59,5 +59,5 @@ private:
- QGuardedPtr<KMainWindow> m_mainWindow;
- QPtrList<KAction> m_actions;
- QPtrList<KToolBar> m_toolBars;
+ QPointer<KMainWindow> m_mainWindow;
+ Q3PtrList<KAction> m_actions;
+ Q3PtrList<KToolBar> m_toolBars;
};
diff --git a/microkde/kdeui/kxmlguiclient.cpp b/microkde/kdeui/kxmlguiclient.cpp
index 073e30b..8740bde 100644
--- a/microkde/kdeui/kxmlguiclient.cpp
+++ b/microkde/kdeui/kxmlguiclient.cpp
@@ -41,2 +41,4 @@
#include <assert.h>
+//Added by qt3to4:
+#include <Q3PtrList>
@@ -65,3 +67,3 @@ public:
//QPtrList<KXMLGUIClient> m_supers;
- QPtrList<KXMLGUIClient> m_children;
+ Q3PtrList<KXMLGUIClient> m_children;
//US KXMLGUIBuilder *m_builder;
@@ -87,3 +89,3 @@ KXMLGUIClient::~KXMLGUIClient()
- QPtrListIterator<KXMLGUIClient> it( d->m_children );
+ Q3PtrListIterator<KXMLGUIClient> it( d->m_children );
for ( ; it.current(); ++it ) {
@@ -101,3 +103,3 @@ KAction *KXMLGUIClient::action( const char *name ) const
if ( !act ) {
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ Q3PtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt ) {
@@ -590,3 +592,3 @@ void KXMLGUIClient::removeChildClient( KXMLGUIClient *child )
-const QPtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
+const Q3PtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
{
@@ -608,3 +610,3 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const
-void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction> &actionList )
+void KXMLGUIClient::plugActionList( const QString &name, const Q3PtrList<KAction> &actionList )
{
diff --git a/microkde/kdeui/kxmlguiclient.h b/microkde/kdeui/kxmlguiclient.h
index cd74c8e..b9d7b09 100644
--- a/microkde/kdeui/kxmlguiclient.h
+++ b/microkde/kdeui/kxmlguiclient.h
@@ -23,3 +23,3 @@
//US #include <qdom.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qmap.h>
@@ -163,3 +163,3 @@ public:
*/
- const QPtrList<KXMLGUIClient> *childClients();
+ const Q3PtrList<KXMLGUIClient> *childClients();
@@ -230,3 +230,3 @@ public:
*/
- void plugActionList( const QString &name, const QPtrList<KAction> &actionList );
+ void plugActionList( const QString &name, const Q3PtrList<KAction> &actionList );