本文整理汇总了C++中Spectrum::addBand方法的典型用法代码示例。如果您正苦于以下问题:C++ Spectrum::addBand方法的具体用法?C++ Spectrum::addBand怎么用?C++ Spectrum::addBand使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spectrum
的用法示例。
在下文中一共展示了Spectrum::addBand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readData
//.........这里部分代码省略.........
double betaminusdecay = iso.attributeNode( "betaminusdecay" ).value().toDouble();
double ecdecay = iso.attributeNode( "ecdecay" ).value().toDouble();
QString spin = iso.attributeNode( "spin" ).value();
QString magmoment = iso.attributeNode( "magmoment" ).value();
Isotope *isotope = new Isotope( neutrons,
number,
percentage,
weight,
halflife,
format,
alphadecay,
betaplusdecay,
betaminusdecay,
ecdecay,
alphapercentage,
betapluspercentage,
betaminuspercentage,
ecpercentage,
spin,
magmoment );
isolist.append( isotope );
}
QDomNodeList spectrumList = domElement.namedItem( "spectra" ).toElement().elementsByTagName( "spectrum" );
Element *e = new Element();
e->setDate(date);
e->setBiologicalMeaning(bio);
e->setNumber( number );
e->setName(i18n(name.utf8()));
e->setRadius( Element::ATOMIC, atomic_radius );
e->setRadius( Element::IONIC, ionic_radius, ionic_charge );
e->setRadius( Element::COVALENT, covalent_radius );
e->setRadius( Element::VDW, vdw_radius );
e->setAbundance( abundance );
if ( artificial == 1 )
e->setArtificial();
if ( radioactive == 1 )
e->setRadioactive();
e->setScientist(scientist);
e->setPeriod( period );
e->setCrysatalstructure( crystal );
e->setOrigin(origin);
e->setBlock(block);
e->setGroup(group);
e->setFamily(family);
e->setOrbits(orbits);
e->setSymbol(symbol);
e->setOxydation(oxydation);
e->setAcidicbehaviour(acidicbehaviour);
e->setIonisationList( ionlist );
e->setIsotopeList( isolist );
e->setMass( mass );
e->setEN( en );
e->setEA( ea );
e->setMeltingpoint( mp );
e->setBoilingpoint( bp );
e->setDensity( density );
e->setupXY();
Spectrum *spectrum = new Spectrum();
bool spectrum_temp = false;
if ( spectrumList.length() > 0 )
spectrum_temp = true;
for( uint i = 0; i < spectrumList.length(); i++ )
{
Spectrum::band b;
QDomElement spec = spectrumList.item( i ).toElement();
b.intensity = spec.attributeNode( "intensity" ).value().toInt();
b.wavelength = spec.attributeNode( "wavelength" ).value().toDouble()/10.0;
b.aki = spec.attributeNode( "aki" ).value().toDouble();
b.energy1 = spec.attributeNode( "energy1" ).value().toDouble();
b.energy2 = spec.attributeNode( "energy2" ).value().toDouble();
b.electronconfig1 = spec.attributeNode( "electronconfig1" ).value();
b.electronconfig2 = spec.attributeNode( "electronconfig1" ).value();
b.term1 = spec.attributeNode( "term1" ).value();
b.term2 = spec.attributeNode( "term2" ).value();
b.J1 = spec.attributeNode( "J1" ).value();
b.J2 = spec.attributeNode( "J2" ).value();
spectrum->addBand( b );
}
if ( spectrum_temp ) //if no spectrumdata are found don't use this object
e->setSpectrum( spectrum );
e->setHasSepctrum( spectrum_temp );
list.append( e );
coordinate point; point.x = e->x; point.y = e->y;
CoordinateList.append( point );
}
return list;
}