Sophie

Sophie

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

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

<class name="QWhatsThis" doc="/**
&lt;p&gt;The &lt;a href=&quot;QWhatsThis.html&quot;&gt;&lt;tt&gt;QWhatsThis&lt;/tt&gt;&lt;/a&gt; class provides a simple description of any widget, i.e&amp;#x2e; answering the question &amp;quot;What's This?&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;quot;What's This?&amp;quot; help is part of an application's online help system, and provides users with information about the functionality and usage of a particular widget. &amp;quot;What's This?&amp;quot; help texts are typically longer and more detailed than &lt;a href=&quot;QToolTip.html&quot;&gt;tooltips&lt;/tt&gt;&lt;/a&gt;, but generally provide less information than that supplied by separate help windows.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QWhatsThis.html&quot;&gt;&lt;tt&gt;QWhatsThis&lt;/tt&gt;&lt;/a&gt; provides a single window with an explanatory text that pops up when the user asks &amp;quot;What's This?&amp;quot;. The default way for users to ask the question is to move the focus to the relevant widget and press Shift+F1. The help text appears immediately; it goes away as soon as the user does something else. (Note that if there is a shortcut for Shift+F1, this mechanism will not work.) Some dialogs provide a &amp;quot;?&amp;quot; button that users can click to enter &amp;quot;What's This?&amp;quot; mode; they then click the relevant widget to pop up the &amp;quot;What's This?&amp;quot; window. It is also possible to provide a a menu option or toolbar button to switch into &amp;quot;What's This?&amp;quot; mode.&lt;/p&gt;
&lt;p&gt;To add &amp;quot;What's This?&amp;quot; text to a widget or an action, you simply call QWidget::setWhatsThis() or QAction::setWhatsThis().&lt;/p&gt;
&lt;p&gt;The text can be either rich text or plain text. If you specify a rich text formatted string, it will be rendered using the default stylesheet, making it possible to embed images in the displayed text. To be as fast as possible, the default stylesheet uses a simple method to determine whether the text can be rendered as plain text. See Qt::mightBeRichText() for details.&lt;/p&gt;
&lt;pre&gt;        newAct = new QAction(tr(&amp;quot;&amp;amp;New&amp;quot;), this);
        newAct-&amp;gt;setShortcut(tr(&amp;quot;Ctrl+N&amp;quot;));
        newAct-&amp;gt;setStatusTip(tr(&amp;quot;Create a new file&amp;quot;));
        newAct-&amp;gt;setWhatsThis(tr(&amp;quot;Click this option to create a new file.&amp;quot;));&lt;/pre&gt;
