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

Method createCell

src/tools/ecode/plugins/debugger/statusdebuggercontroller.cpp:64–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62};
63
64UIWidget* UIBreakpointsTableView::createCell( UIWidget* rowWidget, const ModelIndex& index ) {
65 if ( index.column() == BreakpointsModel::Enabled ) {
66 UIBreakpointsTableCell* widget = UIBreakpointsTableCell::New(
67 mTag + "::cell", (const BreakpointsModel*)getModel(), index );
68 widget->getTextView()->setEnabled( true );
69 widget->setDontAutoHideEmptyTextBox( true );
70 return setupCell( widget, rowWidget, index );
71 } else if ( index.column() == BreakpointsModel::Remove ) {
72 auto cell = UITableView::createCell( rowWidget, index );
73 cell->onClick( [index, this]( auto ) {
74 auto model = getModel();
75 if ( onBreakpointRemove ) {
76 std::string filePath(
77 model
78 ->data( model->index( index.row(), BreakpointsModel::SourcePath ),
79 ModelRole::Data )
80 .asCStr() );
81 int line( model
82 ->data( model->index( index.row(), BreakpointsModel::Line ),
83 ModelRole::Data )
84 .asInt() );
85 onBreakpointRemove( filePath, line );
86 }
87 } );
88 return cell;
89 }
90 return UITableView::createCell( rowWidget, index );
91}
92
93const std::map<KeyBindings::Shortcut, std::string>
94StatusDebuggerController::getLocalDefaultKeybindings() {

Callers

nothing calls this directly

Calls 11

getModelFunction · 0.85
columnMethod · 0.80
getTextViewMethod · 0.80
rowMethod · 0.80
NewFunction · 0.50
setEnabledMethod · 0.45
onClickMethod · 0.45
dataMethod · 0.45
indexMethod · 0.45
asIntMethod · 0.45

Tested by

no test coverage detected