diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.cpp index 6d5517376b8..85bb0f98ff5 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.cpp @@ -75,4 +75,19 @@ void ItemLibraryItem::setItemIconSize(const QSize &itemIconSize) m_iconSize = itemIconSize; setItemIconPath(m_iconPath); } + +bool ItemLibraryItem::setVisible(bool isVisible) +{ + if (isVisible != m_isVisible) { + m_isVisible = isVisible; + return true; + } + + return false; +} + +bool ItemLibraryItem::isVisible() const +{ + return m_isVisible; +} } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h index c96e63a8d49..b8a4783b106 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryitem.h @@ -58,8 +58,12 @@ public: void setItemIconPath(const QString &iconPath); void setItemIconSize(const QSize &itemIconSize); + bool setVisible(bool isVisible); + bool isVisible() const; + private: int m_libId; + bool m_isVisible; QString m_name; QString m_iconPath; QSize m_iconSize;