-rw-r--r-- | microkde/kresources/configdialog.cpp | 17 | ||||
-rw-r--r-- | microkde/kresources/configpage.cpp | 38 | ||||
-rw-r--r-- | microkde/kresources/configpage.h | 10 | ||||
-rw-r--r-- | microkde/kresources/factory.cpp | 6 | ||||
-rw-r--r-- | microkde/kresources/factory.h | 4 | ||||
-rw-r--r-- | microkde/kresources/kcmkresources.cpp | 7 | ||||
-rw-r--r-- | microkde/kresources/manager.h | 8 | ||||
-rw-r--r-- | microkde/kresources/managerimpl.cpp | 10 | ||||
-rw-r--r-- | microkde/kresources/managerimpl.h | 8 | ||||
-rw-r--r-- | microkde/kresources/resource.h | 4 | ||||
-rw-r--r-- | microkde/kresources/selectdialog.cpp | 22 | ||||
-rw-r--r-- | microkde/kresources/selectdialog.h | 10 |
12 files changed, 82 insertions, 62 deletions
diff --git a/microkde/kresources/configdialog.cpp b/microkde/kresources/configdialog.cpp index 55253c0..4820faf 100644 --- a/microkde/kresources/configdialog.cpp +++ b/microkde/kresources/configdialog.cpp @@ -26,12 +26,15 @@ #include <kmessagebox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlayout.h> #include <qpushbutton.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qcheckbox.h> -#include <qscrollview.h> +#include <q3scrollview.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> #include <kbuttonbox.h> @@ -56,12 +59,12 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, resize( KMIN(KGlobal::getDesktopWidth(), 250), KMIN(KGlobal::getDesktopHeight(), 240)); - QFrame *main; + Q3Frame *main; main = plainPage(); - QVBoxLayout *mainLayout = new QVBoxLayout( main, 0, spacingHint() ); + Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main, 0, spacingHint() ); - QGroupBox *generalGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *generalGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); generalGroupBox->layout()->setSpacing( spacingHint() ); generalGroupBox->setTitle( i18n( "General Settings" ) ); @@ -83,5 +86,5 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, mainLayout->addWidget( generalGroupBox ); - QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *resourceGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); resourceGroupBox->layout()->setSpacing( spacingHint()); resourceGroupBox->setTitle( i18n( "%1 Resource Settings" ) diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp index fc7a42e..1a9d063 100644 --- a/microkde/kresources/configpage.cpp +++ b/microkde/kresources/configpage.cpp @@ -29,5 +29,5 @@ $Id$ */ -#include <qgroupbox.h> +#include <q3groupbox.h> #ifdef DESKTOP_VERSION @@ -38,4 +38,8 @@ $Id$ #include <qlabel.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3ValueList> +#include <Q3VBoxLayout> #include <kapplication.h> #include <kcombobox.h> @@ -62,9 +66,9 @@ $Id$ using namespace KRES; -class ConfigViewItem : public QCheckListItem +class ConfigViewItem : public Q3CheckListItem { public: - ConfigViewItem( QListView *parent, Resource* resource ) : - QCheckListItem( parent, resource->resourceName(), CheckBox ), + ConfigViewItem( Q3ListView *parent, Resource* resource ) : + Q3CheckListItem( parent, resource->resourceName(), CheckBox ), mResource( resource ), mIsStandard( false ) @@ -98,11 +102,11 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) setCaption( i18n( "Resource Configuration" ) ); - QVBoxLayout *mainLayout = new QVBoxLayout( this ); + Q3VBoxLayout *mainLayout = new Q3VBoxLayout( this ); - QGroupBox *groupBox = new QGroupBox( i18n( "Resources" ), this ); + Q3GroupBox *groupBox = new Q3GroupBox( i18n( "Resources" ), this ); groupBox->setColumnLayout(0, Qt::Vertical ); groupBox->layout()->setSpacing( 3 ); groupBox->layout()->setMargin( 5 ); - QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 ); + Q3GridLayout *groupBoxLayout = new Q3GridLayout( groupBox->layout(), 4, 2 ); //US mFamilyCombo = new KComboBox( false, groupBox ); @@ -146,6 +150,6 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) connect( mListView, SIGNAL( selectionChanged() ), SLOT( slotSelectionChanged() ) ); - connect( mListView, SIGNAL( clicked( QListViewItem * ) ), - SLOT( slotItemClicked( QListViewItem * ) ) ); + connect( mListView, SIGNAL( clicked( Q3ListViewItem * ) ), + SLOT( slotItemClicked( Q3ListViewItem * ) ) ); mLastItem = 0; @@ -160,5 +164,5 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) ConfigPage::~ConfigPage() { - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) { (*it).mManager->removeListener( this ); @@ -231,5 +235,5 @@ void ConfigPage::save() saveResourceSettings(); - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) (*it).mManager->writeConfig( (*it).mConfig ); @@ -342,5 +346,5 @@ void ConfigPage::slotAdd() if ( !resource->readOnly() ) { bool onlyReadOnly = true; - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it ); @@ -367,5 +371,5 @@ void ConfigPage::slotRemove() return; - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item ); @@ -394,5 +398,5 @@ void ConfigPage::slotEdit() return; - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); if ( !configItem ) @@ -436,5 +440,5 @@ void ConfigPage::slotStandard() } - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it ); @@ -483,5 +487,5 @@ void ConfigPage::resourceDeleted( Resource* resource ) } -void ConfigPage::slotItemClicked( QListViewItem *item ) +void ConfigPage::slotItemClicked( Q3ListViewItem *item ) { ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item ); @@ -505,5 +509,5 @@ void ConfigPage::saveResourceSettings() if ( mCurrentManager ) { - QListViewItem *item = mListView->firstChild(); + Q3ListViewItem *item = mListView->firstChild(); while ( item ) { ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); diff --git a/microkde/kresources/configpage.h b/microkde/kresources/configpage.h index be9239e..dc1aa50 100644 --- a/microkde/kresources/configpage.h +++ b/microkde/kresources/configpage.h @@ -26,4 +26,6 @@ #include <qstringlist.h> #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> #include "manager.h" @@ -32,5 +34,5 @@ class KComboBox; class KListView; -class QListViewItem; +class Q3ListViewItem; class QPushButton; @@ -74,5 +76,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> protected slots: - void slotItemClicked( QListViewItem * ); + void slotItemClicked( Q3ListViewItem * ); signals: @@ -87,5 +89,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> QString mFamily; QStringList mFamilyMap; - QValueList<ResourcePageInfo> mInfoMap; + Q3ValueList<ResourcePageInfo> mInfoMap; KComboBox* mFamilyCombo; @@ -96,5 +98,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> QPushButton* mStandardButton; - QListViewItem* mLastItem; + Q3ListViewItem* mLastItem; static const QString syncfamily; }; diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp index 86b22b2..4f286d1 100644 --- a/microkde/kresources/factory.cpp +++ b/microkde/kresources/factory.cpp @@ -42,6 +42,6 @@ using namespace KRES; -QDict<Factory> *Factory::mSelves = 0; -static KStaticDeleter< QDict<Factory> > staticDeleter; +Q3Dict<Factory> *Factory::mSelves = 0; +static KStaticDeleter< Q3Dict<Factory> > staticDeleter; Factory *Factory::self( const QString& resourceFamily) @@ -52,5 +52,5 @@ Factory *Factory::self( const QString& resourceFamily) if ( !mSelves ) { - mSelves = staticDeleter.setObject( new QDict<Factory> ); + mSelves = staticDeleter.setObject( new Q3Dict<Factory> ); } diff --git a/microkde/kresources/factory.h b/microkde/kresources/factory.h index ea01b23..709fde0 100644 --- a/microkde/kresources/factory.h +++ b/microkde/kresources/factory.h @@ -25,5 +25,5 @@ #define KRESOURCES_FACTORY_H -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -115,5 +115,5 @@ class Factory private: - static QDict<Factory> *mSelves; + static Q3Dict<Factory> *mSelves; QString mResourceFamily; diff --git a/microkde/kresources/kcmkresources.cpp b/microkde/kresources/kcmkresources.cpp index d600a31..f5eb826 100644 --- a/microkde/kresources/kcmkresources.cpp +++ b/microkde/kresources/kcmkresources.cpp @@ -21,4 +21,7 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> //US #include <kaboutdata.h> @@ -41,7 +44,7 @@ KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringLi Ok|Cancel, Ok, true ) { - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( main ); + Q3VBoxLayout *layout = new Q3VBoxLayout( main ); mConfigPage = new KRES::ConfigPage( main ); layout->addWidget( mConfigPage ); diff --git a/microkde/kresources/manager.h b/microkde/kresources/manager.h index 69062da..88705d4 100644 --- a/microkde/kresources/manager.h +++ b/microkde/kresources/manager.h @@ -33,6 +33,8 @@ $Id$ #define KRESOURCES_MANAGER_H -#include <qdict.h> +#include <q3dict.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3PtrList> #include "factory.h" @@ -176,5 +178,5 @@ class Manager : private ManagerImplListener mImpl->setListener( this ); - mListeners = new QPtrList<ManagerListener<T> >; + mListeners = new Q3PtrList<ManagerListener<T> >; } @@ -331,5 +333,5 @@ class Manager : private ManagerImplListener ManagerImpl *mImpl; Factory *mFactory; - QPtrList<ManagerListener<T> > *mListeners; + Q3PtrList<ManagerListener<T> > *mListeners; }; diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp index a6d2007..4c0751c 100644 --- a/microkde/kresources/managerimpl.cpp +++ b/microkde/kresources/managerimpl.cpp @@ -36,4 +36,6 @@ $Id$ #include <kstandarddirs.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3PtrList> #include "resource.h" @@ -233,7 +235,7 @@ Resource::List *ManagerImpl::resourceList() } -QPtrList<Resource> ManagerImpl::resources() +Q3PtrList<Resource> ManagerImpl::resources() { - QPtrList<Resource> result; + Q3PtrList<Resource> result; Resource::List::ConstIterator it; @@ -244,7 +246,7 @@ QPtrList<Resource> ManagerImpl::resources() } -QPtrList<Resource> ManagerImpl::resources( bool active ) +Q3PtrList<Resource> ManagerImpl::resources( bool active ) { - QPtrList<Resource> result; + Q3PtrList<Resource> result; Resource::List::ConstIterator it; diff --git a/microkde/kresources/managerimpl.h b/microkde/kresources/managerimpl.h index 56a2db6..1f728e5 100644 --- a/microkde/kresources/managerimpl.h +++ b/microkde/kresources/managerimpl.h @@ -33,6 +33,6 @@ $Id$ #include <qstring.h> -#include <qptrlist.h> -#include <qdict.h> +#include <q3ptrlist.h> +#include <q3dict.h> //US #include <qobject.h> @@ -82,8 +82,8 @@ class ManagerImpl : public QObject Resource::List *resourceList(); - QPtrList<Resource> resources(); + Q3PtrList<Resource> resources(); // Get only active or passive resources - QPtrList<Resource> resources( bool active ); + Q3PtrList<Resource> resources( bool active ); QStringList resourceNames(); diff --git a/microkde/kresources/resource.h b/microkde/kresources/resource.h index ed5af96..1f9527c 100644 --- a/microkde/kresources/resource.h +++ b/microkde/kresources/resource.h @@ -29,5 +29,5 @@ #endif //QT_THREAD_SUPPORT -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qwidget.h> @@ -240,5 +240,5 @@ class Resource : public QObject public: - typedef QValueList<Resource *> List; + typedef Q3ValueList<Resource *> List; /** diff --git a/microkde/kresources/selectdialog.cpp b/microkde/kresources/selectdialog.cpp index fba8648..d5b83e9 100644 --- a/microkde/kresources/selectdialog.cpp +++ b/microkde/kresources/selectdialog.cpp @@ -35,7 +35,11 @@ #include <kglobal.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qlayout.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> +#include <Q3PtrList> #include "resource.h" @@ -47,5 +51,5 @@ using namespace KRES; //US I am using KBaseDialog instead of KDialog //US : KDialog( parent, name, true ) -SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, +SelectDialog::SelectDialog( Q3PtrList<Resource> list, QWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Resource Selection" ), Help | Ok | Cancel, @@ -58,5 +62,5 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); /*US QVBoxLayout *layout = new QVBoxLayout( main ); @@ -66,13 +70,13 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US QVBoxLayout *mainLayout = new QVBoxLayout( this ); - QVBoxLayout *mainLayout = new QVBoxLayout( main ); + Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main ); mainLayout->setMargin( marginHint() ); //US QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this ); - QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *groupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); groupBox->setTitle( i18n( "Resources" ) ); //US mResourceId = new KListBox( groupBox ); - mResourceId = new QListBox( groupBox ); + mResourceId = new Q3ListBox( groupBox ); mainLayout->addWidget( groupBox ); @@ -102,5 +106,5 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, mResourceId->setCurrentItem( 0 ); - connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)), + connect( mResourceId, SIGNAL(returnPressed(Q3ListBoxItem*)), SLOT(accept()) ); } @@ -114,5 +118,5 @@ Resource *SelectDialog::resource() } -Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent ) +Resource *SelectDialog::getResource( Q3PtrList<Resource> list, QWidget *parent ) { if ( list.count() == 0 ) { diff --git a/microkde/kresources/selectdialog.h b/microkde/kresources/selectdialog.h index 7026212..be5152b 100644 --- a/microkde/kresources/selectdialog.h +++ b/microkde/kresources/selectdialog.h @@ -26,5 +26,5 @@ #include <qobject.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qmap.h> @@ -32,5 +32,5 @@ //US class KListBox; -class QListBox; +class Q3ListBox; namespace KRES { @@ -63,5 +63,5 @@ class SelectDialog : KDialogBase * @param name The name of the dialog */ - SelectDialog( QPtrList<Resource> list, QWidget *parent = 0, + SelectDialog( Q3PtrList<Resource> list, QWidget *parent = 0, const char *name = 0); @@ -77,9 +77,9 @@ class SelectDialog : KDialogBase * user has selected. Returns 0, if the dialog was canceled. */ - static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 ); + static Resource *getResource( Q3PtrList<Resource> list, QWidget *parent = 0 ); private: //US KListBox *mResourceId; - QListBox *mResourceId; + Q3ListBox *mResourceId; QMap<int, Resource*> mResourceMap; |