@@ -175,6 +175,11 @@ QHash<Uuid, QImage> Metadata::customIcons() const
|
||||
return m_customIcons;
|
||||
}
|
||||
|
||||
QList<Uuid> Metadata::customIconsOrder() const
|
||||
{
|
||||
return m_customIconsOrder;
|
||||
}
|
||||
|
||||
bool Metadata::recycleBinEnabled() const
|
||||
{
|
||||
return m_recycleBinEnabled;
|
||||
@@ -328,6 +333,8 @@ void Metadata::addCustomIcon(const Uuid& uuid, const QImage& icon)
|
||||
Q_ASSERT(!m_customIcons.contains(uuid));
|
||||
|
||||
m_customIcons.insert(uuid, icon);
|
||||
m_customIconsOrder.append(uuid);
|
||||
Q_ASSERT(m_customIcons.count() == m_customIconsOrder.count());
|
||||
Q_EMIT modified();
|
||||
}
|
||||
|
||||
@@ -337,6 +344,8 @@ void Metadata::removeCustomIcon(const Uuid& uuid)
|
||||
Q_ASSERT(m_customIcons.contains(uuid));
|
||||
|
||||
m_customIcons.remove(uuid);
|
||||
m_customIconsOrder.removeAll(uuid);
|
||||
Q_ASSERT(m_customIcons.count() == m_customIconsOrder.count());
|
||||
Q_EMIT modified();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ public:
|
||||
QImage customIcon(const Uuid& uuid) const;
|
||||
bool containsCustomIcon(const Uuid& uuid) const;
|
||||
QHash<Uuid, QImage> customIcons() const;
|
||||
QList<Uuid> customIconsOrder() const;
|
||||
bool recycleBinEnabled() const;
|
||||
Group* recycleBin();
|
||||
const Group* recycleBin() const;
|
||||
@@ -134,6 +135,7 @@ private:
|
||||
// bool m_autoEnableVisualHiding;
|
||||
|
||||
QHash<Uuid, QImage> m_customIcons;
|
||||
QList<Uuid> m_customIconsOrder;
|
||||
|
||||
bool m_recycleBinEnabled;
|
||||
QPointer<Group> m_recycleBin;
|
||||
|
||||
Reference in New Issue
Block a user