summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/kaddressbookcardview.cpp
Unidiff
Diffstat (limited to 'kaddressbook/views/kaddressbookcardview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index cce68b9..9c35fd6 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -187,54 +187,58 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
187 this, SLOT(addresseeExecuted(CardViewItem *))); 187 this, SLOT(addresseeExecuted(CardViewItem *)));
188 connect(mCardView, SIGNAL(selectionChanged()), 188 connect(mCardView, SIGNAL(selectionChanged()),
189 this, SLOT(addresseeSelected())); 189 this, SLOT(addresseeSelected()));
190 connect(mCardView, SIGNAL(addresseeDropped(QDropEvent*)), 190 connect(mCardView, SIGNAL(addresseeDropped(QDropEvent*)),
191 this, SIGNAL(dropped(QDropEvent*))); 191 this, SIGNAL(dropped(QDropEvent*)));
192 connect(mCardView, SIGNAL(startAddresseeDrag()), 192 connect(mCardView, SIGNAL(startAddresseeDrag()),
193 this, SIGNAL(startDrag())); 193 this, SIGNAL(startDrag()));
194 connect(this, SIGNAL(printView()), 194 connect(this, SIGNAL(printView()),
195 mCardView , SLOT(printMe())); 195 mCardView , SLOT(printMe()));
196} 196}
197 197
198KAddressBookCardView::~KAddressBookCardView() 198KAddressBookCardView::~KAddressBookCardView()
199{ 199{
200} 200}
201void KAddressBookCardView::setFocusAV() 201void KAddressBookCardView::setFocusAV()
202{ 202{
203 if ( mCardView ) 203 if ( mCardView )
204 mCardView->setFocus(); 204 mCardView->setFocus();
205 205
206} 206}
207void KAddressBookCardView::scrollUP() 207void KAddressBookCardView::scrollUP()
208{ 208{
209 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); 209 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 );
210 QApplication::postEvent( mCardView, ev ); 210 QApplication::postEvent( mCardView, ev );
211 ev = new QKeyEvent ( QEvent::KeyRelease, Qt::Key_Up, 0,0 );
212 QApplication::postEvent( mCardView, ev );
211 213
212} 214}
213void KAddressBookCardView::scrollDOWN() 215void KAddressBookCardView::scrollDOWN()
214{ 216{
215 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); 217 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 );
216 QApplication::postEvent( mCardView, ev ); 218 QApplication::postEvent( mCardView, ev );
219 ev = new QKeyEvent ( QEvent::KeyRelease, Qt::Key_Down, 0,0 );
220 QApplication::postEvent( mCardView, ev );
217} 221}
218void KAddressBookCardView::readConfig(KConfig *config) 222void KAddressBookCardView::readConfig(KConfig *config)
219{ 223{
220 KAddressBookView::readConfig(config); 224 KAddressBookView::readConfig(config);
221 225
222 // costum colors? 226 // costum colors?
223 if ( config->readBoolEntry( "EnableCustomColors", false ) ) 227 if ( config->readBoolEntry( "EnableCustomColors", false ) )
224 { 228 {
225 QPalette p( mCardView->palette() ); 229 QPalette p( mCardView->palette() );
226 QColor c = p.color(QPalette::Normal, QColorGroup::Base ); 230 QColor c = p.color(QPalette::Normal, QColorGroup::Base );
227 p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) ); 231 p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
228 c = p.color(QPalette::Normal, QColorGroup::Text ); 232 c = p.color(QPalette::Normal, QColorGroup::Text );
229 p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) ); 233 p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
230 c = p.color(QPalette::Normal, QColorGroup::Button ); 234 c = p.color(QPalette::Normal, QColorGroup::Button );
231 p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) ); 235 p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
232 c = p.color(QPalette::Normal, QColorGroup::ButtonText ); 236 c = p.color(QPalette::Normal, QColorGroup::ButtonText );
233 p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) ); 237 p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
234 c = p.color(QPalette::Normal, QColorGroup::Highlight ); 238 c = p.color(QPalette::Normal, QColorGroup::Highlight );
235 p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) ); 239 p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
236 c = p.color(QPalette::Normal, QColorGroup::HighlightedText ); 240 c = p.color(QPalette::Normal, QColorGroup::HighlightedText );
237 p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) ); 241 p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
238 mCardView->viewport()->setPalette( p ); 242 mCardView->viewport()->setPalette( p );
239 } 243 }
240 else 244 else