From babd84407a6a3475694268a3966f47a683e4d3cd Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 5 Oct 2016 17:52:52 -0400 Subject: Add a new Lumina project: desktop-utils/lumina-calculator This is just a very basic calculator at the moment. It still need more buttons/icons/features/etc added to it, but the algorithm and mathematics are already functional for evaluation expressions containing: Addition/Subtraction (+/-) Multiplication/Division( * or x, and /) Order of operations when mixing operations, including expressions within parentheses --- .../lumina-calculator/lumina-calculator.pro | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro (limited to 'src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro') diff --git a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro new file mode 100644 index 00000000..8c36c516 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro @@ -0,0 +1,92 @@ +include("$${PWD}/../../OS-detect.pri") + +QT += core gui widgets + +TARGET = lumina-calculator +target.path = $${L_BINDIR} + +HEADERS += mainUI.h + +SOURCES += main.cpp \ + mainUI.cpp + +FORMS += mainUI.ui + +LIBS += -lLuminaUtils + +DEPENDPATH += ../../libLumina + +TRANSLATIONS = i18n/l-calc_af.ts \ + i18n/l-calc_ar.ts \ + i18n/l-calc_az.ts \ + i18n/l-calc_bg.ts \ + i18n/l-calc_bn.ts \ + i18n/l-calc_bs.ts \ + i18n/l-calc_ca.ts \ + i18n/l-calc_cs.ts \ + i18n/l-calc_cy.ts \ + i18n/l-calc_da.ts \ + i18n/l-calc_de.ts \ + i18n/l-calc_el.ts \ + i18n/l-calc_en_GB.ts \ + i18n/l-calc_en_ZA.ts \ + i18n/l-calc_es.ts \ + i18n/l-calc_et.ts \ + i18n/l-calc_eu.ts \ + i18n/l-calc_fa.ts \ + i18n/l-calc_fi.ts \ + i18n/l-calc_fr.ts \ + i18n/l-calc_fr_CA.ts \ + i18n/l-calc_gl.ts \ + i18n/l-calc_he.ts \ + i18n/l-calc_hi.ts \ + i18n/l-calc_hr.ts \ + i18n/l-calc_hu.ts \ + i18n/l-calc_id.ts \ + i18n/l-calc_is.ts \ + i18n/l-calc_it.ts \ + i18n/l-calc_ja.ts \ + i18n/l-calc_ka.ts \ + i18n/l-calc_ko.ts \ + i18n/l-calc_lt.ts \ + i18n/l-calc_lv.ts \ + i18n/l-calc_mk.ts \ + i18n/l-calc_mn.ts \ + i18n/l-calc_ms.ts \ + i18n/l-calc_mt.ts \ + i18n/l-calc_nb.ts \ + i18n/l-calc_nl.ts \ + i18n/l-calc_pa.ts \ + i18n/l-calc_pl.ts \ + i18n/l-calc_pt.ts \ + i18n/l-calc_pt_BR.ts \ + i18n/l-calc_ro.ts \ + i18n/l-calc_ru.ts \ + i18n/l-calc_sk.ts \ + i18n/l-calc_sl.ts \ + i18n/l-calc_sr.ts \ + i18n/l-calc_sv.ts \ + i18n/l-calc_sw.ts \ + i18n/l-calc_ta.ts \ + i18n/l-calc_tg.ts \ + i18n/l-calc_th.ts \ + i18n/l-calc_tr.ts \ + i18n/l-calc_uk.ts \ + i18n/l-calc_uz.ts \ + i18n/l-calc_vi.ts \ + i18n/l-calc_zh_CN.ts \ + i18n/l-calc_zh_HK.ts \ + i18n/l-calc_zh_TW.ts \ + i18n/l-calc_zu.ts + +dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ +dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ + +#desktop.files=lumina-calculator.desktop +#desktop.path=$${L_SHAREDIR}/applications/ + +INSTALLS += target + +WITH_I18N{ + INSTALLS += dotrans +} -- cgit From 0b1d2985423a5ce2a6eedd9e7872eac7e94a2cd9 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 20 Oct 2016 12:59:30 -0400 Subject: Add the app registration for lumina-calculator. --- src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro') diff --git a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro index 8c36c516..0d797d70 100644 --- a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro +++ b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro @@ -82,8 +82,8 @@ TRANSLATIONS = i18n/l-calc_af.ts \ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ -#desktop.files=lumina-calculator.desktop -#desktop.path=$${L_SHAREDIR}/applications/ +desktop.files=lumina-calculator.desktop +desktop.path=$${L_SHAREDIR}/applications/ INSTALLS += target -- cgit From 021dad072d5db15f79cc11b44ee4708258503c05 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 20 Oct 2016 14:36:40 -0400 Subject: Finish cleaning up some of the calculator: 1) Add an input validator to the line edit to ensure only valid characters get added 2) Add the ability to click a history item to copy that equation into the line edit. 3) Turn off some debugging messages. --- src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro') diff --git a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro index 0d797d70..15578f4e 100644 --- a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro +++ b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro @@ -5,7 +5,8 @@ QT += core gui widgets TARGET = lumina-calculator target.path = $${L_BINDIR} -HEADERS += mainUI.h +HEADERS += mainUI.h \ + EqValidator.h SOURCES += main.cpp \ mainUI.cpp -- cgit From 4aea9f05c63447e5f05c15fbc8cb6bcc9382d19d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 20 Oct 2016 15:12:45 -0400 Subject: Oops, make sure the .desktop file actually gets installed. --- src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro') diff --git a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro index 15578f4e..38e22b37 100644 --- a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro +++ b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro @@ -86,7 +86,7 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO desktop.files=lumina-calculator.desktop desktop.path=$${L_SHAREDIR}/applications/ -INSTALLS += target +INSTALLS += target desktop WITH_I18N{ INSTALLS += dotrans -- cgit From 7ab900e41f5f15adccd573d459a80fe60cf6a044 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 7 Nov 2016 13:52:20 -0500 Subject: LARGE UPDATE: 1) Dismantle the Lumina library completely. 2) Setup lots of small subproject files (.pri) for the individual classes within the old library. 3) Move all the Lumina binaries to use the new subproject files 4) Split up the LuminaUtils class/files into LUtils and LDesktopUtils (generic utilities, and desktop-specific utilities) --- src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro') diff --git a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro index 38e22b37..efb9e68c 100644 --- a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro +++ b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro @@ -5,6 +5,12 @@ QT += core gui widgets TARGET = lumina-calculator target.path = $${L_BINDIR} +#include all the special classes from the Lumina tree +include(../../core/libLumina/LUtils.pri) #includes LUtils +include(../../core/libLumina/LuminaXDG.pri) +include(../../core/libLumina/LuminaSingleApplication.pri) +include(../../core/libLumina/LuminaThemes.pri) + HEADERS += mainUI.h \ EqValidator.h @@ -13,10 +19,6 @@ SOURCES += main.cpp \ FORMS += mainUI.ui -LIBS += -lLuminaUtils - -DEPENDPATH += ../../libLumina - TRANSLATIONS = i18n/l-calc_af.ts \ i18n/l-calc_ar.ts \ i18n/l-calc_az.ts \ -- cgit From 135fd7e158e8c4c030beb8f9c64bc24303a07da7 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 10 Nov 2016 10:11:28 -0500 Subject: Disable the theme engine from the desktop-utilities. Also start pruning unneeded libLumina classes from the desktop utils. --- src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro') diff --git a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro index efb9e68c..347a8dfb 100644 --- a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro +++ b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro @@ -8,7 +8,7 @@ target.path = $${L_BINDIR} #include all the special classes from the Lumina tree include(../../core/libLumina/LUtils.pri) #includes LUtils include(../../core/libLumina/LuminaXDG.pri) -include(../../core/libLumina/LuminaSingleApplication.pri) +#include(../../core/libLumina/LuminaSingleApplication.pri) include(../../core/libLumina/LuminaThemes.pri) HEADERS += mainUI.h \ -- cgit