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

0001 /*
0002     SPDX-FileCopyrightText: 2014 Christoph Feck <christoph@maxiom.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QStatusBar>
0010 
0011 class QLabel;
0012 
0013 class KCalcStatusBar : public QStatusBar
0014 {
0015     Q_OBJECT
0016 
0017 public:
0018     explicit KCalcStatusBar(QWidget *parent = nullptr);
0019     ~KCalcStatusBar() override = default;
0020 
0021 public:
0022     enum AngleMode { DegMode, RadMode, GradMode };
0023 
0024 public:
0025     void setBaseIndicatorVisible(bool visible);
0026     void setAngleModeIndicatorVisible(bool visible);
0027 
0028     void setShiftIndicator(bool shift);
0029     void setBase(int base);
0030     void setAngleMode(AngleMode mode);
0031     void setMemoryIndicator(bool memory);
0032 
0033 private:
0034     QLabel *addIndicator(const QList<QString> &indicatorTexts);
0035 
0036 private:
0037     QLabel *const shift_indicator_;
0038     QLabel *const base_indicator_;
0039     QLabel *const angle_mode_indicator_;
0040     QLabel *const memory_indicator_;
0041 };
0042