MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / initializeView

Method initializeView

src/plugins/debugger/dap/dapdebugger.cpp:1212–1288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1210}
1211
1212void DAPDebugger::initializeView()
1213{
1214 // initialize output pane.
1215 d->outputPane = OutputPane::instance();
1216
1217 // initialize stack monitor pane.
1218 d->stackPane = new DWidget;
1219 d->stackPane->setMinimumWidth(300);
1220 QVBoxLayout *vLayout = new QVBoxLayout(d->stackPane);
1221 vLayout->setContentsMargins(0, 6, 0, 0);
1222 d->stackPane->setLayout(vLayout);
1223
1224 d->stackView = new StackFrameView(d->stackPane);
1225 d->stackView->setModel(d->stackModel.model());
1226
1227 d->threadSelector = new DComboBox(d->stackPane);
1228 d->threadSelector->setMinimumWidth(240);
1229 connect(d->threadSelector, QOverload<const QString &>::of(&DComboBox::activated), this, &DAPDebugger::currentThreadChanged);
1230
1231 QHBoxLayout *hLayout = new QHBoxLayout(d->stackPane);
1232 hLayout->setAlignment(Qt::AlignLeft);
1233 hLayout->setContentsMargins(10, 0, 0, 0);
1234 DLabel *label = new DLabel(tr("Threads:"), d->stackPane);
1235 hLayout->addWidget(label);
1236 hLayout->addWidget(d->threadSelector);
1237
1238 vLayout->addLayout(initFrameTitle(tr("Stack List")));
1239 vLayout->addLayout(hLayout);
1240 vLayout->addWidget(d->stackView);
1241
1242 // intialize breakpint pane.
1243 d->breakpointView = new BreakpointView(d->stackPane);
1244 d->breakpointView->setMinimumWidth(300);
1245 d->breakpointView->setModel(d->breakpointModel.model());
1246
1247 initializeVairablesPane();
1248
1249 connect(&d->processingVariablesTimer, &QTimer::timeout, this, [=]() {
1250 d->variablesSpinner->show();
1251 d->variablesSpinner->raise();
1252 d->variablesSpinner->move(d->localsView->width() / 2 - d->variablesSpinner->width(), d->localsView->height() / 3);
1253 });
1254 connect(this, &DAPDebugger::processingVariablesDone, this, [=]() {
1255 if (d->processingVariablesCount != 0)
1256 return;
1257 d->processingVariablesTimer.stop();
1258 d->variablesSpinner->hide();
1259 handleUpdateDebugLine();
1260 });
1261
1262 d->debugMainPane = new DFrame;
1263 d->debugMainPane->setLineWidth(0);
1264 DStyle::setFrameRadius(d->debugMainPane, 0);
1265 QVBoxLayout *mainLayout = new QVBoxLayout();
1266 mainLayout->setContentsMargins(0, 0, 0, 0);
1267 mainLayout->addWidget(d->stackPane);
1268 mainLayout->addWidget(new DHorizontalLine());
1269 mainLayout->addLayout(initFrameTitle(tr("Breakpoint List")));

Callers

nothing calls this directly

Calls 9

connectFunction · 0.85
widthMethod · 0.80
setModelMethod · 0.45
modelMethod · 0.45
addWidgetMethod · 0.45
showMethod · 0.45
stopMethod · 0.45
hideMethod · 0.45
appendItemMethod · 0.45

Tested by

no test coverage detected