| 81 | } |
| 82 | |
| 83 | void ScriptModel::refresh() |
| 84 | { |
| 85 | beginResetModel(); |
| 86 | scriptList.clear(); |
| 87 | for(int i=0;i<ScriptType::UNKNOWN_STYPE;++i) |
| 88 | { |
| 89 | auto type = ScriptType(i); |
| 90 | for(const auto &s: GlobalObjects::scriptManager->scripts(type)) |
| 91 | { |
| 92 | scriptList.append({type, s->id(), s->name(), s->version(), s->desc(), s->getValue("path"), !s->settings().empty(), !s->getScriptMenuItems().empty()}); |
| 93 | } |
| 94 | } |
| 95 | endResetModel(); |
| 96 | } |
| 97 | |
| 98 | void ScriptProxyModel::setType(int type) |
| 99 | { |