ic4gui Namespace Reference

Contains functions providing a basic graphical user interface for common tasks. More...

Classes

struct PropertyDialogOptions A structure containing options customizing the appearance and behavior of the property dialog displayed by the ic4gui::showDevicePropertyDialog() and ic4gui::showPropertyDialog() functions. More...

Enumerations

enum class PropertyDialogFlags : int {
  Default = ic4::c_interface::IC4_PROPERTY_DIALOG_FLAGS::IC4_PROPERTY_DIALOG_DEFAULT , AllowStreamRestart = ic4::c_interface::IC4_PROPERTY_DIALOG_FLAGS::IC4_PROPERTY_DIALOG_ALLOW_STREAM_RESTART , RestoreStateOnCancel = ic4::c_interface::IC4_PROPERTY_DIALOG_FLAGS::IC4_PROPERTY_DIALOG_RESTORE_STATE_ON_CANCEL , ShowTopCategory = ic4::c_interface::IC4_PROPERTY_DIALOG_FLAGS::IC4_PROPERTY_DIALOG_SHOW_TOP_CATEGORY ,
  HideFilter = ic4::c_interface::IC4_PROPERTY_DIALOG_HIDE_FILTER
}

Defines a set of flags to customize the behavior of the dialogs displayed by the ic4gui::showDevicePropertyDialog() and ic4gui::showPropertyDialog() functions. More...

Functions

bool  showDeviceDialog (ic4::WindowHandle hParent, ic4::Grabber &grabber, ic4::Error &err=ic4::Error::Ignore())

Shows a dialog that allows the user to select a video capture device.

ic4::DeviceInfo showSelectDeviceDialog (ic4::WindowHandle hParent, ic4::Error &err=ic4::Error::Ignore())

Shows a dialog that allows the user to select a video capture device.

bool showDevicePropertyDialog (ic4::WindowHandle hParent, ic4::Grabber &grabber, const PropertyDialogOptions &opt={}, ic4::Error &err=ic4::Error::Ignore())

Shows a dialog box allowing the user to configure the properties of the video capture opened in the passed ic4::Grabber.

bool showPropertyDialog (ic4::WindowHandle hParent, const ic4::PropertyMap &map, const PropertyDialogOptions &opt={}, ic4::Error &err=ic4::Error::Ignore())

Shows a dialog box allowing the user to configure the properties of a ic4::PropertyMap.

Detailed Description

Contains functions providing a basic graphical user interface for common tasks.

The GUI support functions are declared in ic4gui/ic4gui.h.

Enumeration Type Documentation

◆ PropertyDialogFlags

enum class PropertyDialogFlags : int
strong

Defines a set of flags to customize the behavior of the dialogs displayed by the ic4gui::showDevicePropertyDialog() and ic4gui::showPropertyDialog() functions.

Enumerator
Default 

Default behavior.

AllowStreamRestart 

Allows properties to be changed that require the stream to be stopped.

For example, if the user changes the value of Width, the stream is stopped, the new value is set, and the stream is restarted.

Programs should be careful to only specify this flag when the program is in a state where a stream restart with possible format reconfiguration is acceptable.

This flag is only valid when calling ic4gui::showDevicePropertyDialog().

RestoreStateOnCancel 

If set, the dialog restores all properties to their initial state when the dialog is cancelled.

The User can cancel the dialog by pressing the Cancel button or closing the dialog window.

ShowTopCategory 

If set, the dialog shows the top-level category in the property tree window.

When the top-level category is Root, it is usually not necessary to display the name of top-level category.

HideFilter 

If set, the dialog does not display the visibility dropdown and filter text box.

Function Documentation

◆ showDeviceDialog()

bool showDeviceDialog ( ic4::WindowHandle  hParent,
ic4::Grabber grabber,
ic4::Error err = ic4::Error::Ignore() 
)
inline

Shows a dialog that allows the user to select a video capture device.

The device is opened in the passed ic4::Grabber object.

Parameters
[in]hParentA parent window for the dialog
[in]grabberA grabber object in which the new device is to be opened
[out]errReference to an error handler. See Error Handling for details.
Returns
true, if a device was selected and opened succesfully, otherwise false.

showDevicePropertyDialog()

bool showDevicePropertyDialog ( ic4::WindowHandle  hParent,
ic4::Grabber grabber,
const PropertyDialogOptions opt = {},
ic4::Error err = ic4::Error::Ignore() 
)
inline

Shows a dialog box allowing the user to configure the properties of the video capture opened in the passed ic4::Grabber.

Parameters
[in]hParentA parent window for the dialog
[in]grabberA grabber object whose video capture device is to be configured
[in]optAn options structure to customize the dialog's behavior
[out]errReference to an error handler. See Error Handling for details.
Returns
true, if the user closed the dialog using the OK button, otherwise false.

◆ showPropertyDialog()

bool showPropertyDialog ( ic4::WindowHandle  hParent,
const ic4::PropertyMap map,
const PropertyDialogOptions opt = {},
ic4::Error err = ic4::Error::Ignore() 
)
inline

Shows a dialog box allowing the user to configure the properties of a ic4::PropertyMap.

Parameters
[in]hParentA parent window for the dialog
[in]mapA property map to configure
[in]optAn options structure to customize the dialog's behavior
[out]errReference to an error handler. See Error Handling for details.
Returns
true, if the user closed the dialog using the OK button, otherwise false.

◆ showSelectDeviceDialog()

ic4::DeviceInfo showSelectDeviceDialog ( ic4::WindowHandle  hParent,
ic4::Error err = ic4::Error::Ignore() 
)
inline

Shows a dialog that allows the user to select a video capture device.

A ic4::DeviceInfo representing the selected device is returned.

Parameters
[in]hParentA parent window for the dialog
[out]errReference to an error handler. See Error Handling for details.
Returns
A ic4::DeviceInfo representing the selected device. If no device is selected, the object is invalid. Check the err output parameter or ic4::DeviceInfo::is_valid().