The RulerWidget is drawn above or to the left of the ViewportWidget.
More...
#include <RulerWidget.h>
Inherits QWidget.
|
enum class | Orientation { Horizontal
, Vertical
} |
|
|
| RulerWidget (Orientation orientation, QWidget *parent, EditorWindow *editorWindow) |
|
Orientation | GetOrientation () |
| Get the orientation of this ruler.
|
|
float | GetOrigin () |
| Get the origin position in canvas space of the ruler scale.
|
|
void | SetCursorPos (const QPoint &pos) |
| Tell the ruler where the cursor is in global Qt space.
|
|
void | DrawForViewport (Draw2dHelper &draw2d) |
| Draw anything needed in the viewport (during adding of a guide for example)
|
|
|
static int | GetRulerBreadth () |
| Get the the desired breadth of the ruler widgets when shown.
|
|
|
void | paintEvent (QPaintEvent *event) override |
| We have a custom paintEvent to draw the tick marks and labels.
|
|
void | mousePressEvent (QMouseEvent *ev) override |
| We handle mouse press events for adding guides.
|
|
void | mouseMoveEvent (QMouseEvent *ev) override |
| We get this after pressing the mouse in the ruler, even if mouse is over viewport.
|
|
void | mouseReleaseEvent (QMouseEvent *ev) override |
| We get this after pressing the mouse in the ruler, even if mouse if over viewport.
|
|
void | focusOutEvent (QFocusEvent *ev) override |
| We need this to cancel the interaction if RMB or a Alt+char combo is pressed.
|
|
void | DrawTickMarksWithLabels (QPainter *painter, QRectF rulerRect, float translation, float scale) |
| Draw the tick marks and text on the ruler.
|
|
void | DrawRulerSection (QPainter *painter, QRectF rulerRect, float startInCanvasPixels, float sectionLengthInScreenPixels, int numSubdivisions, float translation, float scale) |
| Draw one section of the ruller scale - a ssection has one major tick mark with a label plus some smaller tick marks.
|
|
void | DrawCursorPos (QPainter *painter, QRectF rulerRect) |
| Draw the line on the rule that shows where the mouse is.
|
|
The RulerWidget is drawn above or to the left of the ViewportWidget.
The documentation for this class was generated from the following file:
- Gems/LyShine/Code/Editor/RulerWidget.h