2005-03-24 19:50:28 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
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
|
|
|
|
2007-09-09 16:51:55 +00:00
|
|
|
#include <QtCore/QVector>
|
|
|
|
#include <QtGui/QWidget>
|
|
|
|
|
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;
|
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 );
|
2005-03-24 19:50:28 +00:00
|
|
|
|
|
|
|
// [INHERITED] from DocumentObserver
|
|
|
|
uint observerId() const { return REVIEWS_ID; }
|
|
|
|
void notifyViewportChanged( bool smoothMove );
|
|
|
|
|
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 );
|
|
|
|
void slotCurrentPageOnly( bool );
|
|
|
|
|
2006-12-30 12:40:54 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void setAnnotationWindow( Okular::Annotation *annotation );
|
|
|
|
void removeAnnotationWindow( Okular::Annotation *annotation );
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2007-09-09 16:51:55 +00:00
|
|
|
void activated( const QModelIndex& );
|
|
|
|
void contextMenuRequested( const QPoint& );
|
2006-11-21 22:08:49 +00:00
|
|
|
|
2005-03-24 19:50:28 +00:00
|
|
|
private:
|
|
|
|
// data fields (GUI)
|
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
|