Qt:Документация 4.3.2/q3wizard

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Q3Wizard Class Reference
[ Qt3Support module]

The Q3Wizard class provides a framework for wizard dialogs. Далее...

 #include <Q3Wizard>

This class is part of the Qt 3 support library. It is provided to keep old source code working. Мы настоятельно не рекомендуем использовать этот класс в новом коде. See Porting to Qt 4 for more information.

Наследует QDialog.

[править] Свойства

  • 2 войства, унаследованные от QDialog
  • 56 свойств, унаследованных от QWidget
  • 1 свойство, унаследованное от QObject

[править] Открытые функции

  • 5 открытых функций, унаследованных от QDialog
  • 201 свойство, унаследованное от QWidget
  • 29 открытых функций, унаследованных от QObject
  • 12 открытых функций, унаследованных от QPaintDevice

[править] Открытые слоты

  • 4 открытых слота, унаследованные от QDialog
  • 19 открытых слотов, унаследованных от QWidget
  • 1 открытый слот, унаследованный от QObject

[править] Сигналы

  • 3 сигнала, унаследованные от QDialog
  • 1 сигнал, унаследованный от QWidget
  • 1 сигнал, унаследованный от QObject

[править] Защищенные функции

  • 38 защищенных функций, унаследованных от QWidget
  • 7 защищенных функций, унаследованных от QObject
  • 1 защищенная функция, унаследованных от QPaintDevice

[править] Защищённые слоты

  • 1 защищенный слот, унаследованый от QWidget

[править] Дополнительные унаследованные члены

  • 4 статических открытых члена, унаследованных от QWidget
  • 5 статических открытых членов, унаследованных от QObject

[править] Подробное описание

The Q3Wizard class provides a framework for wizard dialogs.

A wizard is a special type of input dialog that consists of a sequence of dialog pages. A wizard's purpose is to walk the user through a process step by step. Wizards are useful for complex or infrequently occurring tasks that people may find difficult to learn or do.

Q3Wizard provides page titles and displays Next, Back, Finish, Cancel, and Help push buttons, as appropriate to the current position in the page sequence. These buttons can be enabled/disabled using setBackEnabled(), setNextEnabled(), setFinishEnabled() and setHelpEnabled().

Create and populate dialog pages that inherit from QWidget and add them to the wizard using addPage(). Use insertPage() to add a dialog page at a certain position in the page sequence. Use removePage() to remove a page from the page sequence.

Use currentPage() to retrieve a pointer to the currently displayed page. page() returns a pointer to the page at a certain position in the page sequence.

Use pageCount() to retrieve the total number of pages in the page sequence. indexOf() will return the index of a page in the page sequence.

Q3Wizard provides functionality to mark pages as appropriate (or not) in the current context with setAppropriate(). The idea is that a page may be irrelevant and should be skipped depending on the data entered by the user on a preceding page.

It is generally considered good design to provide a greater number of simple pages with fewer choices rather than a smaller number of complex pages.


[править] Описание cвойств

[править]
titleFont : QFont

This property holds the font used for page titles.

The default is QApplication::font().

Функции доступа:

  • QFont titleFont () const
  • void setTitleFont ( const QFont & )

[править] Описание функций-членов

[править]
Q3Wizard::Q3Wizard ( QWidget * parent = 0, const char * name = 0, bool modal = false, Qt::WindowFlags f = 0 )

Constructs an empty wizard dialog. The parent, name, modal and f arguments are passed to the QDialog constructor.

[править]
Q3Wizard::~Q3Wizard ()

Destroys the object and frees any allocated resources, including all pages and controllers.

[править]
void Q3Wizard::addPage ( QWidget * page, const QString & title ) [virtual]

Adds page to the end of the page sequence, with the title, title.

[править]
bool Q3Wizard::appropriate ( QWidget * page ) const [virtual]

Called when the Next button is clicked; this virtual function returns true if page is relevant for display in the current context; otherwise it is ignored by Q3Wizard and returns false. The default implementation returns the value set using setAppropriate(). The ultimate default is true.

Warning: The last page of the wizard will be displayed if no page is relevant in the current context.

See also setAppropriate().

[править]
void Q3Wizard::back () [virtual protected slot]

Called when the user clicks the Back button; this function shows the preceding relevant page in the sequence.

See also appropriate().

[править]
QPushButton * Q3Wizard::backButton () const

Returns a pointer to the dialog's Back button

By default, this button is connected to the back() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setBackEnabled() to enable/disable this button.

[править]
QPushButton * Q3Wizard::cancelButton () const

Returns a pointer to the dialog's Cancel button

By default, this button is connected to the QDialog::reject() slot, which is virtual so you can reimplement it in a Q3Wizard subclass.

[править]
QWidget * Q3Wizard::currentPage () const

Returns a pointer to the current page in the sequence. Although the wizard does its best to make sure that this value is never 0, it can be if you try hard enough.

[править]
QPushButton * Q3Wizard::finishButton () const

Returns a pointer to the dialog's Finish button

By default, this button is connected to the QDialog::accept() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setFinishEnabled() to enable/disable this button.

[править]
void Q3Wizard::help () [virtual protected slot]

Called when the user clicks the Help button, this function emits the helpClicked() signal.

[править]
QPushButton * Q3Wizard::helpButton () const

Returns a pointer to the dialog's Help button

By default, this button is connected to the help() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setHelpEnabled() to enable/disable this button.

[править]
void Q3Wizard::helpClicked () [signal]

This signal is emitted when the user clicks on the Help button.

[править]
int Q3Wizard::indexOf ( QWidget * page ) const

Returns the position of page page. If the page is not part of the wizard -1 is returned.

[править]
void Q3Wizard::insertPage ( QWidget * page, const QString & title, int index ) [virtual]

Inserts page at position index into the page sequence, with title title. If index is -1, the page will be appended to the end of the wizard's page sequence.

[править]
void Q3Wizard::layOutButtonRow ( QHBoxLayout * layout ) [virtual protected]

This virtual function is responsible for adding the buttons below the bottom divider.

layout is the horizontal layout of the entire wizard.

[править]
void Q3Wizard::layOutTitleRow ( QHBoxLayout * layout, const QString & title ) [virtual protected]

This virtual function is responsible for laying out the title row.

layout is the horizontal layout for the wizard, and title is the title for this page. This function is called every time title changes.

[править] void Q3Wizard::next () [virtual protected slot]

Called when the user clicks the Next button, this function shows the next relevant page in the sequence.

See also appropriate().

[править]
QPushButton * Q3Wizard::nextButton () const

Returns a pointer to the dialog's Next button

By default, this button is connected to the next() slot, which is virtual so you can reimplement it in a Q3Wizard subclass. Use setNextEnabled() to enable/disable this button.

[править]
QWidget * Q3Wizard::page ( int index ) const

Returns a pointer to the page at position index in the sequence, or 0 if index is out of range. The first page has index 0.

[править]
int Q3Wizard::pageCount () const

Returns the number of pages in the wizard.

[править]
void Q3Wizard::removePage ( QWidget * page ) [virtual]

Removes page from the page sequence but does not delete the page. If page is currently being displayed, Q3Wizard will display the page that precedes it, or the first page if this was the first page.

[править]
void Q3Wizard::selected ( const QString & title ) [signal]

This signal is emitted when the current page changes. The title parameter contains the title of the selected page.

[править]
void Q3Wizard::setAppropriate ( QWidget * page, bool appropriate ) [virtual]

If appropriate is true then page page is considered relevant in the current context and should be displayed in the page sequence; otherwise page should not be displayed in the page sequence.

See also appropriate().

[править]
void Q3Wizard::setBackEnabled ( QWidget * page, bool enable ) [virtual slot]

If enable is true, page page has a Back button; otherwise page has no Back button. By default all pages have this button.

[править]
void Q3Wizard::setFinishEnabled ( QWidget * page, bool enable ) [virtual slot]

If enable is true, page page has a Finish button; otherwise page has no Finish button. By default no page has this button.

[править]
void Q3Wizard::setHelpEnabled ( QWidget * page, bool enable ) [virtual slot]

If enable is true, page page has a Help button; otherwise page has no Help button. By default all pages have this button.

[править]
void Q3Wizard::setNextEnabled ( QWidget * page, bool enable ) [virtual slot]

If enable is true, page page has a Next button; otherwise the Next button on page is disabled. By default all pages have this button.

[править]
void Q3Wizard::setTitle ( QWidget * page, const QString & title )

Sets the title for page page to title.

See also title().

[править]
void Q3Wizard::showPage ( QWidget * page ) [virtual]

Makes page the current page and emits the selected() signal.

This virtual function is called whenever a different page is to be shown, including the first time the Q3Wizard is shown. By reimplementing it (and calling Q3Wizard::showPage()), you can prepare each page prior to it being shown.

[править]
QString Q3Wizard::title ( QWidget * page ) const

Returns the title of page page.

See also setTitle().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2