| 1744 | } |
| 1745 | |
| 1746 | void 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 | |
| 1774 | void SettingsWindow::on_list_Plugins_itemClicked(QListWidgetItem* current) |
| 1775 | { |
nothing calls this directly
no test coverage detected