author | zautrix <zautrix> | 2005-04-02 12:16:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-02 12:16:34 (UTC) |
commit | 997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe (patch) (unidiff) | |
tree | f788b37459574b5cea0d2ab874882c6a396c240d /kaddressbook | |
parent | e0d51120d2f0c178115746e0c1357af40f95bc77 (diff) | |
download | kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.zip kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.gz kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.bz2 |
more fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 5 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/views/colorlistbox.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/views/colorlistbox.h | 1 | ||||
-rw-r--r-- | kaddressbook/views/configurecardviewdialog.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/views/configuretableviewdialog.cpp | 6 |
6 files changed, 20 insertions, 5 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 5ef61b1..e34951a 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -370,65 +370,65 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
370 | SLOT( sendMail( const QString& ) ) ); | 370 | SLOT( sendMail( const QString& ) ) ); |
371 | 371 | ||
372 | 372 | ||
373 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); | 373 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); |
374 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); | 374 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); |
375 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); | 375 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); |
376 | connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); | 376 | connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); |
377 | connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); | 377 | connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); |
378 | 378 | ||
379 | 379 | ||
380 | #ifndef KAB_EMBEDDED | 380 | #ifndef KAB_EMBEDDED |
381 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), | 381 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), |
382 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); | 382 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); |
383 | 383 | ||
384 | connect( mDetails, SIGNAL( browse( const QString& ) ), | 384 | connect( mDetails, SIGNAL( browse( const QString& ) ), |
385 | SLOT( browse( const QString& ) ) ); | 385 | SLOT( browse( const QString& ) ) ); |
386 | 386 | ||
387 | 387 | ||
388 | mAddressBookService = new KAddressBookService( this ); | 388 | mAddressBookService = new KAddressBookService( this ); |
389 | 389 | ||
390 | #endif //KAB_EMBEDDED | 390 | #endif //KAB_EMBEDDED |
391 | 391 | ||
392 | mMessageTimer = new QTimer( this ); | 392 | mMessageTimer = new QTimer( this ); |
393 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); | 393 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); |
394 | mEditorDialog = 0; | 394 | mEditorDialog = 0; |
395 | createAddresseeEditorDialog( this ); | 395 | createAddresseeEditorDialog( this ); |
396 | setModified( false ); | 396 | setModified( false ); |
397 | mBRdisabled = false; | 397 | mBRdisabled = false; |
398 | #ifndef DESKTOP_VERSION | 398 | #ifndef DESKTOP_VERSION |
399 | infrared = 0; | 399 | infrared = 0; |
400 | #endif | 400 | #endif |
401 | //toggleBeamReceive( ); | 401 | //toggleBeamReceive( ); |
402 | //mMainWindow->toolBar()->show(); | 402 | mMainWindow->toolBar()->show(); |
403 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi | 403 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi |
404 | QTimer::singleShot( 10, this , SLOT ( updateToolBar())); | 404 | QTimer::singleShot( 10, this , SLOT ( updateToolBar())); |
405 | } | 405 | } |
406 | 406 | ||
407 | void KABCore::updateToolBar() | 407 | void KABCore::updateToolBar() |
408 | { | 408 | { |
409 | static int iii = 0; | 409 | static int iii = 0; |
410 | ++iii; | 410 | ++iii; |
411 | mMainWindow->toolBar()->repaintMe(); | 411 | mMainWindow->toolBar()->repaintMe(); |
412 | if ( iii < 4 ) | 412 | if ( iii < 4 ) |
413 | QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); | 413 | QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); |
414 | } | 414 | } |
415 | KABCore::~KABCore() | 415 | KABCore::~KABCore() |
416 | { | 416 | { |
417 | // save(); | 417 | // save(); |
418 | //saveSettings(); | 418 | //saveSettings(); |
419 | //KABPrefs::instance()->writeConfig(); | 419 | //KABPrefs::instance()->writeConfig(); |
420 | delete AddresseeConfig::instance(); | 420 | delete AddresseeConfig::instance(); |
421 | mAddressBook = 0; | 421 | mAddressBook = 0; |
422 | KABC::StdAddressBook::close(); | 422 | KABC::StdAddressBook::close(); |
423 | 423 | ||
424 | delete syncManager; | 424 | delete syncManager; |
425 | #ifndef DESKTOP_VERSION | 425 | #ifndef DESKTOP_VERSION |
426 | if ( infrared ) | 426 | if ( infrared ) |
427 | delete infrared; | 427 | delete infrared; |
428 | #endif | 428 | #endif |
429 | } | 429 | } |
430 | void KABCore::receive( const QCString& cmsg, const QByteArray& data ) | 430 | void KABCore::receive( const QCString& cmsg, const QByteArray& data ) |
431 | { | 431 | { |
432 | //qDebug("KA: QCOP message received: %s ", cmsg.data() ); | 432 | //qDebug("KA: QCOP message received: %s ", cmsg.data() ); |
433 | if ( cmsg == "setDocument(QString)" ) { | 433 | if ( cmsg == "setDocument(QString)" ) { |
434 | QDataStream stream( data, IO_ReadOnly ); | 434 | QDataStream stream( data, IO_ReadOnly ); |
@@ -2144,64 +2144,65 @@ void KABCore::addActionsManually() | |||
2144 | mb->insertItem( i18n("&Settings"), settingsMenu ); | 2144 | mb->insertItem( i18n("&Settings"), settingsMenu ); |
2145 | #ifdef DESKTOP_VERSION | 2145 | #ifdef DESKTOP_VERSION |
2146 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 2146 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
2147 | #else | 2147 | #else |
2148 | mb->insertItem( i18n("Sync"), syncMenu ); | 2148 | mb->insertItem( i18n("Sync"), syncMenu ); |
2149 | #endif | 2149 | #endif |
2150 | //mb->insertItem( i18n("&Change"), changeMenu ); | 2150 | //mb->insertItem( i18n("&Change"), changeMenu ); |
2151 | mb->insertItem( i18n("&Help"), helpMenu ); | 2151 | mb->insertItem( i18n("&Help"), helpMenu ); |
2152 | mIncSearchWidget = new IncSearchWidget( tb ); | 2152 | mIncSearchWidget = new IncSearchWidget( tb ); |
2153 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 2153 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
2154 | #ifndef DESKTOP_VERSION | 2154 | #ifndef DESKTOP_VERSION |
2155 | } else { | 2155 | } else { |
2156 | //US setup toolbar | 2156 | //US setup toolbar |
2157 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2157 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2158 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2158 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
2159 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); | 2159 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); |
2160 | tb->insertWidget(-1, 0, menuBarTB); | 2160 | tb->insertWidget(-1, 0, menuBarTB); |
2161 | mIncSearchWidget = new IncSearchWidget( tb ); | 2161 | mIncSearchWidget = new IncSearchWidget( tb ); |
2162 | tb->enableMoving(false); | 2162 | tb->enableMoving(false); |
2163 | popupBarTB->insertItem( i18n("&File"), fileMenu ); | 2163 | popupBarTB->insertItem( i18n("&File"), fileMenu ); |
2164 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); | 2164 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); |
2165 | popupBarTB->insertItem( i18n("&View"), viewMenu ); | 2165 | popupBarTB->insertItem( i18n("&View"), viewMenu ); |
2166 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); | 2166 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); |
2167 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 2167 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
2168 | mViewManager->getFilterAction()->plug ( popupBarTB); | 2168 | mViewManager->getFilterAction()->plug ( popupBarTB); |
2169 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); | 2169 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); |
2170 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); | 2170 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); |
2171 | if (QApplication::desktop()->width() > 320 ) { | 2171 | if (QApplication::desktop()->width() > 320 ) { |
2172 | // mViewManager->getFilterAction()->plug ( tb); | 2172 | // mViewManager->getFilterAction()->plug ( tb); |
2173 | } | 2173 | } |
2174 | } | 2174 | } |
2175 | #endif | 2175 | #endif |
2176 | mIncSearchWidget->setSize(); | ||
2176 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2177 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2177 | 2178 | ||
2178 | 2179 | ||
2179 | 2180 | ||
2180 | //US Now connect the actions with the menue entries. | 2181 | //US Now connect the actions with the menue entries. |
2181 | #ifdef DESKTOP_VERSION | 2182 | #ifdef DESKTOP_VERSION |
2182 | mActionPrint->plug( fileMenu ); | 2183 | mActionPrint->plug( fileMenu ); |
2183 | mActionPrintDetails->plug( fileMenu ); | 2184 | mActionPrintDetails->plug( fileMenu ); |
2184 | fileMenu->insertSeparator(); | 2185 | fileMenu->insertSeparator(); |
2185 | #endif | 2186 | #endif |
2186 | mActionMail->plug( fileMenu ); | 2187 | mActionMail->plug( fileMenu ); |
2187 | fileMenu->insertSeparator(); | 2188 | fileMenu->insertSeparator(); |
2188 | 2189 | ||
2189 | mActionNewContact->plug( editMenu ); | 2190 | mActionNewContact->plug( editMenu ); |
2190 | mActionNewContact->plug( tb ); | 2191 | mActionNewContact->plug( tb ); |
2191 | 2192 | ||
2192 | mActionEditAddressee->plug( editMenu ); | 2193 | mActionEditAddressee->plug( editMenu ); |
2193 | editMenu->insertSeparator(); | 2194 | editMenu->insertSeparator(); |
2194 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 2195 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
2195 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 2196 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
2196 | mActionEditAddressee->plug( tb ); | 2197 | mActionEditAddressee->plug( tb ); |
2197 | 2198 | ||
2198 | // fileMenu->insertSeparator(); | 2199 | // fileMenu->insertSeparator(); |
2199 | mActionSave->plug( fileMenu ); | 2200 | mActionSave->plug( fileMenu ); |
2200 | fileMenu->insertItem( "&Import", ImportMenu ); | 2201 | fileMenu->insertItem( "&Import", ImportMenu ); |
2201 | fileMenu->insertItem( "&Export", ExportMenu ); | 2202 | fileMenu->insertItem( "&Export", ExportMenu ); |
2202 | editMenu->insertItem( i18n("&Change"), changeMenu ); | 2203 | editMenu->insertItem( i18n("&Change"), changeMenu ); |
2203 | editMenu->insertSeparator(); | 2204 | editMenu->insertSeparator(); |
2204 | #ifndef DESKTOP_VERSION | 2205 | #ifndef DESKTOP_VERSION |
2205 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); | 2206 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); |
2206 | #endif | 2207 | #endif |
2207 | #if 0 | 2208 | #if 0 |
@@ -2266,65 +2267,65 @@ void KABCore::addActionsManually() | |||
2266 | mActionWhoAmI->plug( settingsMenu ); | 2267 | mActionWhoAmI->plug( settingsMenu ); |
2267 | //mActionEditCategories->plug( changeMenu ); | 2268 | //mActionEditCategories->plug( changeMenu ); |
2268 | mActionCategories->plug( changeMenu ); | 2269 | mActionCategories->plug( changeMenu ); |
2269 | //mActionManageCategories->plug( changeMenu ); | 2270 | //mActionManageCategories->plug( changeMenu ); |
2270 | 2271 | ||
2271 | //mActionCategories->plug( settingsMenu ); | 2272 | //mActionCategories->plug( settingsMenu ); |
2272 | 2273 | ||
2273 | 2274 | ||
2274 | mActionWN->plug( helpMenu ); | 2275 | mActionWN->plug( helpMenu ); |
2275 | mActionSyncHowto->plug( helpMenu ); | 2276 | mActionSyncHowto->plug( helpMenu ); |
2276 | mActionKdeSyncHowto->plug( helpMenu ); | 2277 | mActionKdeSyncHowto->plug( helpMenu ); |
2277 | mActionMultiSyncHowto->plug( helpMenu ); | 2278 | mActionMultiSyncHowto->plug( helpMenu ); |
2278 | mActionFaq->plug( helpMenu ); | 2279 | mActionFaq->plug( helpMenu ); |
2279 | mActionLicence->plug( helpMenu ); | 2280 | mActionLicence->plug( helpMenu ); |
2280 | mActionAboutKAddressbook->plug( helpMenu ); | 2281 | mActionAboutKAddressbook->plug( helpMenu ); |
2281 | 2282 | ||
2282 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2283 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2283 | 2284 | ||
2284 | mActionSave->plug( tb ); | 2285 | mActionSave->plug( tb ); |
2285 | mViewManager->getFilterAction()->plug ( tb); | 2286 | mViewManager->getFilterAction()->plug ( tb); |
2286 | //LR hide filteraction on started in 480x640 | 2287 | //LR hide filteraction on started in 480x640 |
2287 | if (QApplication::desktop()->width() == 480 ) { | 2288 | if (QApplication::desktop()->width() == 480 ) { |
2288 | mViewManager->getFilterAction()->setComboWidth( 0 ); | 2289 | mViewManager->getFilterAction()->setComboWidth( 0 ); |
2289 | } | 2290 | } |
2290 | mActionUndo->plug( tb ); | 2291 | mActionUndo->plug( tb ); |
2291 | mActionDelete->plug( tb ); | 2292 | mActionDelete->plug( tb ); |
2292 | mActionRedo->plug( tb ); | 2293 | mActionRedo->plug( tb ); |
2293 | } else { | 2294 | } else { |
2294 | mActionSave->plug( tb ); | 2295 | mActionSave->plug( tb ); |
2295 | tb->enableMoving(false); | 2296 | tb->enableMoving(false); |
2296 | } | 2297 | } |
2297 | //mActionQuit->plug ( tb ); | 2298 | //mActionQuit->plug ( tb ); |
2298 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2299 | //tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2299 | 2300 | ||
2300 | //US link the searchwidget first to this. | 2301 | //US link the searchwidget first to this. |
2301 | // The real linkage to the toolbar happens later. | 2302 | // The real linkage to the toolbar happens later. |
2302 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2303 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
2303 | //US tb->insertItem( mIncSearchWidget ); | 2304 | //US tb->insertItem( mIncSearchWidget ); |
2304 | /*US | 2305 | /*US |
2305 | mIncSearchWidget = new IncSearchWidget( tb ); | 2306 | mIncSearchWidget = new IncSearchWidget( tb ); |
2306 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 2307 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
2307 | SLOT( incrementalSearch( const QString& ) ) ); | 2308 | SLOT( incrementalSearch( const QString& ) ) ); |
2308 | 2309 | ||
2309 | mJumpButtonBar = new JumpButtonBar( this, this ); | 2310 | mJumpButtonBar = new JumpButtonBar( this, this ); |
2310 | 2311 | ||
2311 | //US topLayout->addWidget( mJumpButtonBar ); | 2312 | //US topLayout->addWidget( mJumpButtonBar ); |
2312 | this->layout()->add( mJumpButtonBar ); | 2313 | this->layout()->add( mJumpButtonBar ); |
2313 | */ | 2314 | */ |
2314 | 2315 | ||
2315 | #endif //KAB_EMBEDDED | 2316 | #endif //KAB_EMBEDDED |
2316 | 2317 | ||
2317 | mActionExport2phone->plug( ExportMenu ); | 2318 | mActionExport2phone->plug( ExportMenu ); |
2318 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 2319 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
2319 | syncManager->fillSyncMenu(); | 2320 | syncManager->fillSyncMenu(); |
2320 | 2321 | ||
2321 | } | 2322 | } |
2322 | void KABCore::showLicence() | 2323 | void KABCore::showLicence() |
2323 | { | 2324 | { |
2324 | KApplication::showLicence(); | 2325 | KApplication::showLicence(); |
2325 | } | 2326 | } |
2326 | 2327 | ||
2327 | void KABCore::manageCategories( ) | 2328 | void KABCore::manageCategories( ) |
2328 | { | 2329 | { |
2329 | KABCatPrefs* cp = new KABCatPrefs(); | 2330 | KABCatPrefs* cp = new KABCatPrefs(); |
2330 | cp->show(); | 2331 | cp->show(); |
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 86f0f3d..0614d06 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -675,63 +675,63 @@ void ViewManager::initActions() | |||
675 | #else //KAB_EMBEDDED | 675 | #else //KAB_EMBEDDED |
676 | action->plug(viewmenu); | 676 | action->plug(viewmenu); |
677 | #endif //KAB_EMBEDDED | 677 | #endif //KAB_EMBEDDED |
678 | 678 | ||
679 | action = new KAction( i18n( "Add View..." ), "window_new", 0, this, | 679 | action = new KAction( i18n( "Add View..." ), "window_new", 0, this, |
680 | SLOT( addView() ), mCore->actionCollection(), "view_add" ); | 680 | SLOT( addView() ), mCore->actionCollection(), "view_add" ); |
681 | #ifndef KAB_EMBEDDED | 681 | #ifndef KAB_EMBEDDED |
682 | action->setWhatsThis( i18n( "You can add a new view by choosing one of the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views." ) ); | 682 | action->setWhatsThis( i18n( "You can add a new view by choosing one of the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views." ) ); |
683 | #else //KAB_EMBEDDED | 683 | #else //KAB_EMBEDDED |
684 | action->plug(viewmenu); | 684 | action->plug(viewmenu); |
685 | #endif //KAB_EMBEDDED | 685 | #endif //KAB_EMBEDDED |
686 | 686 | ||
687 | mActionDeleteView = new KAction( i18n( "Delete View" ), "view_remove", 0, | 687 | mActionDeleteView = new KAction( i18n( "Delete View" ), "view_remove", 0, |
688 | this, SLOT( deleteView() ), | 688 | this, SLOT( deleteView() ), |
689 | mCore->actionCollection(), "view_delete" ); | 689 | mCore->actionCollection(), "view_delete" ); |
690 | #ifndef KAB_EMBEDDED | 690 | #ifndef KAB_EMBEDDED |
691 | mActionDeleteView->setWhatsThis( i18n( "By pressing this button you can delete the actual view, which you have added before." ) ); | 691 | mActionDeleteView->setWhatsThis( i18n( "By pressing this button you can delete the actual view, which you have added before." ) ); |
692 | #else //KAB_EMBEDDED | 692 | #else //KAB_EMBEDDED |
693 | mActionDeleteView->plug(viewmenu); | 693 | mActionDeleteView->plug(viewmenu); |
694 | viewmenu->insertSeparator(); | 694 | viewmenu->insertSeparator(); |
695 | #endif //KAB_EMBEDDED | 695 | #endif //KAB_EMBEDDED |
696 | 696 | ||
697 | #ifndef KAB_EMBEDDED | 697 | #ifndef KAB_EMBEDDED |
698 | action = new KAction( i18n( "Refresh View" ), "reload", 0, this, | 698 | action = new KAction( i18n( "Refresh View" ), "reload", 0, this, |
699 | SLOT( refreshView(const QString &) ), mCore->actionCollection(), | 699 | SLOT( refreshView(const QString &) ), mCore->actionCollection(), |
700 | "view_refresh" ); | 700 | "view_refresh" ); |
701 | action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) ); | 701 | action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) ); |
702 | #else //KAB_EMBEDDED | 702 | #else //KAB_EMBEDDED |
703 | action = new KAction( i18n( "Refresh View" ), "reload", 0, this, | 703 | action = new KAction( i18n( "Refresh View" ), "reload", 0, this, |
704 | SLOT( refreshView()), mCore->actionCollection(), | 704 | SLOT( refreshView()), mCore->actionCollection(), |
705 | "view_refresh" ); | 705 | "view_refresh" ); |
706 | action->plug(viewmenu); | 706 | action->plug(viewmenu); |
707 | viewmenu->insertSeparator(); | 707 | //viewmenu->insertSeparator(); |
708 | #endif //KAB_EMBEDDED | 708 | #endif //KAB_EMBEDDED |
709 | 709 | ||
710 | action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, | 710 | action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, |
711 | SLOT( configureFilters() ), mCore->actionCollection(), | 711 | SLOT( configureFilters() ), mCore->actionCollection(), |
712 | "options_edit_filters" ); | 712 | "options_edit_filters" ); |
713 | 713 | ||
714 | mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); | 714 | mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); |
715 | #if KDE_VERSION >= 309 | 715 | #if KDE_VERSION >= 309 |
716 | mActionSelectFilter->setMenuAccelsEnabled( false ); | 716 | mActionSelectFilter->setMenuAccelsEnabled( false ); |
717 | #endif | 717 | #endif |
718 | connect( mActionSelectFilter, SIGNAL( activated( int ) ), | 718 | connect( mActionSelectFilter, SIGNAL( activated( int ) ), |
719 | SLOT( setActiveFilter( int ) ) ); | 719 | SLOT( setActiveFilter( int ) ) ); |
720 | 720 | ||
721 | #ifdef KAB_EMBEDDED | 721 | #ifdef KAB_EMBEDDED |
722 | action->plug(settingsmenu); | 722 | action->plug(settingsmenu); |
723 | mActionSelectFilter->plug(viewmenu,0); | 723 | mActionSelectFilter->plug(viewmenu,0); |
724 | #endif //KAB_EMBEDDED | 724 | #endif //KAB_EMBEDDED |
725 | 725 | ||
726 | } | 726 | } |
727 | 727 | ||
728 | void ViewManager::initGUI() | 728 | void ViewManager::initGUI() |
729 | { | 729 | { |
730 | QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 ); | 730 | QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 ); |
731 | mViewWidgetStack = new QWidgetStack( this ); | 731 | mViewWidgetStack = new QWidgetStack( this ); |
732 | layout->addWidget( mViewWidgetStack ); | 732 | layout->addWidget( mViewWidgetStack ); |
733 | } | 733 | } |
734 | 734 | ||
735 | #ifndef KAB_EMBEDDED | 735 | #ifndef KAB_EMBEDDED |
736 | #include "viewmanager.moc" | 736 | #include "viewmanager.moc" |
737 | #endif //KAB_EMBEDDED | 737 | #endif //KAB_EMBEDDED |
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp index c243fa0..7386207 100644 --- a/kaddressbook/views/colorlistbox.cpp +++ b/kaddressbook/views/colorlistbox.cpp | |||
@@ -3,107 +3,112 @@ | |||
3 | * This file: Copyright (C) 2000 Espen Sand, espen@kde.org | 3 | * This file: Copyright (C) 2000 Espen Sand, espen@kde.org |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | * the Free Software Foundation; either version 2 of the License, or |
8 | * (at your option) any later version. | 8 | * (at your option) any later version. |
9 | * | 9 | * |
10 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <qpainter.h> | 21 | #include <qpainter.h> |
22 | 22 | ||
23 | #include <kcolordialog.h> | 23 | #include <kcolordialog.h> |
24 | 24 | ||
25 | #ifndef KAB_EMBEDDED | 25 | #ifndef KAB_EMBEDDED |
26 | #include <kcolordrag.h> | 26 | #include <kcolordrag.h> |
27 | #endif //KAB_EMBEDDED | 27 | #endif //KAB_EMBEDDED |
28 | 28 | ||
29 | #include "colorlistbox.h" | 29 | #include "colorlistbox.h" |
30 | 30 | ||
31 | ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) | 31 | ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) |
32 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) | 32 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) |
33 | { | 33 | { |
34 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); | 34 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); |
35 | connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); | ||
35 | setAcceptDrops( true); | 36 | setAcceptDrops( true); |
36 | } | 37 | } |
37 | 38 | ||
38 | 39 | ||
39 | void ColorListBox::setEnabled( bool state ) | 40 | void ColorListBox::setEnabled( bool state ) |
40 | { | 41 | { |
41 | if( state == isEnabled() ) | 42 | if( state == isEnabled() ) |
42 | { | 43 | { |
43 | return; | 44 | return; |
44 | } | 45 | } |
45 | 46 | ||
46 | QListBox::setEnabled( state ); | 47 | QListBox::setEnabled( state ); |
47 | for( uint i=0; i<count(); i++ ) | 48 | for( uint i=0; i<count(); i++ ) |
48 | { | 49 | { |
49 | updateItem( i ); | 50 | updateItem( i ); |
50 | } | 51 | } |
51 | } | 52 | } |
52 | 53 | ||
53 | 54 | ||
54 | void ColorListBox::setColor( uint index, const QColor &color ) | 55 | void ColorListBox::setColor( uint index, const QColor &color ) |
55 | { | 56 | { |
56 | if( index < count() ) | 57 | if( index < count() ) |
57 | { | 58 | { |
58 | ColorListItem *colorItem = (ColorListItem*)item(index); | 59 | ColorListItem *colorItem = (ColorListItem*)item(index); |
59 | colorItem->setColor(color); | 60 | colorItem->setColor(color); |
60 | updateItem( colorItem ); | 61 | updateItem( colorItem ); |
61 | } | 62 | } |
62 | } | 63 | } |
63 | 64 | ||
64 | 65 | ||
65 | QColor ColorListBox::color( uint index ) const | 66 | QColor ColorListBox::color( uint index ) const |
66 | { | 67 | { |
67 | if( index < count() ) | 68 | if( index < count() ) |
68 | { | 69 | { |
69 | ColorListItem *colorItem = (ColorListItem*)item(index); | 70 | ColorListItem *colorItem = (ColorListItem*)item(index); |
70 | return( colorItem->color() ); | 71 | return( colorItem->color() ); |
71 | } | 72 | } |
72 | else | 73 | else |
73 | { | 74 | { |
74 | return( black ); | 75 | return( black ); |
75 | } | 76 | } |
76 | } | 77 | } |
77 | 78 | void ColorListBox::slotNewColor(QListBoxItem * i) | |
79 | { | ||
80 | if ( i ) | ||
81 | newColor( index( i ) ); | ||
82 | } | ||
78 | 83 | ||
79 | void ColorListBox::newColor( int index ) | 84 | void ColorListBox::newColor( int index ) |
80 | { | 85 | { |
81 | if( isEnabled() == false ) | 86 | if( isEnabled() == false ) |
82 | { | 87 | { |
83 | return; | 88 | return; |
84 | } | 89 | } |
85 | 90 | ||
86 | if( (uint)index < count() ) | 91 | if( (uint)index < count() ) |
87 | { | 92 | { |
88 | QColor c = color( index ); | 93 | QColor c = color( index ); |
89 | #ifndef KAB_EMBEDDED | 94 | #ifndef KAB_EMBEDDED |
90 | if( KColorDialog::getColor( c, this ) != QDialog::Rejected ) | 95 | if( KColorDialog::getColor( c, this ) != QDialog::Rejected ) |
91 | { | 96 | { |
92 | setColor( index, c ); | 97 | setColor( index, c ); |
93 | } | 98 | } |
94 | #else //KAB_EMBEDDED | 99 | #else //KAB_EMBEDDED |
95 | KColorDialog* k = new KColorDialog( this ); | 100 | KColorDialog* k = new KColorDialog( this ); |
96 | k->setColor( c ); | 101 | k->setColor( c ); |
97 | int res = k->exec(); | 102 | int res = k->exec(); |
98 | if ( res ) { | 103 | if ( res ) { |
99 | setColor( index, k->getColor() ); | 104 | setColor( index, k->getColor() ); |
100 | } | 105 | } |
101 | delete k; | 106 | delete k; |
102 | #endif //KAB_EMBEDDED | 107 | #endif //KAB_EMBEDDED |
103 | 108 | ||
104 | } | 109 | } |
105 | } | 110 | } |
106 | 111 | ||
107 | 112 | ||
108 | void ColorListBox::dragEnterEvent( QDragEnterEvent *e ) | 113 | void ColorListBox::dragEnterEvent( QDragEnterEvent *e ) |
109 | { | 114 | { |
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h index 4a0e705..bb91484 100644 --- a/kaddressbook/views/colorlistbox.h +++ b/kaddressbook/views/colorlistbox.h | |||
@@ -19,58 +19,59 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef _COLOR_LISTBOX_H_ | 21 | #ifndef _COLOR_LISTBOX_H_ |
22 | #define _COLOR_LISTBOX_H_ | 22 | #define _COLOR_LISTBOX_H_ |
23 | 23 | ||
24 | #include <klistbox.h> | 24 | #include <klistbox.h> |
25 | 25 | ||
26 | class QDragEnterEvent; | 26 | class QDragEnterEvent; |
27 | class QDragLeaveEvent; | 27 | class QDragLeaveEvent; |
28 | class QDragMoveEvent; | 28 | class QDragMoveEvent; |
29 | class QDropEvent; | 29 | class QDropEvent; |
30 | 30 | ||
31 | class ColorListBox : public KListBox | 31 | class ColorListBox : public KListBox |
32 | { | 32 | { |
33 | Q_OBJECT | 33 | Q_OBJECT |
34 | 34 | ||
35 | public: | 35 | public: |
36 | ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); | 36 | ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); |
37 | void setColor( uint index, const QColor &color ); | 37 | void setColor( uint index, const QColor &color ); |
38 | QColor color( uint index ) const; | 38 | QColor color( uint index ) const; |
39 | 39 | ||
40 | public slots: | 40 | public slots: |
41 | virtual void setEnabled( bool state ); | 41 | virtual void setEnabled( bool state ); |
42 | 42 | ||
43 | protected: | 43 | protected: |
44 | void dragEnterEvent( QDragEnterEvent *e ); | 44 | void dragEnterEvent( QDragEnterEvent *e ); |
45 | void dragLeaveEvent( QDragLeaveEvent *e ); | 45 | void dragLeaveEvent( QDragLeaveEvent *e ); |
46 | void dragMoveEvent( QDragMoveEvent *e ); | 46 | void dragMoveEvent( QDragMoveEvent *e ); |
47 | void dropEvent( QDropEvent *e ); | 47 | void dropEvent( QDropEvent *e ); |
48 | 48 | ||
49 | private slots: | 49 | private slots: |
50 | void newColor( int index ); | 50 | void newColor( int index ); |
51 | void slotNewColor(QListBoxItem * i); | ||
51 | 52 | ||
52 | private: | 53 | private: |
53 | int mCurrentOnDragEnter; | 54 | int mCurrentOnDragEnter; |
54 | 55 | ||
55 | }; | 56 | }; |
56 | 57 | ||
57 | 58 | ||
58 | class ColorListItem : public QListBoxItem | 59 | class ColorListItem : public QListBoxItem |
59 | { | 60 | { |
60 | public: | 61 | public: |
61 | ColorListItem( const QString &text, const QColor &color=Qt::black ); | 62 | ColorListItem( const QString &text, const QColor &color=Qt::black ); |
62 | const QColor &color( void ); | 63 | const QColor &color( void ); |
63 | void setColor( const QColor &color ); | 64 | void setColor( const QColor &color ); |
64 | 65 | ||
65 | protected: | 66 | protected: |
66 | virtual void paint( QPainter * ); | 67 | virtual void paint( QPainter * ); |
67 | virtual int height( const QListBox * ) const; | 68 | virtual int height( const QListBox * ) const; |
68 | virtual int width( const QListBox * ) const; | 69 | virtual int width( const QListBox * ) const; |
69 | 70 | ||
70 | private: | 71 | private: |
71 | QColor mColor; | 72 | QColor mColor; |
72 | int mBoxWidth; | 73 | int mBoxWidth; |
73 | }; | 74 | }; |
74 | 75 | ||
75 | #endif | 76 | #endif |
76 | 77 | ||
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp index 366e54c..e0fbd21 100644 --- a/kaddressbook/views/configurecardviewdialog.cpp +++ b/kaddressbook/views/configurecardviewdialog.cpp | |||
@@ -186,69 +186,73 @@ void CardViewLookNFeelPage::saveSettings( KConfig *config ) | |||
186 | 186 | ||
187 | void CardViewLookNFeelPage::setTextFont() | 187 | void CardViewLookNFeelPage::setTextFont() |
188 | { | 188 | { |
189 | QFont f( lTextFont->font() ); | 189 | QFont f( lTextFont->font() ); |
190 | #ifndef KAB_EMBEDDED | 190 | #ifndef KAB_EMBEDDED |
191 | if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted ) | 191 | if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted ) |
192 | updateFontLabel( f, lTextFont ); | 192 | updateFontLabel( f, lTextFont ); |
193 | #else //KAB_EMBEDDED | 193 | #else //KAB_EMBEDDED |
194 | bool ok; | 194 | bool ok; |
195 | QFont fout = KFontDialog::getFont( f, ok); | 195 | QFont fout = KFontDialog::getFont( f, ok); |
196 | if ( ok ) | 196 | if ( ok ) |
197 | updateFontLabel( fout, lTextFont ); | 197 | updateFontLabel( fout, lTextFont ); |
198 | #endif //KAB_EMBEDDED | 198 | #endif //KAB_EMBEDDED |
199 | } | 199 | } |
200 | 200 | ||
201 | void CardViewLookNFeelPage::setHeaderFont() | 201 | void CardViewLookNFeelPage::setHeaderFont() |
202 | { | 202 | { |
203 | QFont f( lHeaderFont->font() ); | 203 | QFont f( lHeaderFont->font() ); |
204 | #ifndef KAB_EMBEDDED | 204 | #ifndef KAB_EMBEDDED |
205 | if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted ) | 205 | if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted ) |
206 | updateFontLabel( f, lHeaderFont ); | 206 | updateFontLabel( f, lHeaderFont ); |
207 | #else //KAB_EMBEDDED | 207 | #else //KAB_EMBEDDED |
208 | bool ok; | 208 | bool ok; |
209 | QFont fout = KFontDialog::getFont( f, ok); | 209 | QFont fout = KFontDialog::getFont( f, ok); |
210 | if ( ok ) | 210 | if ( ok ) |
211 | updateFontLabel( fout, lHeaderFont ); | 211 | updateFontLabel( fout, lHeaderFont ); |
212 | #endif //KAB_EMBEDDED | 212 | #endif //KAB_EMBEDDED |
213 | } | 213 | } |
214 | 214 | ||
215 | void CardViewLookNFeelPage::enableFonts() | 215 | void CardViewLookNFeelPage::enableFonts() |
216 | { | 216 | { |
217 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); | 217 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); |
218 | if ( cbEnableCustomFonts->isChecked() ) | ||
219 | vbFonts->setFocus(); | ||
218 | } | 220 | } |
219 | 221 | ||
220 | void CardViewLookNFeelPage::enableColors() | 222 | void CardViewLookNFeelPage::enableColors() |
221 | { | 223 | { |
222 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); | 224 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); |
225 | if ( cbEnableCustomColors->isChecked() ) | ||
226 | lbColors->setFocus(); | ||
223 | } | 227 | } |
224 | 228 | ||
225 | void CardViewLookNFeelPage::initGUI() | 229 | void CardViewLookNFeelPage::initGUI() |
226 | { | 230 | { |
227 | int spacing = KDialog::spacingHint(); | 231 | int spacing = KDialog::spacingHint(); |
228 | int margin = KDialog::marginHint(); | 232 | int margin = KDialog::marginHint(); |
229 | 233 | ||
230 | QTabWidget *tabs = new QTabWidget( this ); | 234 | QTabWidget *tabs = new QTabWidget( this ); |
231 | 235 | ||
232 | // Layout | 236 | // Layout |
233 | QVBox *loTab = new QVBox( this, "layouttab" ); | 237 | QVBox *loTab = new QVBox( this, "layouttab" ); |
234 | 238 | ||
235 | loTab->setSpacing( spacing ); | 239 | loTab->setSpacing( spacing ); |
236 | loTab->setMargin( margin ); | 240 | loTab->setMargin( margin ); |
237 | 241 | ||
238 | QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); | 242 | QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); |
239 | 243 | ||
240 | cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); | 244 | cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); |
241 | 245 | ||
242 | QHBox *hbSW = new QHBox( gbGeneral ); | 246 | QHBox *hbSW = new QHBox( gbGeneral ); |
243 | QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); | 247 | QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); |
244 | sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); | 248 | sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); |
245 | lSW->setBuddy( sbSepWidth); | 249 | lSW->setBuddy( sbSepWidth); |
246 | 250 | ||
247 | QHBox *hbPadding = new QHBox( gbGeneral ); | 251 | QHBox *hbPadding = new QHBox( gbGeneral ); |
248 | QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); | 252 | QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); |
249 | sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); | 253 | sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); |
250 | lSpacing->setBuddy( sbSpacing ); | 254 | lSpacing->setBuddy( sbSpacing ); |
251 | 255 | ||
252 | QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); | 256 | QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); |
253 | 257 | ||
254 | QHBox *hbMargin = new QHBox( gbCards ); | 258 | QHBox *hbMargin = new QHBox( gbCards ); |
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp index 8bcceb2..0e36abd 100644 --- a/kaddressbook/views/configuretableviewdialog.cpp +++ b/kaddressbook/views/configuretableviewdialog.cpp | |||
@@ -181,69 +181,73 @@ void LookAndFeelPage::saveSettings( KConfig *config ) | |||
181 | 181 | ||
182 | void LookAndFeelPage::setTextFont() | 182 | void LookAndFeelPage::setTextFont() |
183 | { | 183 | { |
184 | QFont f( lTextFont->font() ); | 184 | QFont f( lTextFont->font() ); |
185 | #ifndef KAB_EMBEDDED | 185 | #ifndef KAB_EMBEDDED |
186 | if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted ) | 186 | if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted ) |
187 | updateFontLabel( f, lTextFont ); | 187 | updateFontLabel( f, lTextFont ); |
188 | #else //KAB_EMBEDDED | 188 | #else //KAB_EMBEDDED |
189 | bool ok; | 189 | bool ok; |
190 | QFont fout = KFontDialog::getFont( f, ok); | 190 | QFont fout = KFontDialog::getFont( f, ok); |
191 | if ( ok ) | 191 | if ( ok ) |
192 | updateFontLabel( fout, lTextFont ); | 192 | updateFontLabel( fout, lTextFont ); |
193 | #endif //KAB_EMBEDDED | 193 | #endif //KAB_EMBEDDED |
194 | } | 194 | } |
195 | 195 | ||
196 | void LookAndFeelPage::setHeaderFont() | 196 | void LookAndFeelPage::setHeaderFont() |
197 | { | 197 | { |
198 | QFont f( lHeaderFont->font() ); | 198 | QFont f( lHeaderFont->font() ); |
199 | #ifndef KAB_EMBEDDED | 199 | #ifndef KAB_EMBEDDED |
200 | if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted ) | 200 | if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted ) |
201 | updateFontLabel( f, lHeaderFont ); | 201 | updateFontLabel( f, lHeaderFont ); |
202 | #else //KAB_EMBEDDED | 202 | #else //KAB_EMBEDDED |
203 | bool ok; | 203 | bool ok; |
204 | QFont fout = KFontDialog::getFont( f, ok); | 204 | QFont fout = KFontDialog::getFont( f, ok); |
205 | if ( ok ) | 205 | if ( ok ) |
206 | updateFontLabel( fout, lHeaderFont ); | 206 | updateFontLabel( fout, lHeaderFont ); |
207 | #endif //KAB_EMBEDDED | 207 | #endif //KAB_EMBEDDED |
208 | } | 208 | } |
209 | 209 | ||
210 | void LookAndFeelPage::enableFonts() | 210 | void LookAndFeelPage::enableFonts() |
211 | { | 211 | { |
212 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); | 212 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); |
213 | if ( cbEnableCustomFonts->isChecked() ) | ||
214 | vbFonts->setFocus(); | ||
213 | } | 215 | } |
214 | 216 | ||
215 | void LookAndFeelPage::enableColors() | 217 | void LookAndFeelPage::enableColors() |
216 | { | 218 | { |
217 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); | 219 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); |
220 | if ( cbEnableCustomColors->isChecked() ) | ||
221 | lbColors->setFocus(); | ||
218 | } | 222 | } |
219 | 223 | ||
220 | void LookAndFeelPage::initGUI() | 224 | void LookAndFeelPage::initGUI() |
221 | { | 225 | { |
222 | int spacing = KDialog::spacingHint(); | 226 | int spacing = KDialog::spacingHint(); |
223 | int margin = KDialog::marginHint(); | 227 | int margin = KDialog::marginHint(); |
224 | 228 | ||
225 | QTabWidget *tabs = new QTabWidget( this ); | 229 | QTabWidget *tabs = new QTabWidget( this ); |
226 | 230 | ||
227 | // General | 231 | // General |
228 | QVBox *generalTab = new QVBox( this, "generaltab" ); | 232 | QVBox *generalTab = new QVBox( this, "generaltab" ); |
229 | 233 | ||
230 | generalTab->setSpacing( spacing ); | 234 | generalTab->setSpacing( spacing ); |
231 | generalTab->setMargin( margin ); | 235 | generalTab->setMargin( margin ); |
232 | 236 | ||
233 | QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, | 237 | QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, |
234 | i18n("Row Separator"), generalTab); | 238 | i18n("Row Separator"), generalTab); |
235 | 239 | ||
236 | mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), | 240 | mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), |
237 | group, "mAlternateButton"); | 241 | group, "mAlternateButton"); |
238 | mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton"); | 242 | mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton"); |
239 | mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton"); | 243 | mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton"); |
240 | 244 | ||
241 | mBackgroundBox = new QCheckBox(i18n("Enable background image:"), generalTab, | 245 | mBackgroundBox = new QCheckBox(i18n("Enable background image:"), generalTab, |
242 | "mBackgroundBox"); | 246 | "mBackgroundBox"); |
243 | connect(mBackgroundBox, SIGNAL(toggled(bool)), | 247 | connect(mBackgroundBox, SIGNAL(toggled(bool)), |
244 | SLOT(enableBackgroundToggled(bool))); | 248 | SLOT(enableBackgroundToggled(bool))); |
245 | // LR image not implemented | 249 | // LR image not implemented |
246 | mBackgroundBox->setEnabled( false ); | 250 | mBackgroundBox->setEnabled( false ); |
247 | mBackgroundName = new KURLRequester(generalTab, "mBackgroundName"); | 251 | mBackgroundName = new KURLRequester(generalTab, "mBackgroundName"); |
248 | #ifndef KAB_EMBEDDED | 252 | #ifndef KAB_EMBEDDED |
249 | mBackgroundName->setMode(KFile::File | KFile::ExistingOnly | | 253 | mBackgroundName->setMode(KFile::File | KFile::ExistingOnly | |