MCPcopy Create free account
hub / github.com/Atarity/Lightpack / updatePlugin

Method updatePlugin

Software/src/SettingsWindow.cpp:1746–1772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1744}
1745
1746void SettingsWindow::updatePlugin(QList<Plugin*> plugins)
1747{
1748 DEBUG_LOW_LEVEL << Q_FUNC_INFO;
1749
1750
1751 _plugins = plugins;
1752 // sort priority
1753 qSort(_plugins.begin() , _plugins.end(), SettingsWindow::toPriority );
1754 ui->list_Plugins->clear();
1755 foreach(Plugin* plugin, _plugins){
1756 int index = _plugins.indexOf(plugin);
1757 QListWidgetItem *item = new QListWidgetItem(getPluginName(plugin));
1758 item->setData(Qt::UserRole, index);
1759 item->setIcon(plugin->Icon());
1760 if (plugin->isEnabled())
1761 {
1762 item->setCheckState(Qt::Checked);
1763 }
1764 else
1765 item->setCheckState(Qt::Unchecked);
1766
1767 ui->list_Plugins->addItem(item);
1768 }
1769
1770 ui->pushButton_ReloadPlugins->setEnabled(true);
1771
1772}
1773
1774void SettingsWindow::on_list_Plugins_itemClicked(QListWidgetItem* current)
1775{

Callers

nothing calls this directly

Calls 2

setEnabledMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected