diff options
Diffstat (limited to 'doc/man/man3/tqstatusbar.3qt')
-rw-r--r-- | doc/man/man3/tqstatusbar.3qt | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/doc/man/man3/tqstatusbar.3qt b/doc/man/man3/tqstatusbar.3qt new file mode 100644 index 000000000..af6057bf5 --- /dev/null +++ b/doc/man/man3/tqstatusbar.3qt @@ -0,0 +1,209 @@ +'\" t +.TH QStatusBar 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QStatusBar \- Horizontal bar suitable for presenting status information +.SH SYNOPSIS +\fC#include <ntqstatusbar.h>\fR +.PP +Inherits QWidget. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "\fBQStatusBar\fR ( QWidget * parent = 0, const char * name = 0 )" +.br +.ti -1c +.BI "virtual \fB~QStatusBar\fR ()" +.br +.ti -1c +.BI "virtual void \fBaddWidget\fR ( QWidget * widget, int stretch = 0, bool permanent = FALSE )" +.br +.ti -1c +.BI "virtual void \fBremoveWidget\fR ( QWidget * widget )" +.br +.ti -1c +.BI "void \fBsetSizeGripEnabled\fR ( bool )" +.br +.ti -1c +.BI "bool \fBisSizeGripEnabled\fR () const" +.br +.in -1c +.SS "Public Slots" +.in +1c +.ti -1c +.BI "void \fBmessage\fR ( const QString & message )" +.br +.ti -1c +.BI "void \fBmessage\fR ( const QString & message, int ms )" +.br +.ti -1c +.BI "void \fBclear\fR ()" +.br +.in -1c +.SS "Signals" +.in +1c +.ti -1c +.BI "void \fBmessageChanged\fR ( const QString & message )" +.br +.in -1c +.SS "Properties" +.in +1c +.ti -1c +.BI "bool \fBsizeGripEnabled\fR - whether the QSizeGrip in the bottom right of the status bar is enabled" +.br +.in -1c +.SS "Protected Members" +.in +1c +.ti -1c +.BI "virtual void \fBpaintEvent\fR ( QPaintEvent * )" +.br +.ti -1c +.BI "void \fBreformat\fR ()" +.br +.ti -1c +.BI "void \fBhideOrShow\fR ()" +.br +.in -1c +.SH DESCRIPTION +The QStatusBar class provides a horizontal bar suitable for presenting status information. +.PP +Each status indicator falls into one of three categories: +.TP +\fITemporary\fR - briefly occupies most of the status bar. Used to explain tool tip texts or menu entries, for example. +.TP +\fINormal\fR - occupies part of the status bar and may be hidden by temporary messages. Used to display the page and line number in a word processor, for example. +.TP +\fIPermanent\fR - is never hidden. Used for important mode indications, for example, some applications put a Caps Lock indicator in the status bar. +.PP +QStatusBar lets you display all three types of indicators. +.PP +To display a \fItemporary\fR message, call message() (perhaps by connecting a suitable signal to it). To remove a temporary message, call clear(). There are two variants of message(): one that displays the message until the next clear() or message() and one that has a time limit: +.PP +.nf +.br + connect( loader, SIGNAL(progressMessage(const QString&)), +.br + statusBar(), SLOT(message(const QString&)) ); +.br +.br + statusBar()->message("Loading..."); // Initial message +.br + loader.loadStuff(); // Emits progress messages +.br + statusBar()->message("Done.", 2000); // Final message for 2 seconds +.br +.fi +.PP +\fINormal\fR and \fIPermanent\fR messages are displayed by creating a small widget and then adding it to the status bar with addWidget(). Widgets like QLabel, QProgressBar or even QToolButton are useful for adding to status bars. removeWidget() is used to remove widgets. +.PP +.nf +.br + statusBar()->addWidget(new MyReadWriteIndication(statusBar())); +.br +.fi +.PP +By default QStatusBar provides a QSizeGrip in the lower-right corner. You can disable it with setSizeGripEnabled(FALSE); +.PP +.ce 1 +.B "[Image Omitted]" +.PP + +.ce 1 +.B "[Image Omitted]" +.PP +See also QToolBar, QMainWindow, QLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System. +.SH MEMBER FUNCTION DOCUMENTATION +.SH "QStatusBar::QStatusBar ( QWidget * parent = 0, const char * name = 0 )" +Constructs a status bar called \fIname\fR with parent \fIparent\fR and with a size grip. +.PP +See also sizeGripEnabled. +.SH "QStatusBar::~QStatusBar ()\fC [virtual]\fR" +Destroys the status bar and frees any allocated resources and child widgets. +.SH "void QStatusBar::addWidget ( QWidget * widget, int stretch = 0, bool permanent = FALSE )\fC [virtual]\fR" +Adds \fIwidget\fR to this status bar. \fIwidget\fR is reparented if it isn't already a child of the QStatusBar. +.PP +\fIwidget\fR is permanently visible if \fIpermanent\fR is TRUE and may be obscured by temporary messages if \fIpermanent\fR is FALSE. The default is FALSE. +.PP +If \fIpermanent\fR is TRUE, \fIwidget\fR is located at the far right of the status bar. If \fIpermanent\fR is FALSE (the default), \fIwidget\fR is located just to the left of the first permanent widget. +.PP +\fIstretch\fR is used to compute a suitable size for \fIwidget\fR as the status bar grows and shrinks. The default of 0 uses a minimum of space. +.PP +This function may cause some flicker. +.PP +See also removeWidget(). +.SH "void QStatusBar::clear ()\fC [slot]\fR" +Removes any temporary message being shown. +.PP +See also message(). +.SH "void QStatusBar::hideOrShow ()\fC [protected]\fR" +Ensures that the right widgets are visible. Used by message() and clear(). +.SH "bool QStatusBar::isSizeGripEnabled () const" +Returns TRUE if the QSizeGrip in the bottom right of the status bar is enabled; otherwise returns FALSE. See the "sizeGripEnabled" property for details. +.SH "void QStatusBar::message ( const QString & message )\fC [slot]\fR" +Hides the normal status indicators and displays \fImessage\fR until clear() or another message() is called. +.PP +See also clear(). +.PP +Example: regexptester/regexptester.cpp. +.SH "void QStatusBar::message ( const QString & message, int ms )\fC [slot]\fR" +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +.PP +Hides the normal status indications and displays \fImessage\fR for \fIms\fR milli-seconds or until clear() or another message() is called, whichever occurs first. +.SH "void QStatusBar::messageChanged ( const QString & message )\fC [signal]\fR" +This signal is emitted when the temporary status messages changes. \fImessage\fR is the new temporary message, and is a null-string when the message has been removed. +.PP +See also message() and clear(). +.SH "void QStatusBar::paintEvent ( QPaintEvent * )\fC [virtual protected]\fR" +Shows the temporary message, if appropriate. +.PP +Reimplemented from QWidget. +.SH "void QStatusBar::reformat ()\fC [protected]\fR" +Changes the status bar's appearance to account for item changes. Special subclasses may need this, but geometry management will usually take care of any necessary rearrangements. +.SH "void QStatusBar::removeWidget ( QWidget * widget )\fC [virtual]\fR" +Removes \fIwidget\fR from the status bar. +.PP +This function may cause some flicker. +.PP +Note that \fIwidget\fR is not deleted. +.PP +See also addWidget(). +.SH "void QStatusBar::setSizeGripEnabled ( bool )" +Sets whether the QSizeGrip in the bottom right of the status bar is enabled. See the "sizeGripEnabled" property for details. +.SS "Property Documentation" +.SH "bool sizeGripEnabled" +This property holds whether the QSizeGrip in the bottom right of the status bar is enabled. +.PP +Enables or disables the QSizeGrip in the bottom right of the status bar. By default, the size grip is enabled. +.PP +Set this property's value with setSizeGripEnabled() and get this property's value with isSizeGripEnabled(). + +.SH "SEE ALSO" +.BR http://doc.trolltech.com/ntqstatusbar.html +.BR http://www.trolltech.com/faq/tech.html +.SH COPYRIGHT +Copyright 1992-2007 Trolltech ASA, 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-bugs@trolltech.com . +Please include the name of the manual page (tqstatusbar.3qt) and the Qt +version (3.3.8). |