Q3ProgressBar Class ReferenceThe Q3ProgressBar widget provides a horizontal progress bar. Далее... #include <Q3ProgressBar> Данный класс является частью библиотеки поддержки Qt 3. Он предоставлен для поддержки ранее написанного кода. Мы настоятельно не рекомендуем использовать этот класс в новом коде. Для получения дополнительной информации смотрите Портирование на Qt 4. Inherits: QFrame. Свойства
Открытые функции
Переопределённые открытые функции
Открытые слоты
Защищенные функции
Переопределённые защищённые функции
Дополнительные унаследованные члены
Подробное описаниеThe Q3ProgressBar widget provides a horizontal progress bar. A 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. The progress bar uses the concept of steps; 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(). If 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.
See also QProgressDialog and QProgressDialog. Описание свойствcenterIndicator : boolThis property holds whether the indicator string should be centered. Функции доступа:
percentageVisible : boolThis property holds whether the current progress value is displayed. Значение по умолчанию - true. Функции доступа:
See also centerIndicator. progress : intThis property holds the current amount of progress. This property is -1 if progress counting has not started. Функции доступа:
progressString : const QStringThis property holds the amount of progress as a string. This property is an empty string if progress counting has not started. Функции доступа:
totalSteps : intThis property holds the total number of steps. If totalSteps is 0, the progress bar will display a busy indicator. Функции доступа:
Описание функций-членовQ3ProgressBar::Q3ProgressBar ( QWidget * parent = 0, Qt::WindowFlags f = 0 )Создаём индикатор выполнения. Общее количество шагов по умолчанию установлено равным 100. The parent, and widget flags, f, are passed on to the QFrame::QFrame() constructor. Смотрите также setTotalSteps(). Q3ProgressBar::Q3ProgressBar ( int totalSteps, QWidget * parent = 0, Qt::WindowFlags f = 0 )Создаём индикатор выполнения. totalSteps - общее количество шагов, которые необходимы для завершения операции, которая представлена в индикаторе выполнения. Например, если операция заключается в проверке 50 файлов, то это значение будет равно 50. Перед проверкой первого файла, вызываем setProgress(0); вызываем setProgress(50) после проверки последнего файла. The parent, and widget flags, f, are passed to the QFrame::QFrame() constructor. Смотрите также setTotalSteps() иsetProgress(). void Q3ProgressBar::changeEvent ( QEvent * ev ) [virtual protected]Переопределено от QWidget::changeEvent(). int Q3ProgressBar::margin () constВозвращает ширину полей вокруг содержимого виджета. This function uses QWidget::getContentsMargins() to get the margin. Эта функция была введена в Qt 4.2. Смотрите также setMargin() и QWidget::getContentsMargins(). QSize Q3ProgressBar::minimumSizeHint () const [virtual]Переопределено от QWidget::minimumSizeHint(). void Q3ProgressBar::paintEvent ( QPaintEvent * ) [virtual protected]Переопределено от QWidget::paintEvent(). void Q3ProgressBar::reset () [slot]Reset the progress bar. The progress bar "rewinds" and shows no progress. bool Q3ProgressBar::setIndicator ( QString & indicator, int progress, int totalSteps ) [virtual protected]This method is called to generate the text displayed in the center (or in some styles, to the left) of the progress bar. The progress may be negative, indicating that the progress bar is in the "reset" state before any progress is set. The default implementation is the percentage of completion or blank in the reset state. The percentage is calculated based on the progress and totalSteps. You can set the indicator text if you wish. To allow efficient repainting of the progress bar, this method should return false if the string is unchanged from the last call to this function. void Q3ProgressBar::setMargin ( int margin )Присваивает ширине полей вокруг содержимого виджета значение margin. This function uses QWidget::setContentsMargins() to set the margin. Эта функция была введена в Qt 4.2. Смотрите также margin() и QWidget::setContentsMargins(). void Q3ProgressBar::setVisible ( bool visible ) [virtual]Переопределено из QWidget::setVisible(). QSize Q3ProgressBar::sizeHint () const [virtual]Переопределено от QWidget::sizeHint(). |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |