From 29246c27da602ea933be69210f551fa6b47532fe Mon Sep 17 00:00:00 2001 From: huayadong Date: Sat, 7 Dec 2024 08:49:31 +0800 Subject: [PATCH] Display prompts for complex functions --- ...isplay-prompts-for-complex-functions.patch | 88 +++++++++++++++++++ kylin-calculator.spec | 9 +- 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 0001-Display-prompts-for-complex-functions.patch diff --git a/0001-Display-prompts-for-complex-functions.patch b/0001-Display-prompts-for-complex-functions.patch new file mode 100644 index 0000000..1032cc7 --- /dev/null +++ b/0001-Display-prompts-for-complex-functions.patch @@ -0,0 +1,88 @@ +From 86db492a5defc403e169575bd700553957014c5e Mon Sep 17 00:00:00 2001 +From: huayadong +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 + diff --git a/kylin-calculator.spec b/kylin-calculator.spec index dcea94c..b5791dc 100644 --- a/kylin-calculator.spec +++ b/kylin-calculator.spec @@ -1,6 +1,6 @@ Name: kylin-calculator Version: 1.2.0.0 -Release: 4 +Release: 5 Summary: Calculator tool for UKUI License: LGPL-3.0-or-later and GPL-3.0-or-later URL: http://www.ukui.org @@ -8,6 +8,7 @@ Source0: %{name}-%{version}.tar.gz Patch01: 0001-install-schema-files-to-fix-build-error.patch Patch02: 0001-Fix-the-version-showing-none-in-about-dialog.patch Patch03: kylin-calculator-1.2.0.0-Multi-language-translation-support.patch +Patch04: 0001-Display-prompts-for-complex-functions.patch BuildRequires: qt5-qtbase-devel BuildRequires: qtchooser @@ -85,6 +86,12 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/kylin-user-guide/data/guide/kylin-calculator/* %changelog +* Mon Dec 9 2024 huayadong - 1.2.0.0-5 +- Type:update +- CVE: +- SUG:NA +- add patch4:0001-Display-prompts-for-complex-functions.patch + * Fri Nov 22 2024 huayadong - 1.2.0.0-4 - Type:update - CVE: -- Gitee