author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kresources | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-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 @@ -27,3 +27,3 @@ -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> @@ -31,6 +31,9 @@ #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> @@ -57,3 +60,3 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, - QFrame *main; + Q3Frame *main; @@ -61,6 +64,6 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, - 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() ); @@ -84,3 +87,3 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, - QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *resourceGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); resourceGroupBox->layout()->setSpacing( spacingHint()); 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 @@ -30,3 +30,3 @@ $Id$ -#include <qgroupbox.h> +#include <q3groupbox.h> @@ -39,2 +39,6 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3ValueList> +#include <Q3VBoxLayout> #include <kapplication.h> @@ -63,7 +67,7 @@ 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 ), @@ -99,5 +103,5 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) - 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 ); @@ -105,3 +109,3 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) groupBox->layout()->setMargin( 5 ); - QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 ); + Q3GridLayout *groupBoxLayout = new Q3GridLayout( groupBox->layout(), 4, 2 ); @@ -147,4 +151,4 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) SLOT( slotSelectionChanged() ) ); - connect( mListView, SIGNAL( clicked( QListViewItem * ) ), - SLOT( slotItemClicked( QListViewItem * ) ) ); + connect( mListView, SIGNAL( clicked( Q3ListViewItem * ) ), + SLOT( slotItemClicked( Q3ListViewItem * ) ) ); @@ -161,3 +165,3 @@ ConfigPage::~ConfigPage() { - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) { @@ -232,3 +236,3 @@ void ConfigPage::save() - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) @@ -343,3 +347,3 @@ void ConfigPage::slotAdd() bool onlyReadOnly = true; - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { @@ -368,3 +372,3 @@ void ConfigPage::slotRemove() - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item ); @@ -395,3 +399,3 @@ void ConfigPage::slotEdit() - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); @@ -437,3 +441,3 @@ void ConfigPage::slotStandard() - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { @@ -484,3 +488,3 @@ void ConfigPage::resourceDeleted( Resource* resource ) -void ConfigPage::slotItemClicked( QListViewItem *item ) +void ConfigPage::slotItemClicked( Q3ListViewItem *item ) { @@ -506,3 +510,3 @@ void ConfigPage::saveResourceSettings() - QListViewItem *item = mListView->firstChild(); + Q3ListViewItem *item = mListView->firstChild(); while ( 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 @@ -27,2 +27,4 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -33,3 +35,3 @@ class KListView; -class QListViewItem; +class Q3ListViewItem; class QPushButton; @@ -75,3 +77,3 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> protected slots: - void slotItemClicked( QListViewItem * ); + void slotItemClicked( Q3ListViewItem * ); @@ -88,3 +90,3 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> QStringList mFamilyMap; - QValueList<ResourcePageInfo> mInfoMap; + Q3ValueList<ResourcePageInfo> mInfoMap; @@ -97,3 +99,3 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> - 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 @@ -43,4 +43,4 @@ using namespace KRES; -QDict<Factory> *Factory::mSelves = 0; -static KStaticDeleter< QDict<Factory> > staticDeleter; +Q3Dict<Factory> *Factory::mSelves = 0; +static KStaticDeleter< Q3Dict<Factory> > staticDeleter; @@ -53,3 +53,3 @@ Factory *Factory::self( const QString& resourceFamily) { - 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 @@ -26,3 +26,3 @@ -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -116,3 +116,3 @@ class Factory private: - static QDict<Factory> *mSelves; + static Q3Dict<Factory> *mSelves; 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 @@ -22,2 +22,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> @@ -42,5 +45,5 @@ KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringLi { - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( main ); + Q3VBoxLayout *layout = new Q3VBoxLayout( main ); mConfigPage = new KRES::ConfigPage( main ); 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 @@ -34,4 +34,6 @@ $Id$ -#include <qdict.h> +#include <q3dict.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -177,3 +179,3 @@ class Manager : private ManagerImplListener - mListeners = new QPtrList<ManagerListener<T> >; + mListeners = new Q3PtrList<ManagerListener<T> >; } @@ -332,3 +334,3 @@ class Manager : private ManagerImplListener 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 @@ -37,2 +37,4 @@ $Id$ #include <qfile.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -234,5 +236,5 @@ Resource::List *ManagerImpl::resourceList() -QPtrList<Resource> ManagerImpl::resources() +Q3PtrList<Resource> ManagerImpl::resources() { - QPtrList<Resource> result; + Q3PtrList<Resource> result; @@ -245,5 +247,5 @@ QPtrList<Resource> ManagerImpl::resources() -QPtrList<Resource> ManagerImpl::resources( bool active ) +Q3PtrList<Resource> ManagerImpl::resources( bool active ) { - QPtrList<Resource> result; + Q3PtrList<Resource> result; 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 @@ -34,4 +34,4 @@ $Id$ #include <qstring.h> -#include <qptrlist.h> -#include <qdict.h> +#include <q3ptrlist.h> +#include <q3dict.h> //US @@ -83,6 +83,6 @@ class ManagerImpl : public QObject - QPtrList<Resource> resources(); + Q3PtrList<Resource> resources(); // Get only active or passive resources - QPtrList<Resource> resources( bool active ); + Q3PtrList<Resource> resources( bool active ); 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 @@ -30,3 +30,3 @@ -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qwidget.h> @@ -241,3 +241,3 @@ 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 @@ -36,5 +36,9 @@ -#include <qlistbox.h> +#include <q3listbox.h> #include <qlayout.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> +#include <Q3PtrList> @@ -48,3 +52,3 @@ using namespace KRES; //US : KDialog( parent, name, true ) -SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, +SelectDialog::SelectDialog( Q3PtrList<Resource> list, QWidget *parent, const char *name ) @@ -59,3 +63,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); /*US @@ -67,3 +71,3 @@ 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() ); @@ -71,3 +75,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //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" ) ); @@ -75,3 +79,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US mResourceId = new KListBox( groupBox ); - mResourceId = new QListBox( groupBox ); + mResourceId = new Q3ListBox( groupBox ); @@ -103,3 +107,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, mResourceId->setCurrentItem( 0 ); - connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)), + connect( mResourceId, SIGNAL(returnPressed(Q3ListBoxItem*)), SLOT(accept()) ); @@ -115,3 +119,3 @@ Resource *SelectDialog::resource() -Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent ) +Resource *SelectDialog::getResource( Q3PtrList<Resource> list, QWidget *parent ) { 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 @@ -27,3 +27,3 @@ #include <qobject.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qmap.h> @@ -33,3 +33,3 @@ //US class KListBox; -class QListBox; +class Q3ListBox; @@ -64,3 +64,3 @@ class SelectDialog : KDialogBase */ - SelectDialog( QPtrList<Resource> list, QWidget *parent = 0, + SelectDialog( Q3PtrList<Resource> list, QWidget *parent = 0, const char *name = 0); @@ -78,3 +78,3 @@ class SelectDialog : KDialogBase */ - static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 ); + static Resource *getResource( Q3PtrList<Resource> list, QWidget *parent = 0 ); @@ -82,3 +82,3 @@ class SelectDialog : KDialogBase //US KListBox *mResourceId; - QListBox *mResourceId; + Q3ListBox *mResourceId; |