5 Star 0 Fork 10

src-openEuler/kylin-calculator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-Display-prompts-for-complex-functions.patch 4.37 KB
一键复制 编辑 原始数据 按行查看 历史
华亚东 提交于 2024-12-07 08:49 . Display prompts for complex functions
From 86db492a5defc403e169575bd700553957014c5e Mon Sep 17 00:00:00 2001
From: huayadong <huayadong@kylinos.cn>
Date: Sat, 7 Dec 2024 08:46:29 +0800
Subject: [PATCH] Display prompts for complex functions
---
src/programmer/programkeyboary.cpp | 5 +++++
src/scientificmodel.cpp | 30 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/src/programmer/programkeyboary.cpp b/src/programmer/programkeyboary.cpp
index b11004b..8a06480 100644
--- a/src/programmer/programkeyboary.cpp
+++ b/src/programmer/programkeyboary.cpp
@@ -83,6 +83,11 @@ void ProgramKeyboary::initLayout()
m_layout->addWidget(m_btnMap.find(QString("0")).value(), 5, 5, 1, 1);
m_layout->addWidget(m_btnMap.find(QString("Equal")).value(), 5, 6, 1, 1);
+ m_btnMap.find(QString("Rsh")).value()->setToolTip(tr("Move X 1 bit to the right"));
+ m_btnMap.find(QString("Lsh")).value()->setToolTip(tr("Move X 1 bit to the left"));
+ m_btnMap.find(QString("XY")).value()->setToolTip(tr("Move X to the right by y bits"));
+ m_btnMap.find(QString("YX")).value()->setToolTip(tr("Move X to the left by y bits"));
+
m_layout->setHorizontalSpacing(2);
m_layout->setVerticalSpacing(2);
m_layout->setMargin(0);
diff --git a/src/scientificmodel.cpp b/src/scientificmodel.cpp
index 6b1a1b1..077a741 100755
--- a/src/scientificmodel.cpp
+++ b/src/scientificmodel.cpp
@@ -193,6 +193,7 @@ void ScientificModel::setWidgetUi()
QStringList btnNameList = btnList.split(",");
int index = 0;
+ btnClear->setToolTip(tr("Clear"));
btnClear->setText(btnNameList[index++]);
btnDiv->setText(btnNameList[index++]);
btnMulti->setText(btnNameList[index++]);
@@ -264,6 +265,29 @@ void ScientificModel::setWidgetUi()
btnExp->setText(btnNameList[index++]);
btnLn->setText(btnNameList[index++]);
+ btnInd->setToolTip(tr("Change some keys to interleaving functions") );
+ btnUndo->setToolTip(tr("/") );
+
+ btnReci->setToolTip(tr("Calculate the reciprocal of the displayed value") );
+ btnXPower2->setToolTip(tr("Square the displayed value") );
+ btnXPower3->setToolTip(tr("Calculate the cubic value of the displayed value") );
+ btnYPowerX->setToolTip(tr("Calculate the displayed value power of the next input value") );
+
+ btnFac->setToolTip(tr("Calculate the factorial of the displayed value") );
+ btnXSquare2->setToolTip(tr("Square root of the displayed square root") );
+ btnXSquare3->setToolTip(tr("Cubic representation of the displayed value") );
+ btnYSquareX->setToolTip(tr(" Calculate the displayed value to the y-th power") );
+
+ btnSin->setToolTip(tr("Calculate the sine value of the displayed value") );
+ btnCos->setToolTip(tr("Calculate the cosine value of the displayed value") );
+ btnTan->setToolTip(tr("Calculate the tangent value of the displayed value") );
+ btnLog->setToolTip(tr("Calculate the index value based on the displayed value") );
+
+ btnRad->setToolTip(tr("Switch between degrees and arcs (click to switch)") );
+ btnPi->setToolTip(tr("Input pi (3.141596...)") );
+ btnExp->setToolTip(tr("Enter e (the value of e is e ≈ 2.71828 18284 59...)") );
+ btnLn->setToolTip(tr("Calculate the natural logarithm of the displayed value") );
+
QString btnIconStr = "btn2nd,btnAns,btnLbra,btnRbra,btnReci,btnXPower2,btnXPower3,btnYPowerX,btnFac,btnXSquare2,"
"btnXSquare3,btnYSquareX,btnSin,btnCos,btnTan,btnLog,btnRad,btnPi,btnE,btnLn";
QStringList btnIconList = btnIconStr.split(",");
@@ -985,10 +1009,16 @@ void ScientificModel::changeBtnSinDisplay()
btnSin->setText("asin");
btnCos->setText("acos");
btnTan->setText("atan");
+ btnSin->setToolTip(tr("Calculate the arcsine value of the displayed value") );
+ btnCos->setToolTip(tr("Calculate the arccosine value of the displayed value") );
+ btnTan->setToolTip(tr("Calculate the arctangent value of the displayed value") );
} else {
btnSin->setText("sin");
btnCos->setText("cos");
btnTan->setText("tan");
+ btnSin->setToolTip(tr("Calculate the sine value of the displayed value") );
+ btnCos->setToolTip(tr("Calculate the cosine value of the displayed value") );
+ btnTan->setToolTip(tr("Calculate the tangent value of the displayed value") );
}
// 更新三角函数图片
--
2.46.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/kylin-calculator.git
git@gitee.com:src-openeuler/kylin-calculator.git
src-openeuler
kylin-calculator
kylin-calculator
master

搜索帮助