Image label item for QML.
More...
#include <cvb/ui/image_view_item.hpp>
|
double | ImageX () const noexcept |
| Get the X position of this label on the image.
|
|
void | SetImageX (double imageX) |
| Set the X position of this label on the image.
|
|
double | ImageY () const noexcept |
| Get the Y position of this label on the image.
|
|
void | SetImageY (double imageY) |
| Set the Y position of this label on the image.
|
|
void | SetImageView (ImageViewItem *view) |
| Set the image view for this label.
|
|
int | LabelScale () const noexcept |
| Get the label scale behaviour (as integer, see Cvb::UI::LabelScale).
|
|
void | SetLabelScale (int labelScale) |
| Set the label scale behaviour (as integer, see Cvb::UI::LabelScale).
|
|
|
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.
|
|
static void | Register () |
| Convenience method to register this type in QML.
|
|
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]
Convenience method to register this type in QML.
- Exceptions
-
Does | not throw any exception. |
This type is registered as ImageLabel in CvbQuick. In addition also the required enums are registered.
◆ Register() [2/2]
template<class T>
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.