mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Elements collection now have a title and an icon.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1491 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -36,6 +36,38 @@ ElementsCollection::ElementsCollection(ElementsCollectionItem *parent) :
|
||||
ElementsCollection::~ElementsCollection() {
|
||||
}
|
||||
|
||||
/**
|
||||
@return the title for this collection
|
||||
*/
|
||||
QString ElementsCollection::title() const {
|
||||
return(title_);
|
||||
}
|
||||
|
||||
/**
|
||||
@param title New title for this collection
|
||||
*/
|
||||
void ElementsCollection::setTitle(const QString &title) {
|
||||
if (title_ == title) return;
|
||||
title_ = title;
|
||||
emit(elementsCollectionChanged(this));
|
||||
}
|
||||
|
||||
/**
|
||||
@return the icon for this collection
|
||||
*/
|
||||
QIcon ElementsCollection::icon() const {
|
||||
return(icon_);
|
||||
}
|
||||
|
||||
/**
|
||||
@param icon the icon for this collection
|
||||
*/
|
||||
void ElementsCollection::setIcon(const QIcon &icon) {
|
||||
if (icon_.cacheKey() == icon.cacheKey()) return;
|
||||
icon_ = icon;
|
||||
emit(elementsCollectionChanged(this));
|
||||
}
|
||||
|
||||
/**
|
||||
@return toujours true
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user