Kpl main view class.
More...
#include <kplview.h>
|
void | mouseLeaved () |
| Emitted when mouse cursor leaves the widget.
|
|
void | urlsDropped (QList< QUrl > *list) |
| Emitted at drop event.
|
|
void | regionSelected (const QRectF &rect) |
| Emitted when rectangular region was selected using the mouse with its right button pressed.
|
|
|
| KplView (double f=1, QWidget *parent=nullptr) |
| Constructor.
|
|
virtual | ~KplView () |
| Destructor.
|
|
void | setZoomFactor (double f) |
| Sets zoom factor.
|
|
virtual QSize | sizeHint () const override |
| Calculates recommended size of the widget.
|
|
double | zoomFactor () const |
| Returns zoom factor.
|
|
|
virtual void | dragEnterEvent (QDragEnterEvent *e) override |
|
virtual void | dragMoveEvent (QDragMoveEvent *e) override |
|
virtual void | dropEvent (QDropEvent *e) override |
| Emits the signal urlsDropped, transferring a list of URLs.
|
|
virtual void | keyPressEvent (QKeyEvent *e) override |
| Implements scrolling of the window by key sequences.
|
|
virtual void | leaveEvent (QEvent *e) override |
| Emits the signal mouseLeaved.
|
|
virtual void | mouseMoveEvent (QMouseEvent *e) override |
| Implements selection of a rectangular region using the mouse with its right button pressed.
|
|
virtual void | mousePressEvent (QMouseEvent *e) override |
| Implements initiation of selection of a rectangular region using the mouse with its right button pressed.
|
|
virtual void | mouseReleaseEvent (QMouseEvent *e) override |
| Implements finishing of selection of a rectangular region using the mouse with its right button pressed.
|
|
|
double | m_zoomFactor |
|
QPoint | startPos |
|
QRubberBand * | rubberBand |
|
Kpl main view class.
Displays the plot items of a KplScene. Provides methods for scrolling and zooming.
- Author
- Werner Stille
◆ KplView()
KplView::KplView |
( |
double | f = 1, |
|
|
QWidget * | parent = nullptr ) |
Constructor.
- Parameters
-
f | zoom factor. |
parent | pointer to parent widget. |
◆ dragEnterEvent()
virtual void KplView::dragEnterEvent |
( |
QDragEnterEvent * | e | ) |
|
|
overrideprotectedvirtual |
◆ dragMoveEvent()
virtual void KplView::dragMoveEvent |
( |
QDragMoveEvent * | e | ) |
|
|
overrideprotectedvirtual |
◆ dropEvent()
virtual void KplView::dropEvent |
( |
QDropEvent * | e | ) |
|
|
overrideprotectedvirtual |
Emits the signal urlsDropped, transferring a list of URLs.
- Parameters
-
◆ keyPressEvent()
virtual void KplView::keyPressEvent |
( |
QKeyEvent * | e | ) |
|
|
overrideprotectedvirtual |
Implements scrolling of the window by key sequences.
-
Home scrolls to bottom margin.
-
End scrolls to top margin.
-
Ctrl+Home scrolls to left margin.
-
Ctrl+End scrolls to right margin.
-
PgUp scrolls page up.
-
PgDown scrolls page down.
- Parameters
-
◆ leaveEvent()
virtual void KplView::leaveEvent |
( |
QEvent * | e | ) |
|
|
overrideprotectedvirtual |
◆ mouseMoveEvent()
virtual void KplView::mouseMoveEvent |
( |
QMouseEvent * | e | ) |
|
|
overrideprotectedvirtual |
Implements selection of a rectangular region using the mouse with its right button pressed.
- Parameters
-
◆ mousePressEvent()
virtual void KplView::mousePressEvent |
( |
QMouseEvent * | e | ) |
|
|
overrideprotectedvirtual |
Implements initiation of selection of a rectangular region using the mouse with its right button pressed.
- Parameters
-
◆ mouseReleaseEvent()
virtual void KplView::mouseReleaseEvent |
( |
QMouseEvent * | e | ) |
|
|
overrideprotectedvirtual |
Implements finishing of selection of a rectangular region using the mouse with its right button pressed.
In this case the signal regionSelected is emitted, transferring the rectangle.
- Parameters
-
◆ regionSelected
void KplView::regionSelected |
( |
const QRectF & | rect | ) |
|
|
signal |
Emitted when rectangular region was selected using the mouse with its right button pressed.
- Parameters
-
rect | rectangle in pixel units. units. |
◆ setZoomFactor()
void KplView::setZoomFactor |
( |
double | f | ) |
|
Sets zoom factor.
- Parameters
-
◆ urlsDropped
void KplView::urlsDropped |
( |
QList< QUrl > * | list | ) |
|
|
signal |
Emitted at drop event.
- Parameters
-
list | pointer to list of dropped URLs. |
The documentation for this class was generated from the following file: