1 | /* |
2 | SPDX-FileCopyrightText: 2001-2013 Evan Teran <evan.teran@gmail.com> |
3 | SPDX-FileCopyrightText: 2003-2005 Klaus Niederkrueger <kniederk@math.uni-koeln.de> |
4 | |
5 | SPDX-License-Identifier: GPL-2.0-or-later |
6 | */ |
7 | |
8 | #pragma once |
9 | |
10 | #include <QMenu> |
11 | #include <QString> |
12 | |
13 | enum ConstantCategory { Mathematics = 1, Electromagnetic = 2, Nuclear = 4, Thermodynamics = 8, Gravitation = 16 }; |
14 | |
15 | struct science_constant { |
16 | QString label; |
17 | QString name; |
18 | QString whatsthis; |
19 | QString value; |
20 | ConstantCategory category; |
21 | }; |
22 | |
23 | class : public QMenu |
24 | { |
25 | Q_OBJECT |
26 | |
27 | public: |
28 | explicit KCalcConstMenu(QWidget *parent = nullptr); |
29 | explicit (const QString &title, QWidget *parent = nullptr); |
30 | |
31 | public: |
32 | static void (); |
33 | |
34 | Q_SIGNALS: |
35 | void triggeredConstant(const science_constant &); |
36 | |
37 | private: |
38 | void (); |
39 | |
40 | public Q_SLOTS: |
41 | void slotPassSignalThrough(QAction *chosen_const); |
42 | }; |
43 | |
44 | |