aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--icon-theme/material-design-dark/actions/formula.svg5
-rw-r--r--icon-theme/material-design-light/actions/formula.svg5
-rw-r--r--port-files/FreeBSD/x11/lumina-core/pkg-plist2
-rw-r--r--src-qt5/desktop-utils/lumina-calculator/mainUI.cpp17
-rw-r--r--src-qt5/desktop-utils/lumina-calculator/mainUI.h2
5 files changed, 21 insertions, 10 deletions
diff --git a/icon-theme/material-design-dark/actions/formula.svg b/icon-theme/material-design-dark/actions/formula.svg
new file mode 100644
index 00000000..00aced0e
--- /dev/null
+++ b/icon-theme/material-design-dark/actions/formula.svg
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="24" height="24" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
+ <path fill="#F8F8F8" fill-opacity="1" stroke-width="1.33333" stroke-linejoin="round" d="M 15.5987,5.28811C 14.4983,5.19184 13.5282,6.00582 13.432,7.10618L 13.1788,10L 16,10L 16,12L 13.0038,12L 12.5604,17.0681C 12.3679,19.2689 10.4278,20.8968 8.22702,20.7043C 6.9208,20.59 5.81636,19.8601 5.1746,18.8254L 6.67042,17.3296C 6.90899,18.0735 7.57426,18.6395 8.40133,18.7119C 9.50169,18.8082 10.4718,17.9942 10.568,16.8938L 10.9962,12L 8,12L 8,10L 11.1712,10L 11.4396,6.93188C 11.6321,4.73115 13.5722,3.10319 15.773,3.29573C 17.0792,3.41001 18.1836,4.13994 18.8254,5.1746L 17.3296,6.67041C 17.091,5.92647 16.4257,5.36046 15.5987,5.28811 Z "/>
+</svg>
diff --git a/icon-theme/material-design-light/actions/formula.svg b/icon-theme/material-design-light/actions/formula.svg
new file mode 100644
index 00000000..6c84a06e
--- /dev/null
+++ b/icon-theme/material-design-light/actions/formula.svg
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="24" height="24" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
+ <path fill="#000000" fill-opacity="1" stroke-width="1.33333" stroke-linejoin="round" d="M 15.5987,5.28811C 14.4983,5.19184 13.5282,6.00582 13.432,7.10618L 13.1788,10L 16,10L 16,12L 13.0038,12L 12.5604,17.0681C 12.3679,19.2689 10.4278,20.8968 8.22702,20.7043C 6.9208,20.59 5.81636,19.8601 5.1746,18.8254L 6.67042,17.3296C 6.90899,18.0735 7.57426,18.6395 8.40133,18.7119C 9.50169,18.8082 10.4718,17.9942 10.568,16.8938L 10.9962,12L 8,12L 8,10L 11.1712,10L 11.4396,6.93188C 11.6321,4.73115 13.5722,3.10319 15.773,3.29573C 17.0792,3.41001 18.1836,4.13994 18.8254,5.1746L 17.3296,6.67041C 17.091,5.92647 16.4257,5.36046 15.5987,5.28811 Z "/>
+</svg>
diff --git a/port-files/FreeBSD/x11/lumina-core/pkg-plist b/port-files/FreeBSD/x11/lumina-core/pkg-plist
index 4fdb6264..358c3182 100644
--- a/port-files/FreeBSD/x11/lumina-core/pkg-plist
+++ b/port-files/FreeBSD/x11/lumina-core/pkg-plist
@@ -215,6 +215,7 @@ share/icons/material-design-dark/scalable/actions/format-view-headline.svg
share/icons/material-design-dark/scalable/actions/format-view-list.svg
share/icons/material-design-dark/scalable/actions/format-view-tiles.svg
share/icons/material-design-dark/scalable/actions/format-view-week.svg
+share/icons/material-design-dark/scalable/actions/formula.svg
share/icons/material-design-dark/scalable/actions/go-bottom.svg
share/icons/material-design-dark/scalable/actions/go-down-search.svg
share/icons/material-design-dark/scalable/actions/go-down.svg
@@ -1027,6 +1028,7 @@ share/icons/material-design-light/scalable/actions/format-view-headline.svg
share/icons/material-design-light/scalable/actions/format-view-list.svg
share/icons/material-design-light/scalable/actions/format-view-tiles.svg
share/icons/material-design-light/scalable/actions/format-view-week.svg
+share/icons/material-design-light/scalable/actions/formula.svg
share/icons/material-design-light/scalable/actions/go-bottom.svg
share/icons/material-design-light/scalable/actions/go-down-search.svg
share/icons/material-design-light/scalable/actions/go-down.svg
diff --git a/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp b/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp
index a0b1416e..a3e55dda 100644
--- a/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp
@@ -60,7 +60,7 @@ mainUI::mainUI() : QMainWindow(), ui(new Ui::mainUI()){
escShortcut = new QShortcut(Qt::Key_Escape, this);
connect(escShortcut, SIGNAL(activated()), this, SLOT(clear_calc()) );
quitShortcut = new QShortcut(Qt::CTRL + Qt::Key_Q, this);
- connect(quitShortcut, SIGNAL(activated()), this, SLOT(on_quitShortcut_Triggered()) );
+ connect(quitShortcut, SIGNAL(activated()), this, SLOT(quitShortcut_Triggered()) );
}
mainUI::~mainUI(){
@@ -169,7 +169,7 @@ void mainUI::copy_to_clipboard(QListWidgetItem *it){
void mainUI::checkInput(const QString &str){
if(str.length()==1 && ui->list_results->count()>0){
- if(OPS.contains(str)){
+ if(OPS.contains(str)){
QString lastresult = ui->list_results->item( ui->list_results->count()-1)->text().section("]",0,0).section("[",-1).simplified();
ui->line_eq->setText( lastresult+str);
}
@@ -216,8 +216,8 @@ double mainUI::performSciOperation(QString func, double arg){
else if(func=="sinh"){ return ::sinh(arg); }
else if(func=="cosh"){ return ::cosh(arg); }
else if(func=="tanh"){ return ::tanh(arg); }
- else{
- qDebug() << "Unknown Scientific Function:" << func;
+ else{
+ qDebug() << "Unknown Scientific Function:" << func;
return BADVALUE;
}
//Special cases:
@@ -292,7 +292,7 @@ double mainUI::strToNumber(QString str){
for(int i=0; i<symbols.length(); i++){
int tmp = str.indexOf(symbols[i]);
while(tmp==0 || (tmp>0 && str[tmp-1].toLower()=='e') ){ tmp = str.indexOf(symbols[i], tmp+1); } //catch scientific notation
- if(sym < tmp){
+ if(sym < tmp){
//qDebug() << " - found:" << tmp << sym;
sym = tmp;
}
@@ -312,7 +312,7 @@ double mainUI::strToNumber(QString str){
//qDebug() << " - Found Number:" << str;// << str.toDouble();
if(str=="\u03C0"){ return PI; }
//else if(str.endsWith("\u03C0")){
- //return performOperation( strToNumber(str.section("\u03C0",0,-2)), PI, '*');
+ //return performOperation( strToNumber(str.section("\u03C0",0,-2)), PI, '*');
else if(str.contains("\u03C0")){
qDebug() << " Has Pi:" << str.count("\u03C0");
//Pi is mixed into the number - need to multiply it all out
@@ -336,7 +336,7 @@ QString mainUI::getHistory(int number){
QString ans = ui->list_results->item(number-1)->text().section("=",0,0).section("]",-1).simplified();
QString eq = ui->list_results->item(number-1)->text().section("[",-1).section("]",0,0).simplified();
//See if the text answer is accurate enough (does not look rounded)
- if(ans.length()<7){
+ if(ans.length()<7){
return ("("+ans+")"); //short enough answer that it was probably not rounded
}else{
//need to re-calculate the last equation instead for exact result
@@ -344,7 +344,6 @@ QString mainUI::getHistory(int number){
}
}
-void mainUI::on_quitShortcut_Triggered(){
+void mainUI::quitShortcut_Triggered(){
QApplication::quit();
}
-
diff --git a/src-qt5/desktop-utils/lumina-calculator/mainUI.h b/src-qt5/desktop-utils/lumina-calculator/mainUI.h
index 308eab30..19077ca7 100644
--- a/src-qt5/desktop-utils/lumina-calculator/mainUI.h
+++ b/src-qt5/desktop-utils/lumina-calculator/mainUI.h
@@ -54,7 +54,7 @@ private slots:
void saveHistory();
- void on_quitShortcut_Triggered();
+ void quitShortcut_Triggered();
private:
Ui::mainUI *ui;
bgstack15