Use CalamaresUtils::lookupAndCall in PythonQtViewStep.

This is done to support both Pythonic and Qt style method names, i.e.
both "isNextEnabled" and "is_next_enabled" is ok in a Python module.
Also better documentation in PythonQtViewStep, and stub for
setConfigurationMap.
Finally, proper handling of PythonQtViewStep Python-facing basewidget:
with this change, a call to PQVS::widget() only triggers a widget
relayout if it's necessary, and leaves it alone otherwise.
This commit is contained in:
Teo Mrnjavac 2016-10-07 19:12:28 +02:00
parent fb9d1fa339
commit a54f217173
2 changed files with 61 additions and 11 deletions

View file

@ -23,6 +23,9 @@
#include <PythonQt.h>
namespace Calamares
{
class PythonQtViewStep : public Calamares::ViewStep
{
Q_OBJECT
@ -45,6 +48,8 @@ public:
QList< Calamares::job_ptr > jobs() const override;
void setConfigurationMap( const QVariantMap& configurationMap ) override;
QWidget* createScriptingConsole();
protected:
@ -56,4 +61,6 @@ private:
friend class PythonQtViewStepDecorator;
};
}
#endif // PYTHONQTVIEWSTEP_H