ddt  0.1
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
DdtPanningWidget Class Reference

#include <ddtPanningWidget.hpp>

Inheritance diagram for DdtPanningWidget:
DdtWidget

Public Slots

void SetImage (QImage *image)
 
void ImageWidgetViewChanged (QRectF visible_image_rect, int current_image_width, int current_image_height)
 

Signals

void UpdatePosition (double scroll_fraction_x, double scroll_fraction_y)
 

Public Member Functions

 DdtPanningWidget (QWidget *parent=nullptr)
 
 ~DdtPanningWidget ()
 
void set_show_axes (bool show_axes)
 
bool get_show_axes ()
 
- Public Member Functions inherited from DdtWidget
 DdtWidget (QWidget *parent=nullptr)
 DdtWidget. More...
 
virtual ~DdtWidget ()=default
 
QLayout * addParentLayout (QLayout *childLayout)
 addParentLayout This will add the given layout to the layout of the parent inside the group box. More...
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event)
 

Protected Attributes

bool show_axes
 
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
 

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

◆ 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_show_axes()

bool DdtPanningWidget::get_show_axes ( )

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 ( QRectF  visible_image_rect,
int  current_image_width,
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_show_axes()

void DdtPanningWidget::set_show_axes ( bool  show_axes)

Sets status of the flag that decides if compass axis should be shown (Qt Designer property)

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

◆ SetImage

void DdtPanningWidget::SetImage ( QImage *  image)
slot

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

◆ 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

◆ 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

◆ 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: