compile
[kdegraphics.git] / okular / ui / side_reviews.h
blobebbf478d260de46dbb6cf8b758de39e9f14f3275
1 /***************************************************************************
2 * Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_SIDE_REVIEWS_H_
11 #define _OKULAR_SIDE_REVIEWS_H_
13 #include <QtCore/QModelIndexList>
14 #include <QtCore/QVector>
15 #include <QtGui/QWidget>
17 #include "core/observer.h"
19 class QModelIndex;
21 namespace Okular {
22 class Annotation;
23 class Document;
26 class AnnotationModel;
27 class AuthorGroupProxyModel;
28 class PageFilterProxyModel;
29 class PageGroupProxyModel;
30 class TreeView;
32 /**
33 * @short ...
35 class Reviews : public QWidget, public Okular::DocumentObserver
37 Q_OBJECT
38 public:
39 Reviews( QWidget * parent, Okular::Document * document );
41 // [INHERITED] from DocumentObserver
42 uint observerId() const { return REVIEWS_ID; }
43 void notifyViewportChanged( bool smoothMove );
45 public Q_SLOTS:
46 void slotPageEnabled( bool );
47 void slotAuthorEnabled( bool );
48 void slotCurrentPageOnly( bool );
50 Q_SIGNALS:
51 void setAnnotationWindow( Okular::Annotation *annotation );
52 void removeAnnotationWindow( Okular::Annotation *annotation );
54 private Q_SLOTS:
55 void activated( const QModelIndex& );
56 void contextMenuRequested( const QPoint& );
58 private:
59 QModelIndexList retrieveAnnotations(const QModelIndex& idx) const;
61 // data fields (GUI)
62 TreeView * m_view;
63 // internal storage
64 Okular::Document * m_document;
65 AnnotationModel * m_model;
66 AuthorGroupProxyModel * m_authorProxy;
67 PageFilterProxyModel * m_filterProxy;
68 PageGroupProxyModel * m_groupProxy;
71 #endif