forked from qt-creator/qt-creator
QmlDesigner: Add visibily to ItemLibraryItem
Change-Id: I5fa1b249e6a2d317e06ed9ff04597de590228f86 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user