diff --git a/conf/preferencesdialog.h b/conf/preferencesdialog.h index 15262826f..68f0ccd40 100644 --- a/conf/preferencesdialog.h +++ b/conf/preferencesdialog.h @@ -10,6 +10,8 @@ #ifndef _PREFERENCESDIALOG_H #define _PREFERENCESDIALOG_H +#include "okular_export.h" + #include #include "settings.h" @@ -21,7 +23,7 @@ class DlgPerformance; class DlgAccessibility; class DlgPresentation; -class PreferencesDialog : public KConfigDialog +class OKULAR_EXPORT PreferencesDialog : public KConfigDialog { public: diff --git a/conf/settings.kcfgc b/conf/settings.kcfgc index 89c306f7a..82875114d 100644 --- a/conf/settings.kcfgc +++ b/conf/settings.kcfgc @@ -2,3 +2,5 @@ ClassName=KpdfSettings File=oKular.kcfg Mutators=true Singleton=true +Visibility=OKULAR_EXPORT +IncludeFiles=okular_export.h diff --git a/core/annotations.h b/core/annotations.h index 959dcec60..c70f07b93 100644 --- a/core/annotations.h +++ b/core/annotations.h @@ -55,7 +55,7 @@ class AnnotationUtils * For current state in relations to pdf embedded annotations: * @see generator_pdf/README.Annotations */ -struct Annotation +struct OKULAR_EXPORT Annotation { // enum definitions 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;\ SubType subType() const { return rttiType; } -struct TextAnnotation : public Annotation +struct OKULAR_EXPORT TextAnnotation : public Annotation { // common stuff for Annotation derived classes AN_COMMONDECL( TextAnnotation, AText ); @@ -166,7 +166,7 @@ struct TextAnnotation : public Annotation InplaceIntent inplaceIntent; // Unknown }; -struct LineAnnotation : public Annotation +struct OKULAR_EXPORT LineAnnotation : public Annotation { // common stuff for Annotation derived classes AN_COMMONDECL( LineAnnotation, ALine ) @@ -188,7 +188,7 @@ struct LineAnnotation : public Annotation LineIntent lineIntent; // Unknown }; -struct GeomAnnotation : public Annotation +struct OKULAR_EXPORT GeomAnnotation : public Annotation { // common stuff for Annotation derived classes AN_COMMONDECL( GeomAnnotation, AGeom ) @@ -202,7 +202,7 @@ struct GeomAnnotation : public Annotation int geomWidthPt; // 18 }; -struct HighlightAnnotation : public Annotation +struct OKULAR_EXPORT HighlightAnnotation : public Annotation { // common stuff for Annotation derived classes AN_COMMONDECL( HighlightAnnotation, AHighlight ) @@ -222,7 +222,7 @@ struct HighlightAnnotation : public Annotation QList< Quad > highlightQuads; // not empty }; -struct StampAnnotation : public Annotation +struct OKULAR_EXPORT StampAnnotation : public Annotation { // common stuff for Annotation derived classes AN_COMMONDECL( StampAnnotation, AStamp ) @@ -231,7 +231,7 @@ struct StampAnnotation : public Annotation QString stampIconName; // 'kpdf' }; -struct InkAnnotation : public Annotation +struct OKULAR_EXPORT InkAnnotation : public Annotation { // common stuff for Annotation derived classes AN_COMMONDECL( InkAnnotation, AInk ) diff --git a/core/area.h b/core/area.h index be42fa7ac..3ffb5e75e 100644 --- a/core/area.h +++ b/core/area.h @@ -9,6 +9,7 @@ #ifndef _KPDF_AREA_H_ #define _KPDF_AREA_H_ +#include "okular_export.h" #include #include #include @@ -20,7 +21,7 @@ class NormalizedShape; /** * @short A point in [0,1] coordinates (only used in annotations atm) */ -class NormalizedPoint +class OKULAR_EXPORT NormalizedPoint { public: double x, y; @@ -33,7 +34,7 @@ class NormalizedPoint /** * @short A rect in normalized [0,1] coordinates. */ -class NormalizedRect +class OKULAR_EXPORT NormalizedRect { public: double left, top, right, bottom; @@ -65,7 +66,7 @@ class NormalizedRect * - Link : class KPDFLink : description of a link * - Image : class KPDFImage : description of an image (n/a) */ -class ObjectRect : public NormalizedRect +class OKULAR_EXPORT ObjectRect : public NormalizedRect { public: // definition of the types of storable objects diff --git a/core/document.h b/core/document.h index c619a48f3..bf5336df4 100644 --- a/core/document.h +++ b/core/document.h @@ -11,6 +11,8 @@ #ifndef _KPDF_DOCUMENT_H_ #define _KPDF_DOCUMENT_H_ +#include "okular_export.h" + #include #include #include @@ -52,7 +54,7 @@ class NotifyRequest; * For a better understanding of hieracies @see README.internals.png * @see DocumentObserver, KPDFPage */ -class KPDFDocument : public QObject +class OKULAR_EXPORT KPDFDocument : public QObject { Q_OBJECT public: @@ -168,7 +170,7 @@ class KPDFDocument : public QObject * data is broadcasted between observers to syncronize their viewports to get * the 'I scroll one view and others scroll too' views. */ -class DocumentViewport +class OKULAR_EXPORT DocumentViewport { public: /** data fields **/ @@ -207,7 +209,7 @@ class DocumentViewport * The Info structure can be filled in by generators to display metadata * about the currently opened file. */ -class DocumentInfo : public QDomDocument +class OKULAR_EXPORT DocumentInfo : public QDomDocument { public: DocumentInfo(); @@ -240,7 +242,7 @@ class DocumentInfo : public QDomDocument * - ViewportName: A 'named reference' to the viewport that must be converted * using getMetaData( "NamedViewport", *viewport_name* ) */ -class DocumentSynopsis : public QDomDocument +class OKULAR_EXPORT DocumentSynopsis : public QDomDocument { public: DocumentSynopsis(); @@ -255,7 +257,7 @@ class DocumentSynopsis : public QDomDocument * - Embedded (if font is shipped inside the document) * - File (system's file that provides this font */ -class DocumentFonts : public QDomDocument +class OKULAR_EXPORT DocumentFonts : public QDomDocument { public: DocumentFonts(); diff --git a/core/generator.h b/core/generator.h index 465fd7540..6b90ff98b 100644 --- a/core/generator.h +++ b/core/generator.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (C) 2004-5 by Enrico Ros * - * Copyright (C) 2005 by Piotr Szymański * + * Copyright (C) 2005 by Piotr Szymanski * * * * 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 * @@ -11,9 +11,11 @@ #ifndef _KPDF_GENERATOR_H_ #define _KPDF_GENERATOR_H_ +#include "okular_export.h" + #define KPDF_EXPORT_PLUGIN( classname ) \ 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 * displayed by the GUI components (pageView, thumbnailList, etc..). */ -class Generator : public QObject +class OKULAR_EXPORT Generator : public QObject { public: /** virtual methods to reimplement **/ @@ -139,7 +141,7 @@ class Generator : public QObject /** * @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 ) : id( rId ), pageNumber( n ), width( w ), height( h ), /*zoom(z),*/ diff --git a/core/link.h b/core/link.h index a32169df5..282635f31 100644 --- a/core/link.h +++ b/core/link.h @@ -10,6 +10,8 @@ #ifndef _KPDF_LINK_H_ #define _KPDF_LINK_H_ +#include "okular_export.h" + #include #include #include "document.h" // for DocumentViewport @@ -21,7 +23,7 @@ * widgets to reimplement the 'linkType' method and return the type of * the link described by the reimplemented class. */ -class KPDFLink +class OKULAR_EXPORT KPDFLink { public: // 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 **/ -class KPDFLinkGoto : public KPDFLink +class OKULAR_EXPORT KPDFLinkGoto : public KPDFLink { public: // query for goto parameters @@ -72,7 +74,7 @@ class KPDFLinkExecute : public KPDFLink }; /** Browse: an URL to open, ranging from 'http://' to 'mailto:' etc.. **/ -class KPDFLinkBrowse : public KPDFLink +class OKULAR_EXPORT KPDFLinkBrowse : public KPDFLink { public: // query for URL diff --git a/core/page.h b/core/page.h index dd8aa9a36..4ce4689b3 100644 --- a/core/page.h +++ b/core/page.h @@ -10,6 +10,8 @@ #ifndef _KPDF_PAGE_H_ #define _KPDF_PAGE_H_ +#include "okular_export.h" + #include #include @@ -47,7 +49,7 @@ class ObjectRect; * * Note: The class takes ownership of all objects. */ -class KPDFPage +class OKULAR_EXPORT KPDFPage { public: KPDFPage( uint number, double width, double height, int rotation ); diff --git a/core/pagetransition.h b/core/pagetransition.h index 707923551..f1ca3e346 100644 --- a/core/pagetransition.h +++ b/core/pagetransition.h @@ -10,10 +10,12 @@ #ifndef _KPDF_PAGE_TRANSITION_H_ #define _KPDF_PAGE_TRANSITION_H_ +#include "okular_export.h" + /** * @short Information object for the transition effect of a page. */ -class KPDFPageTransition +class OKULAR_EXPORT KPDFPageTransition { public: enum Type { diff --git a/okular_export.h b/okular_export.h new file mode 100644 index 000000000..337e3585f --- /dev/null +++ b/okular_export.h @@ -0,0 +1,19 @@ +/*************************************************************************** + * Copyright (C) 2006 by Pino Toscano * + * * + * 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 + +/* export statements for unix */ +#define OKULAR_EXPORT KDE_EXPORT + +#endif