Commit b2292312 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Add helper method to Utils::Wizard



Add method to Utils::Wizard that allows to retrieve the first page
of a given type.

Change-Id: Id92496d09bf89cee6f6e8ef584409125b218ec83
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 68cca186
......@@ -59,6 +59,15 @@ public:
WizardProgress *wizardProgress() const;
virtual bool validateCurrentPage();
template<class T> T *find() const
{
foreach (int id, pageIds()) {
if (T *result = qobject_cast<T *>(page(id)))
return result;
}
return 0;
}
signals:
void nextClicked(); /* workaround for QWizard behavior where page->initialize is
* called before currentIdChanged */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment