代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。