| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | 
|---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qcursor.h:1 --> | 
|---|
| 3 | <html> | 
|---|
| 4 | <head> | 
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | 
|---|
| 6 | <title>qcursor.h Include File</title> | 
|---|
| 7 | <style type="text/css"><!-- | 
|---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; } | 
|---|
| 9 | a:link { color: #004faf; text-decoration: none } | 
|---|
| 10 | a:visited { color: #672967; text-decoration: none } | 
|---|
| 11 | body { background: #ffffff; color: black; } | 
|---|
| 12 | --></style> | 
|---|
| 13 | </head> | 
|---|
| 14 | <body> | 
|---|
| 15 |  | 
|---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> | 
|---|
| 17 | <tr bgcolor="#E5E5E5"> | 
|---|
| 18 | <td valign=center> | 
|---|
| 19 | <a href="index.html"> | 
|---|
| 20 | <font color="#004faf">Home</font></a> | 
|---|
| 21 | | <a href="classes.html"> | 
|---|
| 22 | <font color="#004faf">All Classes</font></a> | 
|---|
| 23 | | <a href="mainclasses.html"> | 
|---|
| 24 | <font color="#004faf">Main Classes</font></a> | 
|---|
| 25 | | <a href="annotated.html"> | 
|---|
| 26 | <font color="#004faf">Annotated</font></a> | 
|---|
| 27 | | <a href="groups.html"> | 
|---|
| 28 | <font color="#004faf">Grouped Classes</font></a> | 
|---|
| 29 | | <a href="functions.html"> | 
|---|
| 30 | <font color="#004faf">Functions</font></a> | 
|---|
| 31 | </td> | 
|---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qcursor.h</h1> | 
|---|
| 33 |  | 
|---|
| 34 | <p>This is the verbatim text of the qcursor.h include file. It is provided only for illustration; the copyright remains with Trolltech. | 
|---|
| 35 | <hr> | 
|---|
| 36 | <pre> | 
|---|
| 37 | /**************************************************************************** | 
|---|
| 38 | ** $Id: qcursor-h.html 2051 2007-02-21 10:04:20Z chehrlic $ | 
|---|
| 39 | ** | 
|---|
| 40 | ** Definition of QCursor class | 
|---|
| 41 | ** | 
|---|
| 42 | ** Created : 940219 | 
|---|
| 43 | ** | 
|---|
| 44 | ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved. | 
|---|
| 45 | ** | 
|---|
| 46 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 
|---|
| 47 | ** | 
|---|
| 48 | ** This file may be distributed under the terms of the Q Public License | 
|---|
| 49 | ** as defined by Trolltech ASA of Norway and appearing in the file | 
|---|
| 50 | ** LICENSE.QPL included in the packaging of this file. | 
|---|
| 51 | ** | 
|---|
| 52 | ** This file may be distributed and/or modified under the terms of the | 
|---|
| 53 | ** GNU General Public License version 2 as published by the Free Software | 
|---|
| 54 | ** Foundation and appearing in the file LICENSE.GPL included in the | 
|---|
| 55 | ** packaging of this file. | 
|---|
| 56 | ** | 
|---|
| 57 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 
|---|
| 58 | ** licenses may use this file in accordance with the Qt Commercial License | 
|---|
| 59 | ** Agreement provided with the Software. | 
|---|
| 60 | ** | 
|---|
| 61 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 
|---|
| 62 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 
|---|
| 63 | ** | 
|---|
| 64 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 
|---|
| 65 | **   information about Qt Commercial License Agreements. | 
|---|
| 66 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 
|---|
| 67 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 
|---|
| 68 | ** | 
|---|
| 69 | ** Contact info@trolltech.com if any conditions of this licensing are | 
|---|
| 70 | ** not clear to you. | 
|---|
| 71 | ** | 
|---|
| 72 | **********************************************************************/ | 
|---|
| 73 |  | 
|---|
| 74 | #ifndef QCURSOR_H | 
|---|
| 75 | #define QCURSOR_H | 
|---|
| 76 |  | 
|---|
| 77 | #ifndef QT_H | 
|---|
| 78 | #include "qpoint.h" | 
|---|
| 79 | #include "qshared.h" | 
|---|
| 80 | #endif // QT_H | 
|---|
| 81 |  | 
|---|
| 82 | /* | 
|---|
| 83 | ### The fake cursor has to go first with old qdoc. | 
|---|
| 84 | */ | 
|---|
| 85 | #ifdef QT_NO_CURSOR | 
|---|
| 86 |  | 
|---|
| 87 | class Q_EXPORT QCursor : public Qt | 
|---|
| 88 | { | 
|---|
| 89 | public: | 
|---|
| 90 | static QPoint pos(); | 
|---|
| 91 | static void   setPos( int x, int y ); | 
|---|
| 92 | static void   setPos( const QPoint & ); | 
|---|
| 93 | private: | 
|---|
| 94 | QCursor(); | 
|---|
| 95 | }; | 
|---|
| 96 |  | 
|---|
| 97 | #endif // QT_NO_CURSOR | 
|---|
| 98 |  | 
|---|
| 99 | #ifndef QT_NO_CURSOR | 
|---|
| 100 |  | 
|---|
| 101 | struct QCursorData; | 
|---|
| 102 |  | 
|---|
| 103 |  | 
|---|
| 104 | class Q_EXPORT QCursor : public Qt | 
|---|
| 105 | { | 
|---|
| 106 | public: | 
|---|
| 107 | QCursor();                          // create default arrow cursor | 
|---|
| 108 | QCursor( int shape ); | 
|---|
| 109 | QCursor( const QBitmap &bitmap, const QBitmap &mask, | 
|---|
| 110 | int hotX=-1, int hotY=-1 ); | 
|---|
| 111 | QCursor( const QPixmap &pixmap, | 
|---|
| 112 | int hotX=-1, int hotY=-1 ); | 
|---|
| 113 | QCursor( const QCursor & ); | 
|---|
| 114 | ~QCursor(); | 
|---|
| 115 | QCursor &operator=( const QCursor & ); | 
|---|
| 116 |  | 
|---|
| 117 | int           shape()   const; | 
|---|
| 118 | void          setShape( int ); | 
|---|
| 119 |  | 
|---|
| 120 | const QBitmap *bitmap() const; | 
|---|
| 121 | const QBitmap *mask()   const; | 
|---|
| 122 | QPoint        hotSpot() const; | 
|---|
| 123 |  | 
|---|
| 124 | #if defined(Q_WS_WIN) | 
|---|
| 125 | HCURSOR       handle()  const; | 
|---|
| 126 | QCursor( HCURSOR ); | 
|---|
| 127 | #elif defined(Q_WS_X11) | 
|---|
| 128 | HANDLE        handle()  const; | 
|---|
| 129 | QCursor( HANDLE ); | 
|---|
| 130 | #elif defined(Q_WS_MAC) | 
|---|
| 131 | HANDLE handle() const; | 
|---|
| 132 | #elif defined(Q_WS_QWS) | 
|---|
| 133 | HANDLE        handle()  const; | 
|---|
| 134 | #endif | 
|---|
| 135 |  | 
|---|
| 136 | static QPoint pos(); | 
|---|
| 137 | static void   setPos( int x, int y ); | 
|---|
| 138 | static void   setPos( const QPoint & ); | 
|---|
| 139 |  | 
|---|
| 140 | static void   initialize(); | 
|---|
| 141 | static void   cleanup(); | 
|---|
| 142 |  | 
|---|
| 143 | #if defined(Q_WS_X11) | 
|---|
| 144 | static int    x11Screen(); | 
|---|
| 145 | #endif | 
|---|
| 146 | private: | 
|---|
| 147 | void          setBitmap( const QBitmap &bitmap, const QBitmap &mask, | 
|---|
| 148 | int hotX, int hotY ); | 
|---|
| 149 | void          update() const; | 
|---|
| 150 | QCursorData  *data; | 
|---|
| 151 | QCursor      *find_cur(int); | 
|---|
| 152 | #if defined(Q_WS_MAC) | 
|---|
| 153 | friend void qt_mac_set_cursor(const QCursor *c, const Point *p); | 
|---|
| 154 | #endif | 
|---|
| 155 | }; | 
|---|
| 156 |  | 
|---|
| 157 |  | 
|---|
| 158 | #if !defined(QT_CLEAN_NAMESPACE) | 
|---|
| 159 | // CursorShape is defined in X11/X.h | 
|---|
| 160 | #ifdef CursorShape | 
|---|
| 161 | #define X_CursorShape CursorShape | 
|---|
| 162 | #undef CursorShape | 
|---|
| 163 | #endif | 
|---|
| 164 | typedef Qt::CursorShape QCursorShape; | 
|---|
| 165 | #ifdef X_CursorShape | 
|---|
| 166 | #define CursorShape X_CursorShape | 
|---|
| 167 | #endif | 
|---|
| 168 | #endif | 
|---|
| 169 |  | 
|---|
| 170 |  | 
|---|
| 171 | /***************************************************************************** | 
|---|
| 172 | QCursor stream functions | 
|---|
| 173 | *****************************************************************************/ | 
|---|
| 174 | #ifndef QT_NO_DATASTREAM | 
|---|
| 175 | Q_EXPORT QDataStream &operator<<( QDataStream &, const QCursor & ); | 
|---|
| 176 | Q_EXPORT QDataStream &operator>>( QDataStream &, QCursor & ); | 
|---|
| 177 | #endif | 
|---|
| 178 | #endif // QT_NO_CURSOR | 
|---|
| 179 |  | 
|---|
| 180 |  | 
|---|
| 181 | inline void QCursor::setPos( const QPoint &p ) | 
|---|
| 182 | { | 
|---|
| 183 | setPos( p.x(), p.y() ); | 
|---|
| 184 | } | 
|---|
| 185 |  | 
|---|
| 186 | #endif // QCURSOR_H | 
|---|
| 187 | </pre> | 
|---|
| 188 | <!-- eof --> | 
|---|
| 189 | <p><address><hr><div align=center> | 
|---|
| 190 | <table width=100% cellspacing=0 border=0><tr> | 
|---|
| 191 | <td>Copyright © 2007 | 
|---|
| 192 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a> | 
|---|
| 193 | <td align=right><div align=right>Qt 3.3.8</div> | 
|---|
| 194 | </table></div></address></body> | 
|---|
| 195 | </html> | 
|---|