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
This commit is contained in:
Pino Toscano 2006-05-08 20:12:04 +00:00
parent c2da771144
commit aca01f331f
10 changed files with 59 additions and 25 deletions

View file

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

View file

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

View file

@ -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 )

View file

@ -9,6 +9,7 @@
#ifndef _KPDF_AREA_H_
#define _KPDF_AREA_H_
#include "okular_export.h"
#include <qlist.h>
#include <qcolor.h>
#include <kdebug.h>
@ -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

View file

@ -11,6 +11,8 @@
#ifndef _KPDF_DOCUMENT_H_
#define _KPDF_DOCUMENT_H_
#include "okular_export.h"
#include <qobject.h>
#include <qvector.h>
#include <qstring.h>
@ -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();

View file

@ -1,6 +1,6 @@
/***************************************************************************
* 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 *
* 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),*/

View file

@ -10,6 +10,8 @@
#ifndef _KPDF_LINK_H_
#define _KPDF_LINK_H_
#include "okular_export.h"
#include <qstring.h>
#include <qrect.h>
#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

View file

@ -10,6 +10,8 @@
#ifndef _KPDF_PAGE_H_
#define _KPDF_PAGE_H_
#include "okular_export.h"
#include <qmap.h>
#include <qlinkedlist.h>
@ -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 );

View file

@ -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 {

19
okular_export.h Normal file
View file

@ -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