VCSpeedDialProperties::VCSpeedDialProperties(VCSpeedDial* dial, Doc* doc) : QDialog(dial) , m_dial(dial) , m_doc(doc) { Q_ASSERT(dial != NULL); Q_ASSERT(doc != NULL); setupUi(this); /* Name */ m_nameEdit->setText(m_dial->caption()); /* Functions */ foreach (quint32 id, m_dial->functions()) createFunctionItem(id); /* Speed types */ if (dial->speedTypes() & VCSpeedDial::FadeIn) m_fadeInCheck->setChecked(true); if (dial->speedTypes() & VCSpeedDial::FadeOut) m_fadeOutCheck->setChecked(true); if (dial->speedTypes() & VCSpeedDial::Duration) m_durationCheck->setChecked(true); /* Absolute input */ m_absoluteMinSpin->setValue(m_dial->absoluteValueMin() / 1000); m_absoluteMaxSpin->setValue(m_dial->absoluteValueMax() / 1000); m_absoluteInputSource = m_dial->inputSource(VCSpeedDial::absoluteInputSourceId); /* Tap input */ m_tapInputSource = m_dial->inputSource(VCSpeedDial::tapInputSourceId); updateInputSources(); }
QuickTestTreeItem *QuickTestTreeItem::createTestItem(const TestParseResult &result) { QuickTestTreeItem *item = new QuickTestTreeItem(result.testCaseName, result.fileName, TestCase); item->setProFile(result.proFile); item->setLine(result.line); item->setColumn(result.column); foreach (const QString &functionName, result.functions.keys()) item->appendChild(createFunctionItem(functionName, result.functions.value(functionName))); return item; }
void VCSpeedDialProperties::slotAddClicked() { FunctionSelection fs(this, m_doc); fs.setMultiSelection(true); fs.setDisabledFunctions(functions().toList()); if (fs.exec() == QDialog::Accepted) { foreach (quint32 id, fs.selection()) createFunctionItem(id); } }
AutoTestTreeItem *AutoTestTreeItem::createTestItem(const TestParseResult &result) { AutoTestTreeItem *item = new AutoTestTreeItem(result.testCaseName, result.fileName, TestCase); item->setProFile(result.proFile); item->setLine(result.line); item->setColumn(result.column); foreach (const QString &functionName, result.functions.keys()) { const TestCodeLocationAndType &locationAndType = result.functions.value(functionName); const QString qualifiedName = result.testCaseName + QLatin1String("::") + functionName; item->appendChild(createFunctionItem(functionName, locationAndType, result.dataTagsOrTestSets.value(qualifiedName))); } return item; }