Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2187

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

<class name="QShortcut" doc="/**
&lt;p&gt;The &lt;a href=&quot;QShortcut.html#QShortcut(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QShortcut&lt;/tt&gt;&lt;/a&gt; class is used to create keyboard shortcuts.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QShortcut.html#QShortcut(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QShortcut&lt;/tt&gt;&lt;/a&gt; class provides a way of connecting keyboard shortcuts to Qt's &lt;a href=&quot;%2E%2E/qtjambi-signalsandslots.html&quot;&gt;signals and slots&lt;/tt&gt;&lt;/a&gt; mechanism, so that objects can be informed when a shortcut is executed. The shortcut can be set up to contain all the key presses necessary to describe a keyboard shortcut, including the states of modifier keys such as &lt;b&gt;Shift&lt;/b&gt;, &lt;b&gt;Ctrl&lt;/b&gt;, and &lt;b&gt;Alt&lt;/b&gt;.&lt;/p&gt;
&lt;a name=&quot;mnemonic&quot;&gt;&lt;/a&gt;&lt;p&gt;On certain widgets, using '&amp;amp;' in front of a character will autmatically create a mnemonic (a shortcut) for that character, e.g&amp;#x2e; &amp;quot;E&amp;amp;xit&amp;quot; will create the shortcut &lt;b&gt;Alt+X&lt;/b&gt; (use '&amp;amp;&amp;amp;' to display an actual ampersand). The widget might consume and perform an action on a given shortcut. On X11 the ampersand will not be shown and the character will be underlined. On Windows, shortcuts are normally not displayed until the user presses the &lt;b&gt;Alt&lt;/b&gt; key, but this is a setting the user can change. On Mac such shortcuts do not exists, unless you explicitly call the global qt_set_sequence_auto_mnemonic() function; then they will appear as they do on X11.&lt;/p&gt;
&lt;p&gt;For applications that use menus, it may be more convenient to use the convenience functions provided in the &lt;a href=&quot;QMenu.html&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; class to assign keyboard shortcuts to menu items as they are created. Alternatively, shortcuts may be associated with other types of actions in the &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; class.&lt;/p&gt;
&lt;p&gt;The simplest way to create a shortcut for a particular widget is to construct the shortcut with a key sequence. For example:&lt;/p&gt;
&lt;pre&gt;    shortcut = new QShortcut(QKeySequence(tr(&amp;quot;Ctrl+O&amp;quot;, &amp;quot;File|Open&amp;quot;)),
                             parent);&lt;/pre&gt;
&lt;p&gt;When the user types the &lt;a href=&quot;QKeySequence.html&quot;&gt;key sequence&lt;/tt&gt;&lt;/a&gt; for a given shortcut, the shortcut's &lt;a href=&quot;QShortcut.html#activated()&quot;&gt;&lt;tt&gt;activated&lt;/tt&gt;&lt;/a&gt; signal is emitted. (In the case of ambiguity, the &lt;a href=&quot;QShortcut.html#activatedAmbiguously()&quot;&gt;&lt;tt&gt;activatedAmbiguously&lt;/tt&gt;&lt;/a&gt; signal is emitted.) A shortcut is &amp;quot;listened for&amp;quot; by Qt's event loop when the shortcut's parent widget is receiving events.&lt;/p&gt;
&lt;p&gt;A shortcut's key sequence can be set with &lt;a href=&quot;QShortcut.html#setKey(com.trolltech.qt.gui.QKeySequence)&quot;&gt;&lt;tt&gt;setKey&lt;/tt&gt;&lt;/a&gt; and retrieved with &lt;a href=&quot;QShortcut.html#key()&quot;&gt;&lt;tt&gt;key&lt;/tt&gt;&lt;/a&gt;. A shortcut can be enabled or disabled with &lt;a href=&quot;QShortcut.html#setEnabled(boolean)&quot;&gt;&lt;tt&gt;setEnabled&lt;/tt&gt;&lt;/a&gt;, and can have &amp;quot;What's This?&amp;quot; help text set with &lt;a href=&quot;QShortcut.html#setWhatsThis(java.lang.String)&quot;&gt;&lt;tt&gt;setWhatsThis&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QShortcutEvent.html&quot;&gt;&lt;tt&gt;QShortcutEvent&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QKeySequence.html&quot;&gt;&lt;tt&gt;QKeySequence&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; */">
    <signal name="protected final void activated()" doc="/**
&lt;p&gt;This signal is emitted when the user types the shortcut's key sequence.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QShortcut.html#activatedAmbiguously()&quot;&gt;&lt;tt&gt;activatedAmbiguously&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void activatedAmbiguously()" doc="/**
&lt;p&gt;This signal is emitted when the user types a shortcut key sequence that is ambiguous. For example, if one key sequence is a &amp;quot;prefix&amp;quot; for another and the user types these keys it isn't clear if they want the shorter key sequence, or if they're about to type more to complete the longer key sequence.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QShortcut.html#activated()&quot;&gt;&lt;tt&gt;activated&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <method name="public QShortcut(com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QShortcut.html#QShortcut(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QShortcut&lt;/tt&gt;&lt;/a&gt; object for the &lt;tt&gt;parent&lt;/tt&gt; widget. Since no shortcut key sequence is specified, the shortcut will not emit any signals.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#setKey(com.trolltech.qt.gui.QKeySequence)&quot;&gt;&lt;tt&gt;setKey&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean autoRepeat()" doc="/**
&lt;p&gt;Returns whether the shortcut can auto repeat.&lt;/p&gt;
&lt;p&gt;If true, the shortcut will auto repeat when the keyboard shortcut combination is held down, provided that keyboard auto repeat is enabled on the system. The default value is true.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#setAutoRepeat(boolean)&quot;&gt;&lt;tt&gt;setAutoRepeat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.Qt.ShortcutContext context()" doc="/**
&lt;p&gt;Returns the context in which the shortcut is valid.&lt;/p&gt;
&lt;p&gt;A shortcut's context decides in which circumstances a shortcut is allowed to be triggered. The normal context is Qt::WindowShortcut, which allows the shortcut to trigger if the parent (the widget containing the shortcut) is a subwidget of the active top-level window.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#setContext(com.trolltech.qt.core.Qt.ShortcutContext)&quot;&gt;&lt;tt&gt;setContext&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int id()" doc="/**
&lt;p&gt;Returns the shortcut's ID.&lt;/p&gt;

@see &lt;tt&gt;QShortcutEvent::shortcutId&lt;/tt&gt; */"/>
    <method name="public final boolean isEnabled()" doc="/**
&lt;p&gt;Returns whether the shortcut is enabled.&lt;/p&gt;
&lt;p&gt;An enabled shortcut emits the &lt;a href=&quot;QShortcut.html#activated()&quot;&gt;&lt;tt&gt;activated&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QShortcut.html#activatedAmbiguously()&quot;&gt;&lt;tt&gt;activatedAmbiguously&lt;/tt&gt;&lt;/a&gt; signal when a &lt;a href=&quot;QShortcutEvent.html&quot;&gt;&lt;tt&gt;QShortcutEvent&lt;/tt&gt;&lt;/a&gt; occurs that matches the shortcut's &lt;a href=&quot;QShortcut.html#key()&quot;&gt;&lt;tt&gt;key&lt;/tt&gt;&lt;/a&gt; sequence.&lt;/p&gt;
&lt;p&gt;If the application is in &lt;tt&gt;WhatsThis&lt;/tt&gt; mode the shortcut will not emit the signals, but will show the &amp;quot;What's This?&amp;quot; text instead.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#whatsThis()&quot;&gt;&lt;tt&gt;whatsThis&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QKeySequence key()" doc="/**
&lt;p&gt;Returns the shortcut's key sequence.&lt;/p&gt;
&lt;p&gt;This is a key sequence with an optional combination of Shift, Ctrl, and Alt. The key sequence may be supplied in a number of ways:&lt;/p&gt;
&lt;pre&gt;    setKey(0);                  &lt;span class=&quot;comment&quot;&gt;// no signal emitted&lt;/span&gt;
    setKey(QKeySequence());     &lt;span class=&quot;comment&quot;&gt;// no signal emitted&lt;/span&gt;
    setKey(0x3b1);              &lt;span class=&quot;comment&quot;&gt;// Greek letter alpha&lt;/span&gt;
    setKey(Qt::Key_D);              &lt;span class=&quot;comment&quot;&gt;// 'd', e.g. to delete&lt;/span&gt;
    setKey('q');                &lt;span class=&quot;comment&quot;&gt;// 'q', e.g. to quit&lt;/span&gt;
    setKey(Qt::CTRL + Qt::Key_P);       &lt;span class=&quot;comment&quot;&gt;// Ctrl+P, e.g. to print document&lt;/span&gt;
    setKey(&amp;quot;Ctrl+P&amp;quot;);           &lt;span class=&quot;comment&quot;&gt;// Ctrl+P, e.g. to print document&lt;/span&gt;&lt;/pre&gt;

@see &lt;a href=&quot;QShortcut.html#setKey(com.trolltech.qt.gui.QKeySequence)&quot;&gt;&lt;tt&gt;setKey&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QWidget parentWidget()" doc="/**
&lt;p&gt;Returns the shortcut's parent widget.&lt;/p&gt;
 */"/>
    <method name="public final void setAutoRepeat(boolean on)" doc="/**
