QmlDesigner: Add visibily to ItemLibraryItem

Change-Id: I5fa1b249e6a2d317e06ed9ff04597de590228f86
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
Marco Bubke
2014-05-22 16:39:25 +02:00
committed by Tim Jenssen
parent 670edda4a9
commit ce2f80c296
2 changed files with 19 additions and 0 deletions

View File

@@ -75,4 +75,19 @@ void ItemLibraryItem::setItemIconSize(const QSize &itemIconSize)
m_iconSize = itemIconSize; m_iconSize = itemIconSize;
setItemIconPath(m_iconPath); 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 } // namespace QmlDesigner

View File

@@ -58,8 +58,12 @@ public:
void setItemIconPath(const QString &iconPath); void setItemIconPath(const QString &iconPath);
void setItemIconSize(const QSize &itemIconSize); void setItemIconSize(const QSize &itemIconSize);
bool setVisible(bool isVisible);
bool isVisible() const;
private: private:
int m_libId; int m_libId;
bool m_isVisible;
QString m_name; QString m_name;
QString m_iconPath; QString m_iconPath;
QSize m_iconSize; QSize m_iconSize;