⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qprogressbar.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QProgressBar 3qt "9 December 2002" "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 NAMEQProgressBar \- Horizontal progress bar.SH SYNOPSIS\fC#include <qprogressbar.h>\fR.PPInherits QFrame..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQProgressBar\fR ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )".br.ti -1c.BI "\fBQProgressBar\fR ( int totalSteps, QWidget * parent = 0, const char * name = 0, WFlags f = 0 )".br.ti -1c.BI "int \fBtotalSteps\fR () const".br.ti -1c.BI "int \fBprogress\fR () const".br.ti -1c.BI "const QString & \fBprogressString\fR () const".br.ti -1c.BI "void \fBsetCenterIndicator\fR ( bool on )".br.ti -1c.BI "bool \fBcenterIndicator\fR () const".br.ti -1c.BI "void \fBsetIndicatorFollowsStyle\fR ( bool )".br.ti -1c.BI "bool \fBindicatorFollowsStyle\fR () const".br.ti -1c.BI "bool \fBpercentageVisible\fR () const".br.ti -1c.BI "void \fBsetPercentageVisible\fR ( bool )".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "void \fBreset\fR ()".br.ti -1c.BI "virtual void \fBsetTotalSteps\fR ( int totalSteps )".br.ti -1c.BI "virtual void \fBsetProgress\fR ( int progress )".br.ti -1c.BI "void \fBsetProgress\fR ( int progress, int totalSteps )".br.in -1c.SS "Properties".in +1c.ti -1c.BI "bool \fBcenterIndicator\fR - whether the indicator string should be centered".br.ti -1c.BI "bool \fBindicatorFollowsStyle\fR - whether the display of the indicator string should follow the GUI style".br.ti -1c.BI "bool \fBpercentageVisible\fR - whether the current progress value is displayed".br.ti -1c.BI "int \fBprogress\fR - the current amount of progress".br.ti -1c.BI "QString \fBprogressString\fR - the amount of progress as a string  \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBtotalSteps\fR - the total number of steps".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual bool \fBsetIndicator\fR ( QString & indicator, int progress, int totalSteps )".br.in -1c.SH DESCRIPTIONThe QProgressBar widget provides a horizontal progress bar..PPA progress bar is used to give the user an indication of the progress of an operation and to reassure them that the application is still running..PPThe progress bar uses the concept of \fIsteps\fR; you give it the total number of steps and the number of steps completed so far and it will display the percentage of steps that have been completed. You can specify the total number of steps in the constructor or later with setTotalSteps(). The current number of steps is set with setProgress(). The progress bar can be rewound to the beginning with reset()..PPIf the total is given as 0 the progress bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using QFtp or QHttp to download items when they are unable to determine the size of the item being downloaded..PPSee also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets..PP.ce 1.B "[Image Omitted]".PP.ce 1.B "[Image Omitted]".PPSee also QProgressDialog, GUI Design Handbook: Progress Indicator, and Advanced Widgets..SH MEMBER FUNCTION DOCUMENTATION.SH "QProgressBar::QProgressBar ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )"Constructs a progress bar..PPThe total number of steps is set to 100 by default..PPThe \fIparent\fR, \fIname\fR and widget flags, \fIf\fR, are passed on to the QFrame::QFrame() constructor..PPSee also totalSteps..SH "QProgressBar::QProgressBar ( int totalSteps, QWidget * parent = 0, const char * name = 0, WFlags f = 0 )"Constructs a progress bar..PPThe \fItotalSteps\fR is the total number of steps that need to be completed for the operation which this progress bar represents. For example, if the operation is to examine 50 files, this value would be 50. Before examining the first file, call setProgress(0); call setProgress(50) after examining the last file..PPThe \fIparent\fR, \fIname\fR and widget flags, \fIf\fR, are passed to the QFrame::QFrame() constructor..PPSee also totalSteps and progress..SH "bool QProgressBar::centerIndicator () const"Returns TRUE if the indicator string should be centered; otherwise returns FALSE. See the "centerIndicator" property for details..SH "bool QProgressBar::indicatorFollowsStyle () const"Returns TRUE if the display of the indicator string should follow the GUI style; otherwise returns FALSE. See the "indicatorFollowsStyle" property for details..SH "bool QProgressBar::percentageVisible () const"Returns TRUE if the current progress value is displayed; otherwise returns FALSE. See the "percentageVisible" property for details..SH "int QProgressBar::progress () const"Returns the current amount of progress. See the "progress" property for details..SH "const QString & QProgressBar::progressString () const"Returns the amount of progress as a string. See the "progressString" property for details..SH "void QProgressBar::reset ()\fC [slot]\fR"Reset the progress bar. The progress bar "rewinds" and shows no progress..PPExamples:.)l fileiconview/mainwindow.cpp and progressbar/progressbar.cpp..SH "void QProgressBar::setCenterIndicator ( bool on )"Sets whether the indicator string should be centered to \fIon\fR. See the "centerIndicator" property for details..SH "bool QProgressBar::setIndicator ( QString & indicator, int progress, int totalSteps )\fC [virtual protected]\fR"This method is called to generate the text displayed in the center (or in some styles, to the left) of the progress bar..PPThe \fIprogress\fR may be negative, indicating that the progress bar is in the "reset" state before any progress is set..PPThe default implementation is the percentage of completion or blank in the reset state. The percentage is calculated based on the \fIprogress\fR and \fItotalSteps\fR. You can set the \fIindicator\fR text if you wish..PPTo allow efficient repainting of the progress bar, this method should return FALSE if the string is unchanged from the last call to this function..SH "void QProgressBar::setIndicatorFollowsStyle ( bool )"Sets whether the display of the indicator string should follow the GUI style. See the "indicatorFollowsStyle" property for details..SH "void QProgressBar::setPercentageVisible ( bool )"Sets whether the current progress value is displayed. See the "percentageVisible" property for details..SH "void QProgressBar::setProgress ( int progress )\fC [virtual slot]\fR"Sets the current amount of progress to \fIprogress\fR. See the "progress" property for details..SH "void QProgressBar::setProgress ( int progress, int totalSteps )\fC [slot]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSets the amount of progress to \fIprogress\fR and the total number of steps to \fItotalSteps\fR..PPSee also totalSteps..SH "void QProgressBar::setTotalSteps ( int totalSteps )\fC [virtual slot]\fR"Sets the total number of steps to \fItotalSteps\fR. See the "totalSteps" property for details..SH "int QProgressBar::totalSteps () const"Returns the total number of steps. See the "totalSteps" property for details..SS "Property Documentation".SH "bool centerIndicator"This property holds whether the indicator string should be centered..PPChanging this property sets QProgressBar::indicatorFollowsStyle to FALSE. The default is TRUE..PPSet this property's value with setCenterIndicator() and get this property's value with centerIndicator()..SH "bool indicatorFollowsStyle"This property holds whether the display of the indicator string should follow the GUI style..PPThe default is TRUE..PPSee also centerIndicator..PPSet this property's value with setIndicatorFollowsStyle() and get this property's value with indicatorFollowsStyle()..SH "bool percentageVisible"This property holds whether the current progress value is displayed..PPThe default is TRUE..PPSee also centerIndicator and indicatorFollowsStyle..PPSet this property's value with setPercentageVisible() and get this property's value with percentageVisible()..SH "int progress"This property holds the current amount of progress..PPThis property is -1 if progress counting has not started..PPSet this property's value with setProgress() and get this property's value with progress()..SH "QString progressString"This property holds the amount of progress as a string..PPThis property is QString::null if progress counting has not started..PPGet this property's value with progressString()..SH "int totalSteps"This property holds the total number of steps..PPIf totalSteps is 0, the progress bar will display a busy indicator..PPSee also.PPSet this property's value with setTotalSteps() and get this property's value with totalSteps()..SH "SEE ALSO".BR http://doc.trolltech.com/qprogressbar.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf 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..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qprogressbar.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -