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

Method index

include/eepp/ui/models/stringmapmodel.hpp:60–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 virtual size_t columnCount( const ModelIndex& = ModelIndex() ) const override { return 1; }
59
60 virtual ModelIndex index( int row, int column,
61 const ModelIndex& parent = ModelIndex() ) const override {
62 if ( row < 0 || column < 0 || row >= (int)rowCount( parent ) ||
63 column >= (int)columnCount( parent ) )
64 return {};
65 Node* parentNode =
66 parent.isValid() ? static_cast<Node*>( parent.internalData() ) : mRoot;
67 if ( row < (int)parentNode->visibleChildren.size() )
68 return createIndex( row, column, parentNode->visibleChildren[row] );
69 return {};
70 }
71
72 virtual ModelIndex parent( const ModelIndex& index ) const {
73 if ( !index.isValid() )

Callers

nothing calls this directly

Calls 6

ModelIndexFunction · 0.85
rowCountFunction · 0.85
columnCountFunction · 0.85
internalDataMethod · 0.80
isValidMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected