[Kde-cygwin-cvs] CVS: qt-3/doc/man/man3 QAccel.3qt,1.1.1.3,1.1.1.4 QAccessible.3qt,1.1.1.3,1.1.1.4 Q
Status: Inactive
Brought to you by:
habacker
Update of /cvsroot/kde-cygwin/qt-3/doc/man/man3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9971/doc/man/man3 Modified Files: Tag: QT_WIN32_3_3_BRANCH QAccel.3qt QAccessible.3qt QAccessibleInterface.3qt QAction.3qt QApplication.3qt QAsciiCache.3qt QAsciiDictIterator.3qt QAssistantClient.3qt QAxAggregated.3qt QAxScriptManager.3qt QAxWidget.3qt QBitArray.3qt QBitmap.3qt QBoxLayout.3qt QButton.3qt QByteArray.3qt QCDEStyle.3qt QCache.3qt QCacheIterator.3qt QCanvasEllipse.3qt QCanvasItem.3qt QCanvasItemList.3qt QCanvasLine.3qt QCanvasPixmapArray.3qt QCanvasPolygon.3qt Log Message: Index: QAccel.3qt =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/man/man3/Attic/QAccel.3qt,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- QAccel.3qt 29 Jan 2005 11:12:43 -0000 1.1.1.3 +++ QAccel.3qt 30 Sep 2005 15:22:33 -0000 1.1.1.4 @@ -1 +1,324 @@ -.so man3/qaccel.3qt +'\" t +.TH QAccel 3qt "2 September 2005" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QAccel \- Handles keyboard accelerator and shortcut keys +.SH SYNOPSIS +\fC#include <qaccel.h>\fR +.PP +Inherits QObject. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "\fBQAccel\fR ( QWidget * parent, const char * name = 0 )" +.br +.ti -1c +.BI "\fBQAccel\fR ( QWidget * watch, QObject * parent, const char * name = 0 )" +.br +.ti -1c +.BI "\fB~QAccel\fR ()" +.br +.ti -1c +.BI "bool \fBisEnabled\fR () const" +.br +.ti -1c +.BI "void \fBsetEnabled\fR ( bool enable )" +.br +.ti -1c +.BI "uint \fBcount\fR () const" +.br +.ti -1c +.BI "int \fBinsertItem\fR ( const QKeySequence & key, int id = -1 )" +.br +.ti -1c +.BI "void \fBremoveItem\fR ( int id )" +.br +.ti -1c +.BI "void \fBclear\fR ()" +.br +.ti -1c +.BI "QKeySequence \fBkey\fR ( int id )" +.br +.ti -1c +.BI "int \fBfindKey\fR ( const QKeySequence & key ) const" +.br +.ti -1c +.BI "bool \fBisItemEnabled\fR ( int id ) const" +.br +.ti -1c +.BI "void \fBsetItemEnabled\fR ( int id, bool enable )" +.br +.ti -1c +.BI "bool \fBconnectItem\fR ( int id, const QObject * receiver, const char * member )" +.br +.ti -1c +.BI "bool \fBdisconnectItem\fR ( int id, const QObject * receiver, const char * member )" +.br +.ti -1c +.BI "void repairEventFilter () \fI(obsolete)\fR" +.br +.ti -1c +.BI "void \fBsetWhatsThis\fR ( int id, const QString & text )" +.br +.ti -1c +.BI "QString \fBwhatsThis\fR ( int id ) const" +.br +.in -1c +.SS "Signals" +.in +1c +.ti -1c +.BI "void \fBactivated\fR ( int id )" +.br +.ti -1c +.BI "void \fBactivatedAmbiguously\fR ( int id )" +.br +.in -1c +.SS "Static Public Members" +.in +1c +.ti -1c +.BI "QKeySequence \fBshortcutKey\fR ( const QString & str )" +.br +.ti -1c +.BI "QString keyToString ( QKeySequence k ) \fI(obsolete)\fR" +.br +.ti -1c +.BI "QKeySequence stringToKey ( const QString & s ) \fI(obsolete)\fR" +.br +.in -1c +.SS "Protected Members" +.in +1c +.ti -1c +.BI "virtual bool eventFilter ( QObject *, QEvent * ) \fI(obsolete)\fR" +.br +.in -1c +.SH DESCRIPTION +The QAccel class handles keyboard accelerator and shortcut keys. +.PP +A keyboard accelerator triggers an action when a certain key combination is pressed. The accelerator handles all keyboard activity for all the children of one top-level widget, so it is not affected by the keyboard focus. +.PP +In most cases, you will not need to use this class directly. Use the QAction class to create actions with accelerators that can be used in both menus and toolbars. If you're only interested in menus use QMenuData::insertItem() or QMenuData::setAccel() to make accelerators for operations that are also available on menus. Many widgets automatically generate accelerators, such as QButton, QGroupBox, QLabel (with QLabel::setBuddy()), QMenuBar and QTabBar. Example: +.PP +.nf +.br + QPushButton p( "&Exit", parent ); // automatic shortcut ALT+Key_E +.br + QPopupMenu *fileMenu = new fileMenu( parent ); +.br + fileMenu->insertItem( "Undo", parent, SLOT(undo()), CTRL+Key_Z ); +.br +.fi +.PP +A QAccel contains a list of accelerator items that can be manipulated using insertItem(), removeItem(), clear(), key() and findKey(). +.PP +Each accelerator item consists of an identifier and a QKeySequence. A single key sequence consists of a keyboard code combined with modifiers (SHIFT, CTRL, ALT or UNICODE_ACCEL). For example, \fCCTRL + Key_P\fR could be a shortcut for printing a document. The key codes are listed in qnamespace.h. As an alternative, use UNICODE_ACCEL with the unicode code point of the character. For example, \fCUNICODE_ACCEL + 'A'\fR gives the same accelerator as Key_A. +.PP +When an accelerator key is pressed, the accelerator sends out the signal activated() with a number that identifies this particular accelerator item. Accelerator items can also be individually connected, so that two different keys will activate two different slots (see connectItem() and disconnectItem()). +.PP +The activated() signal is \fInot\fR emitted when two or more accelerators match the same key. Instead, the first matching accelerator sends out the activatedAmbiguously() signal. By pressing the key multiple times, users can navigate between all matching accelerators. Some standard controls like QPushButton and QCheckBox connect the activatedAmbiguously() signal to the harmless setFocus() slot, whereas activated() is connected to a slot invoking the button's action. Most controls, like QLabel and QTabBar, treat activated() and activatedAmbiguously() as equivalent. +.PP +Use setEnabled() to enable or disable all the items in an accelerator, or setItemEnabled() to enable or disable individual items. An item is active only when both the QAccel and the item itself are enabled. +.PP +The function setWhatsThis() specifies a help text that appears when the user presses an accelerator key in What's This mode. +.PP +The accelerator will be deleted when \fIparent\fR is deleted, and will consume relevant key events until then. +.PP +Please note that the accelerator +.PP +.nf +.br + accelerator->insertItem( QKeySequence("M") ); +.br +.fi +can be triggered with both the 'M' key, and with Shift+M, unless a second accelerator is defined for the Shift+M combination. +.PP +Example: +.PP +.nf +.br + QAccel *a = new QAccel( myWindow ); // create accels for myWindow +.br + a->connectItem( a->insertItem(Key_P+CTRL), // adds Ctrl+P accelerator +.br + myWindow, // connected to myWindow's +.br + SLOT(printDoc()) ); // printDoc() slot +.br +.fi +.PP +See also QKeyEvent, QWidget::keyPressEvent(), QMenuData::setAccel(), QButton::accel, QLabel::setBuddy(), QKeySequence, GUI Design Handbook: Keyboard Shortcuts, and Miscellaneous Classes. +.SH MEMBER FUNCTION DOCUMENTATION +.SH "QAccel::QAccel ( QWidget * parent, const char * name = 0 )" +Constructs a QAccel object called \fIname\fR, with parent \fIparent\fR. The accelerator operates on \fIparent\fR. +.SH "QAccel::QAccel ( QWidget * watch, QObject * parent, const char * name = 0 )" +Constructs a QAccel object called \fIname\fR, that operates on \fIwatch\fR, and is a child of \fIparent\fR. +.PP +This constructor is not needed for normal application programming. +.SH "QAccel::~QAccel ()" +Destroys the accelerator object and frees all allocated resources. +.SH "void QAccel::activated ( int id )\fC [signal]\fR" +This signal is emitted when an accelerator key is pressed. \fIid\fR is a number that identifies this particular accelerator item. +.PP +See also activatedAmbiguously(). +.SH "void QAccel::activatedAmbiguously ( int id )\fC [signal]\fR" +This signal is emitted when an accelerator key is pressed. \fIid\fR is a number that identifies this particular accelerator item. +.PP +See also activated(). +.SH "void QAccel::clear ()" +Removes all accelerator items. +.SH "bool QAccel::connectItem ( int id, const QObject * receiver, const char * member )" +Connects the accelerator item \fIid\fR to the slot \fImember\fR of \fIreceiver\fR. +.PP +.nf +.br + a->connectItem( 201, mainView, SLOT(quit()) ); +.br +.fi +.PP +Of course, you can also send a signal as \fImember\fR. +.PP +Normally accelerators are connected to slots which then receive the \fCactivated(int id)\fR signal with the id of the accelerator item that was activated. If you choose to connect a specific accelerator item using this function, the activated() signal is emitted if the associated key sequence is pressed but no \fCactivated(int id)\fR signal is emitted. +.PP +See also disconnectItem(). +.PP +Example: t14/gamebrd.cpp. +.SH "uint QAccel::count () const" +Returns the number of accelerator items in this accelerator. +.SH "bool QAccel::disconnectItem ( int id, const QObject * receiver, const char * member )" +Disconnects an accelerator item with id \fIid\fR from the function called \fImember\fR in the \fIreceiver\fR object. +.PP +See also connectItem(). +.SH "bool QAccel::eventFilter ( QObject *, QEvent * )\fC [virtual protected]\fR" +\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. serves no purpose anymore +.PP +Reimplemented from QObject. +.SH "int QAccel::findKey ( const QKeySequence & key ) const" +Returns the identifier of the accelerator item with the key code \fIkey\fR, or -1 if the item cannot be found. +.SH "int QAccel::insertItem ( const QKeySequence & key, int id = -1 )" +Inserts an accelerator item and returns the item's identifier. +.PP +\fIkey\fR is a key code and an optional combination of SHIFT, CTRL and ALT. \fIid\fR is the accelerator item id. +.PP +If \fIid\fR is negative, then the item will be assigned a unique negative identifier less than -1. +.PP +.nf +.br + QAccel *a = new QAccel( myWindow ); // create accels for myWindow +.br + a->insertItem( CTRL + Key_P, 200 ); // Ctrl+P, e.g. to print document +.br + a->insertItem( ALT + Key_X, 201 ); // Alt+X, e.g. to quit +.br + a->insertItem( UNICODE_ACCEL + 'q', 202 ); // Unicode 'q', e.g. to quit +.br + a->insertItem( Key_D ); // gets a unique negative id < -1 +.br + a->insertItem( CTRL + SHIFT + Key_P ); // gets a unique negative id < -1 +.br +.fi +.PP +Example: t14/gamebrd.cpp. +.SH "bool QAccel::isEnabled () const" +Returns TRUE if the accelerator is enabled; otherwise returns FALSE. +.PP +See also setEnabled() and isItemEnabled(). +.SH "bool QAccel::isItemEnabled ( int id ) const" +Returns TRUE if the accelerator item with the identifier \fIid\fR is enabled. Returns FALSE if the item is disabled or cannot be found. +.PP +See also setItemEnabled() and isEnabled(). +.SH "QKeySequence QAccel::key ( int id )" +Returns the key sequence of the accelerator item with identifier \fIid\fR, or an invalid key sequence (0) if the id cannot be found. +.SH "QString QAccel::keyToString ( QKeySequence k )\fC [static]\fR" +\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. +.PP +Creates an accelerator string for the key \fIk\fR. For instance CTRL+Key_O gives "Ctrl+O". The "Ctrl" etc. are translated (using QObject::tr()) in the "QAccel" context. +.PP +The function is superfluous. Cast the QKeySequence \fIk\fR to a QString for the same effect. +.SH "void QAccel::removeItem ( int id )" +Removes the accelerator item with the identifier \fIid\fR. +.SH "void QAccel::repairEventFilter ()" +\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. serves no purpose anymore +.SH "void QAccel::setEnabled ( bool enable )" +Enables the accelerator if \fIenable\fR is TRUE, or disables it if \fIenable\fR is FALSE. +.PP +Individual keys can also be enabled or disabled using setItemEnabled(). To work, a key must be an enabled item in an enabled QAccel. +.PP +See also isEnabled() and setItemEnabled(). +.SH "void QAccel::setItemEnabled ( int id, bool enable )" +Enables the accelerator item with the identifier \fIid\fR if \fIenable\fR is TRUE, and disables item \fIid\fR if \fIenable\fR is FALSE. +.PP +To work, an item must be enabled and be in an enabled QAccel. +.PP +See also isItemEnabled() and isEnabled(). +.SH "void QAccel::setWhatsThis ( int id, const QString & text )" +Sets a What's This help text for the accelerator item \fIid\fR to \fItext\fR. +.PP +The text will be shown when the application is in What's This mode and the user hits the accelerator key. +.PP +To set What's This help on a menu item (with or without an accelerator key), use QMenuData::setWhatsThis(). +.PP +See also whatsThis(), QWhatsThis::inWhatsThisMode(), QMenuData::setWhatsThis(), and QAction::whatsThis. +.SH "QKeySequence QAccel::shortcutKey ( const QString & str )\fC [static]\fR" +Returns the shortcut key sequence for \fIstr\fR, or an invalid key sequence (0) if \fIstr\fR has no shortcut sequence. +.PP +For example, shortcutKey("E&xit") returns ALT+Key_X, shortcutKey("&Quit") returns ALT+Key_Q and shortcutKey("Quit") returns 0. (In code that does not inherit the Qt namespace class, you must write e.g. Qt::ALT+Qt::Key_Q.) +.PP +We provide a list of common accelerators in English. At the time of writing, Microsoft and Open Group do not appear to have issued equivalent recommendations for other languages. +.SH "QKeySequence QAccel::stringToKey ( const QString & s )\fC [static]\fR" +\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. +.PP +Returns an accelerator code for the string \fIs\fR. For example" Ctrl+O" gives CTRL+UNICODE_ACCEL+'O'. The strings "Ctrl"," Shift", "Alt" are recognized, as well as their translated equivalents in the "QAccel" context (using QObject::tr()). Returns 0 if \fIs\fR is not recognized. +.PP +This function is typically used with tr(), so that accelerator keys can be replaced in translations: +.PP +.nf +.br + QPopupMenu *file = new QPopupMenu( this ); +.br + file->insertItem( p1, tr("&Open..."), this, SLOT(open()), +.br + QAccel::stringToKey(tr("Ctrl+O", "File|Open")) ); +.br +.fi +.PP +Notice the \fC"File|Open"\fR translator comment. It is by no means necessary, but it provides some context for the human translator. +.PP +The function is superfluous. Construct a QKeySequence from the string \fIs\fR for the same effect. +.PP +See also QObject::tr() and Internationalization with Qt. +.PP +Example: i18n/mywidget.cpp. +.SH "QString QAccel::whatsThis ( int id ) const" +Returns the What's This help text for the specified item \fIid\fR or QString::null if no text has been specified. +.PP +See also setWhatsThis(). + +.SH "SEE ALSO" +.BR http://doc.trolltech.com/qaccel.html +.BR http://www.trolltech.com/faq/tech.html +.SH COPYRIGHT +Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the +license file included in the distribution for a complete license +statement. +.SH AUTHOR +Generated automatically from the source code. +.SH BUGS +If you find a bug in Qt, please report it as described in +.BR http://doc.trolltech.com/bughowto.html . +Good bug reports help us to help you. Thank you. +.P +The definitive Qt documentation is provided in HTML format; it is +located at $QTDIR/doc/html and can be read using Qt Assistant or with +a web browser. This man page is provided as a convenience for those +users who prefer man pages, although this format is not officially +supported by Trolltech. +.P +If you find errors in this manual page, please report them to +.BR qt...@tr... . +Please include the name of the manual page (qaccel.3qt) and the Qt +version (3.3.5). Index: QAccessible.3qt =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/man/man3/Attic/QAccessible.3qt,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- QAccessible.3qt 29 Jan 2005 11:12:43 -0000 1.1.1.3 +++ QAccessible.3qt 30 Sep 2005 15:22:33 -0000 1.1.1.4 @@ -1 +1,399 @@ -.so man3/qaccessible.3qt +'\" t +.TH QAccessible 3qt "2 September 2005" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QAccessible \- Enums and static functions relating to accessibility +.SH SYNOPSIS +\fC#include <qaccessible.h>\fR +.PP +Inherited by QAccessibleInterface. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "enum \fBEvent\fR { SoundPlayed = 0x0001, Alert = 0x0002, ForegroundChanged = 0x0003, MenuStart = 0x0004, MenuEnd = 0x0005, PopupMenuStart = 0x0006, PopupMenuEnd = 0x0007, ContextHelpStart = 0x000C, ContextHelpEnd = 0x000D, DragDropStart = 0x000E, DragDropEnd = 0x000F, DialogStart = 0x0010, DialogEnd = 0x0011, ScrollingStart = 0x0012, ScrollingEnd = 0x0013, MenuCommand = 0x0018, ObjectCreated = 0x8000, ObjectDestroyed = 0x8001, ObjectShow = 0x8002, ObjectHide = 0x8003, ObjectReorder = 0x8004, Focus = 0x8005, Selection = 0x8006, SelectionAdd = 0x8007, SelectionRemove = 0x8008, SelectionWithin = 0x8009, StateChanged = 0x800A, LocationChanged = 0x800B, NameChanged = 0x800C, DescriptionChanged = 0x800D, ValueChanged = 0x800E, ParentChanged = 0x800F, HelpChanged = 0x80A0, DefaultActionChanged = 0x80B0, AcceleratorChanged = 0x80C0 }" +.br +.ti -1c +.BI "enum \fBState\fR { Normal = 0x00000000, Unavailable = 0x00000001, Selected = 0x00000002, Focused = 0x00000004, Pressed = 0x00000008, Checked = 0x00000010, Mixed = 0x00000020, ReadOnly = 0x00000040, HotTracked = 0x00000080, Default = 0x00000100, Expanded = 0x00000200, Collapsed = 0x00000400, Busy = 0x00000800, Floating = 0x00001000, Marqueed = 0x00002000, Animated = 0x00004000, Invisible = 0x00008000, Offscreen = 0x00010000, Sizeable = 0x00020000, Moveable = 0x00040000, SelfVoicing = 0x00080000, Focusable = 0x00100000, Selectable = 0x00200000, Linked = 0x00400000, Traversed = 0x00800000, MultiSelectable = 0x01000000, ExtSelectable = 0x02000000, AlertLow = 0x04000000, AlertMedium = 0x08000000, AlertHigh = 0x10000000, Protected = 0x20000000, Valid = 0x3fffffff }" +.br +.ti -1c +.BI "enum \fBRole\fR { NoRole = 0x00000000, TitleBar = 0x00000001, MenuBar = 0x00000002, ScrollBar = 0x00000003, Grip = 0x00000004, Sound = 0x00000005, Cursor = 0x00000006, Caret = 0x00000007, AlertMessage = 0x00000008, Window = 0x00000009, Client = 0x0000000A, PopupMenu = 0x0000000B, MenuItem = 0x0000000C, ToolTip = 0x0000000D, Application = 0x0000000E, Document = 0x0000000F, Pane = 0x00000010, Chart = 0x00000011, Dialog = 0x00000012, Border = 0x00000013, Grouping = 0x00000014, Separator = 0x00000015, ToolBar = 0x00000016, StatusBar = 0x00000017, Table = 0x00000018, ColumnHeader = 0x00000019, RowHeader = 0x0000001A, Column = 0x0000001B, Row = 0x0000001C, Cell = 0x0000001D, Link = 0x0000001E, HelpBalloon = 0x0000001F, Character = 0x00000020, List = 0x00000021, ListItem = 0x00000022, Outline = 0x00000023, OutlineItem = 0x00000024, PageTab = 0x00000025, PropertyPage = 0x00000026, Indicator = 0x00000027, Graphic = 0x00000028, StaticText = 0x00000029, EditableText = 0x0000002A, PushButton = 0x0000002B, CheckBox = 0x0000002C, RadioButton = 0x0000002D, ComboBox = 0x0000002E, DropLest = 0x0000002F, ProgressBar = 0x00000030, Dial = 0x00000031, HotkeyField = 0x00000032, Slider = 0x00000033, SpinBox = 0x00000034, Diagram = 0x00000035, Animation = 0x00000036, Equation = 0x00000037, ButtonDropDown = 0x00000038, ButtonMenu = 0x00000039, ButtonDropGrid = 0x0000003A, Whitespace = 0x0000003B, PageTabList = 0x0000003C, Clock = 0x0000003D }" +.br +.ti -1c +.BI "enum \fBNavDirection\fR { NavUp = 0x00000001, NavDown = 0x00000002, NavLeft = 0x00000003, NavRight = 0x00000004, NavNext = 0x00000005, NavPrevious = 0x00000006, NavFirstChild = 0x00000007, NavLastChild = 0x00000008, NavFocusChild = 0x00000009 }" +.br +.ti -1c +.BI "enum \fBText\fR { Name = 0, Description, Value, Help, Accelerator, DefaultAction }" +.br +.in -1c +.SS "Static Public Members" +.in +1c +.ti -1c +.BI "QRESULT \fBqueryAccessibleInterface\fR ( QObject * object, QAccessibleInterface ** iface )" +.br +.ti -1c +.BI "void \fBupdateAccessibility\fR ( QObject * object, int control, Event reason )" +.br +.ti -1c +.BI "bool \fBisActive\fR ()" +.br +.in -1c +.SH DESCRIPTION +The QAccessible class provides enums and static functions relating to accessibility. +.PP +Accessibility clients use implementations of the QAccessibleInterface to read the information an accessible object exposes, or to call functions to manipulate the accessible object. +.PP +See the plugin documentation for more details about how to redistribute Qt plugins. +.PP +See also Miscellaneous Classes. +.SS "Member Type Documentation" +.SH "QAccessible::Event" +This enum type defines event types when the state of the accessible object has changed. The event types are: +.TP +\fCQAccessible::SoundPlayed\fR +.TP +\fCQAccessible::Alert\fR +.TP +\fCQAccessible::ForegroundChanged\fR +.TP +\fCQAccessible::MenuStart\fR +.TP +\fCQAccessible::MenuEnd\fR +.TP +\fCQAccessible::PopupMenuStart\fR +.TP +\fCQAccessible::PopupMenuEnd\fR +.TP +\fCQAccessible::ContextHelpStart\fR +.TP +\fCQAccessible::ContextHelpEnd\fR +.TP +\fCQAccessible::DragDropStart\fR +.TP +\fCQAccessible::DragDropEnd\fR +.TP +\fCQAccessible::DialogStart\fR +.TP +\fCQAccessible::DialogEnd\fR +.TP +\fCQAccessible::ScrollingStart\fR +.TP +\fCQAccessible::ScrollingEnd\fR +.TP +\fCQAccessible::ObjectCreated\fR +.TP +\fCQAccessible::ObjectDestroyed\fR +.TP +\fCQAccessible::ObjectShow\fR +.TP +\fCQAccessible::ObjectHide\fR +.TP +\fCQAccessible::ObjectReorder\fR +.TP +\fCQAccessible::Focus\fR +.TP +\fCQAccessible::Selection\fR +.TP +\fCQAccessible::SelectionAdd\fR +.TP +\fCQAccessible::SelectionRemove\fR +.TP +\fCQAccessible::SelectionWithin\fR +.TP +\fCQAccessible::StateChanged\fR +.TP +\fCQAccessible::LocationChanged\fR +.TP +\fCQAccessible::NameChanged\fR +.TP +\fCQAccessible::DescriptionChanged\fR +.TP +\fCQAccessible::ValueChanged\fR +.TP +\fCQAccessible::ParentChanged\fR +.TP +\fCQAccessible::HelpChanged\fR +.TP +\fCQAccessible::DefaultActionChanged\fR +.TP +\fCQAccessible::AcceleratorChanged\fR +.TP +\fCQAccessible::MenuCommand\fR +.SH "QAccessible::NavDirection" +This enum specifies which item to move to when navigating. +.TP +\fCQAccessible::NavUp\fR - sibling above +.TP +\fCQAccessible::NavDown\fR - sibling below +.TP +\fCQAccessible::NavLeft\fR - left sibling +.TP +\fCQAccessible::NavRight\fR - right sibling +.TP +\fCQAccessible::NavNext\fR - next sibling +.TP +\fCQAccessible::NavPrevious\fR - previous sibling +.TP +\fCQAccessible::NavFirstChild\fR - first child +.TP +\fCQAccessible::NavLastChild\fR - last child +.TP +\fCQAccessible::NavFocusChild\fR - child with focus +.SH "QAccessible::Role" +This enum defines a number of roles an accessible object can have. The roles are: +.TP +\fCQAccessible::NoRole\fR +.TP +\fCQAccessible::TitleBar\fR +.TP +\fCQAccessible::MenuBar\fR +.TP +\fCQAccessible::ScrollBar\fR +.TP +\fCQAccessible::Grip\fR +.TP +\fCQAccessible::Sound\fR +.TP +\fCQAccessible::Cursor\fR +.TP +\fCQAccessible::Caret\fR +.TP +\fCQAccessible::AlertMessage\fR +.TP +\fCQAccessible::Window\fR +.TP +\fCQAccessible::Client\fR +.TP +\fCQAccessible::PopupMenu\fR +.TP +\fCQAccessible::MenuItem\fR +.TP +\fCQAccessible::ToolTip\fR +.TP +\fCQAccessible::Application\fR +.TP +\fCQAccessible::Document\fR +.TP +\fCQAccessible::Pane\fR +.TP +\fCQAccessible::Chart\fR +.TP +\fCQAccessible::Dialog\fR +.TP +\fCQAccessible::Border\fR +.TP +\fCQAccessible::Grouping\fR +.TP +\fCQAccessible::Separator\fR +.TP +\fCQAccessible::ToolBar\fR +.TP +\fCQAccessible::StatusBar\fR +.TP +\fCQAccessible::Table\fR +.TP +\fCQAccessible::ColumnHeader\fR +.TP +\fCQAccessible::RowHeader\fR +.TP +\fCQAccessible::Column\fR +.TP +\fCQAccessible::Row\fR +.TP +\fCQAccessible::Cell\fR +.TP +\fCQAccessible::Link\fR +.TP +\fCQAccessible::HelpBalloon\fR +.TP +\fCQAccessible::Character\fR +.TP +\fCQAccessible::List\fR +.TP +\fCQAccessible::ListItem\fR +.TP +\fCQAccessible::Outline\fR +.TP +\fCQAccessible::OutlineItem\fR +.TP +\fCQAccessible::PageTab\fR +.TP +\fCQAccessible::PropertyPage\fR +.TP +\fCQAccessible::Indicator\fR +.TP +\fCQAccessible::Graphic\fR +.TP +\fCQAccessible::StaticText\fR +.TP +\fCQAccessible::EditableText\fR +.TP +\fCQAccessible::PushButton\fR +.TP +\fCQAccessible::CheckBox\fR +.TP +\fCQAccessible::RadioButton\fR +.TP +\fCQAccessible::ComboBox\fR +.TP +\fCQAccessible::DropLest\fR +.TP +\fCQAccessible::ProgressBar\fR +.TP +\fCQAccessible::Dial\fR +.TP +\fCQAccessible::HotkeyField\fR +.TP +\fCQAccessible::Slider\fR +.TP +\fCQAccessible::SpinBox\fR +.TP +\fCQAccessible::Diagram\fR +.TP +\fCQAccessible::Animation\fR +.TP +\fCQAccessible::Equation\fR +.TP +\fCQAccessible::ButtonDropDown\fR +.TP +\fCQAccessible::ButtonMenu\fR +.TP +\fCQAccessible::ButtonDropGrid\fR +.TP +\fCQAccessible::Whitespace\fR +.TP +\fCQAccessible::PageTabList\fR +.TP +\fCQAccessible::Clock\fR +.SH "QAccessible::State" +This enum type defines bitflags that can be combined to indicate the state of the accessible object. The values are: +.TP +\fCQAccessible::Normal\fR +.TP +\fCQAccessible::Unavailable\fR +.TP +\fCQAccessible::Selected\fR +.TP +\fCQAccessible::Focused\fR +.TP +\fCQAccessible::Pressed\fR +.TP +\fCQAccessible::Checked\fR +.TP +\fCQAccessible::Mixed\fR +.TP +\fCQAccessible::ReadOnly\fR +.TP +\fCQAccessible::HotTracked\fR +.TP +\fCQAccessible::Default\fR +.TP +\fCQAccessible::Expanded\fR +.TP +\fCQAccessible::Collapsed\fR +.TP +\fCQAccessible::Busy\fR +.TP +\fCQAccessible::Floating\fR +.TP +\fCQAccessible::Marqueed\fR +.TP +\fCQAccessible::Animated\fR +.TP +\fCQAccessible::Invisible\fR +.TP +\fCQAccessible::Offscreen\fR +.TP +\fCQAccessible::Sizeable\fR +.TP +\fCQAccessible::Moveable\fR +.TP +\fCQAccessible::SelfVoicing\fR +.TP +\fCQAccessible::Focusable\fR +.TP +\fCQAccessible::Selectable\fR +.TP +\fCQAccessible::Linked\fR +.TP +\fCQAccessible::Traversed\fR +.TP +\fCQAccessible::MultiSelectable\fR +.TP +\fCQAccessible::ExtSelectable\fR +.TP +\fCQAccessible::AlertLow\fR +.TP +\fCQAccessible::AlertMedium\fR +.TP +\fCQAccessible::AlertHigh\fR +.TP +\fCQAccessible::Protected\fR +.TP +\fCQAccessible::Valid\fR +.SH "QAccessible::Text" +This enum specifies string information that an accessible object returns. +.TP +\fCQAccessible::Name\fR - The name of the object +.TP +\fCQAccessible::Description\fR - A short text describing the object +.TP +\fCQAccessible::Value\fR - The value of the object +.TP +\fCQAccessible::Help\fR - A longer text giving information about how to use the object +.TP +\fCQAccessible::DefaultAction\fR - The default method to interact with the object +.TP +\fCQAccessible::Accelerator\fR - The keyboard shortcut that executes the default action +.SH MEMBER FUNCTION DOCUMENTATION +.SH "bool QAccessible::isActive ()\fC [static]\fR" +Returns TRUE if an accessibility implementation has been requested, during the runtime of the application, otherwise returns FALSE. +.PP +Use this function to prevent potentially expensive notifications via updateAccessibility(). +.SH "QRESULT QAccessible::queryAccessibleInterface ( QObject * object, QAccessibleInterface ** iface )\fC [static]\fR" +Sets \fIiface\fR to point to the implementation of the QAccessibleInterface for \fIobject\fR, and returns \fCQS_OK\fR if successfull, or sets \fIiface\fR to 0 and returns \fCQE_NOCOMPONENT\fR if no accessibility implementation for \fIobject\fR exists. +.PP +The function uses the classname of \fIobject\fR to find a suitable implementation. If no implementation for the object's class is available the function tries to find an implementation for the object's parent class. +.PP +This function is called to answer an accessibility client's request for object information. You should never need to call this function yourself. +.SH "void QAccessible::updateAccessibility ( QObject * object, int control, Event reason )\fC [static]\fR" +Notifies accessibility clients about a change in \fIobject\fR's accessibility information. +.PP +\fIreason\fR specifies the cause of the change, for example, ValueChange when the position of a slider has been changed. \fIcontrol\fR is the ID of the child element that has changed. When \fIcontrol\fR is 0, the object itself has changed. +.PP +Call this function whenever the state of your accessible object or one of it's sub-elements has been changed either programmatically (e.g. by calling QLabel::setText()) or by user interaction. +.PP +If there are no accessibility tools listening to this event, the +performance penalty for calling this function is minor, but if determining +the parameters of the call is expensive you can use isActive() to +avoid unnecessary performance penalties if no client is listening. + +.SH "SEE ALSO" +.BR http://doc.trolltech.com/qaccessible.html +.BR http://www.trolltech.com/faq/tech.html +.SH COPYRIGHT +Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the +license file included in the distribution for a complete license +statement. +.SH AUTHOR +Generated automatically from the source code. +.SH BUGS +If you find a bug in Qt, please report it as described in +.BR http://doc.trolltech.com/bughowto.html . +Good bug reports help us to help you. Thank you. +.P +The definitive Qt documentation is provided in HTML format; it is +located at $QTDIR/doc/html and can be read using Qt Assistant or with +a web browser. This man page is provided as a convenience for those +users who prefer man pages, although this format is not officially +supported by Trolltech. +.P +If you find errors in this manual page, please report them to +.BR qt...@tr... . +Please include the name of the manual page (qaccessible.3qt) and the Qt +version (3.3.5). Index: QAccessibleInterface.3qt =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/man/man3/Attic/QAccessibleInterface.3qt,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- QAccessibleInterface.3qt 29 Jan 2005 11:12:43 -0000 1.1.1.3 +++ QAccessibleInterface.3qt 30 Sep 2005 15:22:33 -0000 1.1.1.4 @@ -1 +1,178 @@ -.so man3/qaccessibleinterface.3qt +'\" t +.TH QAccessibleInterface 3qt "2 September 2005" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QAccessibleInterface \- Defines an interface that exposes information about accessible objects +.SH SYNOPSIS +\fC#include <qaccessible.h>\fR +.PP +Inherits QAccessible. +.PP +Inherited by QAccessibleObject. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "virtual bool \fBisValid\fR () const = 0" +.br +.ti -1c +.BI "virtual int \fBchildCount\fR () const = 0" +.br +.ti -1c +.BI "virtual QRESULT \fBqueryChild\fR ( int control, QAccessibleInterface ** iface ) const = 0" +.br +.ti -1c +.BI "virtual QRESULT \fBqueryParent\fR ( QAccessibleInterface ** iface ) const = 0" +.br +.ti -1c +.BI "virtual int \fBcontrolAt\fR ( int x, int y ) const = 0" +.br +.ti -1c +.BI "virtual QRect \fBrect\fR ( int control ) const = 0" +.br +.ti -1c +.BI "virtual int \fBnavigate\fR ( NavDirection direction, int startControl ) const = 0" +.br +.ti -1c +.BI "virtual QString \fBtext\fR ( Text t, int control ) const = 0" +.br +.ti -1c +.BI "virtual void \fBsetText\fR ( Text t, int control, const QString & text ) = 0" +.br +.ti -1c +.BI "virtual Role \fBrole\fR ( int control ) const = 0" +.br +.ti -1c +.BI "virtual State \fBstate\fR ( int control ) const = 0" +.br +.ti -1c +.BI "virtual QMemArray<int> \fBselection\fR () const = 0" +.br +.ti -1c +.BI "virtual bool \fBdoDefaultAction\fR ( int control ) = 0" +.br +.ti -1c +.BI "virtual bool \fBsetFocus\fR ( int control ) = 0" +.br +.ti -1c +.BI "virtual bool \fBsetSelected\fR ( int control, bool on, bool extend ) = 0" +.br +.ti -1c +.BI "virtual void \fBclearSelection\fR () = 0" +.br +.in -1c +.SH DESCRIPTION +The QAccessibleInterface class defines an interface that exposes information about accessible objects. +.PP +See also Miscellaneous Classes. +.SH MEMBER FUNCTION DOCUMENTATION +.SH "int QAccessibleInterface::childCount () const\fC [pure virtual]\fR" +Returns the number of children that belong to this object. A child can provide accessibility information on it's own (e.g. a child widget), or be a sub-element of this accessible object. +.PP +All objects provide this information. +.PP +See also queryChild(). +.SH "void QAccessibleInterface::clearSelection ()\fC [pure virtual]\fR" +Removes any selection from the object. +.PP +See also setSelected(). +.SH "int QAccessibleInterface::controlAt ( int x, int y ) const\fC [pure virtual]\fR" +Returns the ID of the child that contains the screen coordinates (\fIx\fR, \fIy\fR). This function returns 0 if the point is positioned on the object itself. If the tested point is outside the boundaries of the object this function returns -1. +.PP +All visual objects provide this information. +.SH "bool QAccessibleInterface::doDefaultAction ( int control )\fC [pure virtual]\fR" +Calling this function performs the default action of the child object specified by \fIcontrol\fR, or the default action of the object itself if \fIcontrol\fR is 0. +.SH "bool QAccessibleInterface::isValid () const\fC [pure virtual]\fR" +Returns TRUE if all the data necessary to use this interface implementation is valid (e.g. all pointers are non-null), otherwise returns FALSE. +.SH "int QAccessibleInterface::navigate ( NavDirection direction, int startControl ) const\fC [pure virtual]\fR" +This function traverses to another object, or to a sub-element of the current object. \fIdirection\fR specifies in which direction to navigate, and \fIstartControl\fR specifies the start point of the navigation, which is either 0 if the navigation starts at the object itself, or an ID of one of the object's sub-elements. +.PP +The function returns the ID of the sub-element located in the \fIdirection\fR specified. If there is nothing in the navigated \fIdirection\fR, this function returns -1. +.PP +All objects support navigation. +.SH "QRESULT QAccessibleInterface::queryChild ( int control, QAccessibleInterface ** iface ) const\fC [pure virtual]\fR" +Sets \fIiface\fR to point to the implementation of the QAccessibleInterface for the child specified with \fIcontrol\fR. If the child doesn't provide accessibility information on it's own, the value of \fIiface\fR is set to 0. For those elements, this object is responsible for exposing the child's properties. +.PP +All objects provide this information. +.PP +See also childCount() and queryParent(). +.SH "QRESULT QAccessibleInterface::queryParent ( QAccessibleInterface ** iface ) const\fC [pure virtual]\fR" +Sets \fIiface\fR to point to the implementation of the QAccessibleInterface for the parent object, or to 0 if there is no such implementation or object. +.PP +All objects provide this information. +.PP +See also queryChild(). +.SH "QRect QAccessibleInterface::rect ( int control ) const\fC [pure virtual]\fR" +Returns the location of the child specified with \fIcontrol\fR in screen coordinates. This function returns the location of the object itself if \fIcontrol\fR is 0. +.PP +All visual objects provide this information. +.SH "Role QAccessibleInterface::role ( int control ) const\fC [pure virtual]\fR" +Returns the role of the object if \fIcontrol\fR is 0, or the role of the object's sub-element with ID \fIcontrol\fR. The role of an object is usually static. All accessible objects have a role. +.PP +See also text(), state(), and selection(). +.SH "QMemArray<int> QAccessibleInterface::selection () const\fC [pure virtual]\fR" +Returns the list of all the element IDs that are selected. +.PP +See also text(), role(), and state(). +.SH "bool QAccessibleInterface::setFocus ( int control )\fC [pure virtual]\fR" +Gives the focus to the child object specified by \fIcontrol\fR, or to the object itself if \fIcontrol\fR is 0. +.PP +Returns TRUE if the focus could be set; otherwise returns FALSE. +.SH "bool QAccessibleInterface::setSelected ( int control, bool on, bool extend )\fC [pure virtual]\fR" +Sets the selection of the child object with ID \fIcontrol\fR to \fIon\fR. If \fIextend\fR is TRUE, all child elements between the focused item and the specified child object have their selection set to \fIon\fR. +.PP +Returns TRUE if the selection could be set; otherwise returns FALSE. +.PP +See also setFocus() and clearSelection(). +.SH "void QAccessibleInterface::setText ( Text t, int control, const QString & text )\fC [pure virtual]\fR" +Sets the text property \fIt\fR of the child object \fIcontrol\fR to \fItext\fR. If \fIcontrol\fR is 0, the text property of the object itself is set. +.SH "State QAccessibleInterface::state ( int control ) const\fC [pure virtual]\fR" +Returns the current state of the object if \fIcontrol\fR is 0, or the state of the object's sub-element element with ID \fIcontrol\fR. All objects have a state. +.PP +See also text(), role(), and selection(). +.SH "QString QAccessibleInterface::text ( Text t, int control ) const\fC [pure virtual]\fR" +Returns a string property \fIt\fR of the child object specified by \fIcontrol\fR, or the string property of the object itself if \fIcontrol\fR is 0. +.PP +The \fIName\fR is a string used by clients to identify, find or announce an accessible object for the user. All objects must have a name that is unique within their container. +.PP +An accessible object's \fIDescription\fR provides textual information about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but is also used for context searching or other applications. Not all objects have a description. An "OK" button would not need a description, but a toolbutton that shows a picture of a smiley would. +.PP +The \fIValue\fR of an accessible object represents visual information contained by the object, e.g. the text in a line edit. Usually, the value can be modified by the user. Not all objects have a value, e.g. static text labels don't, and some objects have a state that already is the value, e.g. toggle buttons. +.PP +The \fIHelp\fR text provides information about the function and usage of an accessible object. Not all objects provide this information. +.PP +An accessible object's \fIDefaultAction\fR describes the object's primary method of manipulation, and should be a verb or a short phrase, e.g. "Press" for a button. +.PP +The accelerator is a keyboard shortcut that activates the default action of the object. A keyboard shortcut is the underlined character in the text of a menu, menu item or control, and is either the character itself, or a combination of this character and a modifier key like ALT, CTRL or SHIFT. Command controls like tool buttons also have shortcut keys and usually display them in their tooltip. +.PP +See also role(), state(), and selection(). + +.SH "SEE ALSO" +.BR http://doc.trolltech.com/qaccessibleinterface.html +.BR http://www.trolltech.com/faq/tech.html +.SH COPYRIGHT +Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the +license file included in the distribution for a complete license +statement. +.SH AUTHOR +Generated automatically from the source code. +.SH BUGS +If you find a bug in Qt, please report it as described in +.BR http://doc.trolltech.com/bughowto.html . +Good bug reports help us to help you. Thank you. +.P +The definitive Qt documentation is provided in HTML format; it is +located at $QTDIR/doc/html and can be read using Qt Assistant or with +a web browser. This man page is provided as a convenience for those +users who prefer man pages, although this format is not officially +supported by Trolltech. +.P +If you find errors in this manual page, please report them to +.BR qt...@tr... . +Please include the name of the manual page (qaccessibleinterface.3qt) and the Qt +version (3.3.5). Index: QAction.3qt =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/man/man3/Attic/QAction.3qt,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- QAction.3qt 29 Jan 2005 11:12:43 -0000 1.1.1.3 +++ QAction.3qt 30 Sep 2005 15:22:33 -0000 1.1.1.4 @@ -1 +1,536 @@ -.so man3/qaction.3qt +'\" t +.TH QAction 3qt "2 September 2005" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QAction \- Abstract user interface action that can appear both in menus and tool bars +.SH SYNOPSIS +\fC#include <qaction.h>\fR +.PP +Inherits QObject. +.PP +Inherited by QActionGroup. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "\fBQAction\fR ( QObject * parent, const char * name = 0 )" +.br +.ti -1c +.BI "\fBQAction\fR ( const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0 )" +.br +.ti -1c +.BI "\fBQAction\fR ( const QIconSet & icon, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0 )" +.br +.ti -1c +.BI "QAction ( const QString & text, const QIconSet & icon, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0, bool toggle = FALSE ) \fI(obsolete)\fR" +.br +.ti -1c +.BI "QAction ( const QString & text, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0, bool toggle = FALSE ) \fI(obsolete)\fR" +.br +.ti -1c +.BI "QAction ( QObject * parent, const char * name, bool toggle ) \fI(obsolete)\fR" +.br +.ti -1c +.BI "\fB~QAction\fR ()" +.br +.ti -1c +.BI "virtual void \fBsetIconSet\fR ( const QIconSet & )" +.br +.ti -1c +.BI "QIconSet \fBiconSet\fR () const" +.br +.ti -1c +.BI "virtual void \fBsetText\fR ( const QString & )" +.br +.ti -1c +.BI "QString \fBtext\fR () const" +.br +.ti -1c +.BI "virtual void \fBsetMenuText\fR ( const QString & )" +.br +.ti -1c +.BI "QString \fBmenuText\fR () const" +.br +.ti -1c +.BI "virtual void \fBsetToolTip\fR ( const QString & )" +.br +.ti -1c +.BI "QString \fBtoolTip\fR () const" +.br +.ti -1c +.BI "virtual void \fBsetStatusTip\fR ( const QString & )" +.br +.ti -1c +.BI "QString \fBstatusTip\fR () const" +.br +.ti -1c +.BI "virtual void \fBsetWhatsThis\fR ( const QString & )" +.br +.ti -1c +.BI "QString \fBwhatsThis\fR () const" +.br +.ti -1c +.BI "virtual void \fBsetAccel\fR ( const QKeySequence & key )" +.br +.ti -1c +.BI "QKeySequence \fBaccel\fR () const" +.br +.ti -1c +.BI "virtual void \fBsetToggleAction\fR ( bool )" +.br +.ti -1c +.BI "bool \fBisToggleAction\fR () const" +.br +.ti -1c +.BI "bool \fBisOn\fR () const" +.br +.ti -1c +.BI "bool \fBisEnabled\fR () const" +.br +.ti -1c +.BI "bool \fBisVisible\fR () const" +.br +.ti -1c +.BI "virtual bool \fBaddTo\fR ( QWidget * w )" +.br +.ti -1c +.BI "virtual bool \fBremoveFrom\fR ( QWidget * w )" +.br +.in -1c +.SS "Public Slots" +.in +1c +.ti -1c +.BI "void \fBactivate\fR ()" +.br +.ti -1c +.BI "void \fBtoggle\fR ()" +.br +.ti -1c +.BI "virtual void \fBsetOn\fR ( bool )" +.br +.ti -1c +.BI "virtual void \fBsetEnabled\fR ( bool )" +.br +.ti -1c +.BI "void \fBsetDisabled\fR ( bool disable )" +.br +.ti -1c +.BI "void \fBsetVisible\fR ( bool )" +.br +.in -1c +.SS "Signals" +.in +1c +.ti -1c +.BI "void \fBactivated\fR ()" +.br +.ti -1c +.BI "void \fBtoggled\fR ( bool on )" +.br +.in -1c +.SS "Properties" +.in +1c +.ti -1c +.BI "QKeySequence \fBaccel\fR - the action's accelerator key" +.br +.ti -1c +.BI "bool \fBenabled\fR - whether the action is enabled" +.br +.ti -1c +.BI "QIconSet \fBiconSet\fR - the action's icon" +.br +.ti -1c +.BI "QString \fBmenuText\fR - the action's menu text" +.br +.ti -1c +.BI "bool \fBon\fR - whether a toggle action is on" +.br +.ti -1c +.BI "QString \fBstatusTip\fR - the action's status tip" +.br +.ti -1c +.BI "QString \fBtext\fR - the action's descriptive text" +.br +.ti -1c +.BI "bool \fBtoggleAction\fR - whether the action is a toggle action" +.br +.ti -1c +.BI "QString \fBtoolTip\fR - the action's tool tip" +.br +.ti -1c +.BI "bool \fBvisible\fR - whether the action can be seen (e.g. in menus and " "toolbars" ")" +.br +.ti -1c +.BI "QString \fBwhatsThis\fR - the action's ""What's This?"" help text" +.br +.in -1c +.SS "Protected Members" +.in +1c +.ti -1c +.BI "virtual void \fBaddedTo\fR ( QWidget * actionWidget, QWidget * container )" +.br +.ti -1c +.BI "virtual void \fBaddedTo\fR ( int index, QPopupMenu * menu )" +.br +.in -1c +.SH DESCRIPTION +The QAction class provides an abstract user interface action that can appear both in menus and tool bars. +.PP +In GUI applications many commands can be invoked via a menu option, a toolbar button and a keyboard accelerator. Since the same action must be performed regardless of how the action was invoked, and since the menu and toolbar should be kept in sync, it is useful to represent a command as an \fIaction\fR. An action can be added to a menu and a toolbar and will automatically keep them in sync. For example, if the user presses a Bold toolbar button the Bold menu item will automatically be checked. +.PP +A QAction may contain an icon, a menu text, an accelerator, a status text, a whats this text and a tool tip. Most of these can be set in the constructor. They can also be set independently with setIconSet(), setText(), setMenuText(), setToolTip(), setStatusTip(), setWhatsThis() and setAccel(). +.PP +An action may be a toggle action e.g. a Bold toolbar button, or a command action, e.g. 'Open File' to invoke an open file dialog. Toggle actions emit the toggled() signal when their state changes. Both command and toggle actions emit the activated() signal when they are invoked. Use setToggleAction() to set an action's toggled status. To see if an action is a toggle action use isToggleAction(). A toggle action may be "on", isOn() returns TRUE, or "off", isOn() returns FALSE. +.PP +Actions are added to widgets (menus or toolbars) using addTo(), and removed using removeFrom(). +.PP +Once a QAction has been created it should be added to the relevant menu and toolbar and then connected to the slot which will perform the action. For example: +.PP +.nf +.br + fileOpenAction = new QAction( QPixmap( fileopen ), "&Open...", +.br + CTRL+Key_O, this, "open" ); +.br + connect( fileOpenAction, SIGNAL( activated() ) , this, SLOT( choose() ) ); +.fi +.PP +We create a "File Save" action with a menu text of "&Save" and \fICtrl+S\fR as the keyboard accelerator. We connect the fileSaveAction's activated() signal to our own save() slot. Note that at this point there is no menu or toolbar action, we'll add them next: +.PP +.nf +.br + QToolBar * fileTools = new QToolBar( this, "file operations" ); +.fi +.PP +.nf +.br + fileSaveAction->addTo( fileTools ); +.fi +.PP +.nf +.br + QPopupMenu * file = new QPopupMenu( this ); +.br + menuBar()->insertItem( "&File", file ); +.fi +.PP +.nf +.br + fileSaveAction->addTo( file ); +.fi +.PP +We create a toolbar and add our fileSaveAction to it. Similarly we create a menu, add a top-level menu item, and add our fileSaveAction. +.PP +We recommend that actions are created as children of the window that they are used in. In most cases actions will be children of the application's main window. +.PP +To prevent recursion, don't create an action as a child of a widget that the action is later added to. +.PP +See also Main Window and Related Classes and Basic Widgets. +.SH MEMBER FUNCTION DOCUMENTATION +.SH "QAction::QAction ( QObject * parent, const char * name = 0 )" +Constructs an action called \fIname\fR with parent \fIparent\fR. +.PP +If \fIparent\fR is a QActionGroup, the new action inserts itself into \fIparent\fR. +.PP +For accelerators and status tips to work, \fIparent\fR must either be a widget, or an action group whose parent is a widget. +.PP +\fBWarning:\fR To prevent recursion, don't create an action as a child of a widget that the action is later added to. +.SH "QAction::QAction ( const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0 )" +This constructor results in an icon-less action with the the menu text \fImenuText\fR and keyboard accelerator \fIaccel\fR. It is a child of \fIparent\fR and called \fIname\fR. +.PP +If \fIparent\fR is a QActionGroup, the action automatically becomes a member of it. +.PP +For accelerators and status tips to work, \fIparent\fR must either be a widget, or an action group whose parent is a widget. +.PP +The action uses a stripped version of \fImenuText\fR (e.g. "&Menu Option..." becomes "Menu Option") as descriptive text for toolbuttons. You can override this by setting a specific description with setText(). The same text and \fIaccel\fR will be used for tool tips and status tips unless you provide text for these using setToolTip() and setStatusTip(). +.PP +Call setToggleAction(TRUE) to make the action a toggle action. +.PP +\fBWarning:\fR To prevent recursion, don't create an action as a child of a widget that the action is later added to. +.SH "QAction::QAction ( const QIconSet & icon, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0 )" +This constructor creates an action with the following properties: the icon or iconset \fIicon\fR, the menu text \fImenuText\fR and keyboard accelerator \fIaccel\fR. It is a child of \fIparent\fR and called \fIname\fR. +.PP +If \fIparent\fR is a QActionGroup, the action automatically becomes a member of it. +.PP +For accelerators and status tips to work, \fIparent\fR must either be a widget, or an action group whose parent is a widget. +.PP +The action uses a stripped version of \fImenuText\fR (e.g. "&Menu Option..." becomes "Menu Option") as descriptive text for toolbuttons. You can override this by setting a specific description with setText(). The same text and \fIaccel\fR will be used for tool tips and status tips unless you provide text for these using setToolTip() and setStatusTip(). +.PP +Call setToggleAction(TRUE) to make the action a toggle action. +.PP +\fBWarning:\fR To prevent recursion, don't create an action as a child of a widget that the action is later added to. +.SH "QAction::QAction ( const QString & text, const QIconSet & icon, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0, bool toggle = FALSE )" +\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. +.PP +This constructor creates an action with the following properties: the description \fItext\fR, the icon or iconset \fIicon\fR, the menu text \fImenuText\fR and keyboard accelerator \fIaccel\fR. It is a child of \fIparent\fR and called \fIname\fR. If \fItoggle\fR is TRUE the action will be a toggle action, otherwise it will be a command action. +.PP +If \fIparent\fR is a QActionGroup, the action automatically becomes a member of it. +.PP +For accelerators and status tips to work, \fIparent\fR must either be a widget, or an action group whose parent is a widget. +.PP +The \fItext\fR and \fIaccel\fR will be used for tool tips and status tips unless you provide specific text for these using setToolTip() and setStatusTip(). +.SH "QAction::QAction ( const QString & text, const QString & menuText, QKeySequence accel, QObject * parent, const char * name = 0, bool toggle = FALSE )" +\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. +.PP +This constructor results in an icon-less action with the description \fItext\fR, the menu text \fImenuText\fR and the keyboard accelerator \fIaccel\fR. Its parent is \fIparent\fR and it is called \fIname\fR. If \fItoggle\fR is TRUE the action will be a toggle action, otherwise it will be a command action. +.PP +The action automatically becomes a member of \fIparent\fR if \fIparent\fR is a QActionGroup. +.PP +For accelerators and status tips to work, \fIparent\fR must either be a widget, or an action group whose parent is a widget. +.PP +The \fItext\fR and \fIaccel\fR will be used for tool tips and status tips unless you provide specific text for these using setToolTip() and setStatusTip(). +.SH "QAction::QAction ( QObject * parent, const char * name, bool toggle )" +\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. +.PP +Constructs an action called \fIname\fR with parent \fIparent\fR. +.PP +If \fItoggle\fR is TRUE the action will be a toggle action, otherwise it will be a command action. +.PP +If \fIparent\fR is a QActionGroup, the new action inserts itself into \fIparent\fR. +.PP +For accelerators and status tips to work, \fIparent\fR must either be a widget, or an action group whose parent is a widget. +.SH "QAction::~QAction ()" +Destroys the object and frees allocated resources. +.SH "QKeySequence QAction::accel () const" +Returns the action's accelerator key. See the "accel" property for details. +.SH "void QAction::activate ()\fC [slot]\fR" +Activates the action and executes all connected slots. This only works for actions that are not toggle action. +.PP +See also toggle(). +.SH "void QAction::activated ()\fC [signal]\fR" +This signal is emitted when an action is activated by the user, e.g. when the user clicks a menu option or a toolbar button or presses an action's accelerator key combination. +.PP +Connect to this signal for command actions. Connect to the toggled() signal for toggle actions. +.PP +Examples: +.)l action/application.cpp, chart/chartform.cpp, and themes/themes.cpp. +.SH "bool QAction::addTo ( QWidget * w )\fC [virtual]\fR" +Adds this action to widget \fIw\fR. +.PP +Currently actions may be added to QToolBar and QPopupMenu widgets. +.PP +An action added to a tool bar is automatically displayed as a tool button; an action added to a pop up menu appears as a menu option. +.PP +addTo() returns TRUE if the action was added successfully and FALSE otherwise. (If \fIw\fR is not a QToolBar or QPopupMenu the action will not be added and FALSE will be returned.) +.PP +See also removeFrom(). +.PP +Examples: +.)l action/application.cpp, action/toggleaction/toggleaction.cpp, and chart/chartform.cpp. +.PP +Reimplemented in QActionGroup. +.SH "void QAction::addedTo ( QWidget * actionWidget, QWidget * container )\fC [virtual protected]\fR" +This function is called from the addTo() function when it has created a widget (\fIactionWidget\fR) for the action in the \fIcontainer\fR. +.SH "void QAction::addedTo ( int index, QPopupMenu * menu )\fC [virtual protected]\fR" +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +.PP +This function is called from the addTo() function when it has created a menu item at the index position \fIindex\fR in the popup menu \fImenu\fR. +.SH "QIconSet QAction::iconSet () const" +Returns the action's icon. See the "iconSet" property for details. +.SH "bool QAction::isEnabled () const" +Returns TRUE if the action is enabled; otherwise returns FALSE. See the "enabled" property for details. +.SH "bool QAction::isOn () const" +Returns TRUE if a toggle action is on; otherwise returns FALSE. See the "on" property for details. +.SH "bool QAction::isToggleAction () const" +Returns TRUE if the action is a toggle action; otherwise returns FALSE. See the "toggleAction" property for details. +.SH "bool QAction::isVisible () const" +Returns TRUE if the action can be seen (e.g. in menus and toolbars); otherwise returns FALSE. See the "visible" property for details. +.SH "QString QAction::menuText () const" +Returns the action's menu text. See the "menuText" property for details. +.SH "bool QAction::removeFrom ( QWidget * w )\fC [virtual]\fR" +Removes the action from widget \fIw\fR. +.PP +Returns TRUE if the action was removed successfully; otherwise returns FALSE. +.PP +See also addTo(). +.SH "void QAction::setAccel ( const QKeySequence & key )\fC [virtual]\fR" +Sets the action's accelerator key to \fIkey\fR. See the "accel" property for details. +.SH "void QAction::setDisabled ( bool disable )\fC [slot]\fR" +Disables the action if \fIdisable\fR is TRUE; otherwise enables the action. +.PP +See the enabled documentation for more information. +.SH "void QAction::setEnabled ( bool )\fC [virtual slot]\fR" +Sets whether the action is enabled. See the "enabled" property for details. +.SH "void QAction::setIconSet ( const QIconSet & )\fC [virtual]\fR" +Sets the action's icon. See the "iconSet" property for details. +.SH "void QAction::setMenuText ( const QString & )\fC [virtual]\fR" +Sets the action's menu text. See the "menuText" property for details. +.SH "void QAction::setOn ( bool )\fC [virtual slot]\fR" +Sets whether a toggle action is on. See the "on" property for details. +.SH "void QAction::setStatusTip ( const QString & )\fC [virtual]\fR" +Sets the action's status tip. See the "statusTip" property for details. +.SH "void QAction::setText ( const QString & )\fC [virtual]\fR" +Sets the action's descriptive text. See the "text" property for details. +.SH "void QAction::setToggleAction ( bool )\fC [virtual]\fR" +Sets whether the action is a toggle action. See the "toggleAction" property for details. +.SH "void QAction::setToolTip ( const QString & )\fC [virtual]\fR" +Sets the action's tool tip. See the "toolTip" property for details. +.SH "void QAction::setVisible ( bool )\fC [slot]\fR" +Sets whether the action can be seen (e.g. in menus and toolbars). See the "visible" property for details. +.SH "void QAction::setWhatsThis ( const QString & )\fC [virtual]\fR" +Sets the action's "What's This?" help text. See the "whatsThis" property for details. +.SH "QString QAction::statusTip () const" +Returns the action's status tip. See the "statusTip" property for details. +.SH "QString QAction::text () const" +Returns the action's descriptive text. See the "text" property for details. +.SH "void QAction::toggle ()\fC [slot]\fR" +Toggles the state of a toggle action. +.PP +See also on, activate(), toggled(), and toggleAction. +.SH "void QAction::toggled ( bool on )\fC [signal]\fR" +This signal is emitted when a toggle action changes state; command actions and QActionGroups don't emit toggled(). +.PP +The \fIon\fR argument denotes the new state: If \fIon\fR is TRUE the toggle action is switched on, and if \fIon\fR is FALSE the toggle action is switched off. +.PP +To trigger a user command depending on whether a toggle action has been switched on or off connect it to a slot that takes a bool to indicate the state, e.g. +.PP +.nf +.br + QMainWindow * window = new QMainWindow; +.fi +.PP +.nf +.br + QAction * labelonoffaction = new QAction( window, "labelonoff" ); +.fi +.PP +.nf +.br + QObject::connect( labelonoffaction, SIGNAL( toggled( bool ) ), +.br + window, SLOT( setUsesTextLabel( bool ) ) ); +.fi +.PP +See also activated(), toggleAction, and on. +.PP +Example: action/toggleaction/toggleaction.cpp. +.SH "QString QAction::toolTip () const" +Returns the action's tool tip. See the "toolTip" property for details. +.SH "QString QAction::whatsThis () const" +Returns the action's "What's This?" help text. See the "whatsThis" property for details. +.SS "Property Documentation" +.SH "QKeySequence accel" +This property holds the action's accelerator key. +.PP +The keycodes can be found in Qt::Key and Qt::Modifier. There is no default accelerator key. +.PP +Set this property's value with setAccel() and get this property's value with accel(). +.SH "bool enabled" +This property holds whether the action is enabled. +.PP +Disabled actions can't be chosen by the user. They don't disappear from the menu/tool bar but are displayed in a way which indicates that they are unavailable, e.g. they might be displayed grayed out. +.PP +What's this? help on disabled actions is still available provided the QAction::whatsThis property is set. +.PP +Set this property's value with setEnabled() and get this property's value with isEnabled(). +.SH "QIconSet iconSet" +This property holds the action's icon. +.PP +The icon is used as the tool button icon and in the menu to the left of t... [truncated message content] |