Support for visibility in oKular; oKular compiles and links, but it seems no plugins are found.

At the moment, the exported classes are only the one needed to make oKular and its actual plugins link, nothing more. Probably some other classes could be made visibile, but I'm not an expert about that.

svn path=/branches/work/kde4/playground/graphics/okular/; revision=538771
remotes/origin/old/work/newpageview
Pino Toscano 20 years ago
parent c2da771144
commit aca01f331f
  1. 4
      conf/preferencesdialog.h
  2. 2
      conf/settings.kcfgc
  3. 14
      core/annotations.h
  4. 7
      core/area.h
  5. 12
      core/document.h
  6. 10
      core/generator.h
  7. 8
      core/link.h
  8. 4
      core/page.h
  9. 4
      core/pagetransition.h
  10. 19
      okular_export.h

@ -10,6 +10,8 @@
#ifndef _PREFERENCESDIALOG_H #ifndef _PREFERENCESDIALOG_H
#define _PREFERENCESDIALOG_H #define _PREFERENCESDIALOG_H
#include "okular_export.h"
#include <kconfigdialog.h> #include <kconfigdialog.h>
#include "settings.h" #include "settings.h"
@ -21,7 +23,7 @@ class DlgPerformance;
class DlgAccessibility; class DlgAccessibility;
class DlgPresentation; class DlgPresentation;
class PreferencesDialog : public KConfigDialog class OKULAR_EXPORT PreferencesDialog : public KConfigDialog
{ {
public: public:

@ -2,3 +2,5 @@ ClassName=KpdfSettings
File=oKular.kcfg File=oKular.kcfg
Mutators=true Mutators=true
Singleton=true Singleton=true
Visibility=OKULAR_EXPORT
IncludeFiles=okular_export.h

@ -55,7 +55,7 @@ class AnnotationUtils
* For current state in relations to pdf embedded annotations: * For current state in relations to pdf embedded annotations:
* @see generator_pdf/README.Annotations * @see generator_pdf/README.Annotations
*/ */
struct Annotation struct OKULAR_EXPORT Annotation
{ {
// enum definitions // enum definitions
enum SubType { AText = 1, ALine = 2, AGeom = 3, AHighlight = 4, AStamp = 5, enum SubType { AText = 1, ALine = 2, AGeom = 3, AHighlight = 4, AStamp = 5,
@ -147,7 +147,7 @@ struct Annotation
void store( QDomNode & parentNode, QDomDocument & document ) const;\ void store( QDomNode & parentNode, QDomDocument & document ) const;\
SubType subType() const { return rttiType; } SubType subType() const { return rttiType; }
struct TextAnnotation : public Annotation struct OKULAR_EXPORT TextAnnotation : public Annotation
{ {
// common stuff for Annotation derived classes // common stuff for Annotation derived classes
AN_COMMONDECL( TextAnnotation, AText ); AN_COMMONDECL( TextAnnotation, AText );
@ -166,7 +166,7 @@ struct TextAnnotation : public Annotation
InplaceIntent inplaceIntent; // Unknown InplaceIntent inplaceIntent; // Unknown
}; };
struct LineAnnotation : public Annotation struct OKULAR_EXPORT LineAnnotation : public Annotation
{ {
// common stuff for Annotation derived classes // common stuff for Annotation derived classes
AN_COMMONDECL( LineAnnotation, ALine ) AN_COMMONDECL( LineAnnotation, ALine )
@ -188,7 +188,7 @@ struct LineAnnotation : public Annotation
LineIntent lineIntent; // Unknown LineIntent lineIntent; // Unknown
}; };
struct GeomAnnotation : public Annotation struct OKULAR_EXPORT GeomAnnotation : public Annotation
{ {
// common stuff for Annotation derived classes // common stuff for Annotation derived classes
AN_COMMONDECL( GeomAnnotation, AGeom ) AN_COMMONDECL( GeomAnnotation, AGeom )
@ -202,7 +202,7 @@ struct GeomAnnotation : public Annotation
int geomWidthPt; // 18 int geomWidthPt; // 18
}; };
struct HighlightAnnotation : public Annotation struct OKULAR_EXPORT HighlightAnnotation : public Annotation
{ {
// common stuff for Annotation derived classes // common stuff for Annotation derived classes
AN_COMMONDECL( HighlightAnnotation, AHighlight ) AN_COMMONDECL( HighlightAnnotation, AHighlight )
@ -222,7 +222,7 @@ struct HighlightAnnotation : public Annotation
QList< Quad > highlightQuads; // not empty QList< Quad > highlightQuads; // not empty
}; };
struct StampAnnotation : public Annotation struct OKULAR_EXPORT StampAnnotation : public Annotation
{ {
// common stuff for Annotation derived classes // common stuff for Annotation derived classes
AN_COMMONDECL( StampAnnotation, AStamp ) AN_COMMONDECL( StampAnnotation, AStamp )
@ -231,7 +231,7 @@ struct StampAnnotation : public Annotation
QString stampIconName; // 'kpdf' QString stampIconName; // 'kpdf'
}; };
struct InkAnnotation : public Annotation struct OKULAR_EXPORT InkAnnotation : public Annotation
{ {
// common stuff for Annotation derived classes // common stuff for Annotation derived classes
AN_COMMONDECL( InkAnnotation, AInk ) AN_COMMONDECL( InkAnnotation, AInk )

@ -9,6 +9,7 @@
#ifndef _KPDF_AREA_H_ #ifndef _KPDF_AREA_H_
#define _KPDF_AREA_H_ #define _KPDF_AREA_H_
#include "okular_export.h"
#include <qlist.h> #include <qlist.h>
#include <qcolor.h> #include <qcolor.h>
#include <kdebug.h> #include <kdebug.h>
@ -20,7 +21,7 @@ class NormalizedShape;
/** /**
* @short A point in [0,1] coordinates (only used in annotations atm) * @short A point in [0,1] coordinates (only used in annotations atm)
*/ */
class NormalizedPoint class OKULAR_EXPORT NormalizedPoint
{ {
public: public:
double x, y; double x, y;
@ -33,7 +34,7 @@ class NormalizedPoint
/** /**
* @short A rect in normalized [0,1] coordinates. * @short A rect in normalized [0,1] coordinates.
*/ */
class NormalizedRect class OKULAR_EXPORT NormalizedRect
{ {
public: public:
double left, top, right, bottom; double left, top, right, bottom;
@ -65,7 +66,7 @@ class NormalizedRect
* - Link : class KPDFLink : description of a link * - Link : class KPDFLink : description of a link
* - Image : class KPDFImage : description of an image (n/a) * - Image : class KPDFImage : description of an image (n/a)
*/ */
class ObjectRect : public NormalizedRect class OKULAR_EXPORT ObjectRect : public NormalizedRect
{ {
public: public:
// definition of the types of storable objects // definition of the types of storable objects

@ -11,6 +11,8 @@
#ifndef _KPDF_DOCUMENT_H_ #ifndef _KPDF_DOCUMENT_H_
#define _KPDF_DOCUMENT_H_ #define _KPDF_DOCUMENT_H_
#include "okular_export.h"
#include <qobject.h> #include <qobject.h>
#include <qvector.h> #include <qvector.h>
#include <qstring.h> #include <qstring.h>
@ -52,7 +54,7 @@ class NotifyRequest;
* For a better understanding of hieracies @see README.internals.png * For a better understanding of hieracies @see README.internals.png
* @see DocumentObserver, KPDFPage * @see DocumentObserver, KPDFPage
*/ */
class KPDFDocument : public QObject class OKULAR_EXPORT KPDFDocument : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -168,7 +170,7 @@ class KPDFDocument : public QObject
* data is broadcasted between observers to syncronize their viewports to get * data is broadcasted between observers to syncronize their viewports to get
* the 'I scroll one view and others scroll too' views. * the 'I scroll one view and others scroll too' views.
*/ */
class DocumentViewport class OKULAR_EXPORT DocumentViewport
{ {
public: public:
/** data fields **/ /** data fields **/
@ -207,7 +209,7 @@ class DocumentViewport
* The Info structure can be filled in by generators to display metadata * The Info structure can be filled in by generators to display metadata
* about the currently opened file. * about the currently opened file.
*/ */
class DocumentInfo : public QDomDocument class OKULAR_EXPORT DocumentInfo : public QDomDocument
{ {
public: public:
DocumentInfo(); DocumentInfo();
@ -240,7 +242,7 @@ class DocumentInfo : public QDomDocument
* - ViewportName: A 'named reference' to the viewport that must be converted * - ViewportName: A 'named reference' to the viewport that must be converted
* using getMetaData( "NamedViewport", *viewport_name* ) * using getMetaData( "NamedViewport", *viewport_name* )
*/ */
class DocumentSynopsis : public QDomDocument class OKULAR_EXPORT DocumentSynopsis : public QDomDocument
{ {
public: public:
DocumentSynopsis(); DocumentSynopsis();
@ -255,7 +257,7 @@ class DocumentSynopsis : public QDomDocument
* - Embedded (if font is shipped inside the document) * - Embedded (if font is shipped inside the document)
* - File (system's file that provides this font * - File (system's file that provides this font
*/ */
class DocumentFonts : public QDomDocument class OKULAR_EXPORT DocumentFonts : public QDomDocument
{ {
public: public:
DocumentFonts(); DocumentFonts();

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* Copyright (C) 2004-5 by Enrico Ros <eros.kde@email.it> * * Copyright (C) 2004-5 by Enrico Ros <eros.kde@email.it> *
* Copyright (C) 2005 by Piotr Szymañski <niedakh@gmail.com> * * Copyright (C) 2005 by Piotr Szymanski <niedakh@gmail.com> *
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
@ -11,9 +11,11 @@
#ifndef _KPDF_GENERATOR_H_ #ifndef _KPDF_GENERATOR_H_
#define _KPDF_GENERATOR_H_ #define _KPDF_GENERATOR_H_
#include "okular_export.h"
#define KPDF_EXPORT_PLUGIN( classname ) \ #define KPDF_EXPORT_PLUGIN( classname ) \
extern "C" { \ extern "C" { \
KDE_EXPORT Generator* create_plugin(KPDFDocument* doc) { return new classname(doc); } \ OKULAR_EXPORT Generator* create_plugin(KPDFDocument* doc) { return new classname(doc); } \
} }
@ -49,7 +51,7 @@ class KConfigDialog;
* class stores the resulting data into 'KPDFPage's. The data will then be * class stores the resulting data into 'KPDFPage's. The data will then be
* displayed by the GUI components (pageView, thumbnailList, etc..). * displayed by the GUI components (pageView, thumbnailList, etc..).
*/ */
class Generator : public QObject class OKULAR_EXPORT Generator : public QObject
{ {
public: public:
/** virtual methods to reimplement **/ /** virtual methods to reimplement **/
@ -139,7 +141,7 @@ class Generator : public QObject
/** /**
* @short Describes a pixmap type request. * @short Describes a pixmap type request.
*/ */
struct PixmapRequest struct OKULAR_EXPORT PixmapRequest
{ {
PixmapRequest( int rId, int n, int w, int h, /*double z,*/ int r, int p, bool a = false ) PixmapRequest( int rId, int n, int w, int h, /*double z,*/ int r, int p, bool a = false )
: id( rId ), pageNumber( n ), width( w ), height( h ), /*zoom(z),*/ : id( rId ), pageNumber( n ), width( w ), height( h ), /*zoom(z),*/

@ -10,6 +10,8 @@
#ifndef _KPDF_LINK_H_ #ifndef _KPDF_LINK_H_
#define _KPDF_LINK_H_ #define _KPDF_LINK_H_
#include "okular_export.h"
#include <qstring.h> #include <qstring.h>
#include <qrect.h> #include <qrect.h>
#include "document.h" // for DocumentViewport #include "document.h" // for DocumentViewport
@ -21,7 +23,7 @@
* widgets to reimplement the 'linkType' method and return the type of * widgets to reimplement the 'linkType' method and return the type of
* the link described by the reimplemented class. * the link described by the reimplemented class.
*/ */
class KPDFLink class OKULAR_EXPORT KPDFLink
{ {
public: public:
// get link type (inherited classes mustreturn an unique identifier) // get link type (inherited classes mustreturn an unique identifier)
@ -35,7 +37,7 @@ class KPDFLink
/** Goto: a viewport and maybe a reference to an external filename **/ /** Goto: a viewport and maybe a reference to an external filename **/
class KPDFLinkGoto : public KPDFLink class OKULAR_EXPORT KPDFLinkGoto : public KPDFLink
{ {
public: public:
// query for goto parameters // query for goto parameters
@ -72,7 +74,7 @@ class KPDFLinkExecute : public KPDFLink
}; };
/** Browse: an URL to open, ranging from 'http://' to 'mailto:' etc.. **/ /** Browse: an URL to open, ranging from 'http://' to 'mailto:' etc.. **/
class KPDFLinkBrowse : public KPDFLink class OKULAR_EXPORT KPDFLinkBrowse : public KPDFLink
{ {
public: public:
// query for URL // query for URL

@ -10,6 +10,8 @@
#ifndef _KPDF_PAGE_H_ #ifndef _KPDF_PAGE_H_
#define _KPDF_PAGE_H_ #define _KPDF_PAGE_H_
#include "okular_export.h"
#include <qmap.h> #include <qmap.h>
#include <qlinkedlist.h> #include <qlinkedlist.h>
@ -47,7 +49,7 @@ class ObjectRect;
* *
* Note: The class takes ownership of all objects. * Note: The class takes ownership of all objects.
*/ */
class KPDFPage class OKULAR_EXPORT KPDFPage
{ {
public: public:
KPDFPage( uint number, double width, double height, int rotation ); KPDFPage( uint number, double width, double height, int rotation );

@ -10,10 +10,12 @@
#ifndef _KPDF_PAGE_TRANSITION_H_ #ifndef _KPDF_PAGE_TRANSITION_H_
#define _KPDF_PAGE_TRANSITION_H_ #define _KPDF_PAGE_TRANSITION_H_
#include "okular_export.h"
/** /**
* @short Information object for the transition effect of a page. * @short Information object for the transition effect of a page.
*/ */
class KPDFPageTransition class OKULAR_EXPORT KPDFPageTransition
{ {
public: public:
enum Type { enum Type {

@ -0,0 +1,19 @@
/***************************************************************************
* Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.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 OKULAR_EXPORT_H
#define OKULAR_EXPORT_H
/* needed for KDE_EXPORT macros */
#include <kdemacros.h>
/* export statements for unix */
#define OKULAR_EXPORT KDE_EXPORT
#endif
Loading…
Cancel
Save