author | ulf69 <ulf69> | 2004-09-16 17:23:08 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-16 17:23:08 (UTC) |
commit | c32d7e58ca69196426eee3217140227aca634f52 (patch) (unidiff) | |
tree | 3cc420da278d1035bb45c23d7c70562369f96b7b /libkdepim/kcmconfigs | |
parent | 02e7ae4983679a787834277176a031286a8310c2 (diff) | |
download | kdepimpi-c32d7e58ca69196426eee3217140227aca634f52.zip kdepimpi-c32d7e58ca69196426eee3217140227aca634f52.tar.gz kdepimpi-c32d7e58ca69196426eee3217140227aca634f52.tar.bz2 |
added sip support to external apps
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 44 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.h | 5 |
2 files changed, 47 insertions, 2 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 4f4cc6a..703aeb1 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -85,4 +85,5 @@ KDEPIMConfigWidget::KDEPIMConfigWidget( QWidget *parent, const char *name ) | |||
85 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); | 85 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); |
86 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); | 86 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); |
87 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); | ||
87 | 88 | ||
88 | 89 | ||
@@ -200,4 +201,7 @@ void KDEPIMConfigWidget::externalapp_changed( int newApp ) | |||
200 | mCurrentClient = mPagerClient; | 201 | mCurrentClient = mPagerClient; |
201 | break; | 202 | break; |
203 | case(ExternalAppHandler::SIP): | ||
204 | mCurrentClient = mSipClient; | ||
205 | break; | ||
202 | default: | 206 | default: |
203 | return; | 207 | return; |
@@ -248,4 +252,7 @@ void KDEPIMConfigWidget::saveEditFieldSettings() | |||
248 | mPagerClient = mClient->currentItem(); | 252 | mPagerClient = mClient->currentItem(); |
249 | break; | 253 | break; |
254 | case(ExternalAppHandler::SIP): | ||
255 | mSipClient = mClient->currentItem(); | ||
256 | break; | ||
250 | default: | 257 | default: |
251 | return; | 258 | return; |
@@ -285,4 +292,10 @@ void KDEPIMConfigWidget::saveEditFieldSettings() | |||
285 | mPagerOtherMessageParameters = mParameters->text(); | 292 | mPagerOtherMessageParameters = mParameters->text(); |
286 | } | 293 | } |
294 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | ||
295 | { | ||
296 | mSipOtherChannel = mChannel->text(); | ||
297 | mSipOtherMessage = mMessage->text(); | ||
298 | mSipOtherMessageParameters = mParameters->text(); | ||
299 | } | ||
287 | 300 | ||
288 | 301 | ||
@@ -354,4 +367,10 @@ void KDEPIMConfigWidget::updateClientWidgets() | |||
354 | mParameters->setText(mPagerOtherMessageParameters); | 367 | mParameters->setText(mPagerOtherMessageParameters); |
355 | } | 368 | } |
369 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | ||
370 | { | ||
371 | mChannel->setText(mSipOtherChannel); | ||
372 | mMessage->setText(mSipOtherMessage); | ||
373 | mParameters->setText(mSipOtherMessageParameters); | ||
374 | } | ||
356 | } | 375 | } |
357 | 376 | ||
@@ -364,5 +383,6 @@ void KDEPIMConfigWidget::updateClientWidgets() | |||
364 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 383 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
365 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 384 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
366 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))) | 385 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
386 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) | ||
367 | { | 387 | { |
368 | readonly = false; | 388 | readonly = false; |
@@ -377,5 +397,6 @@ void KDEPIMConfigWidget::updateClientWidgets() | |||
377 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) | 397 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) |
378 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) | 398 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) |
379 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC))) | 399 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) |
400 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) | ||
380 | { | 401 | { |
381 | enabled = false; | 402 | enabled = false; |
@@ -459,4 +480,9 @@ void KDEPIMConfigWidget::restoreSettings(KPimGlobalPrefs* prefs) | |||
459 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; | 480 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; |
460 | 481 | ||
482 | mSipClient = prefs->mPagerClient; | ||
483 | mSipOtherChannel = prefs->mSipOtherChannel; | ||
484 | mSipOtherMessage = prefs->mSipOtherMessage; | ||
485 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; | ||
486 | |||
461 | mCurrentApp = ExternalAppHandler::EMAIL; | 487 | mCurrentApp = ExternalAppHandler::EMAIL; |
462 | mCurrentClient = mEmailClient; | 488 | mCurrentClient = mEmailClient; |
@@ -501,4 +527,10 @@ void KDEPIMConfigWidget::saveSettings(KPimGlobalPrefs* prefs) | |||
501 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; | 527 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; |
502 | 528 | ||
529 | |||
530 | prefs->mSipClient = mSipClient; | ||
531 | prefs->mSipOtherChannel = mSipOtherChannel; | ||
532 | prefs->mSipOtherMessage = mSipOtherMessage; | ||
533 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; | ||
534 | |||
503 | prefs->writeConfig(); | 535 | prefs->writeConfig(); |
504 | 536 | ||
@@ -551,4 +583,12 @@ void KDEPIMConfigWidget::defaults(KPimGlobalPrefs* prefs) | |||
551 | 583 | ||
552 | 584 | ||
585 | dai = ExternalAppHandler::instance()->getDefaultItem(ExternalAppHandler::SIP, KPimGlobalPrefs::NONE_SIC); | ||
586 | |||
587 | mSipClient = dai->_id; | ||
588 | mSipOtherChannel = dai->_channel; | ||
589 | mSipOtherMessage = dai->_message; | ||
590 | mSipOtherMessageParameters = dai->_parameters; | ||
591 | |||
592 | |||
553 | emit changed( true ); | 593 | emit changed( true ); |
554 | } | 594 | } |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h index 6e02544..e3cfd81 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.h +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h | |||
@@ -131,4 +131,9 @@ class KDEPIMConfigWidget : public QWidget | |||
131 | QString mPagerOtherMessageParameters; | 131 | QString mPagerOtherMessageParameters; |
132 | 132 | ||
133 | int mSipClient; | ||
134 | QString mSipOtherChannel; | ||
135 | QString mSipOtherMessage; | ||
136 | QString mSipOtherMessageParameters; | ||
137 | |||
133 | 138 | ||
134 | 139 | ||