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>
|
virtual | ~DdtMagnificationWidget ()=default |
|
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.
|
|
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.
◆ DdtMagnificationWidget()
DdtMagnificationWidget::DdtMagnificationWidget |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Constructor
- Parameters
-
parent | Pointer to the parent widget |
◆ ~DdtMagnificationWidget()
virtual DdtMagnificationWidget::~DdtMagnificationWidget |
( |
| ) |
|
|
virtualdefault |
◆ 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_marker | flag indicates that marker should/shouldn't be draw |
view_xy | transformed (rotation) canvas/view coordinates |
magnified_image_rect | transformed (scaling + flipping + rotation) rectangle describing magnified image |
view_rotate_90_270 | true if image is rotated by 90 or 270 degrees, otherwise false |
fwhm_x | Full width at half maximum x |
fwhm_y | Full width at half maximum y |
angle_x_axis | Angle of marker |
vertical_flip | Flag that indicate if image is flipped vertically |
horizontal_flip | Flag that indicate if image is flipped horizontally |
◆ ClearMagnifiedImage
void DdtMagnificationWidget::ClearMagnifiedImage |
( |
| ) |
|
|
slot |
◆ 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_image | The 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
-
size | size 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_factors | The 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
-
factor | The magnification factor |
◆ 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
◆ center_rectangle_size
The documentation for this class was generated from the following files: