MCPcopy Create free account
hub / github.com/SpartanJ/eepp / data

Method data

include/eepp/ui/models/csspropertiesmodel.hpp:31–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 virtual Variant data( const ModelIndex& index, ModelRole role = ModelRole::Display ) const {
32 eeASSERT( index.row() < (Int64)mData.size() );
33 if ( mWidget == nullptr || index.row() >= (Int64)mData.size() )
34 return {};
35 PropertyId propId = mData[index.row()];
36 auto propIt = mProps.find( propId );
37 const PropertyDefinition* def = propIt != mProps.end() ? propIt->second : nullptr;
38 if ( !def )
39 return {};
40 if ( role == ModelRole::Display ) {
41 switch ( index.column() ) {
42 case 1:
43 return Variant( mWidget->getPropertyString( def ) );
44 case 0:
45 default:
46 return Variant( def->getName().c_str() );
47 }
48 }
49 return {};
50 }
51
52 CSSPropertiesModel() {}
53

Callers

nothing calls this directly

Calls 9

VariantFunction · 0.85
rowMethod · 0.80
columnMethod · 0.80
c_strMethod · 0.80
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
getPropertyStringMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected