mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-19 18:35:07 +03:00
qcam: Provide initial icon buttons "Play/Stop"
Provide Quit, Play, Stop icons. Create a Qt resource to compile icons into the binary and present them on the toolbar. Update the Quit button with a 'cross', and implement Play/Stop buttons. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
fc9fe45580
commit
2dc85eabe1
4 changed files with 25 additions and 6 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <QComboBox>
|
||||
#include <QCoreApplication>
|
||||
#include <QIcon>
|
||||
#include <QInputDialog>
|
||||
#include <QTimer>
|
||||
#include <QToolBar>
|
||||
|
@ -66,7 +67,7 @@ int MainWindow::createToolbars()
|
|||
/* Disable right click context menu. */
|
||||
toolbar_->setContextMenuPolicy(Qt::PreventContextMenu);
|
||||
|
||||
action = toolbar_->addAction("Quit");
|
||||
action = toolbar_->addAction(QIcon(":x-circle.svg"), "Quit");
|
||||
connect(action, &QAction::triggered, this, &MainWindow::quit);
|
||||
|
||||
/* Camera selection. */
|
||||
|
@ -81,6 +82,12 @@ int MainWindow::createToolbars()
|
|||
|
||||
toolbar_->addSeparator();
|
||||
|
||||
action = toolbar_->addAction(QIcon(":play-circle.svg"), "start");
|
||||
connect(action, &QAction::triggered, this, &MainWindow::startCapture);
|
||||
|
||||
action = toolbar_->addAction(QIcon(":stop-circle.svg"), "stop");
|
||||
connect(action, &QAction::triggered, this, &MainWindow::stopCapture);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue