Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 1955

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QCursor" doc="/**
&lt;p&gt;The &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt; class provides a mouse cursor with an arbitrary shape.&lt;/p&gt;
&lt;p&gt;This class is mainly used to create mouse cursors that are associated with particular widgets and to get and set the position of the mouse cursor.&lt;/p&gt;
&lt;p&gt;Qt has a number of standard cursor shapes, but you can also make custom cursor shapes based on a &lt;a href=&quot;QBitmap.html&quot;&gt;&lt;tt&gt;QBitmap&lt;/tt&gt;&lt;/a&gt;, a mask and a hotspot.&lt;/p&gt;
&lt;p&gt;To associate a cursor with a widget, use QWidget::setCursor(). To associate a cursor with all widgets (normally for a short period of time), use QApplication::setOverrideCursor().&lt;/p&gt;
&lt;p&gt;To set a cursor shape use QCursor::setShape() or use the &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt; constructor which takes the shape as argument, or you can use one of the predefined cursors defined in the &lt;tt&gt;Qt::CursorShape&lt;/tt&gt; enum.&lt;/p&gt;
&lt;p&gt;If you want to create a cursor with your own bitmap, either use the &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt; constructor which takes a bitmap and a mask or the constructor which takes a pixmap as arguments.&lt;/p&gt;
&lt;p&gt;To set or get the position of the mouse cursor use the static methods QCursor::pos() and QCursor::setPos().&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; It is possible to create a &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt; before &lt;a href=&quot;QApplication.html&quot;&gt;&lt;tt&gt;QApplication&lt;/tt&gt;&lt;/a&gt;, but it is not useful except as a place-holder for a real &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt; created after &lt;a href=&quot;QApplication.html&quot;&gt;&lt;tt&gt;QApplication&lt;/tt&gt;&lt;/a&gt;. Attempting to use a &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt; that was created before &lt;a href=&quot;QApplication.html&quot;&gt;&lt;tt&gt;QApplication&lt;/tt&gt;&lt;/a&gt; will result in a crash.&lt;/p&gt;
&lt;a name=&quot;a-note-for-x11-users&quot;&gt;&lt;/a&gt;
&lt;h3&gt;A Note for X11 Users&lt;/h3&gt;
&lt;p&gt;On X11, Qt supports the &lt;a href=&quot;http://www.xfree86.org/4.3.0/Xcursor.3.html&quot;&gt;Xcursor&lt;/tt&gt;&lt;/a&gt; library, which allows for full color icon themes. The table below shows the cursor name used for each Qt::CursorShape value. If a cursor cannot be found using the name shown below, a standard X11 cursor will be used instead. Note: X11 does not provide appropriate cursors for all possible Qt::CursorShape values. It is possible that some cursors will be taken from the Xcursor theme, while others will use an internal bitmap cursor.&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;Shape&lt;/th&gt;&lt;th&gt;Qt::CursorShape Value&lt;/th&gt;&lt;th&gt;Cursor Name&lt;/th&gt;&lt;th&gt;Shape&lt;/th&gt;&lt;th&gt;Qt::CursorShape Value&lt;/th&gt;&lt;th&gt;Cursor Name&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-arrow.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::ArrowCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;left_ptr&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-sizev.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::SizeVerCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;size_ver&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-uparrow.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::UpArrowCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;up_arrow&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-sizeh.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::SizeHorCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;size_hor&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-cross.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::CrossCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;cross&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-sizeb.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::SizeBDiagCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;size_bdiag&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-ibeam.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::IBeamCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;ibeam&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-sizef.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::SizeFDiagCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;size_fdiag&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-wait.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::WaitCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;wait&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-sizeall.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::SizeAllCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;size_all&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-busy.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::BusyCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;left_ptr_watch&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-vsplit.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::SplitVCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;split_v&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-forbidden.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::ForbiddenCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;forbidden&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-hsplit.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::SplitHCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;split_h&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-hand.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::PointingHandCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;pointing_hand&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-openhand.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::OpenHandCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;openhand&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-whatsthis.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::WhatsThisCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;whats_this&lt;/tt&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/cursor-closedhand.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;Qt::ClosedHandCursor&lt;/td&gt;&lt;td&gt;&lt;tt&gt;closedhand&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;

@see &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/guibooks.html#fowler&quot;&gt;GUI Design Handbook: Cursors&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QCursor()" doc="/**
&lt;p&gt;Constructs a cursor with the default arrow shape.&lt;/p&gt;
 */"/>
    <method name="public QCursor(com.trolltech.qt.core.Qt.CursorShape shape)" doc="/**
&lt;p&gt;Constructs a cursor with the specified &lt;tt&gt;shape&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;See &lt;tt&gt;Qt::CursorShape&lt;/tt&gt; for a list of shapes.&lt;/p&gt;

@see &lt;a href=&quot;QCursor.html#setShape(com.trolltech.qt.core.Qt.CursorShape)&quot;&gt;&lt;tt&gt;setShape&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QCursor(com.trolltech.qt.gui.QBitmap bitmap, com.trolltech.qt.gui.QBitmap mask, int hotX, int hotY)" doc="/**
&lt;p&gt;Constructs a custom bitmap cursor.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;bitmap&lt;/tt&gt; and &lt;tt&gt;mask&lt;/tt&gt; make up the bitmap. &lt;tt&gt;hotX&lt;/tt&gt; and &lt;tt&gt;hotY&lt;/tt&gt; define the cursor's hot spot.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;hotX&lt;/tt&gt; is negative, it is set to the &lt;tt&gt;bitmap().width()/2&lt;/tt&gt;. If &lt;tt&gt;hotY&lt;/tt&gt; is negative, it is set to the &lt;tt&gt;bitmap().height()/2&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The cursor &lt;tt&gt;bitmap&lt;/tt&gt; (B) and &lt;tt&gt;mask&lt;/tt&gt; (M) bits are combined like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;B=1 and M=1 gives black.&lt;/li&gt;
&lt;li&gt;B=0 and M=1 gives white.&lt;/li&gt;
&lt;li&gt;B=0 and M=0 gives transparent.&lt;/li&gt;
&lt;li&gt;B=1 and M=0 gives an XOR'd result.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use the global Qt color Qt::color0 to draw 0-pixels and Qt::color1 to draw 1-pixels in the bitmaps.&lt;/p&gt;
&lt;p&gt;Valid cursor sizes depend on the display hardware (or the underlying window system). We recommend using 32 x 32 cursors, because this size is supported on all platforms. Some platforms also support 16 x 16, 48 x 48, and 64 x 64 cursors.&lt;/p&gt;

@see &lt;tt&gt;QBitmap::QBitmap&lt;/tt&gt;
@see &lt;tt&gt;QBitmap::setMask&lt;/tt&gt; */"/>
    <method name="public QCursor(com.trolltech.qt.gui.QBitmap bitmap, com.trolltech.qt.gui.QBitmap mask, int hotX)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;bitmap&lt;/tt&gt;, &lt;tt&gt;mask&lt;/tt&gt;, &lt;tt&gt;hotX&lt;/tt&gt;, -1). */"/>
    <method name="public QCursor(com.trolltech.qt.gui.QBitmap bitmap, com.trolltech.qt.gui.QBitmap mask)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;bitmap&lt;/tt&gt;, &lt;tt&gt;mask&lt;/tt&gt;, -1, -1). */"/>
    <method name="public QCursor(com.trolltech.qt.gui.QCursor cursor)" doc="/**
