File indexing completed on 2024-04-21 03:41:42
0001 /* 0002 SPDX-FileCopyrightText: 2003, 2004, 2005, 2006, 2007 Carsten Niehaus <cniehaus@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef KALZIUM_H 0007 #define KALZIUM_H 0008 0009 #include "calculator/calculator.h" 0010 #include "elementdataviewer.h" 0011 #include "isotopetabledialog.h" 0012 #include "periodictableview.h" 0013 #include "rsdialog.h" 0014 #include "settings/kalziumconfigdialog.h" 0015 #include "tablesdialog.h" 0016 #include <kxmlguiwindow.h> 0017 0018 class KAction; 0019 class KSelectAction; 0020 class QDockWidget; 0021 class DetailedInfoDlg; 0022 class PeriodicTableView; 0023 class DetailedGraphicalOverview; 0024 class GradientWidgetImpl; 0025 class GlossaryDialog; 0026 class IsotopeTable; 0027 class LegendWidget; 0028 class TableInfoWidget; 0029 class ExportDialog; 0030 class MoleculeDialog; 0031 0032 /** 0033 * @brief Application Main Window 0034 * @author Carsten Niehaus <cniehaus@kde.org> 0035 * @version 1.2 0036 * 0037 * This class connects the parts of kalzium. All actions will 0038 * be set, the menu generated and so on. 0039 */ 0040 class Kalzium : public KXmlGuiWindow 0041 { 0042 Q_OBJECT 0043 public: 0044 /** 0045 * Default Constructor 0046 */ 0047 Kalzium(); 0048 0049 /** 0050 * Default Destructor 0051 */ 0052 ~Kalzium() override; 0053 0054 void loadMolecule(const QString &moleculeFile); 0055 0056 private: 0057 DetailedInfoDlg *m_infoDialog; 0058 0059 LegendWidget *m_legendWidget; 0060 0061 TableInfoWidget *m_TableInfoWidget; 0062 0063 PeriodicTableView *m_periodicTable; 0064 0065 IsotopeTableDialog *m_isotopeDialog; 0066 0067 ElementDataViewer *m_elementDataPlotter; 0068 0069 TablesDialog *m_tablesDialog; 0070 0071 RSDialog *m_rsDialog; 0072 0073 calculator *m_calculator; 0074 0075 /** 0076 *initialize actions 0077 */ 0078 void setupActions(); 0079 0080 /** 0081 *initialize the sidebars 0082 */ 0083 void setupSidebars(); 0084 0085 void extractIconicInformationAboutElement(int elementNumber); 0086 0087 /** 0088 * all KActions Kalzium uses 0089 */ 0090 KSelectAction *look_action_schemes; 0091 KSelectAction *look_action_gradients; 0092 0093 KSelectAction *table_action; 0094 KSelectAction *table_action_schemes; 0095 KSelectAction *numeration_action; 0096 // settings 0097 QAction *m_pLegendAction; 0098 QAction *m_SidebarAction; 0099 // tools 0100 QAction *m_pPlotAction; 0101 QAction *m_pcalculator; 0102 QAction *m_pIsotopeTableAction; 0103 QAction *m_pGlossaryAction; 0104 QAction *m_pRSAction; 0105 QAction *m_pTables; 0106 QAction *m_pMoleculesviewer; 0107 QAction *m_pOBConverterAction; 0108 QAction *export_action; 0109 0110 QAction *m_legendAction; 0111 0112 GradientWidgetImpl *m_gradientWidget; 0113 0114 DetailedGraphicalOverview *m_detailWidget; 0115 0116 /** 0117 * the dock of the central pse Widget 0118 */ 0119 QDockWidget *m_dockWin; 0120 QDockWidget *m_legendDock; 0121 QDockWidget *m_tableDock; 0122 0123 QTabWidget *m_tabwidget; 0124 0125 GlossaryDialog *m_glossarydlg; 0126 0127 ExportDialog *m_exportDialog; 0128 0129 KalziumConfigDialog *m_configDialog; 0130 0131 QLabel *m_elementInfo; 0132 0133 Q_SIGNALS: 0134 void numerationChanged(int); 0135 0136 private Q_SLOTS: 0137 /** 0138 * opens the information dialog for the element @p number 0139 */ 0140 void openInformationDialog(int number); 0141 0142 void elementHover(int num); 0143 void setupStatusBar(); 0144 0145 /** 0146 * switched to the table with the index @p index 0147 */ 0148 void slotSwitchtoTable(int index); 0149 0150 /** 0151 * start the glossary 0152 */ 0153 void slotGlossary(); 0154 0155 /** 0156 * show the R/S-phrases 0157 */ 0158 void slotRS(); 0159 0160 MoleculeDialog *slotMoleculeviewer(); 0161 0162 void slotOBConverter(); 0163 0164 void slotTables(); 0165 0166 void slotSwitchtoLookGradient(int); 0167 void slotSwitchtoLookScheme(int); 0168 void slotSwitchtoNumeration(int); 0169 0170 /** 0171 *start the isotopetable 0172 */ 0173 void slotIsotopeTable(); 0174 0175 void slotPlotData(); 0176 /** 0177 * Start the calculator 0178 */ 0179 void showCalculator(); 0180 0181 void slotExportTable(); 0182 0183 void slotShowExportDialog(); 0184 0185 /** 0186 * These slots are for the standard actions 0187 */ 0188 void showSettingsDialog(); 0189 0190 void slotUpdateSettings(); 0191 0192 protected: 0193 QSize sizeHint() const override; 0194 }; 0195 0196 #endif // KALZIUM_H