Imaging Control 4 C++ Library 1.2.0
|
Integer properties represent a feature whose value is an integer number. More...
Public Member Functions | |
PropIntRepresentation | representation (Error &err=Error::Default()) const |
Returns the suggested representation for this integer property. | |
std::string | unit (Error &err=Error::Default()) const |
Returns the unit of this integer property. | |
bool | setValue (int64_t value, Error &err=Error::Default()) |
Changes the value of this property. | |
int64_t | getValue (Error &err=Error::Default()) const |
Reads the current value of this property. | |
int64_t | minimum (Error &err=Error::Default()) const |
Returns the minimum value accepted by this property. | |
int64_t | maximum (Error &err=Error::Default()) const |
Returns the maximum value accepted by this property. | |
PropIncrementMode | incrementMode (Error &err=Error::Default()) const |
Returns how this integer property restricts which values are valid between its minimum and maximum value. | |
int64_t | increment (Error &err=Error::Default()) const |
Returns the step size for valid values accepted by this integer property. | |
std::vector< int64_t > | validValueSet (Error &err=Error::Default()) const |
Returns the valid value set for this property. | |
Public Member Functions inherited from Property | |
Property ()=default | |
Creates an invalid object. | |
bool | is_valid () const noexcept |
Checks whether this property is a valid object. | |
bool | operator== (const Property &other) const noexcept |
Checks whether a property object refers to the same property as another property object. | |
bool | operator!= (const Property &other) const noexcept |
Checks whether a property object refers to a different property as another property object. | |
bool | operator< (const Property &other) const noexcept |
Provides an ordering of property objects. | |
PropType | type (Error &err=Error::Default()) const |
Returns the type of the property. | |
std::string | name (Error &err=Error::Default()) const |
Returns the name of the property. | |
bool | isAvailable (Error &err=Error::Default()) const |
Checks whether a property is currently available. | |
bool | isLocked (Error &err=Error::Default()) const |
Checks whether a property is currently locked. | |
bool | isLikelyLockedByStream (Error &err=Error::Default()) const |
Tries to determine whether a property is locked because a data stream is active. | |
bool | isReadOnly (Error &err=Error::Default()) const |
Checks whether a property is read-only. | |
PropVisibility | visibility (Error &err=Error::Default()) const |
Returns a visibility hint for the property. | |
std::string | displayName (Error &err=Error::Default()) const |
Returns the display name of the property. | |
std::string | tooltip (Error &err=Error::Default()) const |
Returns a tooltip for the property. | |
std::string | description (Error &err=Error::Default()) const |
Returns a description for the property. | |
PropCommand | asCommand (Error &err=Error::Default()) const |
Converts this property into a PropCommand. | |
PropInteger | asInteger (Error &err=Error::Default()) const |
Converts this property into a PropInteger. | |
PropBoolean | asBoolean (Error &err=Error::Default()) const |
Converts this property into a PropBoolean. | |
PropFloat | asFloat (Error &err=Error::Default()) const |
Converts this property into a PropFloat. | |
PropString | asString (Error &err=Error::Default()) const |
Converts this property into a PropString. | |
PropEnumeration | asEnumeration (Error &err=Error::Default()) const |
Converts this property into a PropEnumeration. | |
PropEnumEntry | asEnumEntry (Error &err=Error::Default()) const |
Converts this property into a PropEnumEntry. | |
PropRegister | asRegister (Error &err=Error::Default()) const |
Converts this property into a PropRegister. | |
PropCategory | asCategory (Error &=Error::Default()) const |
Converts this property into a PropCategory. | |
NotificationToken | eventAddNotification (NotificationHandler cb, Error &err=Error::Default()) |
Registers a new property notification event handler. | |
bool | eventRemoveNotification (NotificationToken token, Error &err=Error::Default()) |
Unregisters a previously registered property notification event handler. | |
bool | isSelector (Error &err=Error::Default()) const |
Indicates whether this property's value changes the meaning and/or value of other properties. | |
std::vector< Property > | selectedProperties (Error &err=Error::Default()) const |
Returns the list of properties whose values' meaning depend on this property. | |
Additional Inherited Members | |
Public Types inherited from Property | |
using | NotificationHandler = std::function< void(Property &prop)> |
Function prototype for property notification event handlers. | |
using | NotificationToken = void * |
Represents a registered callback. | |
Integer properties represent a feature whose value is an integer number.
Common examples for a integer properties are Width
or Height
.
An integer property can limit the range of valid values. The range of possible values can be queried by calling PropInteger::minimum() and PropInteger::maximum().
The possible values can be further restricted by an increment value or a set of value values. Check PropInteger::incrementMode(), PropInteger::increment() and PropInteger::validValueSet() for details.
In integer property supplies hints that can be useful when creating a user interface:
PropInteger instances are created in two ways:
|
inline |
Reads the current value of this property.
[out] | err | Reference to an error handler. See Error Handling for details. |
0
, if an error occurred.
|
inline |
Returns the step size for valid values accepted by this integer property.
The increment restricts the set of valid values for an integer property. For example, if the property's minimum value is 0
, the maximum is 10
, and the increment is 2
, 5
is not a valid value for the property and will be rejected when trying to write it.
This function will fail if PropInteger::incrementMode() doest not return PropIncrementMode::Increment.
[out] | err | Reference to an error handler. See Error Handling for details. |
0
, if an error occurred.
|
inline |
Returns how this integer property restricts which values are valid between its minimum and maximum value.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Returns the maximum value accepted by this property.
[out] | err | Reference to an error handler. See Error Handling for details. |
0
, if an error occurred.
|
inline |
Returns the minimum value accepted by this property.
[out] | err | Reference to an error handler. See Error Handling for details. |
0
, if an error occurred.
|
inline |
Returns the suggested representation for this integer property.
The representation can be used as a hint when creating user interfaces.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Changes the value of this property.
[in] | value | The new value to set |
[out] | err | Reference to an error handler. See Error Handling for details. |
true
on success, otherwise false
.
|
inline |
Returns the unit of this integer property.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Returns the valid value set for this property.
This function will fail if PropInteger::incrementMode() does not return PropIncrementMode::ValueSet.
[out] | err | Reference to an error handler. See Error Handling for details. |