QWidget *VBoxSettingsTreeViewSelector::addItem (const QString & /* strBigIcon */, const QString &strMediumIcon , const QString & /* strSmallIcon */, int aId, const QString &aLink, UISettingsPage* aPage /* = NULL */, int aParentId /* = -1 */) { QWidget *result = NULL; if (aPage != NULL) { QIcon icon = UIIconPool::iconSet(strMediumIcon); SelectorItem *item = new SelectorItem (icon, "", aId, aLink, aPage, aParentId); mItemList.append (item); QTreeWidgetItem *twitem = new QTreeWidgetItem (mTwSelector, QStringList() << QString ("") << idToString (aId) << aLink); twitem->setIcon (treeWidget_Category, item->icon()); aPage->setContentsMargins (0, 0, 0, 0); aPage->layout()->setContentsMargins(0, 0, 0, 0); result = aPage; } return result; }
QWidget *VBoxSettingsTreeViewSelector::addItem (const QString & /* aBigIcon */, const QString & /* aBigIconDisabled */, const QString &aSmallIcon, const QString &aSmallIconDisabled, int aId, const QString &aLink, UISettingsPage* aPage /* = NULL */, int aParentId /* = -1 */) { QWidget *result = NULL; if (aPage != NULL) { QIcon icon (aSmallIcon); if (aSmallIconDisabled.isEmpty()) icon.addFile (aSmallIconDisabled, QSize(), QIcon::Disabled); SelectorItem *item = new SelectorItem (icon, "", aId, aLink, aPage, aParentId); mItemList.append (item); QTreeWidgetItem *twitem = new QTreeWidgetItem (mTwSelector, QStringList() << QString ("") << idToString (aId) << aLink); twitem->setIcon (treeWidget_Category, item->icon()); aPage->setContentsMargins (0, 0, 0, 0); aPage->layout()->setContentsMargins(0, 0, 0, 0); result = aPage; } return result; }