add support onLeave and onActivate to pythonqt plugins

This commit is contained in:
Raul Rodrigo Segura 2018-06-21 13:21:48 +02:00
parent 47b130c539
commit f25d6b278d
2 changed files with 20 additions and 0 deletions

View File

@ -159,6 +159,24 @@ PythonQtViewStep::isAtEnd() const
"is_at_end" } ).toBool(); "is_at_end" } ).toBool();
} }
void
PythonQtViewStep::onActivate()
{
CalamaresUtils::lookupAndCall( m_obj,
{ "onActivate",
"onactivate",
"on_activate" });
}
void
PythonQtViewStep::onLeave()
{
CalamaresUtils::lookupAndCall( m_obj,
{ "onLeave",
"onleave",
"on_leave" });
}
JobList JobList
PythonQtViewStep::jobs() const PythonQtViewStep::jobs() const

View File

@ -39,6 +39,8 @@ public:
void next() override; void next() override;
void back() override; void back() override;
void onLeave() override;
void onActivate() override;
bool isNextEnabled() const override; bool isNextEnabled() const override;
bool isBackEnabled() const override; bool isBackEnabled() const override;