| 54 | ///////////////////////////////////////////////////////////// |
| 55 | |
| 56 | JSPluginSelectorWindow::JSPluginSelectorWindow(WizExplorerApp& app, JSPluginModule* module, QWidget* parent) |
| 57 | : WizPopupWidget(parent) |
| 58 | , m_module(module) |
| 59 | , m_windowWidth(module->spec()->width()) |
| 60 | , m_windowHeight(module->spec()->height()) |
| 61 | { |
| 62 | module->parentPlugin()->initStrings(); |
| 63 | |
| 64 | WizMainWindow *mw = WizMainWindow::instance(); |
| 65 | WizWebEngineInjectObjectCollection objects = { |
| 66 | {"JSPlugin", module->parentPlugin()}, |
| 67 | {"JSPluginModule", module}, |
| 68 | {"WizExplorerApp", mw->publicAPIsObject()}, |
| 69 | {"JSPluginWindow", this} |
| 70 | }; |
| 71 | m_web = new WizWebEngineView(objects, this); |
| 72 | |
| 73 | QVBoxLayout* layout = new QVBoxLayout(); |
| 74 | layout->setContentsMargins(0, 0, 0, 0); |
| 75 | setLayout(layout); |
| 76 | |
| 77 | layout->addWidget(m_web); |
| 78 | m_web->load(QUrl::fromLocalFile(m_module->spec()->htmlFileName())); |
| 79 | |
| 80 | } |
| 81 | |
| 82 | QSize JSPluginSelectorWindow::sizeHint() const |
| 83 | { |
nothing calls this directly
no test coverage detected