summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views
authorzautrix <zautrix>2004-09-03 09:23:23 (UTC)
committer zautrix <zautrix>2004-09-03 09:23:23 (UTC)
commitd171ed3b09665db0f511310d6c84a23d75135f50 (patch) (unidiff)
tree557b3fd423a022559971ceafa61def5adbb7e828 /kaddressbook/views
parentf6b72fd55671131cd81a3357940c9337ea5d7494 (diff)
downloadkdepimpi-d171ed3b09665db0f511310d6c84a23d75135f50.zip
kdepimpi-d171ed3b09665db0f511310d6c84a23d75135f50.tar.gz
kdepimpi-d171ed3b09665db0f511310d6c84a23d75135f50.tar.bz2
Much better search possibility in kapi
Diffstat (limited to 'kaddressbook/views') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index 66a3f0b..0847b64 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -113,24 +113,27 @@ void KAddressBookTableView::reconstructListView()
113} 113}
114 114
115void KAddressBookTableView::writeConfig(KConfig *config) 115void KAddressBookTableView::writeConfig(KConfig *config)
116{ 116{
117 KAddressBookView::writeConfig(config); 117 KAddressBookView::writeConfig(config);
118 118
119 mListView->saveLayout(config, config->group()); 119 mListView->saveLayout(config, config->group());
120} 120}
121 121
122void KAddressBookTableView::readConfig(KConfig *config) 122void KAddressBookTableView::readConfig(KConfig *config)
123{ 123{
124 KAddressBookView::readConfig( config ); 124 KAddressBookView::readConfig( config );
125 // The config could have changed the fields, so we need to reconstruct
126 // the listview.
127 reconstructListView();
125 128
126 // costum colors? 129 // costum colors?
127 if ( config->readBoolEntry( "EnableCustomColors", false ) ) 130 if ( config->readBoolEntry( "EnableCustomColors", false ) )
128 { 131 {
129 QPalette p( mListView->palette() ); 132 QPalette p( mListView->palette() );
130 QColor c = p.color(QPalette::Normal, QColorGroup::Base ); 133 QColor c = p.color(QPalette::Normal, QColorGroup::Base );
131 p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) ); 134 p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
132 c = p.color(QPalette::Normal, QColorGroup::Text ); 135 c = p.color(QPalette::Normal, QColorGroup::Text );
133 p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) ); 136 p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
134 c = p.color(QPalette::Normal, QColorGroup::Button ); 137 c = p.color(QPalette::Normal, QColorGroup::Button );
135 p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) ); 138 p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
136 c = p.color(QPalette::Normal, QColorGroup::ButtonText ); 139 c = p.color(QPalette::Normal, QColorGroup::ButtonText );
@@ -158,27 +161,24 @@ void KAddressBookTableView::readConfig(KConfig *config)
158 // mListView->setHeaderFont( config->readFontEntry( "HeaderFont", &f ) ); 161 // mListView->setHeaderFont( config->readFontEntry( "HeaderFont", &f ) );
159 } 162 }
160 else 163 else
161 { 164 {
162 // mListView->setFont( f ); 165 // mListView->setFont( f );
163 f.setBold( true ); 166 f.setBold( true );
164 // mListView->setHeaderFont( f ); 167 // mListView->setHeaderFont( f );
165 } 168 }
166 169
167 170
168 171
169 172
170 // The config could have changed the fields, so we need to reconstruct
171 // the listview.
172 reconstructListView();
173 173
174 // Set the list view options 174 // Set the list view options
175 mListView->setAlternateBackgroundEnabled(config->readBoolEntry("ABackground", 175 mListView->setAlternateBackgroundEnabled(config->readBoolEntry("ABackground",
176 true)); 176 true));
177 mListView->setSingleLineEnabled(config->readBoolEntry("SingleLine", false)); 177 mListView->setSingleLineEnabled(config->readBoolEntry("SingleLine", false));
178 mListView->setToolTipsEnabled(config->readBoolEntry("ToolTips", true)); 178 mListView->setToolTipsEnabled(config->readBoolEntry("ToolTips", true));
179 179
180 if (config->readBoolEntry("Background", false)) 180 if (config->readBoolEntry("Background", false))
181 mListView->setBackgroundPixmap(config->readEntry("BackgroundName")); 181 mListView->setBackgroundPixmap(config->readEntry("BackgroundName"));
182 182
183 // Restore the layout of the listview 183 // Restore the layout of the listview
184 mListView->restoreLayout(config, config->group()); 184 mListView->restoreLayout(config, config->group());