MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / foreach

Function foreach

ASAP/ASAP_Window.cpp:108–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 if (_pluginsDir.cd("plugins")) {
107 if (_pluginsDir.cd("tools")) {
108 foreach(QString fileName, _pluginsDir.entryList(QDir::Files)) {
109 if (fileName.toLower().endsWith(sharedLibraryExtensions)) {
110 QPluginLoader loader(_pluginsDir.absoluteFilePath(fileName));
111 QObject *plugin = loader.instance();
112 if (plugin) {
113 std::shared_ptr<ToolPluginInterface> tool(qobject_cast<ToolPluginInterface*>(plugin));
114 if (tool) {
115 tool->setViewer(viewer);
116 QAction* toolAction = tool->getToolButton();
117 connect(toolAction, SIGNAL(triggered(bool)), viewer, SLOT(changeActiveTool()));
118 _toolPluginFileNames.push_back(fileName.toStdString());
119 viewer->addTool(tool);
120 QToolBar* mainToolBar = this->findChild<QToolBar *>("mainToolBar");
121 toolAction->setCheckable(true);
122 _toolActions->addAction(toolAction);
123 mainToolBar->addAction(toolAction);
124 }
125 }
126 }
127 }
128 _pluginsDir.cdUp();
129 }
130 if (_pluginsDir.cd("workstationextension")) {

Callers

nothing calls this directly

Calls 10

setViewerMethod · 0.80
addToolMethod · 0.80
getToolBarMethod · 0.80
getMenuMethod · 0.80
emptyMethod · 0.80
sizeMethod · 0.80
getToolButtonMethod · 0.45
initializeMethod · 0.45
getDockWidgetMethod · 0.45
getToolsMethod · 0.45

Tested by

no test coverage detected