ddt 1.1.0
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

QString default_magnification_factors
 default_magnification_factors List of magnification scales
 
int region_size
 region_size The size of the region
 
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
 
 DdtMagnificationWidget (QWidget *parent=nullptr)
 
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 SetExpandingSize ()
 
int GetImageSize ()
 
void DrawMarker (const double x, const double y, double fwhm_x, double fwhm_y, const double angle_x_axis, bool vertical_flip, bool horizontal_flip) const
 
void DrawCenterRectangle (QPixmap *const image) const
 
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

◆ ClearMagnifiedImage

void DdtMagnificationWidget::ClearMagnifiedImage ( )
slot

Clears the image 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 ( const double  x,
const double  y,
double  fwhm_x,
double  fwhm_y,
const double  angle_x_axis,
bool  vertical_flip,
bool  horizontal_flip 
) const

Draws a marker for a given position with given parameters

Parameters
xCenter x coordinate
yCenter y coordinate
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

◆ 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
magnified_imageThe 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
default_factorsThe default magnification factor

◆ set_region_size()

void DdtMagnificationWidget::set_region_size ( const int  size)

Set the value for the region size

Parameters
sizesize of the region

◆ 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

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