| 370 | } |
| 371 | |
| 372 | void MainWindow::buildToolbar() { |
| 373 | auto *tb = addToolBar("Main"); |
| 374 | tb->setMovable(false); |
| 375 | tb->setFloatable(false); |
| 376 | tb->setIconSize(QSize(16, 16)); |
| 377 | tb->setToolButtonStyle(Qt::ToolButtonIconOnly); |
| 378 | |
| 379 | tb->addAction(themeIcon({"go-previous", "arrow-left"}), "Back"); |
| 380 | tb->addAction(themeIcon({"go-next", "arrow-right"}), "Forward"); |
| 381 | tb->addSeparator(); |
| 382 | tb->addAction(themeIcon({"view-list-tree", "format-justify-fill", |
| 383 | "format-list-unordered"}), |
| 384 | "Show/hide console tree"); |
| 385 | m_actProperties->setIcon( |
| 386 | themeIcon({"document-properties", "configure"})); |
| 387 | tb->addAction(m_actProperties); |
| 388 | tb->addAction(themeIcon({"help-contents", "help-browser"}), "Help"); |
| 389 | tb->addAction(themeIcon({"view-refresh", "reload"}), |
| 390 | "Scan for hardware changes", this, &MainWindow::refresh); |
| 391 | tb->addSeparator(); |
| 392 | m_actUpdateDriver->setIcon( |
| 393 | themeIcon({"system-software-update", "software-update-available"})); |
| 394 | tb->addAction(m_actUpdateDriver); |
| 395 | m_actUninstall->setIcon(themeIcon({"edit-delete", "list-remove"})); |
| 396 | tb->addAction(m_actUninstall); |
| 397 | tb->addAction(themeIcon({"list-add", "add"}), "Add legacy hardware"); |
| 398 | } |
| 399 | |
| 400 | void MainWindow::showContextMenu(const QPoint &pos) { |
| 401 | auto idx = m_tree->indexAt(pos); |
nothing calls this directly
no test coverage detected