ddt 1.2.1
Loading...
Searching...
No Matches
Signals | Protected Attributes | Properties | List of all members
DdtPanningWidget Class Reference

#include <ddtPanningWidget.hpp>

Inheritance diagram for DdtPanningWidget:
DdtWidget

Signals

void UpdatePosition (double scroll_fraction_x, double scroll_fraction_y)
 

Protected Attributes

bool show_axes
 
int show_status = 1
 
float rotation_deg
 
float zoom_factor
 
bool mouse_drag_active
 
QLabel * preview_image_label
 
QImage preview_image
 
QRect selection_rectangle
 
QRect max_selection_rectangle
 
int origin_x
 
int origin_y
 
QRubberBand * rubberband
 

Properties

bool ShowAxes
 
 DdtPanningWidget (QWidget *parent=nullptr)
 
 ~DdtPanningWidget ()
 
void set_show_axes (const bool show)
 
bool get_show_axes () const
 
void set_rotation_deg (const float rotation)
 
float get_rotation_deg () const
 
bool eventFilter (QObject *obj, QEvent *event)
 
void SetImage (const QImage &image, const QTransform &transform, const double rotation)
 
void ImageWidgetViewChanged (const QRectF &visible_image_rect, const int current_image_width, const int current_image_height)
 
void ClearMagnifiedImage ()
 

Additional Inherited Members

- Public Member Functions inherited from DdtWidget
virtual ~DdtWidget ()=default
 
 DdtWidget (QWidget *parent=nullptr)
 DdtWidget.
 
QWidget * AddParentWidget (QLayout *child_layout)
 AddParentWidget This will add the given layout to a QGroupBox Widget to integrate in the parent layout.
 
void connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 connect Group of overloaded functions that use the QObject::connect method with the Qt::QueuedConnection flag. This defines Qt Signal and Slots connection the same way thought out the QApplication.
 
void connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
void connect (const QObject *sender, const char *signal, const char *member)
 
template<typename Func1 , typename Func2 >
void connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot)
 connect Template version of QObject::connection with fixed Qt::QueuedConnection flag. Normally used to connect a signal with a lambda function.
 

Detailed Description

Class for the Panning Widget that can be used to pan the image currently displayed in an Image Widget

Constructor & Destructor Documentation

◆ DdtPanningWidget()

DdtPanningWidget::DdtPanningWidget ( QWidget * parent = nullptr)
explicit

Constructor

Parameters
parentPointer to the parent widget

◆ ~DdtPanningWidget()

DdtPanningWidget::~DdtPanningWidget ( )
default

Destructor

Member Function Documentation

◆ ClearMagnifiedImage

void DdtPanningWidget::ClearMagnifiedImage ( )
slot

Slot which is called to clear the magnified preview image, e.g. when a binary table is loaded.

◆ eventFilter()

bool DdtPanningWidget::eventFilter ( QObject * obj,
QEvent * event )
protected

Event filter that will be called especially when mouse events reach the widget

Parameters
objPointer to the object
eventPointer to the event that occurred

◆ get_rotation_deg()

float DdtPanningWidget::get_rotation_deg ( ) const

Rerieve the rotation angle (in degrees) that is used for the compass display

Returns
the rotation angle (in degrees)

◆ get_show_axes()

bool DdtPanningWidget::get_show_axes ( ) const

Retrieve the state of the show_axes flag

Returns
true if the compass axes should be plotted in the pan preview

◆ ImageWidgetViewChanged

void DdtPanningWidget::ImageWidgetViewChanged ( const QRectF & visible_image_rect,
const int current_image_width,
const int current_image_height )
slot

Slot which is called when the position in the image widget was changed (e.g. by scrolling, resizing, zoom)

Parameters
visible_image_rectRectangle of the currently visible part of the image
current_image_widthTotal width of the image currently displayed
current_image_heightTotal height of the image currently displayed

◆ set_rotation_deg()

void DdtPanningWidget::set_rotation_deg ( const float rotation)

Sets the rotation angle (in degrees) to be used for the compass display

Parameters
rotationthe rotation angle to be set (in degrees)

◆ set_show_axes()

void DdtPanningWidget::set_show_axes ( const bool show)

Sets status of the flag that decides if compass axis should be shown at all

Parameters
showif true the axes of the compass will be displayed in the preview image

◆ SetImage

void DdtPanningWidget::SetImage ( const QImage & image,
const QTransform & transform,
const double rotation )
slot

Slot which is called when a new image was loaded in the image widget

Parameters
imagePointer to the new preview image
transformTransformation to be used for drawing the compass
rotationThe rotation angle for the compass display

◆ UpdatePosition

void DdtPanningWidget::UpdatePosition ( double scroll_fraction_x,
double scroll_fraction_y )
signal

Signal which is sent when the selection rectangle is moved

Parameters
scroll_fraction_xFraction of the width to which the selection rectangle was moved
scroll_fraction_yFraction of the height to which the selection rectangle was moved

Member Data Documentation

◆ max_selection_rectangle

QRect DdtPanningWidget::max_selection_rectangle
protected

Maximum rectangle that is available for the preview window

◆ mouse_drag_active

bool DdtPanningWidget::mouse_drag_active
protected

Flag which indicates that a mouse drag operation is in progress

◆ origin_x

int DdtPanningWidget::origin_x
protected

Origin of the x coordinate since the preview image might be smaller then the widget

◆ origin_y

int DdtPanningWidget::origin_y
protected

Origin of the y coordinate since the preview image might be smaller then the widget

◆ preview_image

QImage DdtPanningWidget::preview_image
protected

QImage that holds the preview image shown in the widget

◆ preview_image_label

QLabel* DdtPanningWidget::preview_image_label
protected

QLabel which is used to display the preview image that can be used to navigate the current view

◆ rotation_deg

float DdtPanningWidget::rotation_deg
protected

Rotation angle (in degrees) to be used for the compass display

◆ rubberband

QRubberBand* DdtPanningWidget::rubberband
protected

Rubberband object to display the selection rectangle in the widget

◆ selection_rectangle

QRect DdtPanningWidget::selection_rectangle
protected

Rectangle holding the current pan rectangle

◆ show_axes

bool DdtPanningWidget::show_axes
protected

Flag to decide if compass axes should be displayed in the widget

◆ show_status

int DdtPanningWidget::show_status = 1
protected

Status indicating which axes are to be shown 0 - show none 1 - show compass and x/y axes 2 - only show compass 3 - only show x/y axes

◆ zoom_factor

float DdtPanningWidget::zoom_factor
protected

Current zoom factor

Property Documentation

◆ ShowAxes

bool DdtPanningWidget::ShowAxes
readwrite

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