author | zecke <zecke> | 2002-09-21 15:16:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-21 15:16:59 (UTC) |
commit | 978dcbe44df66d4efbbc12bdacdcb293358581fd (patch) (unidiff) | |
tree | 83c4eb4ccaf4eefbfc871666379d4e79a6a4b3ef | |
parent | e6c53c4d7317e766235449535b22d0d2fe709214 (diff) | |
download | opie-978dcbe44df66d4efbbc12bdacdcb293358581fd.zip opie-978dcbe44df66d4efbbc12bdacdcb293358581fd.tar.gz opie-978dcbe44df66d4efbbc12bdacdcb293358581fd.tar.bz2 |
additions
-rw-r--r-- | libopie/pim/opimrecord.cpp | 16 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/libopie/pim/opimrecord.cpp b/libopie/pim/opimrecord.cpp index e510f4e..88b6fde 100644 --- a/libopie/pim/opimrecord.cpp +++ b/libopie/pim/opimrecord.cpp | |||
@@ -1,4 +1,7 @@ | |||
1 | #include <qpe/categories.h> | ||
2 | #include <qpe/categoryselect.h> | ||
3 | |||
1 | #include "opimrecord.h" | 4 | #include "opimrecord.h" |
2 | 5 | ||
3 | OPimRecord::OPimRecord( int uid ) | 6 | OPimRecord::OPimRecord( int uid ) |
4 | : Qtopia::Record() { | 7 | : Qtopia::Record() { |
@@ -18,17 +21,30 @@ OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { | |||
18 | m_relations = rec.m_relations; | 21 | m_relations = rec.m_relations; |
19 | 22 | ||
20 | return *this; | 23 | return *this; |
21 | } | 24 | } |
25 | /* | ||
26 | * category names | ||
27 | */ | ||
22 | QStringList OPimRecord::categoryNames()const { | 28 | QStringList OPimRecord::categoryNames()const { |
23 | QStringList list; | 29 | QStringList list; |
30 | QArray<int> cats = categories(); | ||
31 | Categories catDB; | ||
32 | catDB.load( categoryFileName() ); | ||
33 | |||
34 | for (uint i = 0; i < cats.count(); i++ ) { | ||
35 | list << catDB.label("Todo List", cats[i] ); | ||
36 | } | ||
24 | 37 | ||
25 | return list; | 38 | return list; |
26 | } | 39 | } |
27 | void OPimRecord::setCategoryNames( const QStringList& ) { | 40 | void OPimRecord::setCategoryNames( const QStringList& ) { |
28 | 41 | ||
29 | } | 42 | } |
30 | void OPimRecord::addCategoryName( const QString& ) { | 43 | void OPimRecord::addCategoryName( const QString& ) { |
44 | Categories catDB; | ||
45 | catDB.load( categoryFileName() ); | ||
46 | |||
31 | 47 | ||
32 | } | 48 | } |
33 | bool OPimRecord::isEmpty()const { | 49 | bool OPimRecord::isEmpty()const { |
34 | return ( uid() == 0 ); | 50 | return ( uid() == 0 ); |
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index e510f4e..88b6fde 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp | |||
@@ -1,4 +1,7 @@ | |||
1 | #include <qpe/categories.h> | ||
2 | #include <qpe/categoryselect.h> | ||
3 | |||
1 | #include "opimrecord.h" | 4 | #include "opimrecord.h" |
2 | 5 | ||
3 | OPimRecord::OPimRecord( int uid ) | 6 | OPimRecord::OPimRecord( int uid ) |
4 | : Qtopia::Record() { | 7 | : Qtopia::Record() { |
@@ -18,17 +21,30 @@ OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { | |||
18 | m_relations = rec.m_relations; | 21 | m_relations = rec.m_relations; |
19 | 22 | ||
20 | return *this; | 23 | return *this; |
21 | } | 24 | } |
25 | /* | ||
26 | * category names | ||
27 | */ | ||
22 | QStringList OPimRecord::categoryNames()const { | 28 | QStringList OPimRecord::categoryNames()const { |
23 | QStringList list; | 29 | QStringList list; |
30 | QArray<int> cats = categories(); | ||
31 | Categories catDB; | ||
32 | catDB.load( categoryFileName() ); | ||
33 | |||
34 | for (uint i = 0; i < cats.count(); i++ ) { | ||
35 | list << catDB.label("Todo List", cats[i] ); | ||
36 | } | ||
24 | 37 | ||
25 | return list; | 38 | return list; |
26 | } | 39 | } |
27 | void OPimRecord::setCategoryNames( const QStringList& ) { | 40 | void OPimRecord::setCategoryNames( const QStringList& ) { |
28 | 41 | ||
29 | } | 42 | } |
30 | void OPimRecord::addCategoryName( const QString& ) { | 43 | void OPimRecord::addCategoryName( const QString& ) { |
44 | Categories catDB; | ||
45 | catDB.load( categoryFileName() ); | ||
46 | |||
31 | 47 | ||
32 | } | 48 | } |
33 | bool OPimRecord::isEmpty()const { | 49 | bool OPimRecord::isEmpty()const { |
34 | return ( uid() == 0 ); | 50 | return ( uid() == 0 ); |