7#ifndef __KIS_CATEGORIES_MAPPER_H
8#define __KIS_CATEGORIES_MAPPER_H
11#include <QScopedPointer>
12#include <kritaui_export.h>
32template<
class TEntry,
class TEntryToQStringConverter>
55 :
m_data(new TEntry(entry)),
68 TEntryToQStringConverter converter;
190 QMutableListIterator<DataItem*> it(
m_items);
194 while(it.hasNext()) {
206 Q_ASSERT(!categoryItem);
214 int row =
m_items.indexOf(categoryItem);
238 int row =
m_items.indexOf(item);
254 *item->
data() == entry &&
263 *item->
data() == entry)
return item;
275 filteredItems.append(item);
279 return filteredItems;
float value(const T *src, size_t ch)
DataItem(const TEntry &entry, DataItem *category, KisCategoriesMapper *parent)
void setLockable(bool value)
void setLocked(bool value)
void setChecked(bool value)
void setEnabled(bool value)
void setToggled(bool value)
DataItem(const QString &categoryName, KisCategoriesMapper *parent)
QScopedPointer< TEntry > m_data
DataItem * parentCategory() const
KisCategoriesMapper * m_parent
void setExpanded(bool value)
void setCheckable(bool value)
DataItem * addEntry(const QString &category, const TEntry &entry)
DataItem * fetchEntry(const QString &category, const TEntry &entry) const
void notifyItemChanged(DataItem *item)
void notifyCategoryExpanded(DataItem *categoryItem)
void removeCategory(const QString &category)
QList< DataItem * > m_items
int rowFromItem(DataItem *item) const
~KisCategoriesMapper() override
DataItem * fetchCategory(const QString &category) const
QVector< DataItem * > itemsForCategory(const QString &category) const
DataItem * addCategory(const QString &category)
void removeEntry(const QString &category, const TEntry &entry)
DataItem * fetchOneEntry(const TEntry &entry) const
void expandAllCategories()
DataItem * itemFromRow(int row) const
QList< DataItem * > & testingGetItems()
void beginInsertRow(int row)
void beginRemoveRow(int row)