#include "defaultformhandler.h" #include #include #include DefaultFormHandler::DefaultFormHandler() { m_dialog = new FormDialog(); } DefaultFormHandler::~DefaultFormHandler() { delete m_dialog; } void DefaultFormHandler::showForm(IForm *formWidget) { formWidget->onShow(); m_dialog->setForm(formWidget); m_dialog->setModal(true); auto screen = m_dialog->screen(); if (screen) { m_dialog->move(screen->availableGeometry().center() - m_dialog->rect().center()); } m_dialog->show(); }