Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
vidl_v4l2_control_menu Class Reference

A class for handle a control of type menu. More...

#include <vidl_v4l2_control.h>

Inheritance diagram for vidl_v4l2_control_menu:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vidl_v4l2_control_menu (const v4l2_queryctrl &ctr, int f)
unsigned int n_items () const
 Number of items.
vcl_string get (unsigned int i) const
 Item i.
void set (unsigned int i) const
 Select item i.
unsigned int get () const
 Get the value of the control.
unsigned int default_value () const
 Default value of this control.
virtual vcl_string description () const
 A 1-line brief description.
virtual void reset () const
 Reset control.
v4l2_ctrl_type type () const
 Type of control.
vcl_string name () const
 Name of control.
int id () const
 Id of control.
bool read_only () const
 Control is read only.
bool affect_other_controls () const
 Control can change value of other controls.

Static Public Member Functions

static vidl_v4l2_controlnew_control (const v4l2_queryctrl &ctr, int f)
 Factory method to create new controls.

Protected Member Functions

void set_value (int v) const
int get_value () const

Protected Attributes

int fd
struct v4l2_queryctrl ctrl_

Private Attributes

vcl_vector< vcl_string > items

Detailed Description

A class for handle a control of type menu.

Definition at line 106 of file vidl_v4l2_control.h.


Constructor & Destructor Documentation

vidl_v4l2_control_menu::vidl_v4l2_control_menu ( const v4l2_queryctrl &  ctr,
int  f 
)

Definition at line 101 of file vidl_v4l2_control.cxx.


Member Function Documentation

bool vidl_v4l2_control::affect_other_controls ( ) const [inline, inherited]

Control can change value of other controls.

Definition at line 60 of file vidl_v4l2_control.h.

unsigned int vidl_v4l2_control_menu::default_value ( ) const [inline]

Default value of this control.

Definition at line 123 of file vidl_v4l2_control.h.

vcl_string vidl_v4l2_control_menu::description ( ) const [virtual]

A 1-line brief description.

Implements vidl_v4l2_control.

Definition at line 118 of file vidl_v4l2_control.cxx.

vcl_string vidl_v4l2_control_menu::get ( unsigned int  i) const [inline]

Item i.

Returns:
string assigned to item i

Definition at line 116 of file vidl_v4l2_control.h.

unsigned int vidl_v4l2_control_menu::get ( ) const [inline]

Get the value of the control.

Returns:
index in the menu

Definition at line 121 of file vidl_v4l2_control.h.

int vidl_v4l2_control::get_value ( ) const [protected, inherited]

Definition at line 64 of file vidl_v4l2_control.cxx.

int vidl_v4l2_control::id ( ) const [inline, inherited]

Id of control.

Returns:
ID (for example, V4L2_CID_BRIGHTNESS corresponds to brightness)

Definition at line 49 of file vidl_v4l2_control.h.

unsigned int vidl_v4l2_control_menu::n_items ( ) const [inline]

Number of items.

Returns:
number of entries in the menu

Definition at line 113 of file vidl_v4l2_control.h.

vcl_string vidl_v4l2_control::name ( ) const [inline, inherited]

Name of control.

Returns:
name the driver assign to the control

Definition at line 44 of file vidl_v4l2_control.h.

vidl_v4l2_control * vidl_v4l2_control::new_control ( const v4l2_queryctrl &  ctr,
int  f 
) [static, inherited]

Factory method to create new controls.

Parameters:
ctrdetails from VIDIOC_QUERYCTRL
fassociated file descriptor
Returns:
pointer to base class of new control

Definition at line 20 of file vidl_v4l2_control.cxx.

bool vidl_v4l2_control::read_only ( ) const [inline, inherited]

Control is read only.

Definition at line 51 of file vidl_v4l2_control.h.

virtual void vidl_v4l2_control_menu::reset ( ) const [inline, virtual]

Reset control.

Reimplemented from vidl_v4l2_control.

Definition at line 127 of file vidl_v4l2_control.h.

void vidl_v4l2_control_menu::set ( unsigned int  i) const [inline]

Select item i.

Definition at line 118 of file vidl_v4l2_control.h.

void vidl_v4l2_control::set_value ( int  v) const [protected, inherited]

Definition at line 55 of file vidl_v4l2_control.cxx.

v4l2_ctrl_type vidl_v4l2_control::type ( ) const [inline, inherited]

Type of control.

Returns:
type as indicated in v4l2 specification

Definition at line 41 of file vidl_v4l2_control.h.


Member Data Documentation

struct v4l2_queryctrl vidl_v4l2_control::ctrl_ [protected, inherited]

Definition at line 28 of file vidl_v4l2_control.h.

int vidl_v4l2_control::fd [protected, inherited]

Definition at line 27 of file vidl_v4l2_control.h.

vcl_vector<vcl_string> vidl_v4l2_control_menu::items [private]

Definition at line 108 of file vidl_v4l2_control.h.


The documentation for this class was generated from the following files: