author | zautrix <zautrix> | 2004-10-19 10:52:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-19 10:52:21 (UTC) |
commit | 4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69 (patch) (side-by-side diff) | |
tree | 8213284e178e82b6ab3a41bae1ef81379704379f /kaddressbook/kcmconfigs/kabconfigwidget.cpp | |
parent | b5d1458a283b624980ec64b10b3f7ec1168fc659 (diff) | |
download | kdepimpi-4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69.zip kdepimpi-4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69.tar.gz kdepimpi-4f780ff70bc13bf9cb7e7c33f869a59dfcc36e69.tar.bz2 |
fixed layout problems in config widgets
Diffstat (limited to 'kaddressbook/kcmconfigs/kabconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index c8b68c7..936d052 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -54,115 +54,115 @@ #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( KABPrefs* prefs, QWidget *parent, const char *name ) : KPrefsWidget( prefs, 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::marginHintSmall(), KDialog::spacingHintSmall() ); + QWidget *hBox = new QWidget( generalPage, "qhbox" ); QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); KPrefsWidFont *detailsFont = addWidFont(i18n("phone:123"),i18n("Details view font"), &(KABPrefs::instance()->mDetailsFont),hBox); hboxLayout->addWidget(detailsFont->label()); hboxLayout->addWidget(detailsFont->preview()); hboxLayout->addWidget(detailsFont->button()); hboxLayout->setMargin(KDialog::marginHintSmall() ); hboxLayout->setSpacing(KDialog::spacingHintSmall()); + //hBox->setBackgroundColor( black); layout->addWidget( hBox ); //general groupbox - QVBox *vBox = new QVBox( generalPage, "qvbox" ); - QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); + QWidget *vBox = new QWidget( generalPage, "qvbox" ); + QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); boxLayout->setAlignment( Qt::AlignTop ); boxLayout->setMargin(KDialog::marginHintSmall() ); - vBox->layout()->setMargin(KDialog::marginHintSmall()) ; - vBox->layout()->setSpacing(KDialog::spacingHintSmall()); boxLayout->setSpacing( KDialog::spacingHintSmall() ); mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); boxLayout->addWidget( mSearchReturnBox ); mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); boxLayout->addWidget( mViewsSingleClickBox ); mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); boxLayout->addWidget( mNameParsing ); mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); boxLayout->addWidget( mMultipleViewsAtOnce ); mAskForQuit = new QCheckBox( i18n( "Ask for quit when closing Ka/Pi" ), vBox, "mquit" ); boxLayout->addWidget( mAskForQuit ); layout->addWidget( vBox ); tabWidget->addTab( generalPage, i18n( "General" ) ); // Extension page QWidget *extensionPage = new QWidget( this ); QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); //extensions groupbox QGroupBox* groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage ); 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 ); extensionLayout->addWidget( groupBox ); connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |