File indexing completed on 2024-04-21 03:41:41

0001 /*
0002     SPDX-FileCopyrightText: 2003, 2004, 2005, 2006 Carsten Niehaus <cniehaus@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "detailinfodlg.h"
0007 
0008 #include "element.h"
0009 #include "isotope.h"
0010 #include "kalziumdataobject.h"
0011 #include "kalziumutils.h"
0012 #include "orbitswidget.h"
0013 #include "prefs.h"
0014 #include "psetables.h"
0015 #include "spectrumviewimpl.h"
0016 
0017 #include <QDialog>
0018 #include <QDialogButtonBox>
0019 #include <QFile>
0020 #include <QFileInfo>
0021 #include <QIcon>
0022 #include <QImage>
0023 #include <QLabel>
0024 #include <QLocale>
0025 #include <QStackedWidget>
0026 #include <QStandardPaths>
0027 #include <QTextBrowser>
0028 
0029 #include <KActionCollection>
0030 #include <KHelpClient>
0031 
0032 DetailedInfoDlg::DetailedInfoDlg(int el, QWidget *parent)
0033     : KPageDialog(parent)
0034     , m_tableTyp(0)
0035 {
0036     setFaceType(List);
0037 
0038     buttonBox()->clear();
0039     buttonBox()->addButton(QDialogButtonBox::Close);
0040     buttonBox()->addButton(QDialogButtonBox::Help);
0041 
0042     const QString nextButtonIconSource = (layoutDirection() == Qt::LeftToRight) ? "arrow-right" : "arrow-left";
0043     auto nextButton = new QPushButton(QIcon::fromTheme(nextButtonIconSource), i18nc("Next element", "Next"), this);
0044     nextButton->setToolTip(i18n("Goes to the next element"));
0045 
0046     const QString prevButtonIconSource = (layoutDirection() == Qt::LeftToRight) ? "arrow-left" : "arrow-right";
0047     auto prevButton = new QPushButton(QIcon::fromTheme(prevButtonIconSource), i18nc("Previous element", "Previous"), this);
0048     prevButton->setToolTip(i18n("Goes to the previous element"));
0049 
0050     buttonBox()->addButton(prevButton, QDialogButtonBox::ActionRole);
0051     buttonBox()->addButton(nextButton, QDialogButtonBox::ActionRole);
0052 
0053     resize(820, 580);
0054 
0055     m_baseHtml = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/htmlview/"), QStandardPaths::LocateDirectory);
0056     m_baseHtml2 = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QStringLiteral("data/hazardsymbols/"), QStandardPaths::LocateDirectory);
0057 
0058     // X     m_picsdir = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, "elempics/") + "elempics/";
0059     // X     m_picsdir = QFileInfo(m_picsdir).absolutePath();
0060 
0061     // creating the tabs but not the contents, as that will be done when setting the element
0062     createContent();
0063 
0064     m_actionCollection = new KActionCollection(this);
0065     KStandardAction::quit(this, SLOT(close()), m_actionCollection);
0066 
0067     connect(prevButton, &QPushButton::clicked, this, &DetailedInfoDlg::showPreviousElement);
0068     connect(nextButton, &QPushButton::clicked, this, &DetailedInfoDlg::showNextElement);
0069     connect(buttonBox(), &QDialogButtonBox::helpRequested, this, &DetailedInfoDlg::slotHelp);
0070 
0071     // setting the element and updating the whole dialog
0072     setElement(el);
0073 }
0074 
0075 DetailedInfoDlg::~DetailedInfoDlg()
0076 {
0077     qDeleteAll(m_htmlpages);
0078 }
0079 
0080 void DetailedInfoDlg::setElement(int el)
0081 {
0082     Element *element = KalziumDataObject::instance()->element(el);
0083     if (!element) {
0084         return;
0085     }
0086 
0087     m_element = element;
0088     m_elementNumber = el;
0089 
0090     Q_EMIT elementChanged(m_elementNumber);
0091 
0092     reloadContent();
0093 
0094     /* enableButton(User1, true);
0095      user2Button->setEnabled(true);
0096       if (m_elementNumber == 1) {
0097           user2Button->setEnabled(false);
0098       } else if (m_elementNumber == KalziumDataObject::instance()->numberOfElements()) {
0099           user1Button->setEnabled(false);
0100       }*/
0101 }
0102 
0103 // void DetailedInfoDlg::setOverviewBackgroundColor(const QColor &bgColor)
0104 // {
0105 // //     dTab->setBackgroundColor(bgColor);
0106 // }
0107 
0108 void DetailedInfoDlg::setTableType(int tableTyp)
0109 {
0110     m_tableTyp = tableTyp;
0111 }
0112 
0113 QTextBrowser *DetailedInfoDlg::addHTMLTab(const QString &title, const QString &icontext, const QString &iconname)
0114 {
0115     auto frame = new QWidget(this);
0116     KPageWidgetItem *item = addPage(frame, title);
0117     item->setHeader(icontext);
0118     item->setIcon(QIcon::fromTheme(iconname));
0119     auto layout = new QVBoxLayout(frame);
0120     layout->setContentsMargins(0, 0, 0, 0);
0121     auto browser = new QTextBrowser(frame);
0122     browser->setOpenExternalLinks(true);
0123     layout->addWidget(browser);
0124     return browser;
0125 }
0126 
0127 void DetailedInfoDlg::fillHTMLTab(QTextBrowser *browser, const QString &htmlcode)
0128 {
0129     if (!browser) {
0130         return;
0131     }
0132     browser->setHtml(htmlcode);
0133 }
0134 
0135 QString DetailedInfoDlg::getHtml(DATATYPE type)
0136 {
0137     QString html = R"(<table width="100%" summary="characteristics">)";
0138 
0139     switch (type) {
0140     case MISC: {
0141         // discovery date and discoverers
0142         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(discovery.png" alt="icon"/></td><td>)");
0143         html += KalziumUtils::prettyUnit(m_element, ChemicalDataObject::date);
0144         QString discoverers = m_element->dataAsString(ChemicalDataObject::discoverers);
0145         if (!discoverers.isEmpty()) {
0146             discoverers = discoverers.replace(';', QLatin1String(", "));
0147             html += "<br />" + i18n("It was discovered by %1.", discoverers);
0148         }
0149         html.append("</td></tr>");
0150         // origin of the name
0151         QString nameorigin = m_element->dataAsString(ChemicalDataObject::nameOrigin);
0152         if (!nameorigin.isEmpty()) {
0153             html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(book.png" alt="icon"/></td><td>)");
0154             html.append(i18n("Origin of the name:<br/>%1", nameorigin));
0155             html.append("</td></tr>");
0156         }
0157         // X             if (m_element->artificial() || m_element->radioactive()) {
0158         // X                 html.append("<tr><td><img src=\"file://" + m_baseHtml + "structure.png\" alt=\"icon\"/></td><td>");
0159         // X                 if (!m_element->radioactive()) {
0160         // X                     html.append(i18n("This element is artificial"));
0161         // X                 } else if (!m_element->artificial()) {
0162         // X                     html.append(i18n("This element is radioactive"));
0163         // X                 } else {
0164         // X                     html.append(i18n("This element is radioactive and artificial"));
0165         // X                 }
0166         // X                 html.append("</td></tr>");
0167         // X             }
0168         break;
0169     }
0170     case ISOTOPES: {
0171         html.append("<tr><td>");
0172         html.append(isotopeTable());
0173         html.append("</td></tr>");
0174         break;
0175     }
0176     case DATA: {
0177         // melting point
0178         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(meltingpoint.png" alt="icon"/></td><td>)");
0179         html.append(createWikiLink(i18n("Melting Point")));
0180         html.append("</td><td>");
0181         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::meltingpoint));
0182         html.append("</td></tr>");
0183 
0184         // boiling point
0185         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(boilingpoint.png" alt="icon"/></td><td>)");
0186         html.append(createWikiLink(i18n("Boiling Point")));
0187         html.append("</td><td>");
0188         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::boilingpoint));
0189         html.append("</td></tr>");
0190 
0191         // electro affinity
0192         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(electronaffinity.png" alt="icon"/></td><td>)");
0193         html.append(createWikiLink(i18n("Electron Affinity")));
0194         html.append("</td><td>");
0195         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::electronAffinity));
0196         html.append("</td></tr>");
0197 
0198         // Electronic configuration
0199         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(structure.png" alt="icon"/></td><td>)");
0200         html.append(createWikiLink(i18n("Electronic configuration")));
0201         html.append("</td><td>");
0202         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::electronicConfiguration));
0203         html.append("</td></tr>");
0204 
0205         // covalent radius
0206         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(radius.png" alt="icon"/></td><td>)");
0207         html.append(createWikiLink(i18n("Covalent Radius")));
0208         html.append("</td><td>");
0209         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::radiusCovalent));
0210         html.append("</td></tr>");
0211 
0212         // van der Waals radius
0213         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(radius.png" alt="icon"/></td><td>)");
0214         html.append(createWikiLink(i18n("Van der Waals Radius")));
0215         html.append("</td><td>");
0216         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::radiusVDW));
0217         html.append("</td></tr>");
0218 
0219         // mass
0220         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(mass.png" alt="icon"/></td><td>)");
0221         html.append(createWikiLink(i18n("Atomic mass")));
0222         html.append("</td><td>");
0223         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::mass));
0224         html.append("</td></tr>");
0225 
0226         // 1st ionization energy
0227         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(ionization.png" alt="icon"/></td><td>)");
0228         html.append(createWikiLink(i18n("Ionization energy"), i18n("First Ionization energy")));
0229         html.append("</td><td>");
0230         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::ionization));
0231         html.append("</td></tr>");
0232 
0233         // electro negativity
0234         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(structure.png" alt="icon"/></td><td>)");
0235         html.append(createWikiLink(i18n("Electronegativity")));
0236         html.append("</td><td>");
0237         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::electronegativityPauling));
0238         html.append("</td></tr>");
0239 
0240         // Oxidation numbers
0241         html.append("<tr><td><img src=\"file://" + m_baseHtml + R"(ionization.png" alt="icon"/></td><td>)");
0242         html.append(createWikiLink(i18n("Oxidation states")));
0243         html.append("</td><td>");
0244         html.append(KalziumUtils::prettyUnit(m_element, ChemicalDataObject::oxidation));
0245         html.append("</td></tr>");
0246         break;
0247     }
0248     case EXTRA: {
0249         // Wikipedia.org
0250         //         html.append ("<tr><td><img src=\"file://" + m_baseHtml + "wiki.png\" alt=\"icon\"/></td><td>");
0251         html.append("<tr><td>");
0252         html.append(createWikiLink(m_element->dataAsString(ChemicalDataObject::name),
0253                                    i18nc("Link to element's Wikipedia page, %1 is localized language name", "Wikipedia (%1)", QLocale().nativeLanguageName())));
0254         html.append("</td></tr>");
0255 
0256         // https://education.jlab.org/itselemental/ele001.html
0257         html.append("<tr><td>");
0258         html.append("<a href=\"https://"); // https://
0259         html.append("education.jlab.org/itselemental/ele");
0260         html.append(QStringLiteral("%1").arg(m_element->dataAsString(ChemicalDataObject::atomicNumber), 3, '0'));
0261         html.append(".html");
0262         html.append(R"(" target="_blank" > )");
0263         html.append("Jefferson Lab");
0264         html.append("</a>");
0265         html.append("</td></tr>");
0266 
0267         // FIXME only works with english locals
0268         html.append("<tr><td>");
0269         html.append("<a href=\"https://"); // https://
0270         html.append("www.webelements.com/");
0271         if (QLocale().uiLanguages().first().startsWith(QLatin1String("en"))) {
0272             html.append(m_element->dataAsString(ChemicalDataObject::name).toLower()); // hydrogen
0273         }
0274         html.append(R"(" target="_blank" >)");
0275         html.append("Webelements");
0276         html.append("</a></td></tr>");
0277 
0278         // chemipedia.org
0279         // html.append("<tr><td><img src=\"file://" + m_baseHtml + "chemi.png\" alt=\"icon\"/></td><td>");
0280 
0281         // html.append("</td></tr>");
0282         // physics.nist.gov
0283         // html.append("<tr><td><img src=\"file://" + m_baseHtml + "nist.png\" alt=\"icon\"/></td><td>");
0284 
0285         // html.append("</td></tr>");
0286     }
0287     }
0288 
0289     html += QLatin1String("</table></div></body></html>");
0290 
0291     return html;
0292 }
0293 
0294 QString DetailedInfoDlg::isotopeTable() const
0295 {
0296     QList<Isotope *> list = KalziumDataObject::instance()->isotopes(m_elementNumber);
0297 
0298     QString html;
0299     html = QStringLiteral("<table cellspacing=\"0\" border=\"1\" cellpadding=\"3\" style=\"border-style: solid;\"><tr><th>");
0300     html += i18n("Mass");
0301     html += QLatin1String("</th><th>");
0302     html += i18n("Neutrons");
0303     html += QLatin1String("</th><th>");
0304     html += i18n("Percentage");
0305     html += QLatin1String("</th><th>");
0306     html += i18n("Half-life period");
0307     html += QLatin1String("</th><th>");
0308     html += i18n("Energy and Mode of Decay");
0309     html += QLatin1String("</th><th>");
0310     html += i18n("Spin and Parity");
0311     html += QLatin1String("</th><th>");
0312     html += i18n("Magnetic Moment");
0313     html += QLatin1String("</th></tr>");
0314 
0315     foreach (Isotope *isotope, list) {
0316         html.append("<tr><td align=\"right\">");
0317         if (isotope->mass() > 0.0) {
0318             html.append(i18n("%1 u", isotope->mass()));
0319         }
0320         html.append("</td><td>");
0321         html.append(QString::number(((isotope)->nucleons() - (isotope)->parentElementNumber())));
0322         html.append("</td><td>");
0323         if (!(isotope)->abundance().isEmpty()) {
0324             html.append(i18nc("this can for example be '24%'", "%1%", (isotope)->abundance()));
0325         }
0326         html.append("</td><td>");
0327         if ((isotope)->halflife() > 0.0) {
0328             html.append(i18nc("The first argument is the value, the second is the unit. For example '17 s' for '17 seconds',.",
0329                               "%1 %2",
0330                               (isotope)->halflife(),
0331                               (isotope)->halflifeUnit()));
0332         }
0333         html.append("</td><td>");
0334         if ((isotope)->spontfissionlikeliness() > 0.0) {
0335             if ((isotope)->spontfissiondecay() > 0.0) {
0336                 html.append(i18n("%1 MeV", (isotope)->spontfissiondecay()));
0337             }
0338             html.append(i18nc("Spontaneous fission", " SF"));
0339             if ((isotope)->spontfissionlikeliness() < 100.0) {
0340                 html.append(i18n("(%1%)", (isotope)->spontfissionlikeliness()));
0341             }
0342             if ((isotope)->alphalikeliness() > 0.0 || (isotope)->protonlikeliness() > 0.0 || (isotope)->twoprotonlikeliness() > 0.0
0343                 || (isotope)->neutronlikeliness() > 0.0 || (isotope)->twoneutronlikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0
0344                 || (isotope)->twoeclikeliness() > 0.0 || (isotope)->betaminuslikeliness() > 0.0 || (isotope)->betaminusfissionlikeliness() > 0.0
0345                 || (isotope)->twobetaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0
0346                 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0347                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0348                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0349                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0350                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0351                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0352                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0353                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0354                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0355                 html.append(i18n(", "));
0356             }
0357         }
0358         if ((isotope)->alphalikeliness() > 0.0) {
0359             if ((isotope)->alphadecay() > 0.0) {
0360                 html.append(i18n("%1 MeV", (isotope)->alphadecay()));
0361             }
0362             html.append(i18nc("Alpha decay", " %1", QChar(945)));
0363             if ((isotope)->alphalikeliness() < 100.0) {
0364                 html.append(i18n("(%1%)", (isotope)->alphalikeliness()));
0365             }
0366             if ((isotope)->protonlikeliness() > 0.0 || (isotope)->twoprotonlikeliness() > 0.0 || (isotope)->neutronlikeliness() > 0.0
0367                 || (isotope)->twoneutronlikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0 || (isotope)->twoeclikeliness() > 0.0
0368                 || (isotope)->betaminuslikeliness() > 0.0 || (isotope)->betaminusfissionlikeliness() > 0.0 || (isotope)->twobetaminuslikeliness() > 0.0
0369                 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0
0370                 || (isotope)->betaminustwoneutronlikeliness() > 0.0 || (isotope)->betaminusthreeneutronlikeliness() > 0.0
0371                 || (isotope)->betaminusfourneutronlikeliness() > 0.0 || (isotope)->betaminusalphaneutronlikeliness() > 0.0
0372                 || (isotope)->betaminusalphalikeliness() > 0.0 || (isotope)->betaminustwoalphalikeliness() > 0.0
0373                 || (isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0374                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0375                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0376                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0377                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0378                 html.append(i18n(", "));
0379             }
0380         }
0381         if ((isotope)->protonlikeliness() > 0.0) {
0382             if ((isotope)->protondecay() > 0.0) {
0383                 html.append(i18n("%1 MeV", (isotope)->protondecay()));
0384             }
0385             html.append(i18nc("Proton decay", " p"));
0386             if ((isotope)->protonlikeliness() < 100.0) {
0387                 html.append(i18n("(%1%)", (isotope)->protonlikeliness()));
0388             }
0389             if ((isotope)->twoprotonlikeliness() > 0.0 || (isotope)->neutronlikeliness() > 0.0 || (isotope)->twoneutronlikeliness() > 0.0
0390                 || (isotope)->eclikeliness() > 0.0 || (isotope)->twoeclikeliness() > 0.0 || (isotope)->betaminuslikeliness() > 0.0
0391                 || (isotope)->betaminusfissionlikeliness() > 0.0 || (isotope)->twobetaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0
0392                 || (isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0393                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0394                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0395                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0396                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0397                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0398                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0399                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0400                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0401                 html.append(i18n(", "));
0402             }
0403         }
0404         if ((isotope)->twoprotonlikeliness() > 0.0) {
0405             if ((isotope)->twoprotondecay() > 0.0) {
0406                 html.append(i18n("%1 MeV", (isotope)->twoprotondecay()));
0407             }
0408             html.append(i18n(" 2p"));
0409             if ((isotope)->twoprotonlikeliness() < 100.0) {
0410                 html.append(i18n("(%1%)", (isotope)->twoprotonlikeliness()));
0411             }
0412             if ((isotope)->neutronlikeliness() > 0.0 || (isotope)->twoneutronlikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0
0413                 || (isotope)->twoeclikeliness() > 0.0 || (isotope)->betaminuslikeliness() > 0.0 || (isotope)->betaminusfissionlikeliness() > 0.0
0414                 || (isotope)->twobetaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0
0415                 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0416                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0417                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0418                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0419                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0420                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0421                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0422                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0423                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0424                 html.append(i18n(", "));
0425             }
0426         }
0427         if ((isotope)->neutronlikeliness() > 0.0) {
0428             if ((isotope)->neutrondecay() > 0.0) {
0429                 html.append(i18n("%1 MeV", (isotope)->neutrondecay()));
0430             }
0431             html.append(i18nc("Neutron decay", " n"));
0432             if ((isotope)->neutronlikeliness() < 100.0) {
0433                 html.append(i18n("(%1%)", (isotope)->neutronlikeliness()));
0434             }
0435             if ((isotope)->twoneutronlikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0 || (isotope)->twoeclikeliness() > 0.0
0436                 || (isotope)->betaminuslikeliness() > 0.0 || (isotope)->betaminusfissionlikeliness() > 0.0 || (isotope)->twobetaminuslikeliness() > 0.0
0437                 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0
0438                 || (isotope)->betaminustwoneutronlikeliness() > 0.0 || (isotope)->betaminusthreeneutronlikeliness() > 0.0
0439                 || (isotope)->betaminusfourneutronlikeliness() > 0.0 || (isotope)->betaminusalphaneutronlikeliness() > 0.0
0440                 || (isotope)->betaminusalphalikeliness() > 0.0 || (isotope)->betaminustwoalphalikeliness() > 0.0
0441                 || (isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0442                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0443                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0444                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0445                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0446                 html.append(i18n(", "));
0447             }
0448         }
0449         if ((isotope)->twoneutronlikeliness() > 0.0) {
0450             if ((isotope)->twoneutrondecay() > 0.0) {
0451                 html.append(i18n("%1 MeV", (isotope)->twoneutrondecay()));
0452             }
0453             html.append(i18n(" 2n"));
0454             if ((isotope)->twoneutronlikeliness() < 100.0) {
0455                 html.append(i18n("(%1%)", (isotope)->twoneutronlikeliness()));
0456             }
0457             if ((isotope)->eclikeliness() > 0.0 || (isotope)->twoeclikeliness() > 0.0 || (isotope)->betaminuslikeliness() > 0.0
0458                 || (isotope)->betaminusfissionlikeliness() > 0.0 || (isotope)->twobetaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0
0459                 || (isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0460                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0461                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0462                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0463                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0464                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0465                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0466                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0467                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0468                 html.append(i18n(", "));
0469             }
0470         }
0471         if ((isotope)->eclikeliness() > 0.0) {
0472             if ((isotope)->ecdecay() > 0.0) {
0473                 html.append(i18n("%1 MeV", (isotope)->ecdecay()));
0474             }
0475             html.append(i18nc("Electron capture", " EC"));
0476             if ((isotope)->eclikeliness() < 100.0) {
0477                 html.append(i18n("(%1%)", (isotope)->eclikeliness()));
0478             }
0479             if ((isotope)->twoeclikeliness() > 0.0 || (isotope)->betaminuslikeliness() > 0.0 || (isotope)->betaminusfissionlikeliness() > 0.0
0480                 || (isotope)->twobetaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0
0481                 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0482                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0483                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0484                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0485                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0486                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0487                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0488                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0489                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0490                 html.append(i18n(", "));
0491             }
0492         }
0493         if ((isotope)->twoeclikeliness() > 0.0) {
0494             if ((isotope)->twoecdecay() > 0.0) {
0495                 html.append(i18n("%1 MeV", (isotope)->twoecdecay()));
0496             }
0497             html.append(i18n(" 2EC"));
0498             if ((isotope)->twoeclikeliness() < 100.0) {
0499                 html.append(i18n("(%1%)", (isotope)->twoeclikeliness()));
0500             }
0501             if ((isotope)->betaminuslikeliness() > 0.0 || (isotope)->betaminusfissionlikeliness() > 0.0 || (isotope)->twobetaminuslikeliness() > 0.0
0502                 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0
0503                 || (isotope)->betaminustwoneutronlikeliness() > 0.0 || (isotope)->betaminusthreeneutronlikeliness() > 0.0
0504                 || (isotope)->betaminusfourneutronlikeliness() > 0.0 || (isotope)->betaminusalphaneutronlikeliness() > 0.0
0505                 || (isotope)->betaminusalphalikeliness() > 0.0 || (isotope)->betaminustwoalphalikeliness() > 0.0
0506                 || (isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0507                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0508                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0509                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0510                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0511                 html.append(i18n(", "));
0512             }
0513         }
0514         if ((isotope)->betaminuslikeliness() > 0.0) {
0515             if ((isotope)->betaminusdecay() > 0.0) {
0516                 html.append(i18n("%1 MeV", (isotope)->betaminusdecay()));
0517             }
0518             html.append(i18nc("Electron emmision", " %1<sup>-</sup>", QChar(946)));
0519             if ((isotope)->betaminuslikeliness() < 100.0) {
0520                 html.append(i18n("(%1%)", (isotope)->betaminuslikeliness()));
0521             }
0522             if ((isotope)->betaminusfissionlikeliness() > 0.0 || (isotope)->twobetaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0
0523                 || (isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0524                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0525                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0526                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0527                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0528                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0529                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0530                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0531                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0532                 html.append(i18n(", "));
0533             }
0534         }
0535         if ((isotope)->betaminusfissionlikeliness() > 0.0) {
0536             if ((isotope)->betaminusfissiondecay() > 0.0) {
0537                 html.append(i18n("%1 MeV", (isotope)->betaminusfissiondecay()));
0538             }
0539             html.append(i18n(" %1<sup>-</sup>, fission", QChar(946)));
0540             if ((isotope)->betaminusfissionlikeliness() < 100.0) {
0541                 html.append(i18n("(%1%)", (isotope)->betaminusfissionlikeliness()));
0542             }
0543             if ((isotope)->twobetaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0
0544                 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0545                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0546                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0547                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0548                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0549                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0550                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0551                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0552                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0553                 html.append(i18n(", "));
0554             }
0555         }
0556         if ((isotope)->twobetaminuslikeliness() > 0.0) {
0557             if ((isotope)->twobetaminusdecay() > 0.0) {
0558                 html.append(i18n("%1 MeV", (isotope)->twobetaminusdecay()));
0559             }
0560             html.append(i18n(" 2%1<sup>-</sup>", QChar(946)));
0561             if ((isotope)->twobetaminuslikeliness() < 100.0) {
0562                 html.append(i18n("(%1%)", (isotope)->twobetaminuslikeliness()));
0563             }
0564             if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0
0565                 || (isotope)->betaminustwoneutronlikeliness() > 0.0 || (isotope)->betaminusthreeneutronlikeliness() > 0.0
0566                 || (isotope)->betaminusfourneutronlikeliness() > 0.0 || (isotope)->betaminusalphaneutronlikeliness() > 0.0
0567                 || (isotope)->betaminusalphalikeliness() > 0.0 || (isotope)->betaminustwoalphalikeliness() > 0.0
0568                 || (isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0569                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0570                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0571                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0572                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0573                 html.append(i18n(", "));
0574             }
0575         }
0576         if ((isotope)->betapluslikeliness() > 0.0) {
0577             if ((isotope)->betaplusdecay() > 0.0) {
0578                 html.append(i18n("%1 MeV", (isotope)->betaplusdecay()));
0579             }
0580             html.append(i18nc("Positron emission", " %1<sup>+</sup>", QChar(946)));
0581             if ((isotope)->betapluslikeliness() < 100.0) {
0582                 html.append(i18n("(%1%)", (isotope)->betapluslikeliness()));
0583             }
0584             if ((isotope)->twobetapluslikeliness() > 0.0 || (isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0585                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0586                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0587                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0588                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0589                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0590                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0591                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0592                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0593                 html.append(i18n(", "));
0594             }
0595         }
0596         if ((isotope)->twobetapluslikeliness() > 0.0) {
0597             if ((isotope)->twobetaplusdecay() > 0.0) {
0598                 html.append(i18n("%1 MeV", (isotope)->twobetaplusdecay()));
0599             }
0600             html.append(i18n(" 2%1<sup>+</sup>", QChar(946)));
0601             if ((isotope)->twobetapluslikeliness() < 100.0) {
0602                 html.append(i18n("(%1%)", (isotope)->twobetapluslikeliness()));
0603             }
0604             if ((isotope)->betaminusneutronlikeliness() > 0.0 || (isotope)->betaminustwoneutronlikeliness() > 0.0
0605                 || (isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0606                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0607                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0608                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0609                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0610                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0611                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0612                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0613                 html.append(i18n(", "));
0614             }
0615         }
0616         if ((isotope)->betaminusneutronlikeliness() > 0.0) {
0617             if ((isotope)->betaminusneutrondecay() > 0.0) {
0618                 html.append(i18n("%1 MeV", (isotope)->betaminusneutrondecay()));
0619             }
0620             html.append(i18n(" %1 <sup>-</sup>n", QChar(946)));
0621             if ((isotope)->betaminusneutronlikeliness() < 100.0) {
0622                 html.append(i18n("(%1%)", (isotope)->betaminusneutronlikeliness()));
0623             }
0624             if ((isotope)->betaminustwoneutronlikeliness() > 0.0 || (isotope)->betaminusthreeneutronlikeliness() > 0.0
0625                 || (isotope)->betaminusfourneutronlikeliness() > 0.0 || (isotope)->betaminusalphaneutronlikeliness() > 0.0
0626                 || (isotope)->betaminusalphalikeliness() > 0.0 || (isotope)->betaminustwoalphalikeliness() > 0.0
0627                 || (isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0628                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0629                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0630                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0631                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0632                 html.append(i18n(", "));
0633             }
0634         }
0635         if ((isotope)->betaminustwoneutronlikeliness() > 0.0) {
0636             if ((isotope)->betaminustwoneutrondecay() > 0.0) {
0637                 html.append(i18n("%1 MeV", (isotope)->betaminustwoneutrondecay()));
0638             }
0639             html.append(i18n(" %1<sup>-</sup>2n", QChar(946)));
0640             if ((isotope)->betaminustwoneutronlikeliness() < 100.0) {
0641                 html.append(i18n("(%1%)", (isotope)->betaminustwoneutronlikeliness()));
0642             }
0643             if ((isotope)->betaminusthreeneutronlikeliness() > 0.0 || (isotope)->betaminusfourneutronlikeliness() > 0.0
0644                 || (isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0645                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0646                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0647                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0648                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0649                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0650                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0651                 html.append(i18n(", "));
0652             }
0653         }
0654         if ((isotope)->betaminusthreeneutronlikeliness() > 0.0) {
0655             if ((isotope)->betaminusthreeneutrondecay() > 0.0) {
0656                 html.append(i18n("%1 MeV", (isotope)->betaminusthreeneutrondecay()));
0657             }
0658             html.append(i18n(" %1<sup>-</sup>3n", QChar(946)));
0659             if ((isotope)->betaminusthreeneutronlikeliness() < 100.0) {
0660                 html.append(i18n("(%1%)", (isotope)->betaminusthreeneutronlikeliness()));
0661             }
0662             if ((isotope)->betaminusfourneutronlikeliness() > 0.0 || (isotope)->betaminusalphaneutronlikeliness() > 0.0
0663                 || (isotope)->betaminusalphalikeliness() > 0.0 || (isotope)->betaminustwoalphalikeliness() > 0.0
0664                 || (isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0665                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0666                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0667                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0668                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0669                 html.append(i18n(", "));
0670             }
0671         }
0672         if ((isotope)->betaminusfourneutronlikeliness() > 0.0) {
0673             if ((isotope)->betaminusfourneutrondecay() > 0.0) {
0674                 html.append(i18n("%1 MeV", (isotope)->betaminusfourneutrondecay()));
0675             }
0676             html.append(i18n(" %1<sup>-</sup>4n", QChar(946)));
0677             if ((isotope)->betaminusfourneutronlikeliness() < 100.0) {
0678                 html.append(i18n("(%1%)", (isotope)->betaminusfourneutronlikeliness()));
0679             }
0680             if ((isotope)->betaminusalphaneutronlikeliness() > 0.0 || (isotope)->betaminusalphalikeliness() > 0.0
0681                 || (isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0682                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0683                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0684                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0685                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0686                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0687                 html.append(i18n(", "));
0688             }
0689         }
0690         if ((isotope)->betaminusalphaneutronlikeliness() > 0.0) {
0691             if ((isotope)->betaminusalphaneutrondecay() > 0.0) {
0692                 html.append(i18n("%1 MeV", (isotope)->betaminusalphaneutrondecay()));
0693             }
0694             html.append(i18n(" %1<sup>-</sup>%2 n", QChar(946), QChar(945)));
0695             if ((isotope)->betaminusalphaneutronlikeliness() < 100.0) {
0696                 html.append(i18n("(%1%)", (isotope)->betaminusalphaneutronlikeliness()));
0697             }
0698             if ((isotope)->betaminusalphalikeliness() > 0.0 || (isotope)->betaminustwoalphalikeliness() > 0.0
0699                 || (isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0700                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0701                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0702                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0703                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0704                 html.append(i18n(", "));
0705             }
0706         }
0707         if ((isotope)->betaminusalphalikeliness() > 0.0) {
0708             if ((isotope)->betaminusalphadecay() > 0.0) {
0709                 html.append(i18n("%1 MeV", (isotope)->betaminusalphadecay()));
0710             }
0711             html.append(i18n(" %1<sup>-</sup>%2", QChar(946), QChar(945)));
0712             if ((isotope)->betaminusalphalikeliness() < 100.0) {
0713                 html.append(i18n("(%1%)", (isotope)->betaminusalphalikeliness()));
0714             }
0715             if ((isotope)->betaminustwoalphalikeliness() > 0.0 || (isotope)->betaminusthreealphalikeliness() > 0.0
0716                 || (isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0717                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0718                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0719                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0720                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0721                 html.append(i18n(", "));
0722             }
0723         }
0724         if ((isotope)->betaminustwoalphalikeliness() > 0.0) {
0725             if ((isotope)->betaminustwoalphadecay() > 0.0) {
0726                 html.append(i18n("%1 MeV", (isotope)->betaminustwoalphadecay()));
0727             }
0728             html.append(i18n(" %1<sup>-</sup>2%2", QChar(946), QChar(945)));
0729             if ((isotope)->betaminustwoalphalikeliness() < 100.0) {
0730                 html.append(i18n("(%1%)", (isotope)->betaminustwoalphalikeliness()));
0731             }
0732             if ((isotope)->betaminusthreealphalikeliness() > 0.0 || (isotope)->betaplusprotonlikeliness() > 0.0
0733                 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0734                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0735                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0736                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0737                 html.append(i18n(", "));
0738             }
0739         }
0740         if ((isotope)->betaminusthreealphalikeliness() > 0.0) {
0741             if ((isotope)->betaminusthreealphadecay() > 0.0) {
0742                 html.append(i18n("%1 MeV", (isotope)->betaminusthreealphadecay()));
0743             }
0744             html.append(i18n(" %1<sup>-</sup>3%2", QChar(946), QChar(945)));
0745             if ((isotope)->betaminusthreealphalikeliness() < 100.0) {
0746                 html.append(i18n("(%1%)", (isotope)->betaminusthreealphalikeliness()));
0747             }
0748             if ((isotope)->betaplusprotonlikeliness() > 0.0 || (isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0
0749                 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0750                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0751                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0752                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0753                 html.append(i18n(", "));
0754             }
0755         }
0756         if ((isotope)->betaplusprotonlikeliness() > 0.0) {
0757             if ((isotope)->betaplusprotondecay() > 0.0) {
0758                 html.append(i18n("%1 MeV", (isotope)->betaplusprotondecay()));
0759             }
0760             html.append(i18n(" %1<sup>+</sup>p", QChar(946)));
0761             if ((isotope)->betaplusprotonlikeliness() < 100.0) {
0762                 html.append(i18n("(%1%)", (isotope)->betaplusprotonlikeliness()));
0763             }
0764             if ((isotope)->betaplustwoprotonlikeliness() > 0.0 || (isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0
0765                 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0766                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0767                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0768                 html.append(i18n(", "));
0769             }
0770         }
0771         if ((isotope)->betaplustwoprotonlikeliness() > 0.0) {
0772             if ((isotope)->betaplustwoprotondecay() > 0.0) {
0773                 html.append(i18n("%1 MeV", (isotope)->betaplustwoprotondecay()));
0774             }
0775             html.append(i18n(" %1<sup>+</sup>2p", QChar(946)));
0776             if ((isotope)->betaplustwoprotonlikeliness() < 100.0) {
0777                 html.append(i18n("(%1%)", (isotope)->betaplustwoprotonlikeliness()));
0778             }
0779             if ((isotope)->betaplusalphalikeliness() > 0.0 || (isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0
0780                 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0781                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0782                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0783                 html.append(i18n(", "));
0784             }
0785         }
0786         if ((isotope)->betaplusalphalikeliness() > 0.0) {
0787             if ((isotope)->betaplusalphadecay() > 0.0) {
0788                 html.append(i18n("%1 MeV", (isotope)->betaplusalphadecay()));
0789             }
0790             html.append(i18n(" %1<sup>+</sup>%2", QChar(946), QChar(945)));
0791             if ((isotope)->betaplusalphalikeliness() < 100.0) {
0792                 html.append(i18n("(%1%)", (isotope)->betaplusalphalikeliness()));
0793             }
0794             if ((isotope)->betaplustwoalphalikeliness() > 0.0 || (isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0
0795                 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0
0796                 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0
0797                 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0798                 html.append(i18n(", "));
0799             }
0800         }
0801         if ((isotope)->betaplustwoalphalikeliness() > 0.0) {
0802             if ((isotope)->betaplustwoalphadecay() > 0.0) {
0803                 html.append(i18n("%1 MeV", (isotope)->betaplustwoalphadecay()));
0804             }
0805             html.append(i18n(" %1<sup>+</sup>2%2", QChar(946), QChar(945)));
0806             if ((isotope)->betaplustwoalphalikeliness() < 100.0) {
0807                 html.append(i18n("(%1%)", (isotope)->betaplustwoalphalikeliness()));
0808             }
0809             if ((isotope)->betaplusthreealphalikeliness() > 0.0 || (isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0
0810                 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0811                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0812                 html.append(i18n(", "));
0813             }
0814         }
0815         if ((isotope)->betaplusthreealphalikeliness() > 0.0) {
0816             if ((isotope)->betaplusthreealphadecay() > 0.0) {
0817                 html.append(i18n("%1 MeV", (isotope)->betaplusthreealphadecay()));
0818             }
0819             html.append(i18n(" %1<sup>+</sup>3%2", QChar(946), QChar(945)));
0820             if ((isotope)->betaplusthreealphalikeliness() < 100.0) {
0821                 html.append(i18n("(%1%)", (isotope)->betaplusthreealphalikeliness()));
0822             }
0823             if ((isotope)->alphabetaminuslikeliness() > 0.0 || (isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0
0824                 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0825                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0826                 html.append(i18n(", "));
0827             }
0828         }
0829         if ((isotope)->alphabetaminuslikeliness() > 0.0) {
0830             if ((isotope)->alphabetaminusdecay() > 0.0) {
0831                 html.append(i18n("%1 MeV", (isotope)->alphabetaminusdecay()));
0832             }
0833             html.append(i18n(" %1 %2<sup>-</sup>", QChar(945), QChar(946)));
0834             if ((isotope)->alphabetaminuslikeliness() < 100.0) {
0835                 html.append(i18n("(%1%)", (isotope)->alphabetaminuslikeliness()));
0836             }
0837             if ((isotope)->protonalphalikeliness() > 0.0 || (isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0
0838                 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0
0839                 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0840                 html.append(i18n(", "));
0841             }
0842         }
0843         if ((isotope)->protonalphalikeliness() > 0.0) {
0844             if ((isotope)->protonalphadecay() > 0.0) {
0845                 html.append(i18n("%1 MeV", (isotope)->protonalphadecay()));
0846             }
0847             html.append(i18n(" p%1", QChar(945)));
0848             if ((isotope)->protonalphalikeliness() < 100.0) {
0849                 html.append(i18n("(%1%)", (isotope)->protonalphalikeliness()));
0850             }
0851             if ((isotope)->ecprotonlikeliness() > 0.0 || (isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0
0852                 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0853                 html.append(i18n(", "));
0854             }
0855         }
0856         if ((isotope)->ecprotonlikeliness() > 0.0) {
0857             if ((isotope)->ecprotondecay() > 0.0) {
0858                 html.append(i18n("%1 MeV", (isotope)->ecprotondecay()));
0859             }
0860             html.append(i18n(" ECp"));
0861             if ((isotope)->ecprotonlikeliness() < 100.0) {
0862                 html.append(i18n("(%1%)", (isotope)->ecprotonlikeliness()));
0863             }
0864             if ((isotope)->ectwoprotonlikeliness() > 0.0 || (isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0
0865                 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0866                 html.append(i18n(", "));
0867             }
0868         }
0869         if ((isotope)->ectwoprotonlikeliness() > 0.0) {
0870             if ((isotope)->ectwoprotondecay() > 0.0) {
0871                 html.append(i18n("%1 MeV", (isotope)->ectwoprotondecay()));
0872             }
0873             html.append(i18n(" EC2p"));
0874             if ((isotope)->ectwoprotonlikeliness() < 100.0) {
0875                 html.append(i18n("(%1%)", (isotope)->ectwoprotonlikeliness()));
0876             }
0877             if ((isotope)->ecthreeprotonlikeliness() > 0.0 || (isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0
0878                 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0879                 html.append(i18n(", "));
0880             }
0881         }
0882         if ((isotope)->ecthreeprotonlikeliness() > 0.0) {
0883             if ((isotope)->ecthreeprotondecay() > 0.0) {
0884                 html.append(i18n("%1 MeV", (isotope)->ecthreeprotondecay()));
0885             }
0886             html.append(i18n(" EC3p"));
0887             if ((isotope)->ecthreeprotonlikeliness() < 100.0) {
0888                 html.append(i18n("(%1%)", (isotope)->ecthreeprotonlikeliness()));
0889             }
0890             if ((isotope)->ecalphalikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0891                 html.append(i18n(", "));
0892             }
0893         }
0894         if ((isotope)->ecalphalikeliness() > 0.0) {
0895             if ((isotope)->ecalphadecay() > 0.0) {
0896                 html.append(i18n("%1 MeV", (isotope)->ecalphadecay()));
0897             }
0898             html.append(i18n(" EC%1", QChar(945)));
0899             if ((isotope)->ecalphalikeliness() < 100.0) {
0900                 html.append(i18n("(%1%)", (isotope)->ecalphalikeliness()));
0901             }
0902             if ((isotope)->ecalphaprotonlikeliness() > 0.0 || (isotope)->ecalphaprotonlikeliness() > 0.0) {
0903                 html.append(i18n(", "));
0904             }
0905         }
0906         if ((isotope)->ecalphaprotonlikeliness() > 0.0) {
0907             if ((isotope)->ecalphaprotondecay() > 0.0) {
0908                 html.append(i18n("%1 MeV", (isotope)->ecalphaprotondecay()));
0909             }
0910             html.append(i18n(" EC%1 p", QChar(945)));
0911             if ((isotope)->ecalphaprotonlikeliness() < 100.0) {
0912                 html.append(i18n("(%1%)", (isotope)->ecalphaprotonlikeliness()));
0913             }
0914         }
0915 
0916         /*        if ((isotope)->alphalikeliness() > 0.0) {
0917                     if ((isotope)->alphadecay() > 0.0) {
0918                         html.append(i18n("%1 MeV", (isotope)->alphadecay()));
0919                     }
0920                     html.append(i18n(" %1", QChar(945)));
0921                     if ((isotope)->alphalikeliness() < 100.0) {
0922                         html.append(i18n("(%1%)", (isotope)->alphalikeliness()));
0923                     }
0924                     if ((isotope)->betaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
0925                         html.append(i18n(", "));
0926                     }
0927                 }
0928                 if ((isotope)->alphabetaminuslikeliness() > 0.0) {
0929                     if ((isotope)->alphabetaminusdecay() > 0.0) {
0930                         html.append(i18n("%1 MeV", (isotope)->alphabetaminusdecay()));
0931                     }
0932                     html.append(i18n(" %1, %2<sup>-</sup>", QChar(945), QChar(946) ));
0933                     if ((isotope)->alphabetaminuslikeliness() < 100.0) {
0934                         html.append(i18n("(%1%)", (isotope)->alphabetaminuslikeliness()));
0935                     }
0936                     if ((isotope)->betaminuslikeliness() > 0.0 || (isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
0937                         html.append(i18n(", "));
0938                     }
0939                 }
0940                 if ((isotope)->betaminuslikeliness() > 0.0) {
0941                     if ((isotope)->betaminusdecay() > 0.0) {
0942                         html.append(i18n("%1 MeV", (isotope)->betaminusdecay()));
0943                     }
0944                     html.append(i18n(" %1<sup>-</sup>", QChar(946)));
0945                     if ((isotope)->betaminuslikeliness() < 100.0) {
0946                         html.append(i18n("(%1%)", (isotope)->betaminuslikeliness()));
0947                     }
0948 
0949                     if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
0950                         html.append(i18n(", "));
0951                     }
0952                 }
0953                 if ((isotope)->betaminusneutronlikeliness() > 0.0) {
0954                     if ((isotope)->betaminusneutrondecay() > 0.0) {
0955                         html.append(i18n("%1 MeV", (isotope)->betaminusneutrondecay()));
0956                     }
0957                     html.append(i18n(" %1<sup>-</sup>, n", QChar(946)));
0958                     if ((isotope)->betaminusneutronlikeliness() < 100.0) {
0959                         html.append(i18n("(%1%)", (isotope)->betaminusneutronlikeliness()));
0960                     }
0961 
0962                     if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
0963                         html.append(i18n(", "));
0964                     }
0965                 }
0966                 if ((isotope)->betaminusfissionlikeliness() > 0.0) {
0967                     if ((isotope)->betaminusfissiondecay() > 0.0) {
0968                         html.append(i18n("%1 MeV", (isotope)->betaminusfissiondecay()));
0969                     }
0970                     html.append(i18n(" %1<sup>-</sup>, fission", QChar(946)));
0971                     if ((isotope)->betaminusfissionlikeliness() < 100.0) {
0972                         html.append(i18n("(%1%)", (isotope)->betaminusfissionlikeliness()));
0973                     }
0974 
0975                     if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
0976                         html.append(i18n(", "));
0977                     }
0978                 }
0979                 if ((isotope)->betaminusalphalikeliness() > 0.0) {
0980                     if ((isotope)->betaminusalphadecay() > 0.0) {
0981                         html.append(i18n("%1 MeV", (isotope)->betaminusalphadecay()));
0982                     }
0983                     html.append(i18n(" %1<sup>-</sup>, %2", QChar(946), QChar(945)));
0984                     if ((isotope)->betaminusalphalikeliness() < 100.0) {
0985                         html.append(i18n("(%1%)", (isotope)->betaminusalphalikeliness()));
0986                     }
0987 
0988                     if ((isotope)->betapluslikeliness() > 0.0 || (isotope)->eclikeliness() > 0.0) {
0989                         html.append(i18n(", "));
0990                     }
0991                 }
0992                 if ((isotope)->betapluslikeliness() > 0.0) {
0993                     if ((isotope)->betaplusdecay() > 0.0) {
0994                         html.append(i18n("%1 MeV", (isotope)->betaplusdecay()));
0995                     }
0996                     html.append(i18n(" %1<sup>+</sup>", QChar(946)));
0997                     if ((isotope)->betapluslikeliness() == (isotope)->eclikeliness()) {
0998                         if ((isotope)->ecdecay() > 0.0) {
0999                             html.append(i18n("%1 MeV", (isotope)->ecdecay()));
1000                         }
1001                         html.append(i18nc("Acronym of Electron Capture"," EC"));
1002                     }
1003                     if ((isotope)->betapluslikeliness() < 100.0) {
1004                         html.append(i18n("(%1%)", (isotope)->betapluslikeliness()));
1005                     }
1006                     html += ' ';
1007                 }
1008                 if ((isotope)->betaplusprotonlikeliness() > 0.0) {
1009                     if ((isotope)->betaplusprotondecay() > 0.0) {
1010                         html.append(i18n("%1 MeV", (isotope)->betaplusprotondecay()));
1011                     }
1012                     html.append(i18n(" %1<sup>+</sup>, p", QChar(946)));
1013                     if ((isotope)->betaplusprotonlikeliness() < 100.0) {
1014                         html.append(i18n("(%1%)", (isotope)->betaplusprotonlikeliness()));
1015                     }
1016                     html += ' ';
1017                 }
1018                 if ((isotope)->betaplusalphalikeliness() > 0.0) {
1019                     if ((isotope)->betaplusalphadecay() > 0.0) {
1020                         html.append(i18n("%1 MeV", (isotope)->betaplusalphadecay()));
1021                     }
1022                     html.append(i18n(" %1<sup>+</sup>, %2", QChar(946),QChar(945)));
1023                     if ((isotope)->betaplusalphalikeliness() < 100.0) {
1024                         html.append(i18n("(%1%)", (isotope)->betaplusalphalikeliness()));
1025                     }
1026                     html += ' ';
1027                 }
1028                 if ((isotope)->eclikeliness() > 0.0) {
1029                     if ((isotope)->ecdecay() > 0.0) {
1030                         html.append(i18n("%1 MeV", (isotope)->ecdecay()));
1031                     }
1032                     html.append(i18nc("Acronym of Electron Capture"," EC"));
1033                     if ((isotope)->eclikeliness() < 100.0) {
1034                         html.append(i18n("(%1%)", (isotope)->eclikeliness()));
1035                     }
1036                 }
1037                 if ((isotope)->neutronlikeliness() > 0.0) {
1038                     if ((isotope)->neutrondecay() > 0.0) {
1039                         html.append(i18n("%1 MeV", (isotope)->neutrondecay()));
1040                     }
1041                     html.append(i18nc("Acronym of neutron emission"," n"));
1042                     if ((isotope)->neutronlikeliness() < 100.0) {
1043                         html.append(i18n("(%1%)", (isotope)->neutronlikeliness()));
1044                     }
1045                 }
1046             if ((isotope)->protonlikeliness() > 0.0) {
1047                     if ((isotope)->protondecay() > 0.0) {
1048                         html.append(i18n("%1 MeV", (isotope)->protondecay()));
1049                     }
1050                     html.append(i18nc("Acronym of proton emission"," p"));
1051                     if ((isotope)->protonlikeliness() < 100.0) {
1052                         html.append(i18n("(%1%)", (isotope)->protonlikeliness()));
1053                     }
1054                 }
1055             if ((isotope)->protonalphalikeliness() > 0.0) {
1056                     if ((isotope)->protonalphadecay() > 0.0) {
1057                         html.append(i18n("%1 MeV", (isotope)->protonalphadecay()));
1058                     }
1059                     html.append(i18n(" p, %1", QChar(945)));
1060                     if ((isotope)->protonlikeliness() < 100.0) {
1061                         html.append(i18n("(%1%)", (isotope)->protonlikeliness()));
1062                     }
1063                 }
1064 
1065         */
1066         html.append("</td><td>");
1067         html.append((isotope)->spin());
1068         html.append("</td><td>");
1069         if (!(isotope)->magmoment().isEmpty()) {
1070             html.append(i18n("%1 %2<sub>n</sub>", (isotope)->magmoment(), QChar(956)));
1071         }
1072         html.append("</td></tr>");
1073     }
1074 
1075     html += QLatin1String("</table>");
1076 
1077     return html;
1078 }
1079 
1080 void DetailedInfoDlg::createContent()
1081 {
1082     KPageWidgetItem *item = nullptr;
1083 
1084     // Removed the overview Tab, because its an Dockwidget and doesn't show much information.
1085     // overview tab
1086     //     QWidget *m_pOverviewTab = new QWidget();
1087     //     item = addPage(m_pOverviewTab, i18n("Overview"));
1088     //     item->setHeader(i18n("Overview"));
1089     //     item->setIcon(QIcon("overview"));
1090     //     QVBoxLayout *overviewLayout = new QVBoxLayout(m_pOverviewTab);
1091     //     overviewLayout->setMargin(0);
1092     //     dTab = new DetailedGraphicalOverview(m_pOverviewTab);
1093     //     dTab->setObjectName("DetailedGraphicalOverview");
1094     //     overviewLayout->addWidget(dTab);
1095 
1096     // X      // picture tab
1097     // X      QWidget *m_pPictureTab = new QWidget();
1098     // X      item = addPage(m_pPictureTab, i18n("Picture"));
1099     // X      item->setHeader(i18n("What does this element look like?"));
1100     // X      item->setIcon(QIcon("elempic"));
1101     // X      QVBoxLayout *mainLayout = new QVBoxLayout(m_pPictureTab);
1102     // X      mainLayout->setMargin(0);
1103     // X      piclabel = new QLabel(m_pPictureTab);
1104     // X      piclabel->setMinimumSize(400, 350);
1105     // X      mainLayout->addWidget(piclabel);
1106 
1107     // html tab
1108     m_htmlpages[QStringLiteral("new")] = addHTMLTab(i18n("Data Overview"), i18n("Data Overview"), QStringLiteral("applications-science"));
1109 
1110     // atomic model tab
1111     auto m_pModelTab = new QWidget(this);
1112     item = addPage(m_pModelTab, i18n("Atom Model"));
1113     item->setHeader(i18n("Atom Model"));
1114     item->setIcon(QIcon::fromTheme(QStringLiteral("orbits")));
1115     auto modelLayout = new QVBoxLayout(m_pModelTab);
1116     modelLayout->setContentsMargins(0, 0, 0, 0);
1117     wOrbits = new OrbitsWidget(m_pModelTab);
1118     modelLayout->addWidget(wOrbits);
1119 
1120     // html tabs
1121     m_htmlpages[QStringLiteral("isotopes")] = addHTMLTab(i18n("Isotopes"), i18n("Isotopes"), QStringLiteral("isotopemap"));
1122     m_htmlpages[QStringLiteral("misc")] = addHTMLTab(i18n("Miscellaneous"), i18n("Miscellaneous"), QStringLiteral("misc"));
1123 
1124     // spectrum widget tab
1125     auto m_pSpectrumTab = new QWidget(this);
1126     item = addPage(m_pSpectrumTab, i18n("Spectrum"));
1127     item->setHeader(i18n("Spectrum"));
1128     item->setIcon(QIcon::fromTheme(QStringLiteral("spectrum")));
1129     auto spectrumLayout = new QVBoxLayout(m_pSpectrumTab);
1130     spectrumLayout->setContentsMargins(0, 0, 0, 0);
1131     m_spectrumStack = new QStackedWidget(m_pSpectrumTab);
1132     spectrumLayout->addWidget(m_spectrumStack);
1133     m_spectrumview = new SpectrumViewImpl(m_spectrumStack);
1134     m_spectrumview->setObjectName(QStringLiteral("spectrumwidget"));
1135     m_spectrumStack->addWidget(m_spectrumview);
1136     m_spectrumLabel = new QLabel(m_spectrumStack);
1137     m_spectrumStack->addWidget(m_spectrumLabel);
1138 
1139     // html extra tab
1140     m_htmlpages[QStringLiteral("extra")] = addHTMLTab(i18n("Extra information"), i18n("Extra Information"), QStringLiteral("applications-internet"));
1141 }
1142 
1143 void DetailedInfoDlg::reloadContent()
1144 {
1145     // reading the most common data
1146     const QString element_name = m_element->dataAsString(ChemicalDataObject::name);
1147     const QString element_symbol = m_element->dataAsString(ChemicalDataObject::symbol);
1148     const QString element_block = m_element->dataAsString(ChemicalDataObject::periodTableBlock);
1149 
1150     // updating caption
1151     setWindowTitle(
1152         i18nc("@title:window, for example: [C] Carbon (6 - Block p)", "[%1] %2 (%3 - Block %4)", element_symbol, element_name, m_elementNumber, element_block));
1153 
1154     // X      // updating picture tab
1155     // X      QString picpath = m_picsdir + element_symbol + ".jpg";
1156     // X      if (QFile::exists(picpath)) {
1157     // X           QImage img(picpath, "JPEG");
1158     // X           img = img.scaled(400, 400, Qt::KeepAspectRatio);
1159     // X           piclabel->setPixmap(QPixmap::fromImage(img));
1160     // X      } else {
1161     // X           piclabel->setText(i18n("No picture of %1 found.", element_name));
1162     // X      }
1163 
1164     // updating atomic model tab
1165     wOrbits->setElementNumber(m_elementNumber);
1166     /*
1167        wOrbits->setWhatsThis(
1168        i18n("Here you can see the atomic hull of %1. %2 has the configuration %3.")
1169        .arg(m_element->dataAsString(ChemicalDataObject::name))
1170        .arg(m_element->dataAsString(ChemicalDataObject::name))
1171        .arg(""));//m_element->parsedOrbits()));
1172        */
1173 
1174     // updating html tabs
1175     fillHTMLTab(m_htmlpages[QStringLiteral("new")], getHtml(DATA));
1176     fillHTMLTab(m_htmlpages[QStringLiteral("misc")], getHtml(MISC));
1177     fillHTMLTab(m_htmlpages[QStringLiteral("isotopes")], getHtml(ISOTOPES));
1178     fillHTMLTab(m_htmlpages[QStringLiteral("extra")], getHtml(EXTRA));
1179 
1180     Spectrum *spec = KalziumDataObject::instance()->spectrum(m_elementNumber);
1181 
1182     // updating spectrum widget
1183     if (spec) {
1184         m_spectrumview->setSpectrum(spec);
1185         m_spectrumStack->setCurrentWidget(m_spectrumview);
1186     } else {
1187         m_spectrumLabel->setText(i18n("No spectrum of %1 found.", element_name));
1188         m_spectrumStack->setCurrentWidget(m_spectrumLabel);
1189     }
1190 }
1191 
1192 QString DetailedInfoDlg::createWikiLink(QString link)
1193 {
1194     return createWikiLink(link, link);
1195 }
1196 
1197 QString DetailedInfoDlg::createWikiLink(QString link, QString displayString)
1198 {
1199     QString html;
1200     QString language(QLocale().uiLanguages().first());
1201 
1202     // Wikipedia.org
1203     html.append("<a href=\"https://"); // https://
1204     html.append(language.split('-').at(0)); // en.
1205     html.append(".wikipedia.org/wiki/"); // wikipedia.org
1206     html.append(link); // /hydrogen
1207     html.append(R"(" target="_blank" > )");
1208     html.append(displayString);
1209     html.append("</a>");
1210     // Example from the comment "https://en.wikipedia.org/wiki/hydrogen"
1211 
1212     return html;
1213 }
1214 
1215 void DetailedInfoDlg::slotHelp()
1216 {
1217     // TODO fix this stuff...
1218 #if 0
1219     QString chapter = "infodialog_overview";
1220     switch (activePageIndex()) {
1221     case 0:
1222         chapter = "infodialog_overview";
1223         break;
1224     case 1:
1225         chapter = "infodialog_orbits";
1226         break;
1227     case 2:
1228         chapter = "infodialog_chemical";
1229         break;
1230     case 3:
1231         chapter = "infodialog_energies";
1232         break;
1233     case 4:
1234         chapter = "infodialog_misc";
1235         break;
1236     case 5:
1237         chapter = "infodialog_spectrum";
1238         break;
1239     case 6:
1240         chapter = "infodialog_warnings";
1241         break;
1242     }
1243 #endif
1244     KHelpClient::invokeHelp(QStringLiteral("info-dlg.html#infodialog_spectrum"), QStringLiteral("kalzium"));
1245 }
1246 
1247 void DetailedInfoDlg::showNextElement()
1248 {
1249     setElement(pseTables::instance()->getTabletype(m_tableTyp)->nextOf(m_elementNumber));
1250 }
1251 
1252 void DetailedInfoDlg::showPreviousElement()
1253 {
1254     setElement(pseTables::instance()->getTabletype(m_tableTyp)->previousOf(m_elementNumber));
1255 }
1256 
1257 #include "moc_detailinfodlg.cpp"