Diffstat (limited to 'libkdepim/kpimglobalprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index b2b7663..b71e18d 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -54,80 +54,87 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | |||
54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); | 55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); |
56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); | 56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); |
57 | 57 | ||
58 | KPrefs::setCurrentGroup("Time & Date"); | 58 | KPrefs::setCurrentGroup("Time & Date"); |
59 | 59 | ||
60 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); | 60 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); |
61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | 61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); |
62 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | 62 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); |
63 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | 63 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
67 | 67 | ||
68 | KPrefs::setCurrentGroup( "ExternalApplications" ); | 68 | KPrefs::setCurrentGroup( "ExternalApplications" ); |
69 | 69 | ||
70 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); | 70 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); |
71 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); | 71 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); |
72 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); | 72 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); |
73 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); | 73 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); |
74 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); | 74 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); |
75 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); | 75 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); |
76 | 76 | ||
77 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); | 77 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); |
78 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); | 78 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); |
79 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); | 79 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); |
80 | addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); | 80 | addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); |
81 | 81 | ||
82 | addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); | 82 | addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); |
83 | addItemString( "FaxChannel", &mFaxOtherChannel, "" ); | 83 | addItemString( "FaxChannel", &mFaxOtherChannel, "" ); |
84 | addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); | 84 | addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); |
85 | addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); | 85 | addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); |
86 | 86 | ||
87 | addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC ); | 87 | addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC ); |
88 | addItemString( "SMSChannel", &mSMSOtherChannel, "" ); | 88 | addItemString( "SMSChannel", &mSMSOtherChannel, "" ); |
89 | addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" ); | 89 | addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" ); |
90 | addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" ); | 90 | addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" ); |
91 | 91 | ||
92 | addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC ); | 92 | addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC ); |
93 | addItemString( "PagerChannel", &mPagerOtherChannel, "" ); | 93 | addItemString( "PagerChannel", &mPagerOtherChannel, "" ); |
94 | addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" ); | 94 | addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" ); |
95 | addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" ); | 95 | addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" ); |
96 | 96 | ||
97 | addItemInt( "SIPChannelType", &mSipClient, NONE_SIC ); | 97 | addItemInt( "SIPChannelType", &mSipClient, NONE_SIC ); |
98 | addItemString( "SIPChannel", &mSipOtherChannel, "" ); | 98 | addItemString( "SIPChannel", &mSipOtherChannel, "" ); |
99 | addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); | 99 | addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); |
100 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); | 100 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); |
101 | 101 | ||
102 | |||
103 | KPrefs::setCurrentGroup( "PhoneAccess" ); | ||
104 | addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); | ||
105 | addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); | ||
106 | addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); | ||
107 | |||
108 | |||
102 | } | 109 | } |
103 | 110 | ||
104 | void KPimGlobalPrefs::setGlobalConfig() | 111 | void KPimGlobalPrefs::setGlobalConfig() |
105 | { | 112 | { |
106 | 113 | ||
107 | KGlobal::locale()->setHore24Format( !mPreferredTime ); | 114 | KGlobal::locale()->setHore24Format( !mPreferredTime ); |
108 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); | 115 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); |
109 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); | 116 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); |
110 | KGlobal::locale()->setLanguage( mPreferredLanguage ); | 117 | KGlobal::locale()->setLanguage( mPreferredLanguage ); |
111 | QString dummy = mUserDateFormatLong; | 118 | QString dummy = mUserDateFormatLong; |
112 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 119 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
113 | dummy = mUserDateFormatShort; | 120 | dummy = mUserDateFormatShort; |
114 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 121 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
115 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, | 122 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, |
116 | mDaylightsavingStart, | 123 | mDaylightsavingStart, |
117 | mDaylightsavingEnd ); | 124 | mDaylightsavingEnd ); |
118 | KGlobal::locale()->setTimezone( mTimeZoneId ); | 125 | KGlobal::locale()->setTimezone( mTimeZoneId ); |
119 | 126 | ||
120 | } | 127 | } |
121 | KPimGlobalPrefs::~KPimGlobalPrefs() | 128 | KPimGlobalPrefs::~KPimGlobalPrefs() |
122 | { | 129 | { |
123 | } | 130 | } |
124 | 131 | ||
125 | KPimGlobalPrefs *KPimGlobalPrefs::instance() | 132 | KPimGlobalPrefs *KPimGlobalPrefs::instance() |
126 | { | 133 | { |
127 | if ( !sInstance ) { | 134 | if ( !sInstance ) { |
128 | sInstance = staticDeleter.setObject( new KPimGlobalPrefs() ); | 135 | sInstance = staticDeleter.setObject( new KPimGlobalPrefs() ); |
129 | sInstance->readConfig(); | 136 | sInstance->readConfig(); |
130 | } | 137 | } |
131 | 138 | ||
132 | return sInstance; | 139 | return sInstance; |
133 | } | 140 | } |