aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-calculator/mainUI.cpp
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/desktop-utils/lumina-calculator/mainUI.cpp
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/desktop-utils/lumina-calculator/mainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-calculator/mainUI.cpp7
1 files changed, 7 insertions, 0 deletions
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
// =====================
bgstack15