Changeset View
Changeset View
Standalone View
Standalone View
lib/documentview/documentview.h
Show All 27 Lines | |||||
28 | 28 | | |||
29 | // KDE | 29 | // KDE | ||
30 | 30 | | |||
31 | // Local | 31 | // Local | ||
32 | #include <lib/document/document.h> | 32 | #include <lib/document/document.h> | ||
33 | 33 | | |||
34 | class QPropertyAnimation; | 34 | class QPropertyAnimation; | ||
35 | class QUrl; | 35 | class QUrl; | ||
36 | class QGestureEvent; | ||||
37 | class QTapGesture; | ||||
38 | class QPinchGesture; | ||||
39 | class QGesture; | ||||
36 | 40 | | |||
37 | namespace Gwenview | 41 | namespace Gwenview | ||
38 | { | 42 | { | ||
39 | 43 | | |||
40 | class AbstractRasterImageViewTool; | 44 | class AbstractRasterImageViewTool; | ||
41 | class RasterImageView; | 45 | class RasterImageView; | ||
42 | 46 | | |||
43 | struct DocumentViewPrivate; | 47 | struct DocumentViewPrivate; | ||
▲ Show 20 Lines • Show All 154 Lines • ▼ Show 20 Line(s) | 162 | Q_SIGNALS: | |||
198 | 202 | | |||
199 | void currentToolChanged(AbstractRasterImageViewTool*); | 203 | void currentToolChanged(AbstractRasterImageViewTool*); | ||
200 | 204 | | |||
201 | void isAnimatedChanged(); | 205 | void isAnimatedChanged(); | ||
202 | 206 | | |||
203 | protected: | 207 | protected: | ||
204 | void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override; | 208 | void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override; | ||
205 | 209 | | |||
210 | bool event(QEvent*) override; | ||||
206 | void resizeEvent(QGraphicsSceneResizeEvent* event) override; | 211 | void resizeEvent(QGraphicsSceneResizeEvent* event) override; | ||
207 | void mousePressEvent(QGraphicsSceneMouseEvent* event) override; | 212 | void mousePressEvent(QGraphicsSceneMouseEvent* event) override; | ||
208 | void wheelEvent(QGraphicsSceneWheelEvent* event) override; | 213 | void wheelEvent(QGraphicsSceneWheelEvent* event) override; | ||
209 | void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override; | 214 | void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override; | ||
210 | bool sceneEventFilter(QGraphicsItem*, QEvent*) override; | 215 | bool sceneEventFilter(QGraphicsItem*, QEvent*) override; | ||
211 | void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override; | 216 | void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override; | ||
212 | void dropEvent(QGraphicsSceneDragDropEvent* event) override; | 217 | void dropEvent(QGraphicsSceneDragDropEvent* event) override; | ||
213 | 218 | | |||
rkflx: `override` | |||||
214 | private Q_SLOTS: | 219 | private Q_SLOTS: | ||
rkflx: Remove extra space after `(`. | |||||
rkflx: Better put this into the `private` section? | |||||
215 | void finishOpenUrl(); | 220 | void finishOpenUrl(); | ||
216 | void slotCompleted(); | 221 | void slotCompleted(); | ||
217 | void slotLoadingFailed(); | 222 | void slotLoadingFailed(); | ||
218 | 223 | | |||
219 | void zoomActualSize(); | 224 | void zoomActualSize(); | ||
220 | 225 | | |||
221 | void zoomIn(QPointF center = QPointF(-1, -1)); | 226 | void zoomIn(QPointF center = QPointF(-1, -1)); | ||
222 | void zoomOut(QPointF center = QPointF(-1, -1)); | 227 | void zoomOut(QPointF center = QPointF(-1, -1)); | ||
223 | 228 | | |||
224 | void slotZoomChanged(qreal); | 229 | void slotZoomChanged(qreal); | ||
225 | 230 | | |||
226 | void slotBusyChanged(const QUrl&, bool); | 231 | void slotBusyChanged(const QUrl&, bool); | ||
227 | 232 | | |||
228 | void emitHudTrashClicked(); | 233 | void emitHudTrashClicked(); | ||
229 | void emitHudDeselectClicked(); | 234 | void emitHudDeselectClicked(); | ||
230 | void emitFocused(); | 235 | void emitFocused(); | ||
231 | 236 | | |||
232 | void slotFadeInFinished(); | 237 | void slotFadeInFinished(); | ||
233 | 238 | | |||
234 | void dragThumbnailLoaded(const KFileItem&, const QPixmap&); | 239 | void dragThumbnailLoaded(const KFileItem&, const QPixmap&); | ||
235 | void dragThumbnailLoadingFailed(const KFileItem&); | 240 | void dragThumbnailLoadingFailed(const KFileItem&); | ||
236 | 241 | | |||
237 | private: | 242 | private: | ||
243 | void pinchGestureTriggered(QGestureEvent*); | ||||
244 | void oneAndTwoFingerSwipeGestureTriggered(QGesture*); | ||||
245 | void gestureEvent(QGestureEvent*); | ||||
238 | friend struct DocumentViewPrivate; | 246 | friend struct DocumentViewPrivate; | ||
239 | DocumentViewPrivate* const d; | 247 | DocumentViewPrivate* const d; | ||
240 | 248 | | |||
241 | void createAdapterForDocument(); | 249 | void createAdapterForDocument(); | ||
242 | }; | 250 | }; | ||
243 | 251 | | |||
244 | } // namespace | 252 | } // namespace | ||
245 | 253 | | |||
246 | #endif /* DOCUMENTVIEW_H */ | 254 | #endif /* DOCUMENTVIEW_H */ |
override