1QStatusBar(3qt) QStatusBar(3qt)
2
3
4
6 QStatusBar - Horizontal bar suitable for presenting status information
7
9 #include <qstatusbar.h>
10
11 Inherits QWidget.
12
13 Public Members
14 QStatusBar ( QWidget * parent = 0, const char * name = 0 )
15 virtual ~QStatusBar ()
16 virtual void addWidget ( QWidget * widget, int stretch = 0, bool
17 permanent = FALSE )
18 virtual void removeWidget ( QWidget * widget )
19 void setSizeGripEnabled ( bool )
20 bool isSizeGripEnabled () const
21
22 Public Slots
23 void message ( const QString & message )
24 void message ( const QString & message, int ms )
25 void clear ()
26
27 Signals
28 void messageChanged ( const QString & message )
29
30 Properties
31 bool sizeGripEnabled - whether the QSizeGrip in the bottom right of the
32 status bar is enabled
33
34 Protected Members
35 virtual void paintEvent ( QPaintEvent * )
36 void reformat ()
37 void hideOrShow ()
38
40 The QStatusBar class provides a horizontal bar suitable for presenting
41 status information.
42
43 Each status indicator falls into one of three categories:
44
45 Temporary - briefly occupies most of the status bar. Used to explain
46 tool tip texts or menu entries, for example.
47
48 Normal - occupies part of the status bar and may be hidden by temporary
49 messages. Used to display the page and line number in a word processor,
50 for example.
51
52 Permanent - is never hidden. Used for important mode indications, for
53 example, some applications put a Caps Lock indicator in the status bar.
54
55 QStatusBar lets you display all three types of indicators.
56
57 To display a temporary message, call message() (perhaps by connecting a
58 suitable signal to it). To remove a temporary message, call clear().
59 There are two variants of message(): one that displays the message
60 until the next clear() or message() and one that has a time limit:
61
62 connect( loader, SIGNAL(progressMessage(const QString&)),
63 statusBar(), SLOT(message(const QString&)) );
64 statusBar()->message("Loading..."); // Initial message
65 loader.loadStuff(); // Emits progress messages
66 statusBar()->message("Done.", 2000); // Final message for 2 seconds
67
68 Normal and Permanent messages are displayed by creating a small widget
69 and then adding it to the status bar with addWidget(). Widgets like
70 QLabel, QProgressBar or even QToolButton are useful for adding to
71 status bars. removeWidget() is used to remove widgets.
72
73 statusBar()->addWidget(new MyReadWriteIndication(statusBar()));
74
75 By default QStatusBar provides a QSizeGrip in the lower-right corner.
76 You can disable it with setSizeGripEnabled(FALSE);
77
78 [Image Omitted]
79
80 [Image Omitted]
81
82 See also QToolBar, QMainWindow, QLabel, GUI Design Handbook: Status
83 Bar, Main Window and Related Classes, and Help System.
84
87 Constructs a status bar called name with parent parent and with a size
88 grip.
89
90 See also sizeGripEnabled.
91
93 Destroys the status bar and frees any allocated resources and child
94 widgets.
95
97 = FALSE ) [virtual]
98 Adds widget to this status bar. widget is reparented if it isn't
99 already a child of the QStatusBar.
100
101 widget is permanently visible if permanent is TRUE and may be obscured
102 by temporary messages if permanent is FALSE. The default is FALSE.
103
104 If permanent is TRUE, widget is located at the far right of the status
105 bar. If permanent is FALSE (the default), widget is located just to the
106 left of the first permanent widget.
107
108 stretch is used to compute a suitable size for widget as the status bar
109 grows and shrinks. The default of 0 uses a minimum of space.
110
111 This function may cause some flicker.
112
113 See also removeWidget().
114
116 Removes any temporary message being shown.
117
118 See also message().
119
121 Ensures that the right widgets are visible. Used by message() and
122 clear().
123
125 Returns TRUE if the QSizeGrip in the bottom right of the status bar is
126 enabled; otherwise returns FALSE. See the "sizeGripEnabled" property
127 for details.
128
130 Hides the normal status indicators and displays message until clear()
131 or another message() is called.
132
133 See also clear().
134
135 Example: regexptester/regexptester.cpp.
136
138 This is an overloaded member function, provided for convenience. It
139 behaves essentially like the above function.
140
141 Hides the normal status indications and displays message for ms milli-
142 seconds or until clear() or another message() is called, whichever
143 occurs first.
144
146 This signal is emitted when the temporary status messages changes.
147 message is the new temporary message, and is a null-string when the
148 message has been removed.
149
150 See also message() and clear().
151
153 Shows the temporary message, if appropriate.
154
155 Reimplemented from QWidget.
156
158 Changes the status bar's appearance to account for item changes.
159 Special subclasses may need this, but geometry management will usually
160 take care of any necessary rearrangements.
161
163 Removes widget from the status bar.
164
165 This function may cause some flicker.
166
167 Note that widget is not deleted.
168
169 See also addWidget().
170
172 Sets whether the QSizeGrip in the bottom right of the status bar is
173 enabled. See the "sizeGripEnabled" property for details.
174
175 Property Documentation
177 This property holds whether the QSizeGrip in the bottom right of the
178 status bar is enabled.
179
180 Enables or disables the QSizeGrip in the bottom right of the status
181 bar. By default, the size grip is enabled.
182
183 Set this property's value with setSizeGripEnabled() and get this
184 property's value with isSizeGripEnabled().
185
186
188 http://doc.trolltech.com/qstatusbar.html
189 http://www.trolltech.com/faq/tech.html
190
192 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
193 license file included in the distribution for a complete license
194 statement.
195
197 Generated automatically from the source code.
198
200 If you find a bug in Qt, please report it as described in
201 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
202 help you. Thank you.
203
204 The definitive Qt documentation is provided in HTML format; it is
205 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
206 web browser. This man page is provided as a convenience for those users
207 who prefer man pages, although this format is not officially supported
208 by Trolltech.
209
210 If you find errors in this manual page, please report them to qt-
211 bugs@trolltech.com. Please include the name of the manual page
212 (qstatusbar.3qt) and the Qt version (3.3.8).
213
214
215
216Trolltech AS 2 February 2007 QStatusBar(3qt)