aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-10-20 15:12:45 -0400
committerKen Moore <ken@ixsystems.com>2016-10-20 15:12:45 -0400
commit4aea9f05c63447e5f05c15fbc8cb6bcc9382d19d (patch)
tree8dd2b73bb59cb84eaa81de900247fc6a3639b5a2 /src-qt5
parentFix the resizability of the lumina-calculator window. (diff)
downloadlumina-4aea9f05c63447e5f05c15fbc8cb6bcc9382d19d.tar.gz
lumina-4aea9f05c63447e5f05c15fbc8cb6bcc9382d19d.tar.bz2
lumina-4aea9f05c63447e5f05c15fbc8cb6bcc9382d19d.zip
Oops, make sure the .desktop file actually gets installed.
Diffstat (limited to 'src-qt5')
-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