&lt;p&gt;Constructs a copy of the cursor &lt;tt&gt;cursor&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QCursor(com.trolltech.qt.gui.QPixmap pixmap, int hotX, int hotY)" doc="/**
&lt;p&gt;Constructs a custom pixmap cursor.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;pixmap&lt;/tt&gt; is the image. It is usual to give it a mask (set using QPixmap::setMask()). &lt;tt&gt;hotX&lt;/tt&gt; and &lt;tt&gt;hotY&lt;/tt&gt; define the cursor's hot spot.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;hotX&lt;/tt&gt; is negative, it is set to the &lt;tt&gt;pixmap().width()/2&lt;/tt&gt;. If &lt;tt&gt;hotY&lt;/tt&gt; is negative, it is set to the &lt;tt&gt;pixmap().height()/2&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Valid cursor sizes depend on the display hardware (or the underlying window system). We recommend using 32 x 32 cursors, because this size is supported on all platforms. Some platforms also support 16 x 16, 48 x 48, and 64 x 64 cursors.&lt;/p&gt;

@see &lt;tt&gt;QPixmap::QPixmap&lt;/tt&gt;
@see &lt;tt&gt;QPixmap::setMask&lt;/tt&gt; */"/>
    <method name="public QCursor(com.trolltech.qt.gui.QPixmap pixmap, int hotX)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pixmap&lt;/tt&gt;, &lt;tt&gt;hotX&lt;/tt&gt;, -1). */"/>
    <method name="public QCursor(com.trolltech.qt.gui.QPixmap pixmap)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QCursor.html#QCursor(com.trolltech.qt.gui.QPixmap, int, int)&quot;&gt;&lt;tt&gt;QCursor&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pixmap&lt;/tt&gt;, -1, -1). */"/>
    <method name="public final com.trolltech.qt.core.QPoint hotSpot()" doc="/**
&lt;p&gt;Returns the cursor hot spot, or (0, 0) if it is one of the standard cursors.&lt;/p&gt;
 */"/>
    <method name="public final void writeTo(com.trolltech.qt.core.QDataStream outS)"/>
    <method name="public final void readFrom(com.trolltech.qt.core.QDataStream inS)"/>
    <method name="public final com.trolltech.qt.gui.QPixmap pixmap()" doc="/**
&lt;p&gt;Returns the cursor pixmap. This is only valid if the cursor is a pixmap cursor.&lt;/p&gt;
 */"/>
    <method name="public final void setShape(com.trolltech.qt.core.Qt.CursorShape newShape)" doc="/**
&lt;p&gt;Sets the cursor to the shape identified by &lt;tt&gt;newShape&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;See &lt;tt&gt;Qt::CursorShape&lt;/tt&gt; for the list of cursor shapes.&lt;/p&gt;

@see &lt;a href=&quot;QCursor.html#shape()&quot;&gt;&lt;tt&gt;shape&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.Qt.CursorShape shape()" doc="/**
&lt;p&gt;Returns the cursor shape identifier. The return value is one of the &lt;tt&gt;Qt::CursorShape&lt;/tt&gt; enum values (cast to an int).&lt;/p&gt;

@see &lt;a href=&quot;QCursor.html#setShape(com.trolltech.qt.core.Qt.CursorShape)&quot;&gt;&lt;tt&gt;setShape&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static com.trolltech.qt.core.QPoint pos()" doc="/**
&lt;p&gt;Returns the position of the cursor (hot spot) in global screen coordinates.&lt;/p&gt;
&lt;p&gt;You can call QWidget::mapFromGlobal() to translate it to widget coordinates.&lt;/p&gt;

@see &lt;a href=&quot;QCursor.html#setPos(int, int)&quot;&gt;&lt;tt&gt;setPos&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::mapFromGlobal&lt;/tt&gt;
@see &lt;tt&gt;QWidget::mapToGlobal&lt;/tt&gt; */"/>
    <method name="public static void setPos(com.trolltech.qt.core.QPoint p)" doc="/**
&lt;p&gt;Moves the cursor (hot spot) to the global screen position at point &lt;tt&gt;p&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public native static void setPos(int x, int y)" doc="/**
&lt;p&gt;Moves the cursor (hot spot) to the global screen position (&lt;tt&gt;x&lt;/tt&gt;, &lt;tt&gt;y&lt;/tt&gt;).&lt;/p&gt;
&lt;p&gt;You can call QWidget::mapToGlobal() to translate widget coordinates to global screen coordinates.&lt;/p&gt;

@see &lt;a href=&quot;QCursor.html#pos()&quot;&gt;&lt;tt&gt;pos&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::mapFromGlobal&lt;/tt&gt;
@see &lt;tt&gt;QWidget::mapToGlobal&lt;/tt&gt; */"/>
</class>