Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_cursor.h
Go to the documentation of this file.
1/*
2 * kis_cursor.h - part of KImageShop
3 *
4 * SPDX-FileCopyrightText: 1999 Matthias Elter <elter@kde.org>
5 * SPDX-FileCopyrightText: 2004 Adrian Page <adrian@pagenet.plus.com>
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef __kis_cursor_h__
11#define __kis_cursor_h__
12
13#include <kritawidgetutils_export.h>
14
15#include <QCursor>
16
17class KRITAWIDGETUTILS_EXPORT KisCursor
18{
19
20public:
21
22 KisCursor();
23
24 // Predefined Qt cursors.
25 static QCursor arrowCursor(); // standard arrow cursor
26 static QCursor upArrowCursor(); // upwards arrow
27 static QCursor crossCursor(); // crosshair
28 static QCursor roundCursor(); // small open circle
29 static QCursor pixelBlackCursor(); // black single pixel
30 static QCursor pixelWhiteCursor(); // white single pixel
31 static QCursor waitCursor(); // hourglass/watch
32 static QCursor ibeamCursor(); // ibeam/text entry
33 static QCursor sizeVerCursor(); // vertical resize
34 static QCursor sizeHorCursor(); // horizontal resize
35 static QCursor sizeBDiagCursor(); // diagonal resize (/)
36 static QCursor sizeFDiagCursor(); // diagonal resize (\‍)
37 static QCursor sizeAllCursor(); // all directions resize
38 static QCursor blankCursor(); // blank/invisible cursor
39 static QCursor splitVCursor(); // vertical splitting
40 static QCursor splitHCursor(); // horizontal splitting
41 static QCursor pointingHandCursor(); // a pointing hand
42
43 static QCursor zoomSmoothCursor();
44 static QCursor zoomDiscreteCursor();
45 static QCursor rotateCanvasSmoothCursor();
46 static QCursor rotateCanvasDiscreteCursor();
47 static QCursor samplerImageForegroundCursor();
48 static QCursor samplerImageBackgroundCursor();
49 static QCursor samplerLayerForegroundCursor();
50 static QCursor samplerLayerBackgroundCursor();
51 static QCursor changeExposureCursor();
52 static QCursor changeGammaCursor();
53 static QCursor triangleLeftHandedCursor();
54 static QCursor triangleRightHandedCursor();
55 static QCursor eraserCursor();
56
57 // Existing custom KimageShop cursors. Use the 'load' function for all new cursors.
58 static QCursor moveCursor(); // move tool cursor
59 static QCursor moveSelectionCursor(); // move selection action cursor
60 static QCursor samplerCursor(); // color sampler cursor
61 static QCursor pickLayerCursor(); // pick layer cursor
62 static QCursor handCursor(); // hand tool cursor
63 static QCursor openHandCursor(); // Pan tool cursor
64 static QCursor closedHandCursor(); // Pan tool cursor
65 static QCursor rotateCursor(); // Transform tool cursor
66
67 static QCursor meshCursorFree(); // Transform tool cursor
68 static QCursor meshCursorLocked(); // Transform tool cursor
69
70
71 // Load a cursor from an image file. The image should have an alpha channel
72 // and will be converted to black and white on loading. Any format loadable
73 // by QImage can be used. The file will be stored in the KisIconCache, so
74 // each file will be loaded only once.
75 static QCursor load(const QString & cursorName, int hotspotX = -1, int hotspotY = -1);
76
77private:
78
79
80};
81#endif // __kis_cursor_h__