2021-05-24 07:25:56 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2005 Enrico Ros <eros.kde@email.it>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2005-03-24 19:50:28 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
#ifndef _OKULAR_SIDE_REVIEWS_H_
|
|
|
|
#define _OKULAR_SIDE_REVIEWS_H_
|
2005-03-24 19:50:28 +00:00
|
|
|
|
2018-08-17 18:05:01 +00:00
|
|
|
#include <QModelIndexList>
|
|
|
|
#include <QVector>
|
|
|
|
#include <QWidget>
|
2007-09-09 16:51:55 +00:00
|
|
|
|
2005-03-24 19:50:28 +00:00
|
|
|
#include "core/observer.h"
|
|
|
|
|
2007-09-09 16:51:55 +00:00
|
|
|
class QModelIndex;
|
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
namespace Okular
|
|
|
|
{
|
2007-04-19 18:30:20 +00:00
|
|
|
class Annotation;
|
2006-09-21 08:45:36 +00:00
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
2007-09-09 16:51:55 +00:00
|
|
|
class AnnotationModel;
|
2007-09-10 09:35:08 +00:00
|
|
|
class AuthorGroupProxyModel;
|
2007-09-09 16:51:55 +00:00
|
|
|
class PageFilterProxyModel;
|
|
|
|
class PageGroupProxyModel;
|
2009-11-19 17:26:41 +00:00
|
|
|
class KTreeViewSearchLine;
|
2007-09-09 18:32:54 +00:00
|
|
|
class TreeView;
|
2005-03-24 19:50:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @short ...
|
|
|
|
*/
|
2006-09-21 08:45:36 +00:00
|
|
|
class Reviews : public QWidget, public Okular::DocumentObserver
|
2005-03-24 19:50:28 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2006-09-21 08:45:36 +00:00
|
|
|
Reviews(QWidget *parent, Okular::Document *document);
|
2019-12-18 11:51:13 +00:00
|
|
|
~Reviews() override;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2005-03-24 19:50:28 +00:00
|
|
|
// [INHERITED] from DocumentObserver
|
2017-03-02 19:39:24 +00:00
|
|
|
void notifyCurrentPageChanged(int previous, int current) override;
|
2005-03-24 19:50:28 +00:00
|
|
|
|
2017-03-02 19:39:24 +00:00
|
|
|
void reparseConfig();
|
2005-03-24 19:50:28 +00:00
|
|
|
|
2006-12-30 12:40:54 +00:00
|
|
|
public Q_SLOTS:
|
2005-03-24 19:50:28 +00:00
|
|
|
void slotPageEnabled(bool);
|
|
|
|
void slotAuthorEnabled(bool);
|
2009-11-19 17:26:41 +00:00
|
|
|
void slotCurrentPageOnly(bool);
|
2019-03-31 22:03:36 +00:00
|
|
|
void slotExpandAll();
|
2009-11-19 17:26:41 +00:00
|
|
|
void slotCollapseAll();
|
|
|
|
|
2006-12-30 12:40:54 +00:00
|
|
|
Q_SIGNALS:
|
2005-03-24 19:50:28 +00:00
|
|
|
void openAnnotationWindow(Okular::Annotation *annotation, int pageNumber);
|
|
|
|
|
2006-12-30 12:40:54 +00:00
|
|
|
private Q_SLOTS:
|
2012-01-17 22:46:37 +00:00
|
|
|
void activated(const QModelIndex &);
|
|
|
|
void contextMenuRequested(const QPoint);
|
|
|
|
void saveSearchOptions();
|
2006-12-30 12:40:54 +00:00
|
|
|
|
|
|
|
private:
|
2007-09-09 16:51:55 +00:00
|
|
|
QModelIndexList retrieveAnnotations(const QModelIndex &idx) const;
|
2006-11-21 22:08:49 +00:00
|
|
|
|
2005-03-24 19:50:28 +00:00
|
|
|
// data fields (GUI)
|
2009-11-19 17:26:41 +00:00
|
|
|
KTreeViewSearchLine *m_searchLine;
|
2007-09-09 18:32:54 +00:00
|
|
|
TreeView *m_view;
|
2005-03-24 19:50:28 +00:00
|
|
|
// internal storage
|
2006-09-21 08:45:36 +00:00
|
|
|
Okular::Document *m_document;
|
2007-09-09 16:51:55 +00:00
|
|
|
AnnotationModel *m_model;
|
2007-09-10 09:35:08 +00:00
|
|
|
AuthorGroupProxyModel *m_authorProxy;
|
2007-09-09 16:51:55 +00:00
|
|
|
PageFilterProxyModel *m_filterProxy;
|
|
|
|
PageGroupProxyModel *m_groupProxy;
|
2005-03-24 19:50:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|