ddt 1.2.1
|
#include <ddtGraphicsView.hpp>
Signals | |
void | CursorPosition (double x, double y, bool mouse_clicked) |
void | GraphicalElement (double x1, double y1, double x2, double y2, QString draw_mode) |
void | GraphicalTextElement (double x1, double y1, double x2, double y2, QString draw_mode, QString text) |
void | StatisticRectangle (double x1, double y1, double x2, double y2) |
void | SlitElement (double target_x, double target_y, double slit_x, double slit_y, double x_offset, double y_offset) |
void | CalculateHistogramReferenceLine (const QPointF p1, const QPointF p2) |
void | CalculateDistanceLine (const QPointF p1, const QPointF p2) |
void | MouseDecrementScale () |
void | MouseIncrementScale () |
void | LayerIncrement (const int inc) |
void | LayerDecrement (const int dec) |
DdtGraphicsView (QWidget *parent=nullptr) | |
~DdtGraphicsView () override | |
void | SetConvertPixelToDegrees (const double conv_pixel_degrees) |
void | SetDrawMode (const QString mode) |
QString | GetDrawMode () const |
void | SetDrawSlitLine (const bool draw_line) |
void | SetStatisticRect (const double x1, const double y1, const double x2, const double y2) |
void | SetOverlayImageFile (const QString filename) |
void | AddStatisticRectToScene () |
void | AddSlitElementToScene () |
void | AddReferenceLineElementToScene () |
void | AddDistanceLineElementToScene () |
void | UpdateAllStatistics () |
void | UpdateCursorInfo () |
void | ClearTextItemFocus () |
void | mouseMoveEvent (QMouseEvent *event) override |
void | mousePressEvent (QMouseEvent *event) override |
void | mouseReleaseEvent (QMouseEvent *event) override |
void | mouseDoubleClickEvent (QMouseEvent *event) override |
void | keyPressEvent (QKeyEvent *event) override |
void | wheelEvent (QWheelEvent *event) override |
void | drawForeground (QPainter *painter, const QRectF &rect) override |
bool | IsHandleGraphicalElement () const |
void | AddTextItem () |
void | ReferenceLineHandleHoldingShift () |
Class to serve as graphic view inside the image widget, derived from the QGraphicsView. The mouse events (move, press) are overwritten.
|
explicit |
Constructor
parent | Pointer to the parent widget |
|
overridedefault |
Destructor
void DdtGraphicsView::AddDistanceLineElementToScene | ( | ) |
Re-add the distance line element to the scene for the case it was removed by a refresh procedure
void DdtGraphicsView::AddReferenceLineElementToScene | ( | ) |
Re-add the reference line element to the scene for the case it was removed by a refresh procedure
void DdtGraphicsView::AddSlitElementToScene | ( | ) |
Re-add the slit element to the scene, for the case it was removed by a refresh procedure
void DdtGraphicsView::AddStatisticRectToScene | ( | ) |
Re-add the statistic rectangle to the scene, for the case it was removed by a refresh procedure
|
protected |
Re-add the textItem for text input (necessary in case of a running data stream input)
|
signal |
Signals send when a distance line was drawn
|
signal |
Signals send when a reference line was drawn
|
slot |
Slot which is called when the Graphical Element dialog is closed. It clears the focus of a text item if present.
|
signal |
Signal that is emitted to report the cursor position.
x | mouse x coordinate |
y | mouse y coordinate |
mouse_clicked | flag, if mouse button was clicked |
|
overrideprotected |
Draw the foreground layer. This is automatically called when the view is updated.
painter | the painter to use for drawing |
rect | the exposed rectangle |
QString DdtGraphicsView::GetDrawMode | ( | ) | const |
Returns the current draw mode for graphical elements
|
signal |
Signal that is emitted to report a graphical element's dimensions and type.
x1 | mouse x coordinate of first position |
y1 | mouse y coordinate of first position |
x2 | mouse x coordinate of second position |
y2 | mouse y coordinate of second position |
draw_mode | string identifying the graphical element |
|
signal |
|
protected |
Check if draw mode is to be handled as for graphical elements
|
overrideprotected |
Event handler to receive keyboard events
event | Key event |
Clearing the focus triggers the focusOutEvent of the text_item. This emits the signal GraphicsTextItemLostFocus that calls the connected slot HandleText(). Note: Do not call HandleText() directly!
|
signal |
Signal emitted to decrement the layer (plane) in a cube image
dec | the decrement value. A value of 0 will set the layer to the first one. |
|
signal |
Signal emitted to increment the layer (plane) in a cube image
inc | the increment value. A value of 0 will set the layer to the last one. |
|
signal |
Signal emitted when zooming in by mouse wheel
|
overrideprotected |
Event handler to receive mouse press events.
event | the mouse press event |
|
signal |
Signal emitted when zooming out by mouse wheel
|
overrideprotected |
Event handler to receive mouse move events.
event | the mouse move event |
|
overrideprotected |
Event handler to receive mouse press events.
event | the mouse press event |
|
overrideprotected |
Event handler to receive mouse release events.
event | the mouse press event |
|
protected |
void DdtGraphicsView::SetConvertPixelToDegrees | ( | const double | conv_pixel_degrees | ) |
Set the value for the factor to convert pixel distances to degrees
conv_pixel_degrees | the factor to be used to convert pixel distances to degrees |
void DdtGraphicsView::SetDrawMode | ( | const QString | mode | ) |
Sets the current draw mode for graphical elements
mode | the current draw mode |
void DdtGraphicsView::SetDrawSlitLine | ( | const bool | draw_line | ) |
Sets the draw slit line flag
draw_line | indicating if the slit line shall be drawn |
void DdtGraphicsView::SetOverlayImageFile | ( | const QString | filename | ) |
Sets the current overlay image file name
filename | the current overlay image file name |
void DdtGraphicsView::SetStatisticRect | ( | const double | x1, |
const double | y1, | ||
const double | x2, | ||
const double | y2 ) |
Sets the current draw mode for graphical elements
x1 | the x coordinate of top left corner |
y1 | the y coordinate of top left corner |
x2 | the x coordinate of bottom right corner |
y2 | the y coordinate of bottom right corner |
|
signal |
|
signal |
void DdtGraphicsView::UpdateAllStatistics | ( | ) |
Update all statistics
void DdtGraphicsView::UpdateCursorInfo | ( | ) |
Update the cursor info
|
overrideprotected |
Event handler for mouse wheel events.
event | the scroll wheel event |