-/*!
- * \brief Changes the visibility of the optional built-in "Take snapshot" button.
- *
- * The widget contains a push-button that optionally can be displayed. When
- * visible, this button is located at the bottom of the widget, and causes
- * the SLOT QOpenCamWidget::startSnap to be triggered when clicked.
- *
- * \param visible True makes the button display, and trigger,
- * false turns the feature off. False, i.e. no button, is default.
- *
- **/
-void
-QOpenCamWidget::setSnapshotVisible(bool visible)
-{
- // Checking both parameter and private "sanity" variable,
- // as a sanity- and error-control
- if ( visible && !trigger_active )
- {
- connect( trigger, SIGNAL(clicked()), this, SLOT(startSnap()));
- layout->addWidget(trigger);
- trigger->show();
- trigger_active = true;
- }
- if ( !visible && trigger_active )
- {
- layout->removeWidget(trigger);
- disconnect( trigger, SIGNAL(clicked()), 0, 0 );
- trigger->hide();
- trigger_active = false;
- }
-}