mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-19 07:51:27 +00:00
4d0a1ed6e1
all the reviews on the document (pretty unuseful now, but that will change ;-). Another step to good kpdf annotations. Part: Added Reviews toolbox pane. Added (commented out while doing it right) searchline for toc; just works. Misc: Observer: added id for Reviews pane (as document observer it monitors document/annotations changes). Page: added 2 temporary accessors for annotations (will change soon). Makefile: added side_reviews.cpp to compilation. Searchwidget: slight better spacing to look consistant with the review panel. svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400307
64 lines
2 KiB
C++
64 lines
2 KiB
C++
/***************************************************************************
|
|
* 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>
|
|
#include <qvaluevector.h>
|
|
#include "core/observer.h"
|
|
|
|
class KPDFDocument;
|
|
class KPDFPage;
|
|
class KToolBar;
|
|
class KListView;
|
|
class KListViewSearchLine;
|
|
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; }
|
|
void notifySetup( const QValueVector< KPDFPage * > & pages, bool );
|
|
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;
|
|
KListView * m_listView;
|
|
KListViewSearchLine * m_searchLine;
|
|
// internal storage
|
|
KPDFDocument * m_document;
|
|
QValueVector< KPDFPage * > m_pages;
|
|
QTimer * m_delayTimer;
|
|
int m_currentPage;
|
|
};
|
|
|
|
#endif
|