author | zautrix <zautrix> | 2004-07-03 22:32:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 22:32:36 (UTC) |
commit | 00fe3539778c859d22f595e516733b3cc792e167 (patch) (side-by-side diff) | |
tree | 0970b0a64c63395a0d66f1debe8226501b08e7ea /kaddressbook/kcmconfigs/kabconfigwidget.cpp | |
parent | 5e59162e6eb6603610d1ca4c96d5d97acae0f60b (diff) | |
download | kdepimpi-00fe3539778c859d22f595e516733b3cc792e167.zip kdepimpi-00fe3539778c859d22f595e516733b3cc792e167.tar.gz kdepimpi-00fe3539778c859d22f595e516733b3cc792e167.tar.bz2 |
Made configure kaddressbook dialog fitting on 5500 display
Diffstat (limited to 'kaddressbook/kcmconfigs/kabconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 7b3e5c6..38c7946 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -46,115 +46,121 @@ #include "addresseewidget.h" #include "extensionconfigdialog.h" #include "extensionwidget.h" #include "kabprefs.h" #include "kabconfigwidget.h" class ExtensionItem : public QCheckListItem { public: #ifndef KAB_EMBEDDED ExtensionItem( QListView *parent, const QString &text ); void setService( const KService::Ptr &ptr ); #else //KAB_EMBEDDED ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ); void setFactory( ExtensionFactory* fac ); #endif //KAB_EMBEDDED bool configWidgetAvailable() const; ExtensionFactory *factory() const; virtual QString text( int column ) const; private: #ifndef KAB_EMBEDDED KService::Ptr mPtr; #else //KAB_EMBEDDED ExtensionFactory* mFactory; QString mName; QString mComment; #endif //KAB_EMBEDDED }; KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) { QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); QTabWidget *tabWidget = new QTabWidget( this ); topLayout->addWidget( tabWidget ); // General page QWidget *generalPage = new QWidget( this ); - QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHint(), - KDialog::spacingHint() ); + QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), + KDialog::spacingHintSmall() ); QGroupBox *groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "General" ), generalPage ); QVBoxLayout *boxLayout = new QVBoxLayout( groupBox->layout() ); boxLayout->setAlignment( Qt::AlignTop ); - + boxLayout->setMargin(KDialog::marginHintSmall() ); + groupBox->layout()->setMargin(KDialog::marginHintSmall()) ; + groupBox->layout()->setSpacing(KDialog::spacingHintSmall()); + boxLayout->setSpacing( KDialog::spacingHintSmall() ); mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" ); boxLayout->addWidget( mViewsSingleClickBox ); mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" ); boxLayout->addWidget( mNameParsing ); layout->addWidget( groupBox ); groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions" ), generalPage ); boxLayout = new QVBoxLayout( groupBox->layout() ); boxLayout->setAlignment( Qt::AlignTop ); - + boxLayout->setMargin(KDialog::marginHintSmall()); + boxLayout->setSpacing(KDialog::spacingHintSmall()); + groupBox->layout()->setMargin(1) ; + groupBox->layout()->setSpacing(0); mExtensionView = new KListView( groupBox ); mExtensionView->setAllColumnsShowFocus( true ); mExtensionView->addColumn( i18n( "Name" ) ); mExtensionView->addColumn( i18n( "Description" ) ); mExtensionView->setMaximumHeight(80); boxLayout->addWidget( mExtensionView ); mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox ); mConfigureButton->setEnabled( false ); boxLayout->addWidget( mConfigureButton ); layout->addWidget( groupBox ); connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), SLOT( selectionChanged( QListViewItem* ) ) ); connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), SLOT( itemClicked( QListViewItem* ) ) ); connect( mConfigureButton, SIGNAL( clicked() ), SLOT( configureExtension() ) ); tabWidget->addTab( generalPage, i18n( "General" ) ); // Addressee page mAddresseeWidget = new AddresseeWidget( this ); tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) ); connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) ); } void KABConfigWidget::restoreSettings() { bool blocked = signalsBlocked(); blockSignals( true ); mNameParsing->setChecked( KABPrefs::instance()->mAutomaticNameParsing ); mViewsSingleClickBox->setChecked( KABPrefs::instance()->mHonorSingleClick ); mAddresseeWidget->restoreSettings(); restoreExtensionSettings(); blockSignals( blocked ); emit changed( false ); } void KABConfigWidget::saveSettings() |