projects
/
speedfreak
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'development/ui'
[speedfreak]
/
Client
/
categorylist.cpp
diff --git
a/Client/categorylist.cpp
b/Client/categorylist.cpp
index
243c5d3
..
f15fde0
100644
(file)
--- a/
Client/categorylist.cpp
+++ b/
Client/categorylist.cpp
@@
-30,7
+30,17
@@
CategoryList::~CategoryList()
*/
QStringList CategoryList::getCategoryList()
{
*/
QStringList CategoryList::getCategoryList()
{
- qDebug() << "_getCategoryList" ;
+ qDebug() << "_getCategoryList" << realSizeOfCats;
+
+ if(sizeOfCategoryList() != 0) {
+ clearCategoryList();
+ }
+
+ for(int i = 0; i < realSizeOfCats; i++)
+ {
+ categoryList.append(cats[i].description);
+ }
+
return categoryList;
}
return categoryList;
}
@@
-93,19
+103,29
@@
void CategoryList::appendCats(int ind, QString des, QString uni, QString cat)
}
/**
}
/**
- *Clear categs.
+ *Search description for an index af cats table.
+ *@param Index.
*/
*/
-QString CategoryList::desOfCats(int ind)
+QString CategoryList::getRecentDescription(int ind)
{
return cats[ind].description;
}
/**
{
return cats[ind].description;
}
/**
+ *Search category for an index af cats table.
+ *@param Index.
+ */
+QString CategoryList::getRecentCategory(int ind)
+{
+ return cats[ind].category;
+}
+
+/**
*Clear cats.
*/
void CategoryList::clearCats()
{
*Clear cats.
*/
void CategoryList::clearCats()
{
- for(int i = 0; i < 10; i++)
+ for(int i = 0; i < 20; i++)
{
cats[i].description.clear();
cats[i].unit.clear();
{
cats[i].description.clear();
cats[i].unit.clear();