File indexing completed on 2024-05-12 16:02:26
0001 /* 0002 * kis_cursor.h - part of KImageShop 0003 * 0004 * SPDX-FileCopyrightText: 1999 Matthias Elter <elter@kde.org> 0005 * SPDX-FileCopyrightText: 2004 Adrian Page <adrian@pagenet.plus.com> 0006 * 0007 * SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #ifndef __kis_cursor_h__ 0011 #define __kis_cursor_h__ 0012 0013 #include <kritawidgetutils_export.h> 0014 0015 #include <QCursor> 0016 0017 class KRITAWIDGETUTILS_EXPORT KisCursor 0018 { 0019 0020 public: 0021 0022 KisCursor(); 0023 0024 // Predefined Qt cursors. 0025 static QCursor arrowCursor(); // standard arrow cursor 0026 static QCursor upArrowCursor(); // upwards arrow 0027 static QCursor crossCursor(); // crosshair 0028 static QCursor roundCursor(); // small open circle 0029 static QCursor pixelBlackCursor(); // black single pixel 0030 static QCursor pixelWhiteCursor(); // white single pixel 0031 static QCursor waitCursor(); // hourglass/watch 0032 static QCursor ibeamCursor(); // ibeam/text entry 0033 static QCursor sizeVerCursor(); // vertical resize 0034 static QCursor sizeHorCursor(); // horizontal resize 0035 static QCursor sizeBDiagCursor(); // diagonal resize (/) 0036 static QCursor sizeFDiagCursor(); // diagonal resize (\) 0037 static QCursor sizeAllCursor(); // all directions resize 0038 static QCursor blankCursor(); // blank/invisible cursor 0039 static QCursor splitVCursor(); // vertical splitting 0040 static QCursor splitHCursor(); // horizontal splitting 0041 static QCursor pointingHandCursor(); // a pointing hand 0042 0043 static QCursor zoomSmoothCursor(); 0044 static QCursor zoomDiscreteCursor(); 0045 static QCursor rotateCanvasSmoothCursor(); 0046 static QCursor rotateCanvasDiscreteCursor(); 0047 static QCursor samplerImageForegroundCursor(); 0048 static QCursor samplerImageBackgroundCursor(); 0049 static QCursor samplerLayerForegroundCursor(); 0050 static QCursor samplerLayerBackgroundCursor(); 0051 static QCursor changeExposureCursor(); 0052 static QCursor changeGammaCursor(); 0053 static QCursor triangleLeftHandedCursor(); 0054 static QCursor triangleRightHandedCursor(); 0055 static QCursor eraserCursor(); 0056 0057 // Existing custom KimageShop cursors. Use the 'load' function for all new cursors. 0058 static QCursor moveCursor(); // move tool cursor 0059 static QCursor moveSelectionCursor(); // move selection action cursor 0060 static QCursor samplerCursor(); // color sampler cursor 0061 static QCursor pickLayerCursor(); // pick layer cursor 0062 static QCursor handCursor(); // hand tool cursor 0063 static QCursor openHandCursor(); // Pan tool cursor 0064 static QCursor closedHandCursor(); // Pan tool cursor 0065 static QCursor rotateCursor(); // Transform tool cursor 0066 0067 static QCursor meshCursorFree(); // Transform tool cursor 0068 static QCursor meshCursorLocked(); // Transform tool cursor 0069 0070 0071 // Load a cursor from an image file. The image should have an alpha channel 0072 // and will be converted to black and white on loading. Any format loadable 0073 // by QImage can be used. The file will be stored in the KisIconCache, so 0074 // each file will be loaded only once. 0075 static QCursor load(const QString & cursorName, int hotspotX = -1, int hotspotY = -1); 0076 0077 private: 0078 0079 0080 }; 0081 #endif // __kis_cursor_h__