&lt;p&gt;An alternative way to enter &amp;quot;What's This?&amp;quot; mode is to call &lt;a href=&quot;QWhatsThis.html#createAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;createAction&lt;/tt&gt;&lt;/a&gt;, and add the returned &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; to either a menu or a tool bar. By invoking this context help action (in the picture below, the button with the arrow and question mark icon) the user switches into &amp;quot;What's This?&amp;quot; mode. If they now click on a widget the appropriate help text is shown. The mode is left when help is given or when the user presses Esc.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;%2E%2E/images/whatsthis.png&quot; /&gt;&lt;/p&gt;&lt;p&gt;You can enter &amp;quot;What's This?&amp;quot; mode programmatically with &lt;a href=&quot;QWhatsThis.html#enterWhatsThisMode()&quot;&gt;&lt;tt&gt;enterWhatsThisMode&lt;/tt&gt;&lt;/a&gt;, check the mode with &lt;a href=&quot;QWhatsThis.html#inWhatsThisMode()&quot;&gt;&lt;tt&gt;inWhatsThisMode&lt;/tt&gt;&lt;/a&gt;, and return to normal mode with &lt;a href=&quot;QWhatsThis.html#leaveWhatsThisMode()&quot;&gt;&lt;tt&gt;leaveWhatsThisMode&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to control the &amp;quot;What's This?&amp;quot; behavior of a widget manually see Qt::WA_CustomWhatsThis.&lt;/p&gt;
&lt;p&gt;It is also possible to show different help texts for different regions of a widget, by using a &lt;a href=&quot;QHelpEvent.html&quot;&gt;&lt;tt&gt;QHelpEvent&lt;/tt&gt;&lt;/a&gt; of type QEvent::WhatsThis. Intercept the help event in your widget's QWidget::event() function and call QWhatsThis::showText() with the text you want to display for the position specified in QHelpEvent::pos(). If the text is rich text and the user clicks on a link, the widget also receives a &lt;a href=&quot;QWhatsThisClickedEvent.html&quot;&gt;&lt;tt&gt;QWhatsThisClickedEvent&lt;/tt&gt;&lt;/a&gt; with the link's reference as QWhatsThisClickedEvent::href(). If a &lt;a href=&quot;QWhatsThisClickedEvent.html&quot;&gt;&lt;tt&gt;QWhatsThisClickedEvent&lt;/tt&gt;&lt;/a&gt; is handled (i.e&amp;#x2e; QWidget::event() returns true), the help window remains visible. Call QWhatsThis::hideText() to hide it explicitly.&lt;/p&gt;

@see &lt;a href=&quot;QToolTip.html&quot;&gt;&lt;tt&gt;QToolTip&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public static com.trolltech.qt.gui.QAction createAction(com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Returns a ready-made &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt;, used to invoke &amp;quot;What's This?&amp;quot; context help, with the given &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The returned &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; provides a convenient way to let users enter &amp;quot;What's This?&amp;quot; mode.&lt;/p&gt;
 */"/>
    <method name="public static com.trolltech.qt.gui.QAction createAction()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QWhatsThis.html#createAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;createAction&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="public native static void enterWhatsThisMode()" doc="/**
&lt;p&gt;This function switches the user interface into &amp;quot;What's This?&amp;quot; mode. The user interface can be switched back into normal mode by the user (e.g&amp;#x2e; by them clicking or pressing Esc), or programmatically by calling &lt;a href=&quot;QWhatsThis.html#leaveWhatsThisMode()&quot;&gt;&lt;tt&gt;leaveWhatsThisMode&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When entering &amp;quot;What's This?&amp;quot; mode, a &lt;a href=&quot;%2E%2E/core/QEvent.html&quot;&gt;&lt;tt&gt;QEvent&lt;/tt&gt;&lt;/a&gt; of type Qt::EnterWhatsThisMode is sent to all toplevel widgets.&lt;/p&gt;

@see &lt;a href=&quot;QWhatsThis.html#inWhatsThisMode()&quot;&gt;&lt;tt&gt;inWhatsThisMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QWhatsThis.html#leaveWhatsThisMode()&quot;&gt;&lt;tt&gt;leaveWhatsThisMode&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static void hideText()" doc="/**
&lt;p&gt;If a &amp;quot;What's This?&amp;quot; window is showing, this destroys it.&lt;/p&gt;

@see &lt;a href=&quot;QWhatsThis.html#showText(com.trolltech.qt.core.QPoint, java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;showText&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static boolean inWhatsThisMode()" doc="/**
&lt;p&gt;Returns true if the user interface is in &amp;quot;What's This?&amp;quot; mode; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QWhatsThis.html#enterWhatsThisMode()&quot;&gt;&lt;tt&gt;enterWhatsThisMode&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static void leaveWhatsThisMode()" doc="/**
&lt;p&gt;If the user interface is in &amp;quot;What's This?&amp;quot; mode, this function switches back to normal mode; otherwise it does nothing.&lt;/p&gt;
&lt;p&gt;When leaving &amp;quot;What's This?&amp;quot; mode, a &lt;a href=&quot;%2E%2E/core/QEvent.html&quot;&gt;&lt;tt&gt;QEvent&lt;/tt&gt;&lt;/a&gt; of type Qt::LeaveWhatsThisMode is sent to all toplevel widgets.&lt;/p&gt;

@see &lt;a href=&quot;QWhatsThis.html#enterWhatsThisMode()&quot;&gt;&lt;tt&gt;enterWhatsThisMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QWhatsThis.html#inWhatsThisMode()&quot;&gt;&lt;tt&gt;inWhatsThisMode&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public static void showText(com.trolltech.qt.core.QPoint pos, java.lang.String text, com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Shows &lt;tt&gt;text&lt;/tt&gt; as a &amp;quot;What's This?&amp;quot; window, at global position &lt;tt&gt;pos&lt;/tt&gt;. The optional widget argument, &lt;tt&gt;w&lt;/tt&gt;, is used to determine the appropriate screen on multi-head systems.&lt;/p&gt;

@see &lt;a href=&quot;QWhatsThis.html#hideText()&quot;&gt;&lt;tt&gt;hideText&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public static void showText(com.trolltech.qt.core.QPoint pos, java.lang.String text)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QWhatsThis.html#showText(com.trolltech.qt.core.QPoint, java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;showText&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pos&lt;/tt&gt;, &lt;tt&gt;text&lt;/tt&gt;, 0). */"/>
</class>