ddt  0.1
Public Slots | 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

Public Slots

void MagnifiedImage (QImage magnified_image)
 

Signals

void SetMagnificationFactor (QString factor)
 

Public Member Functions

 DdtMagnificationWidget (QWidget *parent=nullptr)
 
virtual ~DdtMagnificationWidget ()=default
 
void set_default_magnification_factors (const QString default_factors)
 
QString get_default_magnification_factors ()
 
void set_region_size (const int size)
 
int get_region_size ()
 
void SetImageSize (int size)
 
int GetImageSize ()
 
void DrawMarker (double fwhm_x, double fwhm_y, const double angle_x_axis) const
 
void DrawCenterRectangle (QPixmap *const image) const
 
void ClearImage ()
 
- 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 Attributes

QString default_magnification_factors
 default_magnification_factors List of magnification scales More...
 
int region_size
 region_size The size of the region More...
 
int magnification_factor_index
 
QStringList magnification_factors
 

Properties

QString default_magnification_factors READ get_default_magnification_factors WRITE set_default_magnification_factors Q_PROPERTYint region_size
 

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

◆ ClearImage()

void DdtMagnificationWidget::ClearImage ( )

Clears the imae display

◆ DrawCenterRectangle()

void DdtMagnificationWidget::DrawCenterRectangle ( QPixmap *const  image) const

Draw a rectangle around the center of the image Size depends on environment of the widget. For widget and dialog the size should be 10 x 10 pixels, for the Pick Object dialog, it depends on the position of the pixel-slider

Parameters
imageQPixmap onto which the rectangle is drawn

◆ DrawMarker()

void DdtMagnificationWidget::DrawMarker ( double  fwhm_x,
double  fwhm_y,
const double  angle_x_axis 
) const

Draws a marker for a given position with given parameters

Parameters
fwhm_xFull width at half maximum x
fwhm_yFull width at half maximum y
angle_x_axisAngle of marker

◆ get_default_magnification_factors()

QString DdtMagnificationWidget::get_default_magnification_factors ( )

Retrieve the list of magnification scales

Returns
the list of scale factors

◆ get_region_size()

int DdtMagnificationWidget::get_region_size ( )

Retrieve the value region size

Returns
the value of the region size

◆ GetImageSize()

int DdtMagnificationWidget::GetImageSize ( )

Returns the image size

Returns
Size of the image

◆ MagnifiedImage

void DdtMagnificationWidget::MagnifiedImage ( QImage  magnified_image)
slot

Slot to retrieve the magnified image at the mouse coordinates

Parameters
magnifiedImageThe magnified image.

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

◆ set_region_size()

void DdtMagnificationWidget::set_region_size ( const int  size)

Set the value for the region size

Parameters
sizesize of the region

◆ SetImageSize()

void DdtMagnificationWidget::SetImageSize ( int  size)

Set the size of the image

Parameters
sizeSize of the image

◆ SetMagnificationFactor

void DdtMagnificationWidget::SetMagnificationFactor ( QString  factor)
signal

Signal sent, when the magnification factor was changed

Member Data Documentation

◆ default_magnification_factors

QString DdtMagnificationWidget::default_magnification_factors
protected

default_magnification_factors List of magnification scales

◆ 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

◆ region_size

int DdtMagnificationWidget::region_size
protected

region_size The size of the region

Property Documentation

◆ region_size

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

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