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.desktop | 1 + src-qt5/desktop-utils/lumina-calculator/lumina-calculator.pro | 2 +- src-qt5/desktop-utils/lumina-calculator/mainUI.cpp | 7 +++++++ src-qt5/desktop-utils/lumina-calculator/mainUI.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils') 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 +#include + #include #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; -- cgit