MCPcopy Create free account
hub / github.com/KDE/kdevelop / itemChanged

Method itemChanged

plugins/appwizard/projectselectionpage.cpp:123–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void 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
141QString ProjectSelectionPage::selectedTemplate()
142{

Callers

nothing calls this directly

Calls 6

pixmapMethod · 0.80
dataMethod · 0.45
parentMethod · 0.45
setTextMethod · 0.45
toStringMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected