Changeset View
Changeset View
Standalone View
Standalone View
src/QuickEditor/QuickEditor.h
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 33 | { | |||
---|---|---|---|---|---|
64 | int boundsUp(int newTopLeftY, const bool mouse = true); | 64 | int boundsUp(int newTopLeftY, const bool mouse = true); | ||
65 | int boundsDown(int newTopLeftY, const bool mouse = true); | 65 | int boundsDown(int newTopLeftY, const bool mouse = true); | ||
66 | void keyPressEvent(QKeyEvent* event) override; | 66 | void keyPressEvent(QKeyEvent* event) override; | ||
67 | void keyReleaseEvent(QKeyEvent* event) override; | 67 | void keyReleaseEvent(QKeyEvent* event) override; | ||
68 | void mousePressEvent(QMouseEvent* event) override; | 68 | void mousePressEvent(QMouseEvent* event) override; | ||
69 | void mouseMoveEvent(QMouseEvent* event) override; | 69 | void mouseMoveEvent(QMouseEvent* event) override; | ||
70 | void mouseReleaseEvent(QMouseEvent* event) override; | 70 | void mouseReleaseEvent(QMouseEvent* event) override; | ||
71 | void mouseDoubleClickEvent(QMouseEvent* event) override; | 71 | void mouseDoubleClickEvent(QMouseEvent* event) override; | ||
72 | void paintEvent(QPaintEvent*) override; | 72 | void paintEvent(QPaintEvent*) override; | ||
ngraham: unnecessary whitespace change | |||||
73 | void drawBottomHelpText(QPainter& painter); | 73 | void drawBottomHelpText(QPainter& painter); | ||
74 | void drawDragHandles(QPainter& painter); | 74 | void drawDragHandles(QPainter& painter, qreal minEdgeLength); | ||
75 | void drawMagnifier(QPainter& painter); | 75 | void drawMagnifier(QPainter& painter); | ||
76 | void drawMidHelpText(QPainter& painter); | 76 | void drawMidHelpText(QPainter& painter); | ||
77 | void drawSelectionSizeTooltip(QPainter& painter); | 77 | void drawSelectionSizeTooltip(QPainter& painter, bool dragHandlesVisible); | ||
78 | void setBottomHelpText(); | 78 | void setBottomHelpText(); | ||
79 | void layoutBottomHelpText(); | 79 | void layoutBottomHelpText(); | ||
80 | void setMouseCursor(const QPointF& pos); | 80 | void setMouseCursor(const QPointF& pos); | ||
81 | MouseState mouseLocation(const QPointF& pos); | 81 | MouseState mouseLocation(const QPointF& pos); | ||
82 | 82 | | |||
83 | static const qreal mouseAreaSize; | 83 | static const qreal mouseAreaSize; | ||
84 | static const qreal cornerHandleRadius; | 84 | static const qreal handleRadius; | ||
85 | static const qreal midHandleRadius; | 85 | static const qreal increaseDragAreaFactor; | ||
86 | static const int minSpacingBetweenHandles; | ||||
87 | | ||||
86 | static const int selectionSizeThreshold; | 88 | static const int selectionSizeThreshold; | ||
87 | 89 | | |||
88 | static const int selectionBoxPaddingX; | 90 | static const int selectionBoxPaddingX; | ||
89 | static const int selectionBoxPaddingY; | 91 | static const int selectionBoxPaddingY; | ||
90 | static const int selectionBoxMarginY; | 92 | static const int selectionBoxMarginY; | ||
91 | 93 | | |||
92 | static const int bottomHelpMaxLength = 6; | 94 | static const int bottomHelpMaxLength = 6; | ||
93 | static bool bottomHelpTextPrepared; | 95 | static bool bottomHelpTextPrepared; | ||
Show All 32 Lines | |||||
126 | bool mShowMagnifier; | 128 | bool mShowMagnifier; | ||
127 | bool mToggleMagnifier; | 129 | bool mToggleMagnifier; | ||
128 | bool mReleaseToCapture; | 130 | bool mReleaseToCapture; | ||
129 | bool mRememberRegion; | 131 | bool mRememberRegion; | ||
130 | bool mDisableArrowKeys; | 132 | bool mDisableArrowKeys; | ||
131 | QRect mPrimaryScreenGeo; | 133 | QRect mPrimaryScreenGeo; | ||
132 | int mbottomHelpLength; | 134 | int mbottomHelpLength; | ||
133 | 135 | | |||
136 | //Midpoints of handles | ||||
137 | QVector<QPointF> mHandlePositions = QVector<QPointF> {8}; | ||||
138 | | ||||
134 | Q_SIGNALS: | 139 | Q_SIGNALS: | ||
135 | 140 | | |||
136 | void grabDone(const QPixmap &thePixmap); | 141 | void grabDone(const QPixmap &thePixmap); | ||
137 | void grabCancelled(); | 142 | void grabCancelled(); | ||
138 | }; | 143 | }; | ||
139 | 144 | | |||
140 | #endif // QUICKEDITOR_H | 145 | #endif // QUICKEDITOR_H |
unnecessary whitespace change