aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-qt5/desktop-utils/lumina-calculator/lumina-calculator.desktop1
-rw-r--r--src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro2
-rw-r--r--src-qt5/desktop-utils/lumina-calculator/mainUI.cpp7
-rw-r--r--src-qt5/desktop-utils/lumina-calculator/mainUI.h1
4 files changed, 10 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.desktop b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.desktop
index cabc3de1..8732425a 100644
--- a/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.desktop
+++ b/src-qt5/desktop-utils/lumina-calculator/lumina-calculator.desktop
@@ -6,4 +6,5 @@ Type=Application
StartupNotify=true
Categories=Utility;
Name=Calculator
+GenericName=Scientific Calculator for Lumina
Comment=Perform mathematical calculations
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
diff --git a/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp b/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp
index cdb33414..49449586 100644
--- a/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp
@@ -8,6 +8,8 @@
#include "ui_mainUI.h"
#include <QDebug>
+#include <QClipboard>
+
#include <LuminaXDG.h>
#include "EqValidator.h"
@@ -35,6 +37,7 @@ mainUI::mainUI() : QMainWindow(), ui(new Ui::mainUI()){
connect(ui->button_Decimal, SIGNAL (clicked()), this, SLOT (captureButtonDecimal()));
connect(ui->button_Equal, SIGNAL (clicked()), this, SLOT (start_calc()));
connect(ui->list_results, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(insert_history(QListWidgetItem*)) );
+ //connect(ui->list_results, SIGNAL(itemRightClicked(QListWidgetItem*)), this, SLOT(copt_to_clipboard(QListWidgetItem*)) );
this->setWindowTitle(tr("Calculator"));
updateIcons();
ui->line_eq->setFocus();
@@ -86,6 +89,10 @@ void mainUI::insert_history(QListWidgetItem *it){
ui->line_eq->insert("("+txt+")");
}
+void mainUI::copy_to_clipboard(QListWidgetItem *it){
+ QString txt = it->text();
+ QApplication::clipboard()->setText(txt);
+}
// =====================
// PRIVATE FUNCTIONS
// =====================
diff --git a/src-qt5/desktop-utils/lumina-calculator/mainUI.h b/src-qt5/desktop-utils/lumina-calculator/mainUI.h
index 4192b250..50762677 100644
--- a/src-qt5/desktop-utils/lumina-calculator/mainUI.h
+++ b/src-qt5/desktop-utils/lumina-calculator/mainUI.h
@@ -46,6 +46,7 @@ private slots:
void captureButtonDecimal();
void insert_history(QListWidgetItem *it);
+ void copy_to_clipboard(QListWidgetItem *it);
private:
Ui::mainUI *ui;
bgstack15