File indexing completed on 2021-12-21 14:36:19

0001 /*
0002     SPDX-FileCopyrightText: 2001-2013 Evan Teran <evan.teran@gmail.com>
0003     SPDX-FileCopyrightText: 1996-2000 Bernd Johannes Wuebben <wuebben@kde.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include "kcalc_button.h"
0011 
0012 struct science_constant;
0013 
0014 class KCalcConstButton : public KCalcButton
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019     explicit KCalcConstButton(QWidget *parent);
0020 
0021     KCalcConstButton(const QString &label, QWidget *parent, const QString &tooltip = QString());
0022 
0023     QString constant() const;
0024 
0025     void setButtonNumber(int num);
0026 
0027     void setLabelAndTooltip();
0028 
0029 Q_SIGNALS:
0030     void constButtonClicked(int num);
0031 
0032 private Q_SLOTS:
0033     void slotConfigureButton();
0034     void slotChooseScientificConst(const science_constant &const_chosen);
0035     void slotClicked();
0036 
0037 private:
0038     void initPopupMenu();
0039 
0040 private:
0041     int button_num_ = -1;
0042 };
0043