| 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 | |