author | zautrix <zautrix> | 2004-10-13 02:34:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-13 02:34:50 (UTC) |
commit | e7833b80c28e38bfe6316ee5fce150635cdebe03 (patch) (unidiff) | |
tree | bc52de370428ef240e370da516077e883283d398 | |
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 | |||
@@ -115,11 +115,8 @@ void ViewContainer::slotStyleSelected( int index ) | |||
115 | mCurrentLook = 0; | 115 | mCurrentLook = 0; |
116 | } | 116 | } |
117 | 117 | ||
118 | KABLookFactory *factory = mLookFactories.at( index ); | 118 | KABLookFactory *factory = mLookFactories.at( index ); |
119 | kdDebug(5720) << "ViewContainer::slotStyleSelected: " | ||
120 | << "creating look " | ||
121 | << factory->description() << endl; | ||
122 | 119 | ||
123 | mCurrentLook = factory->create(); | 120 | mCurrentLook = factory->create(); |
124 | mDetailsStack->raiseWidget( mCurrentLook ); | 121 | mDetailsStack->raiseWidget( mCurrentLook ); |
125 | 122 | ||
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 | |||
@@ -24,20 +24,23 @@ | |||
24 | #include <addresseeview.h> | 24 | #include <addresseeview.h> |
25 | 25 | ||
26 | #include "look_html.h" | 26 | #include "look_html.h" |
27 | #include <qscrollview.h> | 27 | #include <qscrollview.h> |
28 | #include "kabprefs.h" | ||
28 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) | 29 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) |
29 | : KABBasicLook( parent, name ) | 30 | : KABBasicLook( parent, name ) |
30 | { | 31 | { |
31 | mView = new KPIM::AddresseeView( this ); | 32 | mView = new KPIM::AddresseeView( this ); |
33 | mView->setFont( KABPrefs::instance()->mDetailsFont ); | ||
32 | } | 34 | } |
33 | 35 | ||
34 | KABHtmlView::~KABHtmlView() | 36 | KABHtmlView::~KABHtmlView() |
35 | { | 37 | { |
36 | } | 38 | } |
37 | 39 | ||
38 | void KABHtmlView::setAddressee( const KABC::Addressee &addr ) | 40 | void KABHtmlView::setAddressee( const KABC::Addressee &addr ) |
39 | { | 41 | { |
42 | mView->setFont( KABPrefs::instance()->mDetailsFont ); | ||
40 | mView->setAddressee( addr ); | 43 | mView->setAddressee( addr ); |
41 | } | 44 | } |
42 | 45 | ||
43 | #ifndef KAB_EMBEDDED | 46 | #ifndef KAB_EMBEDDED |
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index dded2bf..9270a7d 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp | |||
@@ -38,8 +38,9 @@ static KStaticDeleter<KABPrefs> staticDeleter; | |||
38 | 38 | ||
39 | KABPrefs::KABPrefs() | 39 | KABPrefs::KABPrefs() |
40 | : KPimPrefs("kaddressbookrc") | 40 | : KPimPrefs("kaddressbookrc") |
41 | { | 41 | { |
42 | mDetailsFont = QFont("helvetica",12); | ||
42 | KPrefs::setCurrentGroup( "Views" ); | 43 | KPrefs::setCurrentGroup( "Views" ); |
43 | addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); | 44 | addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); |
44 | 45 | ||
45 | KPrefs::setCurrentGroup( "General" ); | 46 | KPrefs::setCurrentGroup( "General" ); |
@@ -50,8 +51,9 @@ KABPrefs::KABPrefs() | |||
50 | addItemBool("AskForQuit",&mAskForQuit,true); | 51 | addItemBool("AskForQuit",&mAskForQuit,true); |
51 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 52 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
52 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 53 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
53 | addItemBool("SearchWithReturn",&mSearchWithReturn, true ); | 54 | addItemBool("SearchWithReturn",&mSearchWithReturn, true ); |
55 | addItemFont("DetailsFont",&mDetailsFont); | ||
54 | 56 | ||
55 | 57 | ||
56 | #endif //KAB_EMBEDDED | 58 | #endif //KAB_EMBEDDED |
57 | 59 | ||
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index e4f359c..4a3b6e2 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h | |||
@@ -81,8 +81,9 @@ class KABPrefs : public KPimPrefs | |||
81 | // Filter | 81 | // Filter |
82 | int mCurrentFilter; | 82 | int mCurrentFilter; |
83 | 83 | ||
84 | void setCategoryDefaults(); | 84 | void setCategoryDefaults(); |
85 | QFont mDetailsFont; | ||
85 | 86 | ||
86 | private: | 87 | private: |
87 | KABPrefs(); | 88 | KABPrefs(); |
88 | 89 | ||
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 | |||
@@ -97,8 +97,21 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
97 | // General page | 97 | // General page |
98 | QWidget *generalPage = new QWidget( this ); | 98 | QWidget *generalPage = new QWidget( this ); |
99 | QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), | 99 | QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), |
100 | KDialog::spacingHintSmall() ); | 100 | KDialog::spacingHintSmall() ); |
101 | |||
102 | QWidget *hBox = new QWidget( generalPage, "qhbox" ); | ||
103 | QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); | ||
104 | KPrefsWidFont *detailsFont = | ||
105 | addWidFont(i18n("phone:123"),i18n("Details view font"), | ||
106 | &(KABPrefs::instance()->mDetailsFont),hBox); | ||
107 | hboxLayout->addWidget(detailsFont->label()); | ||
108 | hboxLayout->addWidget(detailsFont->preview()); | ||
109 | hboxLayout->addWidget(detailsFont->button()); | ||
110 | hboxLayout->setMargin(KDialog::marginHintSmall() ); | ||
111 | hboxLayout->setSpacing(KDialog::spacingHintSmall()); | ||
112 | layout->addWidget( hBox ); | ||
113 | |||
101 | //general groupbox | 114 | //general groupbox |
102 | QVBox *vBox = new QVBox( generalPage, "qvbox" ); | 115 | QVBox *vBox = new QVBox( generalPage, "qvbox" ); |
103 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); | 116 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); |
104 | boxLayout->setAlignment( Qt::AlignTop ); | 117 | boxLayout->setAlignment( Qt::AlignTop ); |