File: kcalc_statusbar.h

package info (click to toggle)
kcalc 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,740 kB
  • sloc: cpp: 13,605; xml: 699; python: 49; makefile: 6; sh: 4
file content (45 lines) | stat: -rw-r--r-- 923 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
    SPDX-FileCopyrightText: 2014 Christoph Feck <christoph@maxiom.de>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

#pragma once

#include <QStatusBar>

class QLabel;

class KCalcStatusBar : public QStatusBar
{
    Q_OBJECT

public:
    explicit KCalcStatusBar(QWidget *parent = nullptr);
    ~KCalcStatusBar() override = default;

public:
    enum AngleMode {
        DegMode,
        RadMode,
        GradMode
    };

public:
    void setBaseIndicatorVisible(bool visible);
    void setAngleModeIndicatorVisible(bool visible);

    void setShiftIndicator(bool shift);
    void setBase(int base);
    void setAngleMode(AngleMode mode);
    void setMemoryIndicator(bool memory);

private:
    QLabel *addIndicator(const QList<QString> &indicatorTexts);

private:
    QLabel *const shift_indicator_;
    QLabel *const base_indicator_;
    QLabel *const angle_mode_indicator_;
    QLabel *const memory_indicator_;
};