You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
519 B
C++
26 lines
519 B
C++
#include "defaultformhandler.h"
|
|
|
|
#include <QApplication>
|
|
#include <QDesktopWidget>
|
|
#include <QRect>
|
|
|
|
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);
|
|
m_dialog->move(QApplication::desktop()->screen()->rect().center() - m_dialog->rect().center());
|
|
m_dialog->show();
|
|
}
|
|
|