Changeset View
Changeset View
Standalone View
Standalone View
kcm/kcmakonadicontactactions.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 39 | { | |||
---|---|---|---|---|---|
44 | 44 | | |||
45 | about->addAuthor(i18n("Tobias Koenig"), QString(), QStringLiteral("tokoe@kde.org")); | 45 | about->addAuthor(i18n("Tobias Koenig"), QString(), QStringLiteral("tokoe@kde.org")); | ||
46 | 46 | | |||
47 | setAboutData(about); | 47 | setAboutData(about); | ||
48 | ui.setupUi(this); | 48 | ui.setupUi(this); | ||
49 | 49 | | |||
50 | mConfigManager = addConfig(ContactActionsSettings::self(), this); | 50 | mConfigManager = addConfig(ContactActionsSettings::self(), this); | ||
51 | 51 | | |||
52 | ui.DialPhoneNumberAction->addItem(i18n("System Default"), ContactActionsSettings::UseSystemDefault); | ||||
52 | ui.DialPhoneNumberAction->addItem(i18n("Skype"), ContactActionsSettings::UseSkype); | 53 | ui.DialPhoneNumberAction->addItem(i18n("Skype"), ContactActionsSettings::UseSkype); | ||
53 | ui.DialPhoneNumberAction->addItem(i18n("Ekiga"), ContactActionsSettings::UseEkiga); | 54 | ui.DialPhoneNumberAction->addItem(i18n("Ekiga"), ContactActionsSettings::UseEkiga); | ||
54 | ui.DialPhoneNumberAction->addItem(i18n("SflPhone"), ContactActionsSettings::UseSflPhone); | 55 | ui.DialPhoneNumberAction->addItem(i18n("SflPhone"), ContactActionsSettings::UseSflPhone); | ||
55 | ui.DialPhoneNumberAction->addItem(i18n("kdeconnect"), ContactActionsSettings::UseKdeConnectPhone); | | |||
56 | ui.DialPhoneNumberAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalPhoneApplication); | 56 | ui.DialPhoneNumberAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalPhoneApplication); | ||
57 | 57 | | |||
58 | connect(ui.DialPhoneNumberAction, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotDialPhoneNumberActionChanged); | 58 | connect(ui.DialPhoneNumberAction, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotDialPhoneNumberActionChanged); | ||
59 | 59 | | |||
60 | ui.SendSmsAction->addItem(i18n("Skype"), ContactActionsSettings::UseSkypeSms); | 60 | ui.SendSmsAction->addItem(i18n("Skype"), ContactActionsSettings::UseSkypeSms); | ||
61 | ui.SendSmsAction->addItem(i18n("SflPhone"), ContactActionsSettings::UseSflPhoneSms); | 61 | ui.SendSmsAction->addItem(i18n("SflPhone"), ContactActionsSettings::UseSflPhoneSms); | ||
62 | ui.SendSmsAction->addItem(i18n("kdeconnect"), ContactActionsSettings::UseKdeConnectSms); | 62 | ui.SendSmsAction->addItem(i18n("kdeconnect"), ContactActionsSettings::UseKdeConnectSms); | ||
63 | ui.SendSmsAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalSmsApplication); | 63 | ui.SendSmsAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalSmsApplication); | ||
Show All 35 Lines | 91 | { | |||
99 | } | 99 | } | ||
100 | Q_EMIT changed(true); | 100 | Q_EMIT changed(true); | ||
101 | } | 101 | } | ||
102 | 102 | | |||
103 | void KCMAkonadiContactActions::slotDialPhoneNumberActionChanged(int value) | 103 | void KCMAkonadiContactActions::slotDialPhoneNumberActionChanged(int value) | ||
104 | { | 104 | { | ||
105 | ContactActionsSettings::EnumDialPhoneNumberAction enumValue = static_cast<ContactActionsSettings::EnumDialPhoneNumberAction>(ui.DialPhoneNumberAction->itemData(value).toInt()); | 105 | ContactActionsSettings::EnumDialPhoneNumberAction enumValue = static_cast<ContactActionsSettings::EnumDialPhoneNumberAction>(ui.DialPhoneNumberAction->itemData(value).toInt()); | ||
106 | if (enumValue == ContactActionsSettings::UseExternalPhoneApplication) { | 106 | if (enumValue == ContactActionsSettings::UseExternalPhoneApplication) { | ||
107 | ui.stackedWidget_2->setCurrentIndex(1); | 107 | ui.phoneDetailsStack->setCurrentIndex(1); | ||
108 | } else if (enumValue == ContactActionsSettings::UseKdeConnectPhone) { | | |||
109 | ui.stackedWidget_2->setCurrentIndex(2); | | |||
110 | } else { | 108 | } else { | ||
111 | ui.stackedWidget_2->setCurrentIndex(0); | 109 | ui.phoneDetailsStack->setCurrentIndex(0); | ||
112 | } | 110 | } | ||
113 | Q_EMIT changed(true); | 111 | Q_EMIT changed(true); | ||
114 | } | 112 | } | ||
115 | 113 | | |||
116 | void KCMAkonadiContactActions::load() | 114 | void KCMAkonadiContactActions::load() | ||
117 | { | 115 | { | ||
118 | mConfigManager->updateWidgets(); | 116 | mConfigManager->updateWidgets(); | ||
119 | 117 | | |||
Show All 40 Lines |