Skip to content

Commit

Permalink
Add IntelliSense for inverse trig
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Jun 12, 2024
1 parent a499bd2 commit 4a9f2d7
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 40 deletions.
18 changes: 18 additions & 0 deletions application/calculator/functiondatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ FunctionDatabase::FunctionDatabase(QObject* parent) :
{{tr("angle"), tr("Angle to calculate the tangent of")}}},
}
});
d->functions.insert("asin", {
"asin", {
{tr("Calculates the inverse sine of an angle"),
{{tr("angle"), tr("Angle to calculate the inverse sine of")}}},
}
});
d->functions.insert("acos", {
"acos", {
{tr("Calculates the inverse cosine of an angle"),
{{tr("angle"), tr("Angle to calculate the inverse cosine of")}}},
}
});
d->functions.insert("atan", {
"atan", {
{tr("Calculates the inverse tangent of an angle"),
{{tr("angle"), tr("Angle to calculate the inverse tangent of")}}},
}
});
d->functions.insert("log", {
"log", {{tr("Calculates the logarithm (base 10) of a number"),
{{"x", tr("Number to take the logarithm of")}}},
Expand Down
73 changes: 53 additions & 20 deletions application/translations/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@
<location filename="../calculator/functiondatabase.cpp" line="33"/>
<location filename="../calculator/functiondatabase.cpp" line="39"/>
<location filename="../calculator/functiondatabase.cpp" line="45"/>
<location filename="../calculator/functiondatabase.cpp" line="51"/>
<location filename="../calculator/functiondatabase.cpp" line="57"/>
<location filename="../calculator/functiondatabase.cpp" line="63"/>
<source>angle</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -491,98 +494,128 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="49"/>
<location filename="../calculator/functiondatabase.cpp" line="50"/>
<source>Calculates the inverse sine of an angle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="51"/>
<source>Angle to calculate the inverse sine of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="56"/>
<source>Calculates the inverse cosine of an angle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="57"/>
<source>Angle to calculate the inverse cosine of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="62"/>
<source>Calculates the inverse tangent of an angle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="63"/>
<source>Angle to calculate the inverse tangent of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="67"/>
<source>Calculates the logarithm (base 10) of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="50"/>
<location filename="../calculator/functiondatabase.cpp" line="52"/>
<location filename="../calculator/functiondatabase.cpp" line="68"/>
<location filename="../calculator/functiondatabase.cpp" line="70"/>
<source>Number to take the logarithm of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="51"/>
<location filename="../calculator/functiondatabase.cpp" line="69"/>
<source>Calculates the logarithm of a number, specifying a base</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="53"/>
<location filename="../calculator/functiondatabase.cpp" line="71"/>
<source>Base of the logarithm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="53"/>
<location filename="../calculator/functiondatabase.cpp" line="71"/>
<source>base</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="57"/>
<location filename="../calculator/functiondatabase.cpp" line="75"/>
<source>Calculates the natural logarithm (base e) of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="58"/>
<location filename="../calculator/functiondatabase.cpp" line="76"/>
<source>Number to take the natural logarithm of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="63"/>
<location filename="../calculator/functiondatabase.cpp" line="81"/>
<source>Calculates the absolute value of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="64"/>
<location filename="../calculator/functiondatabase.cpp" line="82"/>
<source>Number to take the absolute value of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="69"/>
<location filename="../calculator/functiondatabase.cpp" line="87"/>
<source>Calculates e raised to the power of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="70"/>
<location filename="../calculator/functiondatabase.cpp" line="88"/>
<source>Number to raise e to the power of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="75"/>
<location filename="../calculator/functiondatabase.cpp" line="93"/>
<source>Returns the real part of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="76"/>
<location filename="../calculator/functiondatabase.cpp" line="94"/>
<source>Number to return the real part of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="81"/>
<location filename="../calculator/functiondatabase.cpp" line="99"/>
<source>Returns the imaginary part of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="82"/>
<location filename="../calculator/functiondatabase.cpp" line="100"/>
<source>Number to return the imaginary part of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="87"/>
<location filename="../calculator/functiondatabase.cpp" line="105"/>
<source>Returns the phase angle of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="88"/>
<location filename="../calculator/functiondatabase.cpp" line="106"/>
<source>Number to return the phase angle of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="93"/>
<location filename="../calculator/functiondatabase.cpp" line="111"/>
<source>Returns the complex conjugate of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="94"/>
<location filename="../calculator/functiondatabase.cpp" line="112"/>
<source>Number to return the complex conjugate of</source>
<translation type="unfinished"></translation>
</message>
Expand Down
73 changes: 53 additions & 20 deletions application/translations/vi_VN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@
<location filename="../calculator/functiondatabase.cpp" line="33"/>
<location filename="../calculator/functiondatabase.cpp" line="39"/>
<location filename="../calculator/functiondatabase.cpp" line="45"/>
<location filename="../calculator/functiondatabase.cpp" line="51"/>
<location filename="../calculator/functiondatabase.cpp" line="57"/>
<location filename="../calculator/functiondatabase.cpp" line="63"/>
<source>angle</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -491,98 +494,128 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="49"/>
<location filename="../calculator/functiondatabase.cpp" line="50"/>
<source>Calculates the inverse sine of an angle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="51"/>
<source>Angle to calculate the inverse sine of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="56"/>
<source>Calculates the inverse cosine of an angle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="57"/>
<source>Angle to calculate the inverse cosine of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="62"/>
<source>Calculates the inverse tangent of an angle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="63"/>
<source>Angle to calculate the inverse tangent of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="67"/>
<source>Calculates the logarithm (base 10) of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="50"/>
<location filename="../calculator/functiondatabase.cpp" line="52"/>
<location filename="../calculator/functiondatabase.cpp" line="68"/>
<location filename="../calculator/functiondatabase.cpp" line="70"/>
<source>Number to take the logarithm of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="51"/>
<location filename="../calculator/functiondatabase.cpp" line="69"/>
<source>Calculates the logarithm of a number, specifying a base</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="53"/>
<location filename="../calculator/functiondatabase.cpp" line="71"/>
<source>Base of the logarithm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="53"/>
<location filename="../calculator/functiondatabase.cpp" line="71"/>
<source>base</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="57"/>
<location filename="../calculator/functiondatabase.cpp" line="75"/>
<source>Calculates the natural logarithm (base e) of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="58"/>
<location filename="../calculator/functiondatabase.cpp" line="76"/>
<source>Number to take the natural logarithm of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="63"/>
<location filename="../calculator/functiondatabase.cpp" line="81"/>
<source>Calculates the absolute value of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="64"/>
<location filename="../calculator/functiondatabase.cpp" line="82"/>
<source>Number to take the absolute value of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="69"/>
<location filename="../calculator/functiondatabase.cpp" line="87"/>
<source>Calculates e raised to the power of a number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="70"/>
<location filename="../calculator/functiondatabase.cpp" line="88"/>
<source>Number to raise e to the power of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="75"/>
<location filename="../calculator/functiondatabase.cpp" line="93"/>
<source>Returns the real part of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="76"/>
<location filename="../calculator/functiondatabase.cpp" line="94"/>
<source>Number to return the real part of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="81"/>
<location filename="../calculator/functiondatabase.cpp" line="99"/>
<source>Returns the imaginary part of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="82"/>
<location filename="../calculator/functiondatabase.cpp" line="100"/>
<source>Number to return the imaginary part of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="87"/>
<location filename="../calculator/functiondatabase.cpp" line="105"/>
<source>Returns the phase angle of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="88"/>
<location filename="../calculator/functiondatabase.cpp" line="106"/>
<source>Number to return the phase angle of</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="93"/>
<location filename="../calculator/functiondatabase.cpp" line="111"/>
<source>Returns the complex conjugate of a complex number</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../calculator/functiondatabase.cpp" line="94"/>
<location filename="../calculator/functiondatabase.cpp" line="112"/>
<source>Number to return the complex conjugate of</source>
<translation type="unfinished"></translation>
</message>
Expand Down

0 comments on commit 4a9f2d7

Please sign in to comment.