Image label item for QML.
More...
#include <cvb/ui/image_view_item.hpp>
Inherits QQuickItem.
|
template<class T > |
static void | Register (const char *uri, int versionMajor, int versionMinor, const char *qmlName) |
| Convenience method to register this type or a derived type in QML. More...
|
|
static void | Register () |
| Convenience method to register this type in QML. More...
|
|
Image label item for QML.
This class (or an extended subclass) should be registered in QML. The item provides an overlay object to draw into an image display (see ImageViewItem) Instances should only be created from QML.
For convenience see ImageLabelItem::Register
◆ ImageX()
Get the X position of this label on the image.
- Returns
- The X position.
- Exceptions
-
Does | not throw any exception. |
Use in QML as property: imageX.
◆ ImageY()
Get the Y position of this label on the image.
- Returns
- The Y position.
- Exceptions
-
Does | not throw any exception. |
Use in QML as property: imageY.
◆ LabelScale()
Get the label scale behaviour (as integer, see Cvb::UI::LabelScale).
- Returns
- The label scale behavior.
- Exceptions
-
Does | not throw any exception. |
Use in QML as property: labelScale.
This if this property is set to "On" the label will zoom/scale according to the image view.
The related enum is automatically registered in QML using ImageLabelItem::Register.
◆ Register() [1/2]
◆ Register() [2/2]
static void Register |
( |
const char * |
uri, |
|
|
int |
versionMajor, |
|
|
int |
versionMinor, |
|
|
const char * |
qmlName |
|
) |
| |
|
inlinestatic |
Convenience method to register this type or a derived type in QML.
- Parameters
-
[in] | uri | URI forwarded to Qt. |
[in] | versionMajor | Major version forwarded to Qt. |
[in] | versionMinor | Minor version forwarded to Qt. |
[in] | qmlName | Name in QML forwarded to Qt. |
- Exceptions
-
Does | not throw any exception. |
Basically just calls qmlRegisterType(...). In addition also the required enums are registered.
◆ SetImageView()
Set the image view for this label.
- Parameters
-
- Exceptions
-
Does | not throw any exception. |
Use in QML as property: imageView.
Use this property in QML to associate the label with an image view.
◆ SetImageX()
void SetImageX |
( |
double |
imageX | ) |
|
|
inline |
Set the X position of this label on the image.
- Parameters
-
[in] | imageX | The new X position. |
- Exceptions
-
Does | not throw any exception. |
Use in QML as property: imageX.
◆ SetImageY()
void SetImageY |
( |
double |
imageY | ) |
|
|
inline |
Set the Y position of this label on the image.
- Parameters
-
[in] | imageY | The new Y position. |
- Exceptions
-
Does | not throw any exception. |
Use in QML as property: imageY.
◆ SetLabelScale()
void SetLabelScale |
( |
int |
labelScale | ) |
|
|
inline |
Set the label scale behaviour (as integer, see Cvb::UI::LabelScale).
- Parameters
-
[in] | labelScale | The label scale behavior. |
- Exceptions
-
Does | not throw any exception. |
Use in QML as property: labelScale.
This if this property is set to "On" the label will zoom/scale according to the image view.
The related enum is automatically registered in QML using ImageLabelItem::Register.