• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kcalc

  • sources
  • kde-4.14
  • kdeutils
  • kcalc
kcalc_const_menu.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2001 - 2013 Evan Teran
3  evan.teran@gmail.com
4 
5 Copyright (C) 2003 - 2005 Klaus Niederkrueger
6  kniederk@math.uni-koeln.de
7 
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #ifndef KCALC_CONST_MENU_H_
23 #define KCALC_CONST_MENU_H_
24 
25 #include <QMenu>
26 #include <QString>
27 
28 enum ConstantCategory {
29  Mathematics = 1,
30  Electromagnetic = 2,
31  Nuclear = 4,
32  Thermodynamics = 8,
33  Gravitation = 16
34 };
35 
36 struct science_constant {
37  QString label;
38  QString name;
39  QString whatsthis;
40  QString value;
41  ConstantCategory category;
42 };
43 
44 class KCalcConstMenu : public QMenu {
45  Q_OBJECT
46 
47 public:
48  explicit KCalcConstMenu(QWidget * parent = 0);
49  explicit KCalcConstMenu(const QString &title, QWidget * parent = 0);
50 
51 public:
52  static void init_consts();
53 
54 signals:
55  void triggeredConstant(const science_constant &);
56 
57 
58 private:
59  void init_all();
60 
61 public slots:
62  void slotPassSignalThrough(QAction *chosen_const);
63 };
64 
65 #endif
KCalcConstMenu::triggeredConstant
void triggeredConstant(const science_constant &)
KCalcConstMenu::KCalcConstMenu
KCalcConstMenu(QWidget *parent=0)
Definition: kcalc_const_menu.cpp:143
QWidget
Mathematics
Definition: kcalc_const_menu.h:29
Gravitation
Definition: kcalc_const_menu.h:33
science_constant::category
ConstantCategory category
Definition: kcalc_const_menu.h:41
KCalcConstMenu::init_consts
static void init_consts()
Definition: kcalc_const_menu.cpp:61
Electromagnetic
Definition: kcalc_const_menu.h:30
science_constant
Definition: kcalc_const_menu.h:36
science_constant::label
QString label
Definition: kcalc_const_menu.h:37
science_constant::name
QString name
Definition: kcalc_const_menu.h:38
Nuclear
Definition: kcalc_const_menu.h:31
QMenu::title
QString title() const
Thermodynamics
Definition: kcalc_const_menu.h:32
QString
KCalcConstMenu
Definition: kcalc_const_menu.h:44
QMenu
science_constant::whatsthis
QString whatsthis
Definition: kcalc_const_menu.h:39
KCalcConstMenu::slotPassSignalThrough
void slotPassSignalThrough(QAction *chosen_const)
Definition: kcalc_const_menu.cpp:130
ConstantCategory
ConstantCategory
Definition: kcalc_const_menu.h:28
QAction
science_constant::value
QString value
Definition: kcalc_const_menu.h:40
QObject::parent
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcalc

Skip menu "kcalc"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal