aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/PresentationLabel.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-11-27 15:46:57 -0500
committerKen Moore <ken@ixsystems.com>2017-11-27 15:46:57 -0500
commitc1c4f85bf10d090c96a935050582ac05e2dce414 (patch)
tree83d0c57379534d2aaa7801108b0c43068dfb40bc /src-qt5/desktop-utils/lumina-pdf/PresentationLabel.h
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-c1c4f85bf10d090c96a935050582ac05e2dce414.tar.gz
lumina-c1c4f85bf10d090c96a935050582ac05e2dce414.tar.bz2
lumina-c1c4f85bf10d090c96a935050582ac05e2dce414.zip
Some UI improvements for lumina-pdf:
1. Add a context menu of options. 2. Use the context menu for both the presentation label and normal viewer 3. Get things ready for better integration of keyboard shortcuts application-wide.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/PresentationLabel.h')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/PresentationLabel.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/PresentationLabel.h b/src-qt5/desktop-utils/lumina-pdf/PresentationLabel.h
new file mode 100644
index 00000000..c5b552a6
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-pdf/PresentationLabel.h
@@ -0,0 +1,35 @@
+//===========================================
+// Lumina Desktop source code
+// Copyright (c) 2017, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// Simple subclass of QLabel to provide
+// some overlay information as a presentation window
+//===========================================
+#ifndef _PRESENTATION_LABEL_WIDGET_H
+#define _PRESENTATION_LABEL_WIDGET_H
+
+#include <QLabel>
+#include <QMouseEvent>
+#include <QDebug>
+
+class PresentationLabel : public QLabel{
+ Q_OBJECT
+
+signals:
+ void nextSlide();
+
+public:
+ PresentationLabel() : QLabel(0, Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint){
+ this->setContextMenuPolicy(Qt::CustomContextMenu);
+ }
+
+protected:
+ void mousePressEvent(QMouseEvent *ev){
+ QLabel::mousePressEvent(ev);
+ if(ev->button()==Qt::LeftButton){ emit nextSlide(); }
+ }
+};
+
+#endif
bgstack15