summaryrefslogtreecommitdiff
path: root/src/categoriesdialog.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-23 20:59:40 -0500
committerJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-23 20:59:40 -0500
commitefdff42d5f6cdf5044e741ad7aa00bf73991c422 (patch)
tree0554ea7bec60e31d6a0110553c0a43eaefb7d91e /src/categoriesdialog.cpp
parentb7d4d20bf185e23e5d19451cccb66bdc94acf09f (diff)
Make category struct attributes private
Diffstat (limited to 'src/categoriesdialog.cpp')
-rw-r--r--src/categoriesdialog.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/categoriesdialog.cpp b/src/categoriesdialog.cpp
index 53c930f3..b770fa0b 100644
--- a/src/categoriesdialog.cpp
+++ b/src/categoriesdialog.cpp
@@ -213,7 +213,7 @@ void CategoriesDialog::fillTable()
categories.m_Categories.begin();
iter != categories.m_Categories.end(); ++iter, ++row) {
const CategoryFactory::Category& category = *iter;
- if (category.m_ID == 0) {
+ if (category.ID() == 0) {
--row;
continue;
}
@@ -221,11 +221,11 @@ void CategoriesDialog::fillTable()
// table->setVerticalHeaderItem(row, new QTableWidgetItem(" "));
QScopedPointer<QTableWidgetItem> idItem(new QTableWidgetItem());
- idItem->setData(Qt::DisplayRole, category.m_ID);
+ idItem->setData(Qt::DisplayRole, category.ID());
- QScopedPointer<QTableWidgetItem> nameItem(new QTableWidgetItem(category.m_Name));
+ QScopedPointer<QTableWidgetItem> nameItem(new QTableWidgetItem(category.name()));
QScopedPointer<QTableWidgetItem> parentIDItem(new QTableWidgetItem());
- parentIDItem->setData(Qt::DisplayRole, category.m_ParentID);
+ parentIDItem->setData(Qt::DisplayRole, category.parentID());
QScopedPointer<QTableWidgetItem> nexusCatItem(new QTableWidgetItem());
table->setItem(row, 0, idItem.take());
@@ -236,15 +236,15 @@ void CategoriesDialog::fillTable()
for (auto nexusCat : categories.m_NexusMap) {
QScopedPointer<QListWidgetItem> nexusItem(new QListWidgetItem());
- nexusItem->setData(Qt::DisplayRole, nexusCat.second.m_Name);
- nexusItem->setData(Qt::UserRole, nexusCat.second.m_ID);
+ nexusItem->setData(Qt::DisplayRole, nexusCat.second.name());
+ nexusItem->setData(Qt::UserRole, nexusCat.second.ID());
list->addItem(nexusItem.take());
auto item = table->item(categories.resolveNexusID(nexusCat.first) - 1, 3);
if (item != nullptr) {
auto itemData = item->data(Qt::UserRole).toList();
QVariantList newData;
- newData.append(nexusCat.second.m_Name);
- newData.append(nexusCat.second.m_ID);
+ newData.append(nexusCat.second.name());
+ newData.append(nexusCat.second.ID());
itemData.insert(itemData.length(), newData);
QStringList names;
for (auto cat : itemData) {