KVIrc
4.9.2
DeveloperAPIs
|
Provides a wizard-style dialog with steps. More...
#include <KviTalWizard.h>
Signals | |
void | helpClicked () |
void | pageChanged (QString title) |
Public Member Functions | |
void | addPage (QWidget *pWidget, const QString &szTitle) |
QPushButton * | backButton () |
QPushButton * | cancelButton () |
QWidget * | currentPage () |
QPushButton * | finishButton () |
QPushButton * | helpButton () |
void | insertPage (QWidget *pWidget, const QString &szTitle, int iIndex) |
KviTalWizard (QWidget *pParent) | |
QPushButton * | nextButton () |
void | setBackEnabled (QWidget *pWidget, bool bEnabled) |
void | setCancelEnabled (QWidget *pWidget, bool bEnabled) |
bool | setCurrentPage (QWidget *pWidget) |
void | setFinishEnabled (QWidget *pWidget, bool bEnabled) |
void | setHelpEnabled (QWidget *pWidget, bool bEnabled) |
void | setNextEnabled (QWidget *pWidget, bool bEnabled) |
bool | setPageEnabled (QWidget *pWidget, bool bEnabled) |
bool | setPageTitle (QWidget *pWidget, const QString &szTitle) |
~KviTalWizard () | |
Protected Slots | |
void | backButtonClicked () |
void | cancelButtonClicked () |
void | finishButtonClicked () |
void | helpButtonClicked () |
void | nextButtonClicked () |
Protected Member Functions | |
virtual void | closeEvent (QCloseEvent *e) |
void | setCurrentPage (KviTalWizardPageData *pData) |
virtual void | showEvent (QShowEvent *e) |
Protected Attributes | |
KviTalWizardPrivate * | m_p |
Provides a wizard-style dialog with steps.
KviTalWizard::KviTalWizard | ( | QWidget * | pParent | ) |
References __tr, backButtonClicked(), cancelButtonClicked(), connect(), finishButtonClicked(), helpButtonClicked(), KviTalWizardPrivate::iEnabledPageCount, m_p, nextButtonClicked(), KviTalWizardPrivate::pBackButton, KviTalWizardPrivate::pCancelButton, KviTalWizardPrivate::pCurrentPage, KviTalWizardPrivate::pFinishButton, KviTalWizardPrivate::pFinishSpacer, KviTalWizardPrivate::pHelpButton, KviTalWizardPrivate::pLayout, KviTalWizardPrivate::pNextButton, KviTalWizardPrivate::pNextSpacer, KviTalWizardPrivate::pPageList, KviTalWizardPrivate::pStepsLabel, KviTalWizardPrivate::pTitleLabel, KviTalWizardPrivate::pWidgetStack, KviPointerList< T >::setAutoDelete(), KviTalHBox::setMargin(), KviTalHBox::setSpacing(), and KviTalHBox::setStretchFactor().
KviTalWizard::~KviTalWizard | ( | ) |
References m_p, and KviTalWizardPrivate::pPageList.
void KviTalWizard::addPage | ( | QWidget * | pWidget, |
const QString & | szTitle | ||
) |
Adds a page to the wizard with the specified title. The pages are displayed in order they're added. Adding a page a second time is equivalent to calling setPageTitle() and enabling the page.
References insertPage().
Referenced by KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(), RegistrationWizard::RegistrationWizard(), SaveThemeDialog::SaveThemeDialog(), and SetupWizard::SetupWizard().
QPushButton * KviTalWizard::backButton | ( | ) |
Returns a pointer to the back button displayed in the dialog.
References m_p, and KviTalWizardPrivate::pBackButton.
Referenced by KviKvsMdmWizard::KviKvsMdmWizard(), and KVSO_CLASS_FUNCTION().
|
protectedslot |
QPushButton * KviTalWizard::cancelButton | ( | ) |
Returns a pointer to the cancel button displayed in the dialog.
References m_p, and KviTalWizardPrivate::pCancelButton.
Referenced by KviRemoteMircServerImportWizard::getListTerminated().
|
protectedslot |
Referenced by closeEvent(), and KviTalWizard().
|
protectedvirtual |
Handles redirects the close button to the "cancel" operation.
Reimplemented in KviRemoteMircServerImportWizard.
References cancelButtonClicked().
QWidget * KviTalWizard::currentPage | ( | ) |
Returns a pointer to the current page
References m_p, KviTalWizardPrivate::pCurrentPage, and KviTalWizardPageData::pWidget.
QPushButton * KviTalWizard::finishButton | ( | ) |
Returns a pointer to the finish button displayed in the dialog.
References m_p, and KviTalWizardPrivate::pFinishButton.
Referenced by KviRemoteMircServerImportWizard::getListTerminated(), KVSO_CLASS_FUNCTION(), and KviRemoteMircServerImportWizard::start().
|
protectedslot |
Referenced by KviTalWizard().
QPushButton * KviTalWizard::helpButton | ( | ) |
Returns a pointer to the help button displayed in the dialog.
References m_p, and KviTalWizardPrivate::pHelpButton.
Referenced by KVSO_CLASS_FUNCTION().
|
protectedslot |
References helpClicked().
Referenced by KviTalWizard().
|
signal |
Emitted when the help button is clicked.
Referenced by helpButtonClicked().
void KviTalWizard::insertPage | ( | QWidget * | pWidget, |
const QString & | szTitle, | ||
int | iIndex | ||
) |
Adds a page to the wizard with the specified title and in the specified position. Adding a page a second time is equivalent to calling setPageTitle() and enabling the page.
References KviPointerList< T >::append(), KviTalWizardPageData::bEnabled, KviTalWizardPageData::EnableBack, KviTalWizardPageData::EnableCancel, KviTalWizardPageData::EnableNext, KviTalWizardPrivate::findPage(), KviTalWizardPrivate::iEnabledPageCount, KviTalWizardPageData::iEnableFlags, KviPointerList< T >::insert(), KviTalWizardPageData::iVisibleIndex, m_p, KviTalWizardPrivate::pPageList, KviTalWizardPageData::pWidget, KviTalWizardPrivate::pWidgetStack, KviTalWizardPrivate::reindexPages(), and KviTalWizardPageData::szTitle.
Referenced by addPage().
QPushButton * KviTalWizard::nextButton | ( | ) |
Returns a pointer to the next button displayed in the dialog.
References m_p, and KviTalWizardPrivate::pNextButton.
Referenced by KviKvsMdmWizard::KviKvsMdmWizard(), and KVSO_CLASS_FUNCTION().
|
protectedslot |
|
signal |
void KviTalWizard::setBackEnabled | ( | QWidget * | pWidget, |
bool | bEnabled | ||
) |
Enables or disables the prev button for the specified page. By default the prev button is always enabled.
References KviTalWizardPageData::EnableBack, KviTalWizardPrivate::findPage(), KviTalWizardPageData::iEnableFlags, m_p, KviTalWizardPrivate::pCurrentPage, and setCurrentPage().
Referenced by KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(), SaveThemeDialog::SaveThemeDialog(), and SetupWizard::SetupWizard().
void KviTalWizard::setCancelEnabled | ( | QWidget * | pWidget, |
bool | bEnabled | ||
) |
Enables or disables the cancel button for the specified page. By default the cancel button is always enabled.
References KviTalWizardPageData::EnableCancel, KviTalWizardPrivate::findPage(), KviTalWizardPageData::iEnableFlags, m_p, KviTalWizardPrivate::pCurrentPage, and setCurrentPage().
bool KviTalWizard::setCurrentPage | ( | QWidget * | pWidget | ) |
Switches the wizard to the specified page. Please note that this class handles page switching automatically so you usually don't need to call this function.
Returns true on success or false if the pWidget does not identify a page that has been added to this wizard.
References KviTalWizardPrivate::findPage(), and m_p.
Referenced by SetupWizard::accept(), backButtonClicked(), nextButtonClicked(), SaveThemeDialog::saveTheme(), setBackEnabled(), setCancelEnabled(), setFinishEnabled(), setHelpEnabled(), setNextEnabled(), setPageEnabled(), and showEvent().
|
protected |
References KviTalWizardPageData::EnableBack, KviTalWizardPageData::EnableCancel, KviTalWizardPageData::EnableFinish, KviTalWizardPageData::EnableHelp, KviTalWizardPageData::EnableNext, KviTalWizardPrivate::findNextEnabledPage(), KviTalWizardPrivate::findPrevEnabledPage(), KviTalWizardPrivate::iEnabledPageCount, KviTalWizardPageData::iEnableFlags, KviTalWizardPageData::iVisibleIndex, m_p, Normal, KviTalWizardPrivate::pBackButton, KviTalWizardPrivate::pCancelButton, KviTalWizardPrivate::pCurrentPage, KviTalWizardPrivate::pFinishButton, KviTalWizardPrivate::pFinishSpacer, KviTalWizardPrivate::pHelpButton, KviTalWizardPrivate::pNextButton, KviTalWizardPrivate::pNextSpacer, KviTalWizardPrivate::pStepsLabel, KviTalWizardPrivate::pTitleLabel, KviTalWizardPageData::pWidget, KviTalWizardPrivate::pWidgetStack, and KviTalWizardPageData::szTitle.
void KviTalWizard::setFinishEnabled | ( | QWidget * | pWidget, |
bool | bEnabled | ||
) |
Enables or disables the finish button for the specified page. By default the finish button is always disabled.
References KviTalWizardPageData::EnableFinish, KviTalWizardPrivate::findPage(), KviTalWizardPageData::iEnableFlags, m_p, KviTalWizardPrivate::pCurrentPage, and setCurrentPage().
Referenced by SaveThemeDialog::imageSelectionChanged(), KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(), RegistrationWizard::RegistrationWizard(), SaveThemeDialog::SaveThemeDialog(), and SetupWizard::SetupWizard().
void KviTalWizard::setHelpEnabled | ( | QWidget * | pWidget, |
bool | bEnabled | ||
) |
Enables or disables the help button for the specified page. By default the help button is always disabled.
References KviTalWizardPageData::EnableHelp, KviTalWizardPrivate::findPage(), KviTalWizardPageData::iEnableFlags, m_p, KviTalWizardPrivate::pCurrentPage, and setCurrentPage().
Referenced by SaveThemeDialog::SaveThemeDialog(), and SetupWizard::SetupWizard().
void KviTalWizard::setNextEnabled | ( | QWidget * | pWidget, |
bool | bEnabled | ||
) |
Enables or disables the next button for the specified page. By default the next button is always enabled.
References KviTalWizardPageData::EnableNext, KviTalWizardPrivate::findPage(), KviTalWizardPageData::iEnableFlags, m_p, KviTalWizardPrivate::pCurrentPage, and setCurrentPage().
Referenced by SetupWizard::enableOrDisableIdentityPageNextButton(), SaveThemeDialog::imageSelectionChanged(), KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(), RegistrationWizard::maskChanged(), SetupWizard::newDataTextChanged(), SetupWizard::newDirClicked(), SetupWizard::newIncomingTextChanged(), RegistrationWizard::notifyNickChanged(), SetupWizard::oldDataTextChanged(), SetupWizard::oldDirClicked(), SetupWizard::portableClicked(), RegistrationWizard::realNameChanged(), and SaveThemeDialog::SaveThemeDialog().
bool KviTalWizard::setPageEnabled | ( | QWidget * | pWidget, |
bool | bEnabled | ||
) |
Enables or disables a page. A disabled page is skipped when the user presses "Next" in the previous page or "Back" in the page after. Disabling the current page has no effect.
Returns true on success or false if the pWidget does not identify a page that has been added to this wizard.
References KviTalWizardPageData::bEnabled, KviTalWizardPrivate::findPage(), KviTalWizardPrivate::iEnabledPageCount, m_p, KviTalWizardPrivate::pCurrentPage, KviTalWizardPrivate::reindexPages(), and setCurrentPage().
Referenced by SetupWizard::newDirClicked(), SetupWizard::oldDirClicked(), SetupWizard::portableClicked(), and SetupWizard::SetupWizard().
bool KviTalWizard::setPageTitle | ( | QWidget * | pWidget, |
const QString & | szTitle | ||
) |
Changes a page title.
Returns true on success or false if the pWidget does not identify a page that has been added to this wizard.
References KviTalWizardPrivate::findPage(), m_p, and KviTalWizardPageData::szTitle.
|
protectedvirtual |
Displays the first page if no other page is shown yet.
Reimplemented in SetupWizard, and RegistrationWizard.
References KviTalWizardPrivate::findFirstEnabledPage(), m_p, pageChanged(), KviTalWizardPrivate::pCurrentPage, KviTalWizardPageData::pWidget, setCurrentPage(), and KviTalWizardPageData::szTitle.
Referenced by RegistrationWizard::showEvent(), and SetupWizard::showEvent().
|
protected |
Referenced by backButton(), backButtonClicked(), cancelButton(), currentPage(), finishButton(), helpButton(), insertPage(), KviTalWizard(), nextButton(), nextButtonClicked(), setBackEnabled(), setCancelEnabled(), setCurrentPage(), setFinishEnabled(), setHelpEnabled(), setNextEnabled(), setPageEnabled(), setPageTitle(), showEvent(), and ~KviTalWizard().