author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/distributionlist.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/distributionlist.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h index c81e543..8d21a17 100644 --- a/kabc/distributionlist.h +++ b/kabc/distributionlist.h | |||
@@ -11,57 +11,60 @@ | |||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef KABC_DISTRIBUTIONLIST_H | 21 | #ifndef KABC_DISTRIBUTIONLIST_H |
22 | #define KABC_DISTRIBUTIONLIST_H | 22 | #define KABC_DISTRIBUTIONLIST_H |
23 | 23 | ||
24 | //#include <kdirwatch.h> | 24 | //#include <kdirwatch.h> |
25 | 25 | ||
26 | #include "addressbook.h" | 26 | #include "addressbook.h" |
27 | //Added by qt3to4: | ||
28 | #include <Q3ValueList> | ||
29 | #include <Q3PtrList> | ||
27 | 30 | ||
28 | namespace KABC { | 31 | namespace KABC { |
29 | 32 | ||
30 | class DistributionListManager; | 33 | class DistributionListManager; |
31 | 34 | ||
32 | /** | 35 | /** |
33 | @short Distribution list of email addresses | 36 | @short Distribution list of email addresses |
34 | 37 | ||
35 | This class represents a list of email addresses. Each email address is | 38 | This class represents a list of email addresses. Each email address is |
36 | associated with an address book entry. If the address book entry changes, the | 39 | associated with an address book entry. If the address book entry changes, the |
37 | entry in the distribution list is automatically updated. | 40 | entry in the distribution list is automatically updated. |
38 | */ | 41 | */ |
39 | class DistributionList | 42 | class DistributionList |
40 | { | 43 | { |
41 | public: | 44 | public: |
42 | /** | 45 | /** |
43 | @short Distribution List Entry | 46 | @short Distribution List Entry |
44 | 47 | ||
45 | This class represents an entry of a distribution list. It consists of an | 48 | This class represents an entry of a distribution list. It consists of an |
46 | addressee and an email address. If the email address is null, the | 49 | addressee and an email address. If the email address is null, the |
47 | preferred email address of the addressee is used. | 50 | preferred email address of the addressee is used. |
48 | */ | 51 | */ |
49 | struct Entry | 52 | struct Entry |
50 | { | 53 | { |
51 | typedef QValueList<Entry> List; | 54 | typedef Q3ValueList<Entry> List; |
52 | 55 | ||
53 | Entry() {} | 56 | Entry() {} |
54 | Entry( const Addressee &_addressee, const QString &_email ) : | 57 | Entry( const Addressee &_addressee, const QString &_email ) : |
55 | addressee( _addressee ), email( _email ) {} | 58 | addressee( _addressee ), email( _email ) {} |
56 | 59 | ||
57 | Addressee addressee; | 60 | Addressee addressee; |
58 | QString email; | 61 | QString email; |
59 | }; | 62 | }; |
60 | 63 | ||
61 | /** | 64 | /** |
62 | Create distribution list object. | 65 | Create distribution list object. |
63 | 66 | ||
64 | @param manager Managing object of this list. | 67 | @param manager Managing object of this list. |
65 | @param name Name of this list. | 68 | @param name Name of this list. |
66 | */ | 69 | */ |
67 | DistributionList( DistributionListManager *manager, const QString &name ); | 70 | DistributionList( DistributionListManager *manager, const QString &name ); |
@@ -154,33 +157,33 @@ class DistributionListManager | |||
154 | */ | 157 | */ |
155 | QStringList listNames(); | 158 | QStringList listNames(); |
156 | 159 | ||
157 | /** | 160 | /** |
158 | Load distribution lists form disk. | 161 | Load distribution lists form disk. |
159 | */ | 162 | */ |
160 | bool load(); | 163 | bool load(); |
161 | 164 | ||
162 | /** | 165 | /** |
163 | Save distribution lists to disk. | 166 | Save distribution lists to disk. |
164 | */ | 167 | */ |
165 | bool save(); | 168 | bool save(); |
166 | 169 | ||
167 | private: | 170 | private: |
168 | AddressBook *mAddressBook; | 171 | AddressBook *mAddressBook; |
169 | 172 | ||
170 | QPtrList<DistributionList> mLists; | 173 | Q3PtrList<DistributionList> mLists; |
171 | }; | 174 | }; |
172 | 175 | ||
173 | /** | 176 | /** |
174 | @short Watchdog for distribution lists | 177 | @short Watchdog for distribution lists |
175 | 178 | ||
176 | This class provides a @ref changed() signal that i emitted when the | 179 | This class provides a @ref changed() signal that i emitted when the |
177 | distribution lists has changed in some way. | 180 | distribution lists has changed in some way. |
178 | 181 | ||
179 | Exapmle: | 182 | Exapmle: |
180 | 183 | ||
181 | <pre> | 184 | <pre> |
182 | KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() | 185 | KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() |
183 | 186 | ||
184 | connect( watchdog, SIGNAL( changed() ), SLOT( doSomething() ) ); | 187 | connect( watchdog, SIGNAL( changed() ), SLOT( doSomething() ) ); |
185 | </pre> | 188 | </pre> |
186 | */ | 189 | */ |