inAlphaDecay = true;
} else if (attrs.value(i) == QLatin1String("bo:alphaDecayLikeliness")) {
d->inAlphaDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:alphabetaminusDecay")) {
+ d->inAlphaBetaminusDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:alphabetaminusDecayLikeliness")) {
+ d->inAlphaBetaminusDecayLikeliness = true;
} else if (attrs.value(i) == QLatin1String("bo:ecDecay")) {
d->inECDecay = true;
} else if (attrs.value(i) == QLatin1String("bo:ecDecayLikeliness")) {
d->inECDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:neutronDecay")) {
+ d->inNeutronDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:neutronDecayLikeliness")) {
+ d->inNeutronDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:protonDecay")) {
+ d->inProtonDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:protonDecayLikeliness")) {
+ d->inProtonDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:protonalphaDecay")) {
+ d->inProtonAlphaDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:protonalphaDecayLikeliness")) {
+ d->inProtonAlphaDecayLikeliness = true;
} else if (attrs.value(i) == QLatin1String("bo:betaminusDecay")) {
d->inBetaminusDecay = true;
} else if (attrs.value(i) == QLatin1String("bo:betaminusDecayLikeliness")) {
d->inBetaminusDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaminusneutronDecay")) {
+ d->inBetaminusNeutronDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaminusneutronDecayLikeliness")) {
+ d->inBetaminusNeutronDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaminusfissionDecay")) {
+ d->inBetaminusFissionDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaminusfissionDecayLikeliness")) {
+ d->inBetaminusFissionDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaminusfissionDecay")) {
+ d->inBetaminusFissionDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaminusfissionDecayLikeliness")) {
+ d->inBetaminusFissionDecayLikeliness = true;
} else if (attrs.value(i) == QLatin1String("bo:betaplusDecay")) {
d->inBetaplusDecay = true;
} else if (attrs.value(i) == QLatin1String("bo:betaplusDecayLikeliness")) {
d->inBetaplusDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaplusprotonDecay")) {
+ d->inBetaplusDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaplusprotonDecayLikeliness")) {
+ d->inBetaplusDecayLikeliness = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaplusalphaDecay")) {
+ d->inBetaplusDecay = true;
+ } else if (attrs.value(i) == QLatin1String("bo:betaplusalphaDecayLikeliness")) {
+ d->inBetaplusDecayLikeliness = true;
} else if (attrs.value(i) == QLatin1String("bo:spin")) {
d->inSpin = true;
} else if (attrs.value(i) == QLatin1String("bo:magneticMoment")) {
@@ -210,6 +282,14 @@
value = ch.toDouble();
type = ChemicalDataObject::alphaDecayLikeliness;
d->inAlphaDecayLikeliness = false;
+ } else if (d->inAlphaBetaminusDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::alphabetaminusDecay;
+ d->inAlphaBetaminusDecay = false;
+ } else if (d->inAlphaBetaminusDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::alphabetaminusDecayLikeliness;
+ d->inAlphaBetaminusDecayLikeliness = false;
} else if (d->inBetaplusDecay) {
value = ch.toDouble();
type = ChemicalDataObject::betaplusDecay;
@@ -218,6 +298,22 @@
value = ch.toDouble();
type = ChemicalDataObject::betaplusDecayLikeliness;
d->inBetaplusDecayLikeliness = false;
+ } else if (d->inBetaplusProtonDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaplusprotonDecay;
+ d->inBetaplusProtonDecay = false;
+ } else if (d->inBetaplusProtonDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaplusprotonDecayLikeliness;
+ d->inBetaplusProtonDecayLikeliness = false;
+ } else if (d->inBetaplusAlphaDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaplusalphaDecay;
+ d->inBetaplusAlphaDecay = false;
+ } else if (d->inBetaplusAlphaDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaplusalphaDecayLikeliness;
+ d->inBetaplusAlphaDecayLikeliness = false;
} else if (d->inBetaminusDecay) {
value = ch.toDouble();
type = ChemicalDataObject::betaminusDecay;
@@ -226,6 +322,30 @@
value = ch.toDouble();
type = ChemicalDataObject::betaminusDecayLikeliness;
d->inBetaminusDecayLikeliness = false;
+ } else if (d->inBetaminusNeutronDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaminusneutronDecay;
+ d->inBetaminusNeutronDecay = false;
+ } else if (d->inBetaminusNeutronDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaminusneutronDecayLikeliness;
+ d->inBetaminusNeutronDecayLikeliness = false;
+ } else if (d->inBetaminusFissionDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaminusfissionDecay;
+ d->inBetaminusFissionDecay = false;
+ } else if (d->inBetaminusFissionDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaminusfissionDecayLikeliness;
+ d->inBetaminusFissionDecayLikeliness = false;
+ } else if (d->inBetaminusAlphaDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaminusalphaDecay;
+ d->inBetaminusAlphaDecay = false;
+ } else if (d->inBetaminusAlphaDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::betaminusalphaDecayLikeliness;
+ d->inBetaminusAlphaDecayLikeliness = false;
} else if (d->inECDecayLikeliness) {
value = ch.toDouble();
type = ChemicalDataObject::ecDecayLikeliness;
@@ -234,6 +354,30 @@
value = ch.toDouble();
type = ChemicalDataObject::ecDecay;
d->inECDecay = false;
+ } else if (d->inNeutronDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::neutronDecayLikeliness;
+ d->inNeutronDecayLikeliness = false;
+ } else if (d->inNeutronDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::neutronDecay;
+ d->inNeutronDecay = false;
+ } else if (d->inProtonDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::protonDecayLikeliness;
+ d->inProtonDecayLikeliness = false;
+ } else if (d->inProtonDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::protonDecay;
+ d->inProtonDecay = false;
+ } else if (d->inProtonAlphaDecayLikeliness) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::protonalphaDecayLikeliness;
+ d->inProtonAlphaDecayLikeliness = false;
+ } else if (d->inProtonAlphaDecay) {
+ value = ch.toDouble();
+ type = ChemicalDataObject::protonalphaDecay;
+ d->inProtonAlphaDecay = false;
} else if (d->inAbundance) {
value = ch;
type = ChemicalDataObject::relativeAbundance;
diff --git a/src/detailinfodlg.cpp b/src/detailinfodlg.cpp
--- a/src/detailinfodlg.cpp
+++ b/src/detailinfodlg.cpp
@@ -137,7 +137,7 @@
item->setHeader(icontext);
item->setIcon(QIcon::fromTheme(iconname));
QVBoxLayout *layout = new QVBoxLayout(frame);
- layout->setContentsMargins(0, 0, 0, 0);
+ layout->setMargin(0);
KHTMLPart *w = new KHTMLPart(frame, frame);
w->setJScriptEnabled(false);
@@ -393,6 +393,18 @@
html.append(i18n(", "));
}
}
+ if ((isotope)->alphabetaminuslikeliness() > 0.0) {
+ if ((isotope)->alphabetaminusdecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->alphabetaminusdecay()));
+ }
+ html.append(i18n(" %1, %2-", QChar(945), QChar(946) ));
+ if ((isotope)->alphabetaminuslikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->alphabetaminuslikeliness()));
+ }
+ if ((isotope)->betaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
+ html.append(i18n(", "));
+ }
+ }
if ((isotope)->betaminuslikeliness() > 0.0) {
if ((isotope)->betaminusdecay() > 0.0) {
html.append(i18n("%1 MeV", (isotope)->betaminusdecay()));
@@ -406,6 +418,45 @@
html.append(i18n(", "));
}
}
+ if ((isotope)->betaminusneutronlikeliness() > 0.0) {
+ if ((isotope)->betaminusneutrondecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->betaminusneutrondecay()));
+ }
+ html.append(i18n(" %1-, n", QChar(946)));
+ if ((isotope)->betaminusneutronlikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->betaminusneutronlikeliness()));
+ }
+
+ if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
+ html.append(i18n(", "));
+ }
+ }
+ if ((isotope)->betaminusfissionlikeliness() > 0.0) {
+ if ((isotope)->betaminusfissiondecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->betaminusfissiondecay()));
+ }
+ html.append(i18n(" %1-, fission", QChar(946)));
+ if ((isotope)->betaminusfissionlikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->betaminusfissionlikeliness()));
+ }
+
+ if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
+ html.append(i18n(", "));
+ }
+ }
+ if ((isotope)->betaminusalphalikeliness() > 0.0) {
+ if ((isotope)->betaminusalphadecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->betaminusalphadecay()));
+ }
+ html.append(i18n(" %1-, %2", QChar(946), QChar(945)));
+ if ((isotope)->betaminusalphalikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->betaminusalphalikeliness()));
+ }
+
+ if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
+ html.append(i18n(", "));
+ }
+ }
if ((isotope)->betapluslikeliness() > 0.0) {
if ((isotope)->betaplusdecay() > 0.0) {
html.append(i18n("%1 MeV", (isotope)->betaplusdecay()));
@@ -422,6 +473,26 @@
}
html += ' ';
}
+ if ((isotope)->betaplusprotonlikeliness() > 0.0) {
+ if ((isotope)->betaplusprotondecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->betaplusprotondecay()));
+ }
+ html.append(i18n(" %1+, p", QChar(946)));
+ if ((isotope)->betaplusprotonlikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->betaplusprotonlikeliness()));
+ }
+ html += ' ';
+ }
+ if ((isotope)->betaplusalphalikeliness() > 0.0) {
+ if ((isotope)->betaplusalphadecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->betaplusalphadecay()));
+ }
+ html.append(i18n(" %1+, %2", QChar(946),QChar(945)));
+ if ((isotope)->betaplusalphalikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->betaplusalphalikeliness()));
+ }
+ html += ' ';
+ }
if ((isotope)->eclikeliness() > 0.0) {
if ((isotope)->ecdecay() > 0.0) {
html.append(i18n("%1 MeV", (isotope)->ecdecay()));
@@ -431,6 +502,35 @@
html.append(i18n("(%1%)", (isotope)->eclikeliness()));
}
}
+ if ((isotope)->neutronlikeliness() > 0.0) {
+ if ((isotope)->neutrondecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->neutrondecay()));
+ }
+ html.append(i18nc("Acronym of neutron emission"," n"));
+ if ((isotope)->neutronlikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->neutronlikeliness()));
+ }
+ }
+ if ((isotope)->protonlikeliness() > 0.0) {
+ if ((isotope)->protondecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->protondecay()));
+ }
+ html.append(i18nc("Acronym of proton emission"," p"));
+ if ((isotope)->protonlikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->protonlikeliness()));
+ }
+ }
+ if ((isotope)->protonalphalikeliness() > 0.0) {
+ if ((isotope)->protonalphadecay() > 0.0) {
+ html.append(i18n("%1 MeV", (isotope)->protonalphadecay()));
+ }
+ html.append(i18n(" p, %1", QChar(945)));
+ if ((isotope)->protonlikeliness() < 100.0) {
+ html.append(i18n("(%1%)", (isotope)->protonlikeliness()));
+ }
+ }
+
+
html.append("");
html.append((isotope)->spin());
html.append(" | ");
@@ -457,7 +557,7 @@
// item->setHeader(i18n("Overview"));
// item->setIcon(QIcon("overview"));
// QVBoxLayout *overviewLayout = new QVBoxLayout(m_pOverviewTab);
-// overviewLayout->setContentsMargins(0, 0, 0, 0);
+// overviewLayout->setMargin(0);
// dTab = new DetailedGraphicalOverview(m_pOverviewTab);
// dTab->setObjectName("DetailedGraphicalOverview");
// overviewLayout->addWidget(dTab);
@@ -468,7 +568,7 @@
//X item->setHeader(i18n("What does this element look like?"));
//X item->setIcon(QIcon("elempic"));
//X QVBoxLayout *mainLayout = new QVBoxLayout(m_pPictureTab);
-//X mainLayout->setContentsMargins(0, 0, 0, 0);
+//X mainLayout->setMargin(0);
//X piclabel = new QLabel(m_pPictureTab);
//X piclabel->setMinimumSize(400, 350);
//X mainLayout->addWidget(piclabel);
@@ -482,7 +582,7 @@
item->setHeader(i18n("Atom Model"));
item->setIcon(QIcon::fromTheme(QStringLiteral("orbits")));
QVBoxLayout *modelLayout = new QVBoxLayout(m_pModelTab);
- modelLayout->setContentsMargins(0, 0, 0, 0);
+ modelLayout->setMargin(0);
wOrbits = new OrbitsWidget(m_pModelTab);
modelLayout->addWidget(wOrbits);
@@ -497,7 +597,7 @@
item->setHeader(i18n("Spectrum"));
item->setIcon(QIcon::fromTheme(QStringLiteral("spectrum")));
QVBoxLayout *spectrumLayout = new QVBoxLayout(m_pSpectrumTab);
- spectrumLayout->setContentsMargins(0, 0, 0, 0);
+ spectrumLayout->setMargin(0);
m_spectrumStack = new QStackedWidget(m_pSpectrumTab);
spectrumLayout->addWidget(m_spectrumStack);
m_spectrumview = new SpectrumViewImpl(m_spectrumStack);
diff --git a/src/isotopetable/isotopeitem.h b/src/isotopetable/isotopeitem.h
--- a/src/isotopetable/isotopeitem.h
+++ b/src/isotopetable/isotopeitem.h
@@ -36,7 +36,7 @@
/**
* there are several types of decay for an isotope.
*/
- enum IsotopeType { alpha, ec, multiple, bplus, bminus, stable };
+ enum IsotopeType { alpha, ec, multiple, bplus, bminus, unknown, stable };
enum { Type = UserType + 1 };
diff --git a/src/isotopetable/isotopeitem.cpp b/src/isotopetable/isotopeitem.cpp
--- a/src/isotopetable/isotopeitem.cpp
+++ b/src/isotopetable/isotopeitem.cpp
@@ -56,8 +56,11 @@
case bminus:
b = QBrush(Qt::white);
break;
+ case unknown:
+ b = QBrush(Qt::darkGray);
+ break;
case stable:
- b = QBrush(Qt::lightGray);
+ b = QBrush(Qt::magenta);
break;
default:
b = QBrush(Qt::darkGray);
@@ -118,16 +121,19 @@
if (isotope->alphalikeliness() > 60.0) {
return IsotopeItem::alpha;
}
- if (isotope->betaminuslikeliness() > 60.0) {
+ if (isotope->betaminuslikeliness() > 60.0 || isotope->betaminusneutronlikeliness() > 60.0 || isotope->betaminusfissionlikeliness() > 60.0) {
return IsotopeItem::bminus;
}
- if (isotope->betapluslikeliness() > 60.0) {
- return IsotopeItem::bminus;
+ if (isotope->betapluslikeliness() > 60.0 || isotope->betaplusalphalikeliness() > 60.0 || isotope->betaplusalphalikeliness() > 60.0) {
+ return IsotopeItem::bplus;
}
if (isotope->eclikeliness() > 60.0) {
return IsotopeItem::ec;
- } else {
+ }
+ if (!(isotope->halflife() > 0.0) && !(isotope->abundance().isEmpty())) {
return IsotopeItem::stable;
+ } else {
+ return IsotopeItem::unknown;
}
}
diff --git a/src/isotopetable/isotopetabledialog.cpp b/src/isotopetable/isotopetabledialog.cpp
--- a/src/isotopetable/isotopetabledialog.cpp
+++ b/src/isotopetable/isotopetabledialog.cpp
@@ -64,8 +64,8 @@
items << qMakePair(i18nc("Many ways", "Multiple"), QColor(Qt::green));
items << qMakePair(i18nc("Beta plus ray emission", "Beta +"), QColor(Qt::yellow));
items << qMakePair(i18nc("Beta minus ray emission", "Beta -"), QColor(Qt::white));
- items << qMakePair(i18nc("Stable isotope", "Stable"), QColor(Qt::lightGray));
- items << qMakePair(i18nc("Default colour", "default"), QColor(Qt::darkGray));
+ items << qMakePair(i18nc("Stable isotope", "Stable"), QColor(Qt::magenta));
+ items << qMakePair(i18nc("Unknown Decay", "unknown"), QColor(Qt::darkGray));
foreach (const legendPair &pair, items) {
LegendItem *item = new LegendItem(pair);
|