Exemple #1
0
void qtractorInstrumentList::saveData ( QTextStream& ts,
	const qtractorInstrumentData& data ) const
{
	if (!data.basedOn().isEmpty())
	    ts << "BasedOn=" << data.basedOn() << endl;
	qtractorInstrumentData::ConstIterator it = data.constBegin();
	const qtractorInstrumentData::ConstIterator& it_end = data.constEnd();
	for ( ; it != it_end; ++it)
		ts << it.key() << "=" << it.value() << endl;
	ts << endl;
}
void qtractorInstrumentForm::listInstrumentData (
	QTreeWidgetItem *pParentItem, const qtractorInstrumentData& data )
{
	QTreeWidgetItem *pItem = NULL;
	if (!data.basedOn().isEmpty()) {
		pItem = new QTreeWidgetItem(pParentItem, pItem);
		pItem->setIcon(0, QIcon(":/images/itemProperty.png"));
		pItem->setText(0,
			tr("Based On = %1").arg(data.basedOn()));
	}
	qtractorInstrumentData::ConstIterator it
		= data.constBegin();
	const qtractorInstrumentData::ConstIterator& it_end
		= data.constEnd();
	for ( ; it != it_end; ++it) {
		pItem = new QTreeWidgetItem(pParentItem, pItem);
		pItem->setText(0,
			QString("%1 = %2").arg(it.key()).arg(it.value()));
	}
}