| 121 | } |
| 122 | |
| 123 | void ProjectSelectionPage::itemChanged( const QModelIndex& current) |
| 124 | { |
| 125 | TemplatePreviewIcon icon = current.data(KDevelop::TemplatesModel::PreviewIconRole).value<TemplatePreviewIcon>(); |
| 126 | |
| 127 | QPixmap pixmap = icon.pixmap(); |
| 128 | ui->icon->setPixmap(pixmap); |
| 129 | ui->icon->setFixedHeight(pixmap.height()); |
| 130 | // header name is either from this index directly or the parents if we show the combo box |
| 131 | const QVariant headerData = ui->templateType->isVisible() |
| 132 | ? current.parent().data() |
| 133 | : current.data(); |
| 134 | ui->header->setText(QStringLiteral("<h1>%1</h1>").arg(headerData.toString().trimmed())); |
| 135 | ui->description->setText(current.data(KDevelop::TemplatesModel::CommentRole).toString()); |
| 136 | validateData(); |
| 137 | |
| 138 | ui->propertiesBox->setEnabled(true); |
| 139 | } |
| 140 | |
| 141 | QString ProjectSelectionPage::selectedTemplate() |
| 142 | { |