krita/ui

kis_cursor.h

Go to the documentation of this file.
00001 /*
00002  *  kis_cursor.h - part of KImageShop
00003  *
00004  *  Copyright (c) 1999 Matthias Elter <elter@kde.org>
00005  *  Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef __kis_cursor_h__
00023 #define __kis_cursor_h__
00024 
00025 #include <krita_export.h>
00026 
00027 #include <QCursor>
00028 
00029 class KRITAUI_EXPORT KisCursor
00030 {
00031 
00032 public:
00033 
00034     KisCursor();
00035 
00036     // Predefined Qt cursors.
00037     static QCursor arrowCursor();         // standard arrow cursor
00038     static QCursor upArrowCursor();       // upwards arrow
00039     static QCursor crossCursor();         // crosshair
00040     static QCursor waitCursor();          // hourglass/watch
00041     static QCursor ibeamCursor();         // ibeam/text entry
00042     static QCursor sizeVerCursor();       // vertical resize
00043     static QCursor sizeHorCursor();       // horizontal resize
00044     static QCursor sizeBDiagCursor();     // diagonal resize (/)
00045     static QCursor sizeFDiagCursor();     // diagonal resize (\)
00046     static QCursor sizeAllCursor();       // all directions resize
00047     static QCursor blankCursor();         // blank/invisible cursor
00048     static QCursor splitVCursor();        // vertical splitting
00049     static QCursor splitHCursor();        // horizontal splitting
00050     static QCursor pointingHandCursor();  // a pointing hand
00051 
00052     // Existing custom KimageShop cursors. Use the 'load' function for all new cursors.
00053     static QCursor moveCursor();          // move tool cursor
00054     static QCursor penCursor();           // pen tool cursor
00055     static QCursor brushCursor();         // brush tool cursor
00056     static QCursor airbrushCursor();      // airbrush tool cursor
00057     static QCursor eraserCursor();        // eraser tool cursor
00058     static QCursor fillerCursor();        // filler tool cursor
00059     static QCursor pickerCursor();        // color picker cursor
00060     static QCursor pickerPlusCursor();        // color picker cursor
00061     static QCursor pickerMinusCursor();        // color picker cursor
00062     static QCursor colorChangerCursor();  // color changer tool cursor
00063     static QCursor selectCursor();        // select cursor
00064     static QCursor zoomCursor();          // zoom tool cursor
00065     static QCursor handCursor();          // hand tool cursor
00066     static QCursor openHandCursor();      // Pan tool cursor
00067     static QCursor closedHandCursor();    // Pan tool cursor
00068     static QCursor rotateCursor();    // Transform tool cursor
00069 
00070     // Load a cursor from an image file. The image should have an alpha channel
00071     // and will be converted to black and white on loading. Any format loadable by
00072     // QImage can be used.
00073     static QCursor load(const QString & imageFilename, int hotspotX = -1, int hotspotY = -1);
00074 };
00075 #endif // __kis_cursor_h__