-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,6 +1,9 @@ +#include <qpe/categories.h> +#include <qpe/categoryselect.h> + #include "opimrecord.h" OPimRecord::OPimRecord( int uid ) : Qtopia::Record() { setUid( uid ); @@ -16,21 +19,34 @@ OPimRecord::OPimRecord( const OPimRecord& rec ) OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { Qtopia::Record::operator=( rec ); m_relations = rec.m_relations; return *this; } +/* + * category names + */ QStringList OPimRecord::categoryNames()const { QStringList list; + QArray<int> cats = categories(); + Categories catDB; + catDB.load( categoryFileName() ); + + for (uint i = 0; i < cats.count(); i++ ) { + list << catDB.label("Todo List", cats[i] ); + } return list; } void OPimRecord::setCategoryNames( const QStringList& ) { } void OPimRecord::addCategoryName( const QString& ) { + Categories catDB; + catDB.load( categoryFileName() ); + } bool OPimRecord::isEmpty()const { return ( uid() == 0 ); } QStringList OPimRecord::relatedApps()const{ 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,6 +1,9 @@ +#include <qpe/categories.h> +#include <qpe/categoryselect.h> + #include "opimrecord.h" OPimRecord::OPimRecord( int uid ) : Qtopia::Record() { setUid( uid ); @@ -16,21 +19,34 @@ OPimRecord::OPimRecord( const OPimRecord& rec ) OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { Qtopia::Record::operator=( rec ); m_relations = rec.m_relations; return *this; } +/* + * category names + */ QStringList OPimRecord::categoryNames()const { QStringList list; + QArray<int> cats = categories(); + Categories catDB; + catDB.load( categoryFileName() ); + + for (uint i = 0; i < cats.count(); i++ ) { + list << catDB.label("Todo List", cats[i] ); + } return list; } void OPimRecord::setCategoryNames( const QStringList& ) { } void OPimRecord::addCategoryName( const QString& ) { + Categories catDB; + catDB.load( categoryFileName() ); + } bool OPimRecord::isEmpty()const { return ( uid() == 0 ); } QStringList OPimRecord::relatedApps()const{ |