FunctionPad.qml 2.2 KB
Newer Older
Han Young's avatar
Han Young committed
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
/*
 * This file is part of Kalk
 *
 * Copyright (C) 2020 Han Young <hanyoung@protonmail.com>
 *
 *
 * $BEGIN_LICENSE:GPL3+$
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * $END_LICENSE$
 */
import QtQuick 2.0
import org.kde.kirigami 2.13 as Kirigami
import QtQuick.Layouts 1.1
GridLayout {
    signal pressed(string text)
    columns: 3
Han Young's avatar
Han Young committed
30
31
32
    NumberButton {text: "sin(" ; display: "sin"; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
    NumberButton {text: "cos(" ; display: "cos"; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
    NumberButton {text: "tan(" ; display: "tan"; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
Han Young's avatar
Han Young committed
33
34
35
    NumberButton {text: "log(" ; fontSize: Kirigami.Theme.defaultFont.pointSize * 1.5; display: "log"; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
    NumberButton {text: "log10(" ; fontSize: Kirigami.Theme.defaultFont.pointSize * 1.5; display: "log10"; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
    NumberButton {text: "log2(" ; fontSize: Kirigami.Theme.defaultFont.pointSize * 1.5; display: "log2"; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
Han Young's avatar
Han Young committed
36
37
38
39
    NumberButton {text: "√(" ; display: ""; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
    NumberButton {text: "π" ; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
    NumberButton {text: "e" ; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
    NumberButton {text: "%" ; onClicked: pressed(text); textColor: Kirigami.Theme.activeTextColor;}
Han Young's avatar
Han Young committed
40
}