ddt 1.2.1
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Attributes | Properties | List of all members
DdtMagnificationWidget Class Reference

The DdtMagnificationWidget class Class for the Magnification Widget that can be used to display a magnified portion of the image around the point currently under the mouse pointer inside the image widget. More...

#include <ddtMagnificationWidget.hpp>

Inheritance diagram for DdtMagnificationWidget:
DdtWidget

Signals

void SetMagnificationFactor (QString factor)
 

Public Member Functions

virtual ~DdtMagnificationWidget ()=default
 
- 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.
 

Protected Attributes

QPixmap current_zoomed_image
 current_zoomed_image Copy of the drawn zoomed image, using to draw marker/cross
 
bool draw_marker
 draw_marker Flag indicates that the marker should/shouldn't be draw
 
QLineF marker_line_one
 marker_line_one First line that builds marker
 
QLineF marker_line_two
 marker_line_two Second line that builds marker
 
QString default_magnification_factors
 default_magnification_factors List of magnification scales
 
int center_rectangle_size
 center_rectangle_size The size of the center rectangle, 0 value disables drawing the center rectangle
 
int magnification_factor_index
 
QStringList magnification_factors
 

Properties

QString default_magnification_factors READ get_default_magnification_factors WRITE set_default_magnification_factors Q_PROPERTYint center_rectangle_size
 
 DdtMagnificationWidget (QWidget *parent=nullptr)
 
void set_default_magnification_factors (const QString default_factors)
 
QString get_default_magnification_factors ()
 
void set_center_rectangle_size (const int size)
 
int get_center_rectangle_size () const
 
void SetExpandingSize ()
 
int GetImageSize () const
 
int GetCurrentMagnificationFactor () const
 
int GetMaximumCenterRectangleSize () const
 
void CalcMarkerPosAndDraw (bool draw_marker, QPointF view_xy, QRect magnified_image_rect, bool view_rotate_90_270, double fwhm_x, double fwhm_y, double angle_x_axis, bool vertical_flip, bool horizontal_flip)
 
void ClearMagnifiedImage ()
 
void MagnifiedImage (QImage magnified_image)
 

Detailed Description

The DdtMagnificationWidget class Class for the Magnification Widget that can be used to display a magnified portion of the image around the point currently under the mouse pointer inside the image widget.

Constructor & Destructor Documentation

◆ DdtMagnificationWidget()

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

Constructor

Parameters
parentPointer to the parent widget

◆ ~DdtMagnificationWidget()

virtual DdtMagnificationWidget::~DdtMagnificationWidget ( )
virtualdefault

Destructor

Member Function Documentation

◆ CalcMarkerPosAndDraw()

void DdtMagnificationWidget::CalcMarkerPosAndDraw ( bool draw_marker,
QPointF view_xy,
QRect magnified_image_rect,
bool view_rotate_90_270,
double fwhm_x,
double fwhm_y,
double angle_x_axis,
bool vertical_flip,
bool horizontal_flip )

Calculates the marker position, remembers results for later drawing and redraw magnified image

Parameters
draw_markerflag indicates that marker should/shouldn't be draw
view_xytransformed (rotation) canvas/view coordinates
magnified_image_recttransformed (scaling + flipping + rotation) rectangle describing magnified image
view_rotate_90_270true if image is rotated by 90 or 270 degrees, otherwise false
fwhm_xFull width at half maximum x
fwhm_yFull width at half maximum y
angle_x_axisAngle of marker
vertical_flipFlag that indicate if image is flipped vertically
horizontal_flipFlag that indicate if image is flipped horizontally

◆ ClearMagnifiedImage

void DdtMagnificationWidget::ClearMagnifiedImage ( )
slot

Clears the image display

◆ get_center_rectangle_size()

int DdtMagnificationWidget::get_center_rectangle_size ( ) const

Retrieve the size of the center rectangle

Returns
size of the center rectangle

◆ get_default_magnification_factors()

QString DdtMagnificationWidget::get_default_magnification_factors ( )

Retrieve the list of magnification scales

Returns
the list of scale factors

◆ GetCurrentMagnificationFactor()

int DdtMagnificationWidget::GetCurrentMagnificationFactor ( ) const

Returns the current magnification factor

Returns
Current magnification factor

◆ GetImageSize()

int DdtMagnificationWidget::GetImageSize ( ) const

Returns the image size

Returns
Size of the image

◆ GetMaximumCenterRectangleSize()

int DdtMagnificationWidget::GetMaximumCenterRectangleSize ( ) const

Returns a maximum center rectangle size

Returns
Maximum center rectangle size

◆ MagnifiedImage

void DdtMagnificationWidget::MagnifiedImage ( QImage magnified_image)
slot

Slot to retrieve the magnified image at the mouse coordinates

Parameters
magnified_imageThe magnified image.

◆ set_center_rectangle_size()

void DdtMagnificationWidget::set_center_rectangle_size ( const int size)

Set the size of the center rectangle and redraw magnified image

Parameters
sizesize of the center rectangle

◆ set_default_magnification_factors()

void DdtMagnificationWidget::set_default_magnification_factors ( const QString default_factors)

Set the list of possible scale factors as comma separated values like: 1/20,1/10,1/4,1/2,1,2,4,10,20". When empty a default list should be used.

Parameters
default_factorsThe default magnification factor

◆ SetExpandingSize()

void DdtMagnificationWidget::SetExpandingSize ( )

Set the expnading size policy for the image

◆ SetMagnificationFactor

void DdtMagnificationWidget::SetMagnificationFactor ( QString factor)
signal

Signal sent, when the magnification factor was changed

Parameters
factorThe magnification factor

Member Data Documentation

◆ center_rectangle_size

int DdtMagnificationWidget::center_rectangle_size
protected

center_rectangle_size The size of the center rectangle, 0 value disables drawing the center rectangle

◆ current_zoomed_image

QPixmap DdtMagnificationWidget::current_zoomed_image
protected

current_zoomed_image Copy of the drawn zoomed image, using to draw marker/cross

◆ default_magnification_factors

QString DdtMagnificationWidget::default_magnification_factors
protected

default_magnification_factors List of magnification scales

◆ draw_marker

bool DdtMagnificationWidget::draw_marker
protected

draw_marker Flag indicates that the marker should/shouldn't be draw

◆ magnification_factor_index

int DdtMagnificationWidget::magnification_factor_index
protected

Index for the list of magnification factors

◆ magnification_factors

QStringList DdtMagnificationWidget::magnification_factors
protected

List of magnification factors

◆ marker_line_one

QLineF DdtMagnificationWidget::marker_line_one
protected

marker_line_one First line that builds marker

◆ marker_line_two

QLineF DdtMagnificationWidget::marker_line_two
protected

marker_line_two Second line that builds marker

Property Documentation

◆ center_rectangle_size

QString default_magnification_factors READ get_default_magnification_factors WRITE set_default_magnification_factors Q_PROPERTYint DdtMagnificationWidget::center_rectangle_size
readwrite

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