File indexing completed on 2022-11-29 18:11:57

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