&lt;p&gt;Sets whether the shortcut can auto repeat to &lt;tt&gt;on&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If true, the shortcut will auto repeat when the keyboard shortcut combination is held down, provided that keyboard auto repeat is enabled on the system. The default value is true.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#autoRepeat()&quot;&gt;&lt;tt&gt;autoRepeat&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setContext(com.trolltech.qt.core.Qt.ShortcutContext context)" doc="/**
&lt;p&gt;Sets the context in which the shortcut is valid to &lt;tt&gt;context&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;A shortcut's context decides in which circumstances a shortcut is allowed to be triggered. The normal context is Qt::WindowShortcut, which allows the shortcut to trigger if the parent (the widget containing the shortcut) is a subwidget of the active top-level window.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#context()&quot;&gt;&lt;tt&gt;context&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setEnabled(boolean enable)" doc="/**
&lt;p&gt;Sets whether the shortcut is enabled to &lt;tt&gt;enable&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;An enabled shortcut emits the &lt;a href=&quot;QShortcut.html#activated()&quot;&gt;&lt;tt&gt;activated&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QShortcut.html#activatedAmbiguously()&quot;&gt;&lt;tt&gt;activatedAmbiguously&lt;/tt&gt;&lt;/a&gt; signal when a &lt;a href=&quot;QShortcutEvent.html&quot;&gt;&lt;tt&gt;QShortcutEvent&lt;/tt&gt;&lt;/a&gt; occurs that matches the shortcut's &lt;a href=&quot;QShortcut.html#key()&quot;&gt;&lt;tt&gt;key&lt;/tt&gt;&lt;/a&gt; sequence.&lt;/p&gt;
&lt;p&gt;If the application is in &lt;tt&gt;WhatsThis&lt;/tt&gt; mode the shortcut will not emit the signals, but will show the &amp;quot;What's This?&amp;quot; text instead.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#isEnabled()&quot;&gt;&lt;tt&gt;isEnabled&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QShortcut.html#whatsThis()&quot;&gt;&lt;tt&gt;whatsThis&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setKey(com.trolltech.qt.gui.QKeySequence key)" doc="/**
&lt;p&gt;Sets the shortcut's key sequence to &lt;tt&gt;key&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This is a key sequence with an optional combination of Shift, Ctrl, and Alt. The key sequence may be supplied in a number of ways:&lt;/p&gt;
&lt;pre&gt;    setKey(0);                  &lt;span class=&quot;comment&quot;&gt;// no signal emitted&lt;/span&gt;
    setKey(QKeySequence());     &lt;span class=&quot;comment&quot;&gt;// no signal emitted&lt;/span&gt;
    setKey(0x3b1);              &lt;span class=&quot;comment&quot;&gt;// Greek letter alpha&lt;/span&gt;
    setKey(Qt::Key_D);              &lt;span class=&quot;comment&quot;&gt;// 'd', e.g. to delete&lt;/span&gt;
    setKey('q');                &lt;span class=&quot;comment&quot;&gt;// 'q', e.g. to quit&lt;/span&gt;
    setKey(Qt::CTRL + Qt::Key_P);       &lt;span class=&quot;comment&quot;&gt;// Ctrl+P, e.g. to print document&lt;/span&gt;
    setKey(&amp;quot;Ctrl+P&amp;quot;);           &lt;span class=&quot;comment&quot;&gt;// Ctrl+P, e.g. to print document&lt;/span&gt;&lt;/pre&gt;

@see &lt;a href=&quot;QShortcut.html#key()&quot;&gt;&lt;tt&gt;key&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setWhatsThis(java.lang.String text)" doc="/**
&lt;p&gt;Sets the shortcut's &amp;quot;What's This?&amp;quot; help text to &lt;tt&gt;text&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The text will be shown when the application is in &amp;quot;What's This?&amp;quot; mode and the user types the shortcut &lt;a href=&quot;QShortcut.html#key()&quot;&gt;&lt;tt&gt;key&lt;/tt&gt;&lt;/a&gt; sequence.&lt;/p&gt;
&lt;p&gt;To set &amp;quot;What's This?&amp;quot; help on a menu item (with or without a shortcut key), set the help on the item's action.&lt;/p&gt;

@see &lt;a href=&quot;QShortcut.html#whatsThis()&quot;&gt;&lt;tt&gt;whatsThis&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWhatsThis::inWhatsThisMode&lt;/tt&gt;
@see &lt;tt&gt;QAction::setWhatsThis&lt;/tt&gt; */"/>
    <method name="public final java.lang.String whatsThis()" doc="/**
&lt;p&gt;Returns the shortcut's &amp;quot;What's This?&amp;quot; help text.&lt;/p&gt;
&lt;p&gt;The text will be shown when the application is in &amp;quot;What's This?&amp;quot; mode and the user types the shortcut &lt;a href=&quot;QShortcut.html#key()&quot;&gt;&lt;tt&gt;key&lt;/tt&gt;&lt;/a&gt; sequence.&lt;/p&gt;
&lt;p&gt;To set &amp;quot;What's This?&amp;quot; help on a menu item (with or without a shortcut key), set the help on the item's action.&lt;/p&gt;

@see &lt;tt&gt;QWhatsThis::inWhatsThisMode&lt;/tt&gt;
@see &lt;tt&gt;QAction::setWhatsThis&lt;/tt&gt; */"/>
    <method name="public boolean event(com.trolltech.qt.core.QEvent e)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
</class>