diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-12-26 18:20:40 -0500 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-12-26 18:20:40 -0500 |
commit | a32c6a9fd54fd400db0b729e826bc9a06297a3d7 (patch) | |
tree | a2fed348100dd0b36761f86cb020219091085bad /src-qt5/desktop-utils/lumina-pdf/CM_PrintPreviewWidget.h | |
parent | Made improvements to focus setting and the find widget in lumina-pdf (diff) | |
download | lumina-a32c6a9fd54fd400db0b729e826bc9a06297a3d7.tar.gz lumina-a32c6a9fd54fd400db0b729e826bc9a06297a3d7.tar.bz2 lumina-a32c6a9fd54fd400db0b729e826bc9a06297a3d7.zip |
Began creating custom QPrintPreviewWidget for lumina-pdf
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/CM_PrintPreviewWidget.h')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/CM_PrintPreviewWidget.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/CM_PrintPreviewWidget.h b/src-qt5/desktop-utils/lumina-pdf/CM_PrintPreviewWidget.h deleted file mode 100644 index ac457a10..00000000 --- a/src-qt5/desktop-utils/lumina-pdf/CM_PrintPreviewWidget.h +++ /dev/null @@ -1,34 +0,0 @@ -//=========================================== -// 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 QPrintPreviewWidget to provide -// notification when a context menu is requested -//=========================================== -#ifndef _CONTEXT_MENU_PRINT_PREVIEW_WIDGET_H -#define _CONTEXT_MENU_PRINT_PREVIEW_WIDGET_H - -#include <QPrintPreviewWidget> -#include <QMouseEvent> -#include <QDebug> - -class CM_PrintPreviewWidget : public QPrintPreviewWidget{ - Q_OBJECT -signals: - void customContextMenuRequested(const QPoint&); - -public: - CM_PrintPreviewWidget(QPrinter * printer = 0, QWidget *parent = 0) : QPrintPreviewWidget(printer, parent){ - this->setMouseTracking(true); - QList<QWidget*> children = this->findChildren<QWidget*>("",Qt::FindChildrenRecursively); - for(int i=0; i<children.length(); i++){ - children[i]->setContextMenuPolicy(Qt::CustomContextMenu); - connect(children[i], SIGNAL(customContextMenuRequested(const QPoint&)), this, SIGNAL(customContextMenuRequested(const QPoint&)) ); - } - } - -}; - -#endif |