Variant BaseAssetObjectItem::getData(int column, ItemRole::Id roleId) const { if (column != 0) { return Variant(); } if (roleId == ValueRole::roleId_) { return getDisplayText(0); } else if (roleId == IndexPathRole::roleId_) { return getFullPath(); } else if (roleId == ThumbnailRole::roleId_) { return getThumbnail(0); } else if (roleId == TypeIconRole::roleId_) { return getTypeIconResourceString(); } else if (roleId == SizeRole::roleId_) { return getSize(); } else if (roleId == CreatedTimeRole::roleId_) { return getCreatedTime(); } else if (roleId == ModifiedTimeRole::roleId_) { return getModifiedTime(); } else if (roleId == AccessedTimeRole::roleId_) { return getAccessedTime(); } else if (roleId == IsDirectoryRole::roleId_) { return isDirectory(); } else if (roleId == IsReadOnlyRole::roleId_) { return isReadOnly(); } else if (roleId == IsCompressedRole::roleId_) { return isCompressed(); } else if (roleId == ItemRole::itemIdId) { return intptr_t(this); } return Variant(); }
void SI_SymbolPin::updateErcMessages() noexcept { mErcMsgUnconnectedRequiredPin->setMsg( QString(tr("Unconnected pin: \"%1\" of symbol \"%2\"")) .arg(getDisplayText(true, true)).arg(mSymbol.getName())); mErcMsgUnconnectedRequiredPin->setVisible((mAddedToSchematic) && (mComponentSignal->isRequired()) && (!mRegisteredNetPoint)); }
QString Flags::getLongText(const LayoutUnit& layoutUnit, const Rules* rules) { if( rules == NULL ) { return getDisplayText(layoutUnit.layout, layoutUnit.variant, rules); } QString layoutText = layoutUnit.layout; const LayoutInfo* layoutInfo = rules->getLayoutInfo(layoutUnit.layout); if( layoutInfo != NULL ) { layoutText = layoutInfo->description; if( ! layoutUnit.variant.isEmpty() ) { const VariantInfo* variantInfo = layoutInfo->getVariantInfo(layoutUnit.variant); QString variantText = variantInfo != NULL ? variantInfo->description : layoutUnit.variant; layoutText = getDisplayText(layoutText, variantText, rules); } } return layoutText; }