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

Method typeChanged

plugins/appwizard/projectselectionpage.cpp:97–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void ProjectSelectionPage::typeChanged(const QModelIndex& idx)
98{
99 if (!idx.model())
100 {
101 qCDebug(PLUGIN_APPWIZARD) << "Index with no model";
102 return;
103 }
104 int children = idx.model()->rowCount(idx);
105 ui->templateType->setVisible(children);
106 ui->templateType->setEnabled(children > 1);
107 if (children) {
108 ui->templateType->setModel(m_templatesModel);
109 ui->templateType->setRootModelIndex(idx);
110 ui->templateType->setCurrentIndex(0);
111 itemChanged(idx.model()->index(0, 0, idx));
112 } else {
113 itemChanged(idx);
114 }
115}
116
117void ProjectSelectionPage::templateChanged(int current)
118{

Callers

nothing calls this directly

Calls 7

setCurrentIndexMethod · 0.80
modelMethod · 0.45
rowCountMethod · 0.45
setVisibleMethod · 0.45
setEnabledMethod · 0.45
setModelMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected