| 250 | } |
| 251 | |
| 252 | void BuildManager::initCompileOutput() |
| 253 | { |
| 254 | d->compileOutputPane = new CompileOutputPane(d->compileWidget); |
| 255 | |
| 256 | QLabel *compileOutputText = new QLabel(d->compileWidget); |
| 257 | compileOutputText->setText(tr("Compile Output")); |
| 258 | compileOutputText->setContentsMargins(10, 0, 0, 0); |
| 259 | |
| 260 | QHBoxLayout *hOutputTopLayout = new QHBoxLayout(); |
| 261 | hOutputTopLayout->addWidget(compileOutputText); |
| 262 | hOutputTopLayout->setSpacing(0); |
| 263 | hOutputTopLayout->setContentsMargins(0, 0, 5, 0); |
| 264 | hOutputTopLayout->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); |
| 265 | |
| 266 | auto createVLine = [this] { |
| 267 | DVerticalLine *vLine = new DVerticalLine(d->compileWidget); |
| 268 | vLine->setFixedHeight(20); |
| 269 | return vLine; |
| 270 | }; |
| 271 | |
| 272 | // init toolButton |
| 273 | hOutputTopLayout->addSpacing(10); |
| 274 | hOutputTopLayout->addWidget(createVLine()); |
| 275 | hOutputTopLayout->addSpacing(10); |
| 276 | |
| 277 | auto btn = utils::createIconButton(d->cancelAction, d->compileWidget); |
| 278 | btn->setFixedSize(QSize(26, 26)); |
| 279 | hOutputTopLayout->addWidget(btn); |
| 280 | btn = utils::createIconButton(d->rebuildAction, d->compileWidget); |
| 281 | btn->setFixedSize(QSize(26, 26)); |
| 282 | hOutputTopLayout->addWidget(btn); |
| 283 | btn = utils::createIconButton(d->cleanAction, d->compileWidget); |
| 284 | btn->setFixedSize(QSize(26, 26)); |
| 285 | hOutputTopLayout->addWidget(btn); |
| 286 | |
| 287 | DToolButton *clearLogBtn = new DToolButton(d->compileWidget); |
| 288 | clearLogBtn->setIconSize({ 16, 16 }); |
| 289 | clearLogBtn->setFixedSize({ 26, 26 }); |
| 290 | clearLogBtn->setIcon(QIcon::fromTheme("clear_log")); |
| 291 | clearLogBtn->setToolTip(tr("Clear Output")); |
| 292 | connect(clearLogBtn, &DToolButton::clicked, d->compileOutputPane, &CompileOutputPane::clearContents); |
| 293 | hOutputTopLayout->addWidget(createVLine()); |
| 294 | hOutputTopLayout->addWidget(clearLogBtn); |
| 295 | |
| 296 | DFrame *OutputTopWidget = new DFrame(d->compileWidget); |
| 297 | DStyle::setFrameRadius(OutputTopWidget, 0); |
| 298 | OutputTopWidget->setLineWidth(0); |
| 299 | OutputTopWidget->setLayout(hOutputTopLayout); |
| 300 | OutputTopWidget->setFixedHeight(36); |
| 301 | |
| 302 | d->compileOutputWidget = new DWidget(d->compileWidget); |
| 303 | auto outputLayout = new QVBoxLayout(d->compileOutputWidget); |
| 304 | outputLayout->setContentsMargins(0, 0, 0, 0); |
| 305 | outputLayout->setSpacing(0); |
| 306 | outputLayout->addWidget(OutputTopWidget); |
| 307 | outputLayout->addWidget(new DHorizontalLine(d->compileOutputWidget)); |
| 308 | outputLayout->addWidget(d->compileOutputPane); |
| 309 | } |
nothing calls this directly
no test coverage detected