summaryrefslogtreecommitdiff
path: root/libopie2/opiepim
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimrecord.cpp16
1 files changed, 16 insertions, 0 deletions
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 +1,4 @@
+#include <qpe/categories.h>
+#include <qpe/categoryselect.h>
+
#include "opimrecord.h"
@@ -21,4 +24,14 @@ OPimRecord &OPimRecord::operator=( const OPimRecord& rec) {
}
+/*
+ * 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] );
+ }
@@ -30,2 +43,5 @@ void OPimRecord::setCategoryNames( const QStringList& ) {
void OPimRecord::addCategoryName( const QString& ) {
+ Categories catDB;
+ catDB.load( categoryFileName() );
+