-rw-r--r-- | libkdepim/kcmconfigs/kcmkdepimconfig.cpp | 4 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 53 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.h | 6 |
3 files changed, 36 insertions, 27 deletions
diff --git a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp index 5094830..9f47766 100644 --- a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp +++ b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp @@ -27,12 +27,14 @@ Copyright (c) 2004 Ulf Schenk $Id$ */ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <kdebug.h> //#include <klocale.h> //#include <stdlib.h> #include "kdepimconfigwidget.h" @@ -51,13 +53,13 @@ extern "C" #endif KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name ) : KCModule( KPimGlobalPrefs::instance(), parent, name ) { //abort(); - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" ); layout->addWidget( mConfigWidget ); layout->setSpacing( 0 ); layout->setMargin( 0 ); connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 292951b..11a2b45 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -28,22 +28,27 @@ Copyright (c) 2004 Ulf Schenk $Id$ */ #include <qlayout.h> #include <qtabwidget.h> #include <qcombobox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlineedit.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcheckbox.h> #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qdir.h> #include <qregexp.h> #include <qspinbox.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3VBoxLayout> #include <kdialog.h> #include <kprefsdialog.h> #include <klocale.h> #include <kglobalsettings.h> #include <kdateedit.h> @@ -98,13 +103,13 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() ); tabWidget = new QTabWidget( this ); topLayout->addWidget( tabWidget ); @@ -118,41 +123,41 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, void KDEPIMConfigWidget::showTimeZoneTab() { tabWidget->setCurrentPage ( 3 ) ; } void KDEPIMConfigWidget::setupBackupTab() { - QVBox *colorPage = new QVBox( this ); + Q3VBox *colorPage = new Q3VBox( this ); tabWidget->addTab( colorPage, i18n( "Backup" ) ); QWidget* topFrame = new QWidget( colorPage ); - QVBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3VBoxLayout *topLayout = new Q3VBoxLayout(topFrame); KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); topLayout->addWidget((QWidget*)sb->checkBox()); QWidget* bupFrame = new QWidget( topFrame ); topLayout->addWidget((bupFrame)); QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); - QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); + Q3VBoxLayout *bupLayout = new Q3VBoxLayout(bupFrame); sb = addWidBool(i18n("Use standard backup dir"), &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); bupLayout->addWidget((QWidget*)sb->checkBox()); mBackupUrl = new KURLRequester( bupFrame ); mBackupUrl->setPathIsDir(); mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); bupLayout->addWidget( mBackupUrl ); mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); - QHBox *dummy = new QHBox(bupFrame); + Q3HBox *dummy = new Q3HBox(bupFrame); new QLabel(i18n("Number of Backups:"),dummy); mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); new QLabel(i18n(" "),dummy); bupLayout->addWidget( dummy ); - dummy = new QHBox(bupFrame); + dummy = new Q3HBox(bupFrame); new QLabel(i18n("Make backup every "),dummy); mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); new QLabel(i18n(" days"),dummy); new QLabel(i18n(" "),dummy); bupLayout->addWidget( dummy ); QString localKdeDir; @@ -164,24 +169,24 @@ void KDEPIMConfigWidget::setupBackupTab() KPimGlobalPrefs::instance()->mBackupUseDefaultDir = true; } } void KDEPIMConfigWidget::setupStoreTab() { - QVBox *colorPage = new QVBox( this ); + Q3VBox *colorPage = new Q3VBox( this ); tabWidget->addTab( colorPage, i18n( "Colors" ) ); QWidget* cw = new QWidget( colorPage ); KPrefsWidColor *holidayColor = addWidColor(i18n("Alternating background of list views"), &(KPimGlobalPrefs::instance()->mAlternateColor),cw); - QHBoxLayout *topLayout = new QHBoxLayout(cw); + Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw); topLayout->addWidget(holidayColor->label()); topLayout->addWidget( (QWidget* )holidayColor->button()); - QVBox *storePage = new QVBox( this ); + Q3VBox *storePage = new Q3VBox( this ); if ( QApplication::desktop()->height() > 240 ) new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); mStoreUrl = new KURLRequester( storePage ); mStoreUrl->setPathIsDir(); mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); @@ -197,13 +202,13 @@ void KDEPIMConfigWidget::setupStoreTab() qDebug("Reading config from %s ", confFile.latin1()); } } #endif new QLabel( i18n("New dirs are created automatically"), storePage ); - QHBox *bb = new QHBox( storePage ); + Q3HBox *bb = new Q3HBox( storePage ); QPushButton * pb; if ( QApplication::desktop()->width() < 640 ) pb = new QPushButton ( i18n("Save"), bb ); else pb = new QPushButton ( i18n("Save settings"), bb ); connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); @@ -267,13 +272,13 @@ void KDEPIMConfigWidget::saveStoreSettings() saveStoreSettings(); } } void KDEPIMConfigWidget::setupExternalAppTab() { QWidget *externalAppsPage = new QWidget( this ); - QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), + Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); mExternalApps = new QComboBox( externalAppsPage ); QMap<ExternalAppHandler::Types, QString>::Iterator it; for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) @@ -282,14 +287,14 @@ void KDEPIMConfigWidget::setupExternalAppTab() layout->addWidget( mExternalApps ); connect( mExternalApps, SIGNAL( activated( int ) ), this, SLOT (externalapp_changed( int ) ) ); - mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); - QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); + mExternalAppGroupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); + Q3GridLayout *boxLayout = new Q3GridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); mExternalAppGroupBox->layout()->setMargin(4); mClient = new QComboBox( mExternalAppGroupBox ); boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); connect( mClient, SIGNAL( activated( int ) ), @@ -349,13 +354,13 @@ void KDEPIMConfigWidget::setupExternalAppTab() } void KDEPIMConfigWidget::setupLocaleDateTab() { QWidget *topFrame = new QWidget( this ); - QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); + Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); topLayout->setMargin(KDialog::marginHintSmall()); int iii = 0; @@ -417,13 +422,13 @@ void KDEPIMConfigWidget::setupLocaleDateTab() } void KDEPIMConfigWidget::setupLocaleTab() { QWidget *topFrame = new QWidget( this ); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(KDialog::spacingHint()); topLayout->setMargin(KDialog::marginHint()); int iii = 0; KPrefsWidRadios *syncPrefsGroup = addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); @@ -439,13 +444,13 @@ void KDEPIMConfigWidget::setupLocaleTab() topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); ++iii; tabWidget->addTab( topFrame, i18n( "Language" ) ); topFrame = new QWidget( this ); - topLayout = new QGridLayout(topFrame,4,2); + topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(KDialog::spacingHint()); topLayout->setMargin(KDialog::marginHint()); iii = 0; syncPrefsGroup = addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); @@ -468,25 +473,25 @@ void KDEPIMConfigWidget::setupLocaleTab() } void KDEPIMConfigWidget::setupTimeZoneTab() { QWidget *topFrame; - QGridLayout *topLayout ; + Q3GridLayout *topLayout ; topFrame = new QWidget( this ); - topLayout = new QGridLayout( topFrame, 5, 2); + topLayout = new Q3GridLayout( topFrame, 5, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); topLayout->setMargin(KDialog::marginHintSmall()); - QHBox *timeZoneBox = new QHBox( topFrame ); + Q3HBox *timeZoneBox = new Q3HBox( topFrame ); topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); new QLabel( i18n("Timezone:"), timeZoneBox ); mTimeZoneCombo = new QComboBox( timeZoneBox ); if ( QApplication::desktop()->width() < 300 ) { mTimeZoneCombo->setMaximumWidth(150); @@ -547,13 +552,13 @@ void KDEPIMConfigWidget::setupTimeZoneTab() connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); topFrame = new QWidget( this ); - topLayout = new QGridLayout( topFrame, 3, 2); + topLayout = new Q3GridLayout( topFrame, 3, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); topLayout->setMargin(KDialog::marginHintSmall()); tabWidget->addTab( topFrame, i18n( "Fonts" ) ); QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); topLayout->addMultiCellWidget(labb,0,0,0,2); @@ -708,13 +713,13 @@ void KDEPIMConfigWidget::updateClientWidgets() // update group box mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); //update the entries in the client combobox mClient->clear(); - QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); + Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); DefaultAppItem* dai; for ( dai=items.first(); dai != 0; dai=items.next() ) { mClient->insertItem( i18n(dai->_label), dai->_id ); if (dai->_id == mCurrentClient) diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h index 824ef79..d693015 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.h +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h @@ -31,20 +31,22 @@ $Id$ #ifndef KDEPIMCONFIGWIDGET_H #define KDEPIMCONFIGWIDGET_H #include <kprefswidget.h> #include <kio/kfile/kurlrequester.h> #include <qmap.h> +//Added by qt3to4: +#include <QLabel> #include "externalapphandler.h" class QComboBox; class QLineEdit; class KPimGlobalPrefs; -class QGroupBox; +class Q3GroupBox; class QTabWidget; class KDateEdit; class KDEPIMConfigWidget : public KPrefsWidget { Q_OBJECT @@ -103,13 +105,13 @@ class KDEPIMConfigWidget : public KPrefsWidget // KListView *mExtensionView; // QCheckBox *mNameParsing; // QCheckBox *mViewsSingleClickBox; // QPushButton *mConfigureButton; QComboBox* mExternalApps; - QGroupBox* mExternalAppGroupBox; + Q3GroupBox* mExternalAppGroupBox; QComboBox* mClient; QLineEdit* mChannel; QLineEdit* mMessage; QLineEdit* mParameters; |