MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / JSPluginSelectorWindow

Method JSPluginSelectorWindow

src/jsplugin/JSPluginWidgets.cpp:56–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54/////////////////////////////////////////////////////////////
55
56JSPluginSelectorWindow::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
82QSize JSPluginSelectorWindow::sizeHint() const
83{

Callers

nothing calls this directly

Calls 9

widthMethod · 0.80
heightMethod · 0.80
initStringsMethod · 0.80
parentPluginMethod · 0.80
setContentsMarginsMethod · 0.80
htmlFileNameMethod · 0.80
specMethod · 0.45
publicAPIsObjectMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected