author | zautrix <zautrix> | 2004-10-13 02:34:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-13 02:34:50 (UTC) |
commit | e7833b80c28e38bfe6316ee5fce150635cdebe03 (patch) (side-by-side diff) | |
tree | bc52de370428ef240e370da516077e883283d398 /kaddressbook | |
parent | d56ca1073ce493afdeb54e33425638f7147d4bca (diff) | |
download | kdepimpi-e7833b80c28e38bfe6316ee5fce150635cdebe03.zip kdepimpi-e7833b80c28e38bfe6316ee5fce150635cdebe03.tar.gz kdepimpi-e7833b80c28e38bfe6316ee5fce150635cdebe03.tar.bz2 |
added font setting in KA
-rw-r--r-- | kaddressbook/details/detailsviewcontainer.cpp | 3 | ||||
-rw-r--r-- | kaddressbook/details/look_html.cpp | 3 | ||||
-rw-r--r-- | kaddressbook/kabprefs.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabprefs.h | 1 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 13 |
5 files changed, 19 insertions, 3 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp index a42499f..ceffc77 100644 --- a/kaddressbook/details/detailsviewcontainer.cpp +++ b/kaddressbook/details/detailsviewcontainer.cpp @@ -111,19 +111,16 @@ void ViewContainer::slotStyleSelected( int index ) mCurrentLook->saveSettings( config ); addr = mCurrentLook->addressee(); delete mCurrentLook; mCurrentLook = 0; } KABLookFactory *factory = mLookFactories.at( index ); - kdDebug(5720) << "ViewContainer::slotStyleSelected: " - << "creating look " - << factory->description() << endl; mCurrentLook = factory->create(); mDetailsStack->raiseWidget( mCurrentLook ); connect( mCurrentLook, SIGNAL( sendEmail( const QString& ) ), this, SIGNAL( sendEmail( const QString& ) ) ); connect( mCurrentLook, SIGNAL( browse( const QString& ) ), this, SIGNAL( browse( const QString& ) ) ); diff --git a/kaddressbook/details/look_html.cpp b/kaddressbook/details/look_html.cpp index 63364a7..64987b8 100644 --- a/kaddressbook/details/look_html.cpp +++ b/kaddressbook/details/look_html.cpp @@ -20,26 +20,29 @@ with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <addresseeview.h> #include "look_html.h" #include <qscrollview.h> +#include "kabprefs.h" KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) : KABBasicLook( parent, name ) { mView = new KPIM::AddresseeView( this ); + mView->setFont( KABPrefs::instance()->mDetailsFont ); } KABHtmlView::~KABHtmlView() { } void KABHtmlView::setAddressee( const KABC::Addressee &addr ) { + mView->setFont( KABPrefs::instance()->mDetailsFont ); mView->setAddressee( addr ); } #ifndef KAB_EMBEDDED #include "look_html.moc" #endif //KAB_EMBEDDED diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index dded2bf..9270a7d 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -34,28 +34,30 @@ #include "kabprefs.h" KABPrefs *KABPrefs::sInstance = 0; static KStaticDeleter<KABPrefs> staticDeleter; KABPrefs::KABPrefs() : KPimPrefs("kaddressbookrc") { + mDetailsFont = QFont("helvetica",12); KPrefs::setCurrentGroup( "Views" ); addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); KPrefs::setCurrentGroup( "General" ); addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true ); addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 ); #ifdef KAB_EMBEDDED addItemBool("AskForQuit",&mAskForQuit,true); addItemBool("ToolBarHor",&mToolBarHor, true ); addItemBool("ToolBarUp",&mToolBarUp, false ); addItemBool("SearchWithReturn",&mSearchWithReturn, true ); + addItemFont("DetailsFont",&mDetailsFont); #endif //KAB_EMBEDDED KPrefs::setCurrentGroup( "MainWindow" ); addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index e4f359c..4a3b6e2 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -77,16 +77,17 @@ class KABPrefs : public KPimPrefs // Views stuff QString mCurrentView; QStringList mViewNames; // Filter int mCurrentFilter; void setCategoryDefaults(); + QFont mDetailsFont; private: KABPrefs(); static KABPrefs *sInstance; }; #endif diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index e970c3d..c8b68c7 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -93,16 +93,29 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * 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()); + layout->addWidget( hBox ); + //general groupbox QVBox *vBox = new QVBox( generalPage, "qvbox" ); QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); boxLayout->setAlignment( Qt::AlignTop ); boxLayout->setMargin(KDialog::marginHintSmall() ); vBox->layout()->setMargin(KDialog::marginHintSmall()) ; vBox->layout()->setSpacing(KDialog::spacingHintSmall()); boxLayout->setSpacing( KDialog::spacingHintSmall() ); |