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

Method initIssueList

src/plugins/builder/mainframe/buildmanager.cpp:169–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void BuildManager::initIssueList()
170{
171 d->problemOutputPane = new ProblemOutputPane(d->compileWidget);
172
173 QLabel *issusListText = new QLabel(d->compileWidget);
174 issusListText->setText(tr("Issues list"));
175 issusListText->setContentsMargins(10, 0, 0, 0);
176
177 DToolButton *filterButton = new DToolButton(d->compileWidget);
178 filterButton->setFixedSize(26, 26);
179 filterButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
180 filterButton->setIcon(QIcon::fromTheme("filter"));
181 filterButton->setContentsMargins(0, 0, 0, 0);
182 filterButton->setToolTip(tr("Filter"));
183
184 DToolButton *settingButton = new DToolButton(d->compileWidget);
185 settingButton->setFixedSize(26, 26);
186 settingButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
187 settingButton->setIcon(QIcon::fromTheme("settings"));
188 settingButton->setContentsMargins(0, 0, 0, 0);
189 settingButton->setToolTip(tr("Settings"));
190
191 DFrame *issueTopWidget = new DFrame(d->compileWidget);
192 DStyle::setFrameRadius(issueTopWidget, 0);
193 issueTopWidget->setLineWidth(0);
194 issueTopWidget->setFixedHeight(36);
195 QHBoxLayout *hIssueTopLayout = new QHBoxLayout(issueTopWidget);
196 hIssueTopLayout->addWidget(issusListText);
197 hIssueTopLayout->addWidget(settingButton);
198 hIssueTopLayout->addWidget(filterButton);
199 hIssueTopLayout->setSpacing(0);
200 hIssueTopLayout->setContentsMargins(0, 0, 5, 0);
201 hIssueTopLayout->setAlignment(Qt::AlignVCenter);
202
203 DMenu *filterMenu = new DMenu(filterButton);
204
205 QAction *showAllAction = new QAction(tr("All"), this);
206 showAllAction->setCheckable(true);
207 showAllAction->setChecked(true);
208 filterMenu->addAction(showAllAction);
209
210 QAction *showErrorAction = new QAction(tr("Error"), this);
211 showErrorAction->setCheckable(true);
212 filterMenu->addAction(showErrorAction);
213
214 QAction *showWarningAction = new QAction(tr("Warning"), this);
215 showWarningAction->setCheckable(true);
216 filterMenu->addAction(showWarningAction);
217
218 d->issuesWidget = new DWidget(d->compileWidget);
219 QVBoxLayout *issuesListLayout = new QVBoxLayout(d->issuesWidget);
220 issuesListLayout->setSpacing(0);
221 issuesListLayout->setContentsMargins(0, 0, 0, 0);
222 issuesListLayout->addWidget(issueTopWidget);
223 issuesListLayout->addWidget(new DHorizontalLine(d->issuesWidget));
224 issuesListLayout->addWidget(d->problemOutputPane);
225
226 connect(filterMenu, &DMenu::triggered, [=](QAction *action) {

Callers

nothing calls this directly

Calls 10

connectFunction · 0.85
setFixedSizeMethod · 0.80
setCheckableMethod · 0.80
QPointClass · 0.50
setTextMethod · 0.45
setIconMethod · 0.45
addWidgetMethod · 0.45
setCheckedMethod · 0.45
addActionMethod · 0.45
showSpecificTasksMethod · 0.45

Tested by

no test coverage detected