From 978dcbe44df66d4efbbc12bdacdcb293358581fd Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 21 Sep 2002 15:16:59 +0000 Subject: additions --- 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,3 +1,6 @@ +#include +#include + #include "opimrecord.h" OPimRecord::OPimRecord( int uid ) @@ -19,8 +22,18 @@ OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { return *this; } +/* + * category names + */ QStringList OPimRecord::categoryNames()const { QStringList list; + QArray cats = categories(); + Categories catDB; + catDB.load( categoryFileName() ); + + for (uint i = 0; i < cats.count(); i++ ) { + list << catDB.label("Todo List", cats[i] ); + } return list; } @@ -28,6 +41,9 @@ void OPimRecord::setCategoryNames( const QStringList& ) { } void OPimRecord::addCategoryName( const QString& ) { + Categories catDB; + catDB.load( categoryFileName() ); + } bool OPimRecord::isEmpty()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,3 +1,6 @@ +#include +#include + #include "opimrecord.h" OPimRecord::OPimRecord( int uid ) @@ -19,8 +22,18 @@ OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { return *this; } +/* + * category names + */ QStringList OPimRecord::categoryNames()const { QStringList list; + QArray cats = categories(); + Categories catDB; + catDB.load( categoryFileName() ); + + for (uint i = 0; i < cats.count(); i++ ) { + list << catDB.label("Todo List", cats[i] ); + } return list; } @@ -28,6 +41,9 @@ void OPimRecord::setCategoryNames( const QStringList& ) { } void OPimRecord::addCategoryName( const QString& ) { + Categories catDB; + catDB.load( categoryFileName() ); + } bool OPimRecord::isEmpty()const { -- cgit v0.9.0.2