'\" t .TH TQStatusBar 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 TQStatusBar \- Horizontal bar suitable for presenting status information .SH SYNOPSIS \fC#include \fR .PP Inherits TQWidget. .PP .SS "Public Members" .in +1c .ti -1c .BI "\fBTQStatusBar\fR ( TQWidget * parent = 0, const char * name = 0 )" .br .ti -1c .BI "virtual \fB~TQStatusBar\fR ()" .br .ti -1c .BI "virtual void \fBaddWidget\fR ( TQWidget * widget, int stretch = 0, bool permanent = FALSE )" .br .ti -1c .BI "virtual void \fBremoveWidget\fR ( TQWidget * 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 TQString & message )" .br .ti -1c .BI "void \fBmessage\fR ( const TQString & message, int ms )" .br .ti -1c .BI "void \fBclear\fR ()" .br .in -1c .SS "Signals" .in +1c .ti -1c .BI "void \fBmessageChanged\fR ( const TQString & message )" .br .in -1c .SS "Properties" .in +1c .ti -1c .BI "bool \fBsizeGripEnabled\fR - whether the TQSizeGrip 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 ( TQPaintEvent * )" .br .ti -1c .BI "void \fBreformat\fR ()" .br .ti -1c .BI "void \fBhideOrShow\fR ()" .br .in -1c .SH DESCRIPTION The TQStatusBar 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 TQStatusBar 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, TQ_SIGNAL(progressMessage(const TQString&)), .br statusBar(), TQ_SLOT(message(const TQString&)) ); .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 TQLabel, TQProgressBar or even TQToolButton 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 TQStatusBar provides a TQSizeGrip 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 TQToolBar, TQMainWindow, TQLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System. .SH MEMBER FUNCTION DOCUMENTATION .SH "TQStatusBar::TQStatusBar ( TQWidget * 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 "TQStatusBar::~TQStatusBar ()\fC [virtual]\fR" Destroys the status bar and frees any allocated resources and child widgets. .SH "void TQStatusBar::addWidget ( TQWidget * 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 TQStatusBar. .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 TQStatusBar::clear ()\fC [slot]\fR" Removes any temporary message being shown. .PP See also message(). .SH "void TQStatusBar::hideOrShow ()\fC [protected]\fR" Ensures that the right widgets are visible. Used by message() and clear(). .SH "bool TQStatusBar::isSizeGripEnabled () const" Returns TRUE if the TQSizeGrip in the bottom right of the status bar is enabled; otherwise returns FALSE. See the "sizeGripEnabled" property for details. .SH "void TQStatusBar::message ( const TQString & 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 TQStatusBar::message ( const TQString & 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 TQStatusBar::messageChanged ( const TQString & 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 TQStatusBar::paintEvent ( TQPaintEvent * )\fC [virtual protected]\fR" Shows the temporary message, if appropriate. .PP Reimplemented from TQWidget. .SH "void TQStatusBar::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 TQStatusBar::removeWidget ( TQWidget * 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 TQStatusBar::setSizeGripEnabled ( bool )" Sets whether the TQSizeGrip 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 TQSizeGrip in the bottom right of the status bar is enabled. .PP Enables or disables the TQSizeGrip 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/tqstatusbar.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 TQt documentation is provided in HTML format; it is located at $TQTDIR/doc/html and can be read using TQt 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).