author | zautrix <zautrix> | 2005-08-23 13:59:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-23 13:59:59 (UTC) |
commit | 02fa432f183ad2b18380de0e41399efe3b867dba (patch) (unidiff) | |
tree | d13d3941ef4d6abc90790d5b6039a92787ea7987 /kabc/stdaddressbook.h | |
parent | 72d600e2c3b3405e5f37615a56560811c0cf9a78 (diff) | |
download | kdepimpi-02fa432f183ad2b18380de0e41399efe3b867dba.zip kdepimpi-02fa432f183ad2b18380de0e41399efe3b867dba.tar.gz kdepimpi-02fa432f183ad2b18380de0e41399efe3b867dba.tar.bz2 |
fixx
-rw-r--r-- | kabc/stdaddressbook.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h index 9ec53b0..cf130b3 100644 --- a/kabc/stdaddressbook.h +++ b/kabc/stdaddressbook.h | |||
@@ -41,111 +41,111 @@ namespace KABC { | |||
41 | It's implemented as a singleton. Use @ref self() to get the address book | 41 | It's implemented as a singleton. Use @ref self() to get the address book |
42 | object. On the first self() call the address book also gets loaded. | 42 | object. On the first self() call the address book also gets loaded. |
43 | 43 | ||
44 | Example: | 44 | Example: |
45 | 45 | ||
46 | <pre> | 46 | <pre> |
47 | KABC::AddressBook *ab = KABC::StdAddressBook::self(); | 47 | KABC::AddressBook *ab = KABC::StdAddressBook::self(); |
48 | 48 | ||
49 | KABC::AddressBook::Iterator it; | 49 | KABC::AddressBook::Iterator it; |
50 | for ( it = ab->begin(); it != ab->end(); ++it ) { | 50 | for ( it = ab->begin(); it != ab->end(); ++it ) { |
51 | kdDebug() << "UID=" << (*it).uid() << endl; | 51 | kdDebug() << "UID=" << (*it).uid() << endl; |
52 | 52 | ||
53 | // do some other stuff | 53 | // do some other stuff |
54 | } | 54 | } |
55 | 55 | ||
56 | KABC::StdAddressBook::save(); | 56 | KABC::StdAddressBook::save(); |
57 | </pre> | 57 | </pre> |
58 | */ | 58 | */ |
59 | class StdAddressBook : public AddressBook | 59 | class StdAddressBook : public AddressBook |
60 | { | 60 | { |
61 | public: | 61 | public: |
62 | 62 | ||
63 | /** | 63 | /** |
64 | Destructor. | 64 | Destructor. |
65 | */ | 65 | */ |
66 | ~StdAddressBook(); | 66 | ~StdAddressBook(); |
67 | 67 | ||
68 | /** | 68 | /** |
69 | Return the standard addressbook object. It also loads slow resources. | 69 | Return the standard addressbook object. It also loads slow resources. |
70 | It is the same as self(false); . | 70 | It is the same as self(false); . |
71 | */ | 71 | */ |
72 | static StdAddressBook *self(); | 72 | static StdAddressBook *self(); |
73 | 73 | ||
74 | /** | 74 | /** |
75 | This is the same as above, but with specified | 75 | This is the same as above, but with specified |
76 | behaviour of resource loading. | 76 | behaviour of resource loading. |
77 | 77 | ||
78 | @param onlyFastResource Only resources marked as 'fast' should be loaded | 78 | @param onlyFastResource Only resources marked as 'fast' should be loaded |
79 | */ | 79 | */ |
80 | // FIXME for KDE4 return StdAddressBook and merge with the metod above -zecke | 80 | // FIXME for KDE4 return StdAddressBook and merge with the metod above -zecke |
81 | static StdAddressBook *self( bool onlyFastResources ); | 81 | static StdAddressBook *self( bool onlyFastResources ); |
82 | 82 | ||
83 | /** | 83 | /** |
84 | Save the standard address book to disk. | 84 | Save the standard address book to disk. |
85 | */ | 85 | */ |
86 | static bool save(); | 86 | static bool save(); |
87 | 87 | ||
88 | /** | 88 | /** |
89 | Call this method in your crash handler to allow the library clean up | 89 | Call this method in your crash handler to allow the library clean up |
90 | possible locks. | 90 | possible locks. |
91 | */ | 91 | */ |
92 | static void handleCrash(); | 92 | static void handleCrash(); |
93 | 93 | ||
94 | /** | 94 | /** |
95 | Returns the default file name for vcard-based addressbook | 95 | Returns the default file name for vcard-based addressbook |
96 | */ | 96 | */ |
97 | static QString fileName(); | 97 | static QString fileName(); |
98 | 98 | ||
99 | /** | 99 | /** |
100 | Returns the default directory name for vcard-based addressbook | 100 | Returns the default directory name for vcard-based addressbook |
101 | */ | 101 | */ |
102 | static QString directoryName(); | 102 | static QString directoryName(); |
103 | 103 | ||
104 | /** | 104 | /** |
105 | Set the automatic save property of the address book. | 105 | Set the automatic save property of the address book. |
106 | If @p enable is TRUE (default) the address book is saved at | 106 | If @p enable is TRUE (default) the address book is saved at |
107 | destruction time otherwise you have to call @ref save() to | 107 | destruction time otherwise you have to call @ref save() to |
108 | explicitely save it. | 108 | explicitely save it. |
109 | */ | 109 | */ |
110 | static void setAutomaticSave( bool enable ); | 110 | static void setAutomaticSave( bool enable ); |
111 | 111 | ||
112 | /** | 112 | /** |
113 | Closes the address book. Depending on @ref automaticSave() it will | 113 | Closes the address book. Depending on @ref automaticSave() it will |
114 | save the address book first. | 114 | save the address book first. |
115 | */ | 115 | */ |
116 | static void close(); | 116 | static void close(); |
117 | 117 | ||
118 | /** | 118 | /** |
119 | Returns whether the address book is saved at destruction time. | 119 | Returns whether the address book is saved at destruction time. |
120 | See also @ref setAutomaticSave(). | 120 | See also @ref setAutomaticSave(). |
121 | */ | 121 | */ |
122 | static bool automaticSave(); | 122 | static bool automaticSave(); |
123 | 123 | ||
124 | /** | 124 | /** |
125 | Returns the contact, that is associated with the owner of the | 125 | Returns the contact, that is associated with the owner of the |
126 | address book. This contact should be used by other programs | 126 | address book. This contact should be used by other programs |
127 | to access user specific data. | 127 | to access user specific data. |
128 | */ | 128 | */ |
129 | Addressee whoAmI(); | 129 | Addressee whoAmI(); |
130 | 130 | ||
131 | /** | 131 | /** |
132 | Sets the users contact. See @ref whoAmI() for more information. | 132 | Sets the users contact. See @ref whoAmI() for more information. |
133 | 133 | ||
134 | @param uid The uid of the users contact. | 134 | @param uid The uid of the users contact. |
135 | */ | 135 | */ |
136 | void setWhoAmI( const Addressee &addr ); | 136 | void setWhoAmI( const Addressee &addr ); |
137 | void init( bool onlyFastResources ); | ||
137 | 138 | ||
138 | protected: | 139 | protected: |
139 | StdAddressBook(); | 140 | StdAddressBook(); |
140 | StdAddressBook( bool onlyFastResources ); | 141 | StdAddressBook( bool onlyFastResources ); |
141 | 142 | ||
142 | void init( bool onlyFastResources ); | ||
143 | 143 | ||
144 | private: | 144 | private: |
145 | static QString setTempAppDir(); | 145 | static QString setTempAppDir(); |
146 | static StdAddressBook *mSelf; | 146 | static StdAddressBook *mSelf; |
147 | static bool mAutomaticSave; | 147 | static bool mAutomaticSave; |
148 | }; | 148 | }; |
149 | 149 | ||
150 | } | 150 | } |
151 | #endif | 151 | #endif |