MCPcopy Create free account
hub / github.com/KDE/labplot / getPlugins

Method getPlugins

src/backend/notebook/Notebook.cpp:248–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248QList<Cantor::PanelPlugin*> Notebook::getPlugins() {
249 DEBUG(Q_FUNC_INFO)
250 if (!m_pluginsLoaded) {
251 auto* handler = new Cantor::PanelPluginHandler(this);
252 handler->loadPlugins();
253
254 if (m_plugins.isEmpty())
255 INFO(Q_FUNC_INFO << ", no plugins yet.")
256
257 auto states = Cantor::PanelPluginHandler::PanelStates();
258 if (!m_session) {
259 WARN(Q_FUNC_INFO << ", WARNING: no session!")
260 } else
261 m_plugins = handler->activePluginsForSession(m_session, states);
262
263 for (auto* plugin : m_plugins) {
264 INFO(Q_FUNC_INFO << ", connecting plugin")
265 plugin->connectToShell(m_part);
266 }
267
268 m_pluginsLoaded = true;
269 }
270
271 DEBUG(Q_FUNC_INFO << ", DONE")
272 return m_plugins;
273}
274
275KParts::ReadWritePart* Notebook::part() {
276 return m_part;

Callers 1

setNotebooksMethod · 0.80

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected