1
/***************************************************************************
2
begin : Tue Apr 2 20:43:44 2002 UTC
3
copyright : (C) 2003, 2004, 2005, 2006 by Carsten Niehaus
4
email : cniehaus@kde.org
5
***************************************************************************/
7
/***************************************************************************
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
14
***************************************************************************/
16
#ifndef DETAILINFODLG_H
17
#define DETAILINFODLG_H
19
#include <kpagedialog.h>
23
class DetailedGraphicalOverview;
25
class KalziumTableType;
27
class SpectrumViewImpl;
31
class KActionCollection;
35
* @brief The dialog which shows all available information of an element
36
* @author Carsten Niehaus
38
class DetailedInfoDlg : public KPageDialog
43
explicit DetailedInfoDlg( int el, QWidget *parent = 0 );
46
void setElement( int el );
48
// void setOverviewBackgroundColor( const QColor &bgColor );
50
void setTableType( int ktt );
53
* add <sup></sup> to the numbers
54
@return the beatified string
56
QString beautifyOrbitalString(const QString& orbits);
63
DATA, /** <the overview about atomic and compound data */
64
EXTRA/** Links to wikipedia and other sites where useful information can be found*/
70
KActionCollection* m_actionCollection;
72
SpectrumViewImpl *m_spectrumview;
73
QStackedWidget* m_spectrumStack;
74
QLabel* m_spectrumLabel;
76
QString isotopeTable() const;
78
DetailedGraphicalOverview *dTab;
80
OrbitsWidget *wOrbits;
81
QMap<QString, KHTMLPart*> m_htmlpages;
86
* Create the initial set of tabs. Used it *ONLY* once in the
92
QString getHtml( DATATYPE );
96
//X QString m_picsdir;
99
* Add a new HTML page to the dialog.
101
* @param title The title of the tab, appears above the htmlview
102
* @param icontext The name of the tab, appears belov or instead
104
* @param iconname The name of the icon
105
* @returns the pointer to the resulting KHTMLPart, needed for
106
* writing HTML code on it
108
KHTMLPart* addHTMLTab( const QString& title, const QString& icontext, const QString& iconname );
110
* Change the HTML code in an HTML page.
112
* @param htmlpart the KHTMLPart to edit
113
* @param htmlcode the HTML code to display
115
void fillHTMLTab( KHTMLPart* htmlpart, const QString& htmlcode );
118
* Creates a localized link to Wikipedia.
119
* http://en.wikipedia.org/wiki/link"
120
* @param link the link inside wikipedia
121
* @param displayString the displayed string to click on.
123
QString createWikiLink( QString link, QString displayString);
125
/// overloaded function to add link as the displayed String
126
QString createWikiLink( QString link );
129
void slotLinkClicked(const KUrl &url);
131
virtual void slotUser1();
132
virtual void slotUser2();
134
* invoke the help of the correct chapter
136
virtual void slotHelp();
139
void elementChanged( int );