• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
  • contact
  • kcm
kcm/contactactionssettings.cpp
1 // This file is generated by kconfig_compiler from contactactionssettings.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "contactactionssettings.h"
5 
6 #include <klocale.h>
7 
8 #include <kglobal.h>
9 #include <QtCore/QFile>
10 
11 class ContactActionsSettingsHelper
12 {
13  public:
14  ContactActionsSettingsHelper() : q(0) {}
15  ~ContactActionsSettingsHelper() { delete q; }
16  ContactActionsSettings *q;
17 };
18 K_GLOBAL_STATIC(ContactActionsSettingsHelper, s_globalContactActionsSettings)
19 ContactActionsSettings *ContactActionsSettings::self()
20 {
21  if (!s_globalContactActionsSettings->q) {
22  new ContactActionsSettings;
23  s_globalContactActionsSettings->q->readConfig();
24  }
25 
26  return s_globalContactActionsSettings->q;
27 }
28 
29 ContactActionsSettings::ContactActionsSettings( )
30  : KConfigSkeleton( QLatin1String( "akonadi_contactrc" ) )
31 {
32  Q_ASSERT(!s_globalContactActionsSettings->q);
33  s_globalContactActionsSettings->q = this;
34  setCurrentGroup( QLatin1String( "Show Address Settings" ) );
35 
36  QList<KConfigSkeleton::ItemEnum::Choice2> valuesShowAddressAction;
37  {
38  KConfigSkeleton::ItemEnum::Choice2 choice;
39  choice.name = QLatin1String("UseBrowser");
40  valuesShowAddressAction.append( choice );
41  }
42  {
43  KConfigSkeleton::ItemEnum::Choice2 choice;
44  choice.name = QLatin1String("UseExternalAddressApplication");
45  valuesShowAddressAction.append( choice );
46  }
47  {
48  KConfigSkeleton::ItemEnum::Choice2 choice;
49  choice.name = QLatin1String("UseGooglemap");
50  valuesShowAddressAction.append( choice );
51  }
52  {
53  KConfigSkeleton::ItemEnum::Choice2 choice;
54  choice.name = QLatin1String("UseMapquest");
55  valuesShowAddressAction.append( choice );
56  }
57  mShowAddressActionItem = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "ShowAddressAction" ), mShowAddressAction, valuesShowAddressAction, UseBrowser );
58  mShowAddressActionItem->setLabel( i18n("ShowAddressAction") );
59  mShowAddressActionItem->setWhatsThis( i18n("Defines which application shall be used to show the postal address of a contact on a map. If 'Web Browser' is selected, an URL can be defined with placeholders for the single address parts. If 'External Application' is selected, a command with placeholders can be defined.") );
60  addItem( mShowAddressActionItem, QLatin1String( "ShowAddressAction" ) );
61  mAddressUrlItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "AddressUrl" ), mAddressUrl, QLatin1String( "http://open.mapquestapi.com/nominatim/v1/search.php?q=%s,+%l,+%c" ) );
62  mAddressUrlItem->setLabel( i18n("AddressUrl") );
63  mAddressUrlItem->setToolTip( i18n("The following placeholders can be used in the URL:\n"
64 " %s: Street\n"
65 " %r: Region\n"
66 " %l: Location\n"
67 " %z: Zip Code\n"
68 " %c: Country ISO Code") );
69  mAddressUrlItem->setWhatsThis( i18n("This URL defines the website that shall be used to show a contact's postal address.") );
70  addItem( mAddressUrlItem, QLatin1String( "AddressUrl" ) );
71  mAddressCommandItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "AddressCommand" ), mAddressCommand );
72  mAddressCommandItem->setLabel( i18n("Address Command") );
73  mAddressCommandItem->setToolTip( i18n("The following placeholders can be used in the command:\n"
74 " %s: Street\n"
75 " %r: Region\n"
76 " %l: Location\n"
77 " %z: Zip Code\n"
78 " %c: Country ISO Code") );
79  mAddressCommandItem->setWhatsThis( i18n("This command defines the application that shall be executed to show a contact's postal address.") );
80  addItem( mAddressCommandItem, QLatin1String( "AddressCommand" ) );
81 
82  setCurrentGroup( QLatin1String( "Phone Dial Settings" ) );
83 
84  QList<KConfigSkeleton::ItemEnum::Choice2> valuesDialPhoneNumberAction;
85  {
86  KConfigSkeleton::ItemEnum::Choice2 choice;
87  choice.name = QLatin1String("UseSkype");
88  valuesDialPhoneNumberAction.append( choice );
89  }
90  {
91  KConfigSkeleton::ItemEnum::Choice2 choice;
92  choice.name = QLatin1String("UseExternalPhoneApplication");
93  valuesDialPhoneNumberAction.append( choice );
94  }
95  {
96  KConfigSkeleton::ItemEnum::Choice2 choice;
97  choice.name = QLatin1String("UseWinCE");
98  valuesDialPhoneNumberAction.append( choice );
99  }
100  {
101  KConfigSkeleton::ItemEnum::Choice2 choice;
102  choice.name = QLatin1String("UseSflPhone");
103  valuesDialPhoneNumberAction.append( choice );
104  }
105  {
106  KConfigSkeleton::ItemEnum::Choice2 choice;
107  choice.name = QLatin1String("UseEkiga");
108  valuesDialPhoneNumberAction.append( choice );
109  }
110  mDialPhoneNumberActionItem = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "DialPhoneNumberAction" ), mDialPhoneNumberAction, valuesDialPhoneNumberAction, UseSkype );
111  mDialPhoneNumberActionItem->setLabel( i18n("DialPhoneNumberAction") );
112  mDialPhoneNumberActionItem->setWhatsThis( i18n("Defines which application shall be used to dial the phone number of a contact. If 'Skype' is selected the Skype application will be started (if installed on the computer) and the number is dialed. If 'External Application' is selected, a command with placeholders can be defined.") );
113  addItem( mDialPhoneNumberActionItem, QLatin1String( "DialPhoneNumberAction" ) );
114  mPhoneCommandItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "PhoneCommand" ), mPhoneCommand );
115  mPhoneCommandItem->setLabel( i18n("Phone Command") );
116  mPhoneCommandItem->setToolTip( i18n("The following placeholders can be used in the command:\n"
117 " %N: The raw number as stored in the address book.\n"
118 " %n: The normalized number with all non-digit characters removed.") );
119  mPhoneCommandItem->setWhatsThis( i18n("This command defines the application that shall be executed to dial a contact's phone number.") );
120  addItem( mPhoneCommandItem, QLatin1String( "PhoneCommand" ) );
121 
122  setCurrentGroup( QLatin1String( "Send SMS Settings" ) );
123 
124  QList<KConfigSkeleton::ItemEnum::Choice2> valuesSendSmsAction;
125  {
126  KConfigSkeleton::ItemEnum::Choice2 choice;
127  choice.name = QLatin1String("UseSkypeSms");
128  valuesSendSmsAction.append( choice );
129  }
130  {
131  KConfigSkeleton::ItemEnum::Choice2 choice;
132  choice.name = QLatin1String("UseExternalSmsApplication");
133  valuesSendSmsAction.append( choice );
134  }
135  {
136  KConfigSkeleton::ItemEnum::Choice2 choice;
137  choice.name = QLatin1String("UseWinCESms");
138  valuesSendSmsAction.append( choice );
139  }
140  {
141  KConfigSkeleton::ItemEnum::Choice2 choice;
142  choice.name = QLatin1String("UseSflPhoneSms");
143  valuesSendSmsAction.append( choice );
144  }
145  mSendSmsActionItem = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "SendSmsAction" ), mSendSmsAction, valuesSendSmsAction, UseSkypeSms );
146  mSendSmsActionItem->setLabel( i18n("SendSmsAction") );
147  mSendSmsActionItem->setWhatsThis( i18n("Defines which application shall be used to send an SMS to the phone number of a contact. If 'Skype' is selected the Skype application will be started (if installed on the computer) and the SMS is sent via Skype. If 'External Application' is selected, a command with placeholders can be defined.") );
148  addItem( mSendSmsActionItem, QLatin1String( "SendSmsAction" ) );
149  mSmsCommandItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "SmsCommand" ), mSmsCommand );
150  mSmsCommandItem->setLabel( i18n("SMS Command") );
151  mSmsCommandItem->setToolTip( i18n("The following placeholders can be used in the command:\n"
152 " %N: The raw number as stored in the address book.\n"
153 " %n: The normalized number with all non-digit characters removed.\n"
154 " %t: The text") );
155  mSmsCommandItem->setWhatsThis( i18n("This command defines the application that shall be executed to send an SMS to a contact's phone number.") );
156  addItem( mSmsCommandItem, QLatin1String( "SmsCommand" ) );
157 }
158 
159 ContactActionsSettings::~ContactActionsSettings()
160 {
161  if (!s_globalContactActionsSettings.isDestroyed()) {
162  s_globalContactActionsSettings->q = 0;
163  }
164 }
165 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jul 27 2021 06:51:00 by doxygen 1.8.20 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal