Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit d983cfdd authored by Enrico Ros's avatar Enrico Ros

Copying kpdf_experiments into branch and reordering directories. Look there

for the file naming map and file  versioning. Please wait until the commit
storm ends to report any bug. Albert and Enrico
Moved KPDFDocumentObserver in its own include file. Updated dependancies.

svn path=/trunk/kdegraphics/kpdf/; revision=374928
parent eee26733
......@@ -26,11 +26,11 @@
// local includes
#include "document.h"
#include "observer.h"
#include "page.h"
#include "link.h"
#include "conf/settings.h"
#include "generator_pdf/generator_pdf.h" // PDF generator
//#include "generator_ps/generator_ps.H" // PS generator
#include "conf/settings.h"
// structures used internally by KPDFDocument for local variables storage
class KPDFDocumentPrivate
......
......@@ -15,43 +15,14 @@
#include <qstring.h>
#include <qdom.h>
class KPrinter;
class KPDFPage;
class KPDFLink;
class Generator;
class KPDFDocumentObserver;
class DocumentInfo;
class DocumentSynopsis;
class Generator;
class PixmapRequest;
/**
* @short Base class for objects being notified when something changes.
*
* Inherit this class and call KPDFDocument->addObserver( yourClass ) to get
* notified of asyncronous events (new pixmap generated, or changed, etc..).
*/
class KPDFDocumentObserver
{
public:
// you must give each observer a unique ID (used for notifications)
virtual uint observerId() const = 0;
// commands from the Document to all observers
virtual void pageSetup( const QValueVector<KPDFPage*> & /*pages*/, bool /*documentChanged*/ ) {};
virtual void pageSetCurrent( int /*pageNumber*/, const QRect & /*viewport*/ = QRect() ) {};
// queries to observers
virtual bool canUnloadPixmap( int /*pageNum*/ ) { return true; }
// monitor changes in pixmaps (generation thread complete)
virtual void notifyPixmapChanged( int /*pageNumber*/ ) {};
virtual void notifyPixmapsCleared() {};
};
#define PRESENTATION_ID 1
#define PART_ID 2
#define PAGEVIEW_ID 3
#define THUMBNAILS_ID 4
#define TOC_ID 5
class KPrinter;
/**
* @short The Document. Heart of everything. Actions take place here.
......
/***************************************************************************
* Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> *
* Copyright (C) 2005 by Albert Astals Cid <tsdgeos@terra.es> *
* *
* 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_DOCUMENTOBSERVER_H_
#define _KPDF_DOCUMENTOBSERVER_H_
#include <qvaluevector.h>
#include <qrect.h>
/** IDs for observers. Globally defined here. **/
#define PRESENTATION_ID 1
#define PART_ID 2
#define PAGEVIEW_ID 3
#define THUMBNAILS_ID 4
#define TOC_ID 5
/**
* @short Base class for objects being notified when something changes.
*
* Inherit this class and call KPDFDocument->addObserver( yourClass ) to get
* notified of asyncronous events (new pixmap generated, or changed, etc..).
*/
class KPDFDocumentObserver
{
public:
// you must give each observer a unique ID (used for notifications)
virtual uint observerId() const = 0;
// commands from the Document to all observers
virtual void pageSetup( const QValueVector< class KPDFPage * > & /*pages*/, bool /*documentChanged*/ ) {};
virtual void pageSetCurrent( int /*pageNumber*/, const QRect & /*viewport*/ = QRect() ) {};
// queries to observers
virtual bool canUnloadPixmap( int /*pageNum*/ ) { return true; }
// monitor changes in pixmaps (generation thread complete)
virtual void notifyPixmapChanged( int /*pageNumber*/ ) {};
virtual void notifyPixmapsCleared() {};
};
#endif
......@@ -21,6 +21,7 @@
* (at your option) any later version. *
***************************************************************************/
// qt/kde includes
#include <qsplitter.h>
#include <qpainter.h>
#include <qlayout.h>
......@@ -28,7 +29,6 @@
#include <qvbox.h>
#include <qtoolbox.h>
#include <qpushbutton.h>
#include <dcopobject.h>
#include <kaction.h>
#include <kdirwatch.h>
......@@ -48,8 +48,8 @@
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
// local includes
#include "xpdf/GlobalParams.h"
#include "part.h"
#include "ui/pageview.h"
#include "ui/thumbnaillist.h"
......
......@@ -18,9 +18,8 @@
#include <kparts/browserextension.h>
#include <kparts/part.h>
#include "core/observer.h"
#include "dcop.h"
#include "core/document.h"
class QWidget;
class QSplitter;
......@@ -35,6 +34,7 @@ class KSelectAction;
class KAboutData;
class KPrinter;
class KPDFDocument;
class ThumbnailList;
class PageView;
class SearchWidget;
......
......@@ -33,7 +33,7 @@
#include <kpopupmenu.h>
#include <kparts/componentfactory.h>
#include <kio/netaccess.h>
#include <kmainwindowiface.h>
#include <kmainwindowiface.h>
// local includes
#include "shell.h"
......
......@@ -73,8 +73,8 @@ namespace KPDF
void optionsConfigureToolbars();
void applyNewToolbarConfig();
void slotUpdateFullScreen();
void slotShowMenubar();
void slotUpdateFullScreen();
void slotShowMenubar();
public slots:
void openURL( const KURL & url );
......
......@@ -16,13 +16,13 @@
* (at your option) any later version. *
***************************************************************************/
// qt/kde includes
#include <qcursor.h>
#include <qpainter.h>
#include <qtimer.h>
#include <qpushbutton.h>
#include <qapplication.h>
#include <qclipboard.h>
#include <kiconloader.h>
#include <kurldrag.h>
#include <kaction.h>
......@@ -34,11 +34,14 @@
#include <kimageio.h>
#include <kdebug.h>
// system includes
#include <math.h>
#include <stdlib.h>
// local includes
#include "pageview.h"
#include "pageviewutils.h"
#include "core/document.h"
#include "core/page.h"
#include "core/link.h"
#include "core/generator.h"
......
......@@ -21,12 +21,12 @@
#include <qscrollview.h>
#include <qvaluevector.h>
#include "core/document.h"
#include "core/observer.h"
class KURL;
class KActionCollection;
class KPDFDocument;
class PageViewItem;
class PageViewPrivate;
......
......@@ -14,12 +14,15 @@
#include <qpixmap.h>
#include <qstringlist.h>
#include <qvaluevector.h>
#include "core/document.h"
#include "core/observer.h"
class PresentationFrame;
class KToolBar;
class QTimer;
class KPDFDocument;
class KPDFPage;
class PresentationFrame;
/**
* @short A widget that shows pages as fullscreen slides (with transitions fx).
*
......
......@@ -18,6 +18,7 @@
// local includes
#include "thumbnaillist.h"
#include "core/document.h"
#include "core/generator.h"
#include "core/page.h"
......
......@@ -7,13 +7,13 @@
* (at your option) any later version. *
***************************************************************************/
#ifndef THUMBNAILLIST_H
#define THUMBNAILLIST_H
#ifndef _KPDF_THUMBNAILLIST_H_
#define _KPDF_THUMBNAILLIST_H_
#include <qscrollview.h>
#include <qvaluevector.h>
#include <qvbox.h>
#include "core/document.h"
#include "core/observer.h"
class QTimer;
class KActionCollection;
......
......@@ -13,8 +13,8 @@
// local includes
#include "toc.h"
#include "core/page.h"
#include "core/document.h"
#include "core/page.h"
// uncomment following to enable a 2nd column showing the page referred by
// each tree entry
......
......@@ -7,12 +7,11 @@
* (at your option) any later version. *
***************************************************************************/
#ifndef TOC_H
#define TOC_H
#ifndef _KPDF_TOC_H_
#define _KPDF_TOC_H_
#include <klistview.h>
#include "core/document.h"
#include "core/observer.h"
class TOC : public KListView, public KPDFDocumentObserver
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment