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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _KPDF_SIDE_REVIEWS_H_
|
|
|
|
#define _KPDF_SIDE_REVIEWS_H_
|
|
|
|
|
|
|
|
#include <qwidget.h>
|
2006-03-24 20:40:02 +00:00
|
|
|
#include <qvector.h>
|
2005-03-24 19:50:28 +00:00
|
|
|
#include "core/observer.h"
|
|
|
|
|
|
|
|
class KPDFDocument;
|
|
|
|
class KPDFPage;
|
|
|
|
class KToolBar;
|
2006-03-24 21:31:46 +00:00
|
|
|
class K3ListView;
|
|
|
|
class K3ListViewSearchLine;
|
2005-03-24 19:50:28 +00:00
|
|
|
class QTimer;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @short ...
|
|
|
|
*/
|
|
|
|
class Reviews : public QWidget, public DocumentObserver
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
Reviews( QWidget * parent, KPDFDocument * document );
|
|
|
|
|
|
|
|
// [INHERITED] from DocumentObserver
|
|
|
|
uint observerId() const { return REVIEWS_ID; }
|
2006-03-24 20:40:02 +00:00
|
|
|
void notifySetup( const QVector< KPDFPage * > & pages, bool );
|
2005-03-24 19:50:28 +00:00
|
|
|
void notifyViewportChanged( bool smoothMove );
|
|
|
|
void notifyPageChanged( int pageNumber, int changedFlags );
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void slotPageEnabled( bool );
|
|
|
|
void slotAuthorEnabled( bool );
|
|
|
|
void slotCurrentPageOnly( bool );
|
|
|
|
void slotUpdateListView();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// add all annotations of a page to the listView taking care of grouping
|
|
|
|
void addContents( const KPDFPage * page );
|
|
|
|
// delay an update to the listView
|
|
|
|
void requestListViewUpdate( int delayms = 200 );
|
|
|
|
|
|
|
|
// data fields (GUI)
|
|
|
|
KToolBar * m_toolBar1;
|
|
|
|
KToolBar * m_toolBar2;
|
2006-03-24 21:31:46 +00:00
|
|
|
K3ListView * m_listView;
|
|
|
|
K3ListViewSearchLine * m_searchLine;
|
2005-03-24 19:50:28 +00:00
|
|
|
// internal storage
|
|
|
|
KPDFDocument * m_document;
|
2006-03-24 20:40:02 +00:00
|
|
|
QVector< KPDFPage * > m_pages;
|
2005-03-24 19:50:28 +00:00
|
|
|
QTimer * m_delayTimer;
|
|
|
|
int m_currentPage;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|