File indexing completed on 2024-04-28 15:51:58
0001 /* 0002 SPDX-FileCopyrightText: 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef OKULAR_SIGNATUREPANEL_H 0008 #define OKULAR_SIGNATUREPANEL_H 0009 0010 #include <QHash> 0011 #include <QWidget> 0012 0013 #include "core/observer.h" 0014 0015 namespace Okular 0016 { 0017 class Document; 0018 } 0019 0020 class PageView; 0021 0022 class SignaturePanelPrivate; 0023 0024 class SignaturePanel : public QWidget, public Okular::DocumentObserver 0025 { 0026 Q_OBJECT 0027 public: 0028 SignaturePanel(Okular::Document *document, QWidget *parent); 0029 ~SignaturePanel() override; 0030 0031 // inherited from DocumentObserver 0032 void notifySetup(const QVector<Okular::Page *> &pages, int setupFlags) override; 0033 0034 void setPageView(PageView *pv); 0035 0036 Q_SIGNALS: 0037 void documentHasSignatures(bool hasSignatures); 0038 0039 private Q_SLOTS: 0040 void activated(const QModelIndex &); 0041 void slotShowContextMenu(); 0042 void slotViewProperties(); 0043 void signUnsignedSignature(); 0044 0045 private: 0046 Q_DECLARE_PRIVATE(SignaturePanel) 0047 QScopedPointer<SignaturePanelPrivate> d_ptr; 0048 }; 0049 0050 #endif