Namespaces | Classes | Enumerations | Functions
Cvb::UI Namespace Reference

Namespace for user interface components. More...

Namespaces

 Quick
 Namespace for QML related classes.
 

Classes

class  ImageScene
 Scene to provide a convenient display for an image. More...
 
class  ImageView
 View to display an image. More...
 
class  OpenGLBufferFormat
 Buffer format description for a texture to hold the pixel data. More...
 
class  OpenGLCoord
 OpenGL coordinate representing a texture corner. More...
 
class  OpenGLCoordArray
 Set of all coordinates required to render a texture. More...
 
class  OpenGLImageRenderer
 Base class for OpenGL image renderer. More...
 
class  OpenGLImageRendererFactory
 Factory to create an OpenGL based image renderer. More...
 
class  PropertyGrid
 View to display a device's nodemap. More...
 
class  ZoomDescriptor
 Describes an zoom setting for the display. More...
 

Enumerations

enum  UploadMode { Image, Viewport }
 Defines the upload behavior. More...
 
enum  ZoomID {
  Invalid, Custom, Panorama, Factor1,
  Factor2, Factor4, Factor8, Factor16,
  Factor32, Factor64, Factor128
}
 Identifier for a zoom factor. More...
 
enum  AutoRefresh { On, Off }
 Allows to automatically refresh, if image content changes. More...
 
enum  LabelScale
 Switch defining if image view labels are sensitive to zoom operations.
 
enum  RefreshMode { UploadOnly, UploadAndScheduleRepaint, UploadAndWaitForRepaint }
 Defines the refresh behavior. More...
 
enum  RenderEngine { Raster, OpenGL2, OpenGL3 }
 Defines the render engine used for drawing. More...
 
enum  OpenGLTextureFormat { Unknown, RGB, Mono }
 OpenGL texture format to hold the pixel data. More...
 

Functions

Cvb::String QtToCvb (const QString text) noexcept
 Convenience converter for strings. More...
 
QString CvbToQt (const Cvb::String &text) noexcept
 Convenience converter for strings. More...
 
QSizeF CvbToQt (Size2D< double > size) noexcept
 Convenience converter for sizes. More...
 
Size2D< double > QtToCvb (QSizeF size) noexcept
 Convenience converter for sizes. More...
 
QRectF CvbToQt (RectLT< double > rect) noexcept
 Convenience converter for rectangles. More...
 
RectLT< double > QtToCvb (const QRectF &rect) noexcept
 Convenience converter for rectangles. More...
 
QPointF CvbToQt (Point2D< double > point) noexcept
 Convenience converter for points. More...
 
Point2D< double > QtToCvb (const QPointF &point)
 Convenience converter for points. More...
 

Detailed Description

Namespace for user interface components.

All components within this namespace depend on the Qt5 library. You may seamlessly integrate with your Qt Widget based application and link to your own version of Qt. In order to use OpenGL 3 rendering your Qt version must be 5.6 or higher. Older Qt versions may be used but OpenGL3 will not be available as render engine.

Note
None of the classes in this namespace defines the Q_OBJECT macro, so they are independent of Qt's meta-object compiler (moc).
Remarks
CMake users: Link to imported target CVB::CvbUI
Use with COMPONENTS PropertyGrid and/or CvbQuick if required.

Enumeration Type Documentation

◆ AutoRefresh

enum AutoRefresh
strong

Allows to automatically refresh, if image content changes.

Enumerator
On 

Hooks in at Image::RegisterEventPixelContentChanged() to automatically refresh the ImageView.

Note
Automatic refresh will only work on CvbDeviceImages.
Off 

Does not call refresh automatically.

◆ OpenGLTextureFormat

enum OpenGLTextureFormat
strong

OpenGL texture format to hold the pixel data.

Enumerator
Unknown 

Represent an invalid format for internal use.

RGB 

Represents a three plane color format with 8 bit per plane.

Mono 

Represents a gray scale color format with 8 bit per pixel.

◆ RefreshMode

enum RefreshMode
strong

Defines the refresh behavior.

Enumerator
UploadOnly 

This only uploads the pixel data, but does not repaint on screen. This may be used to synchronize painting with other widgets.

UploadAndScheduleRepaint 

This uploads the pixel data and schedules a repaint via Qt's event loop. This may be used for high frame rates that do not allow to display every frame.

Note
This options leaves the responsibility for drawing to Qt. As a consequence drawing may be optimized behind the scenes (eg. omitting a repaint). For more details see the Qt documentation.
UploadAndWaitForRepaint 

This does the same as UploadAndScheduleRepaint, but in addition it blocks your call to Refresh() until the pixel data was drawn on the screen. This may be used if you need an exact synchronization between the image display and your acquisition thread. This is the default option.

◆ RenderEngine

enum RenderEngine
strong

Defines the render engine used for drawing.

See also
CvbQtImageView::Refresh(const CvbImage &, CvbRefreshMode)
Enumerator
Raster 

This uses Qt's raster paint engine to draw the image. This option is available on all systems supporting Qt and does not have any requirements for the graphics hardware. This is the default option.

OpenGL2 

Uses OpemGL2 (ES) to draw the image. This should be available on all graphics cards supporting OpenGL, if a vendor specific driver is installed.

Note
OpenGL2 (ES) is a requirement for for Qt5 OpenGL module.
OpenGL3 

Uses OpemGL3 (ES) to draw the image. This should be available on most graphics cards, if a vendor specific driver is installed. However, a compatible OpenGL3 (ES) profile is required to actually render the image.

◆ UploadMode

enum UploadMode
strong

Defines the upload behavior.

Enumerator
Image 

Upload respectively copy the complete Image data, to frame buffer. This also includes parts of the image that are not visible. This allows smooth drawing and scaling. This is the default option.

Note
This does not require to share the image with the ImageView.
Viewport 

Upload respectively copy only the visible part of the image. For large images this is usually much faster than uploading the whole image. The pixel data may be subsampled, as a consequence aliasing may occur.

Note
This does require to share the image with the ImageView.

◆ ZoomID

enum ZoomID
strong

Identifier for a zoom factor.

Enumerator
Invalid 

Represents an invalid zoom factor for internal use.

Custom 

Represents a custom zoom factor that is user defined.

Panorama 

Represents a dynamic zoom factor, that is dependent on the view port size of ImageView.

Factor1 

Represents the zoom to draw the image in original size.

Factor2 

Represents the zoom to draw the image scaled by 2.

Factor4 

Represents the zoom to draw the image scaled by 4.

Factor8 

Represents the zoom to draw the image scaled by 8.

Factor16 

Represents the zoom to draw the image scaled by 16.

Factor32 

Represents the zoom to draw the image scaled by 32.

Factor64 

Represents the zoom to draw the image scaled by 64.

Factor128 

Represents the zoom to draw the image scaled by 128.

Function Documentation

◆ CvbToQt() [1/4]

QString Cvb::UI::CvbToQt ( const Cvb::String text)
inlinenoexcept

Convenience converter for strings.

Parameters
[in]textString as used by CVB classes.
Returns
QString from the Qt library.
Exceptions
Doesnot throw any exception.
Examples
Cvb/QtDisplayAdvanced, Cvb/QtImageDisplay, Cvb/QtPropertyGrid, Minos/QmlMinos, Movie2/QtMovie2, Polimago/QmlCookieClassification, and ShapeFinder2/QtShapeFinder2.

◆ CvbToQt() [2/4]

QSizeF Cvb::UI::CvbToQt ( Size2D< double >  size)
inlinenoexcept

Convenience converter for sizes.

Parameters
[in]sizeSize used by CVB classes.
Returns
QSizeF from the Qt library
Exceptions
Doesnot throw any exception.

◆ CvbToQt() [3/4]

QRectF Cvb::UI::CvbToQt ( RectLT< double >  rect)
inlinenoexcept

Convenience converter for rectangles.

Parameters
[in]rectSize used by CVB classes.
Returns
QRectF from the Qt library
Exceptions
Doesnot throw any exception.

◆ CvbToQt() [4/4]

QPointF Cvb::UI::CvbToQt ( Point2D< double >  point)
inlinenoexcept

Convenience converter for points.

Parameters
[in]pointPoint used by CVB classes.
Returns
QPointF from the Qt library
Exceptions
Doesnot throw any exception.

◆ QtToCvb() [1/4]

Cvb::String Cvb::UI::QtToCvb ( const QString  text)
inlinenoexcept

Convenience converter for strings.

Parameters
[in]textQString from the Qt library.
Returns
string as used by CVB classes.
Exceptions
Doesnot throw any exception.
Examples
Cvb/QtDisplayAdvanced, Cvb/QtPropertyGrid, Movie2/QtMovie2, Polimago/QmlCookieClassification, and ShapeFinder2/QtShapeFinder2.

◆ QtToCvb() [2/4]

Size2D<double> Cvb::UI::QtToCvb ( QSizeF  size)
inlinenoexcept

Convenience converter for sizes.

Parameters
[in]sizeQSizeF from the Qt library.
Returns
size used by the CVB classes.
Exceptions
Doesnot throw any exception.

◆ QtToCvb() [3/4]

RectLT<double> Cvb::UI::QtToCvb ( const QRectF rect)
inlinenoexcept

Convenience converter for rectangles.

Parameters
[in]rectQRectF from the Qt library.
Returns
Rectangle used by the CVB classes.
Exceptions
Doesnot throw any exception.

◆ QtToCvb() [4/4]

Point2D<double> Cvb::UI::QtToCvb ( const QPointF point)
inline

Convenience converter for points.

Parameters
[in]pointQPointF from the Qt library.
Returns
point used by the CVB classes.
Exceptions
Doesnot throw any exception.