summaryrefslogtreecommitdiffstats
path: root/kugar/part/kugar_part.h
blob: 3f54e42cecabb98bfa4f44f9c14de55d7385aff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright (c) 2000 Phil Thompson <phil@river-bank.demon.co.uk>
//
// This file contains the definition of the interface to the Kugar KPart.


#ifndef _KUGAR_PART_H
#define _KUGAR_PART_H

#include <KoDocument.h>

#include "mpagecollection.h"
#include "mreportengine.h"

class KInstance;
class KugarBrowserExtension;

class KugarPart: public KoDocument
{
    Q_OBJECT

public:
    KugarPart( QWidget *parentWidget = 0, const char *widgetName = 0, 
               QObject* parent = 0,
               const char* name = 0, bool singleViewMode = false );
    virtual ~KugarPart();

    virtual bool initDoc( InitDocFlags flags, QWidget* parentWidget = 0 );

    virtual bool loadOasis( const QDomDocument&, KoOasisStyles&, 
                            const QDomDocument&, KoStore* );
    virtual bool saveOasis( KoStore*, KoXmlWriter* );

    virtual bool loadXML( QIODevice *, const QDomDocument & );
    //  virtual QDomDocument saveXML();

    virtual void paintContent( QPainter&, const QRect&,
                               bool /*transparent*/ = false,
                               double /*zoomX*/ = 1.0, double /*zoomY*/ = 1.0 )
    {
        ;
    }

    Kugar::MReportEngine *reportEngine()
    {
        return m_reportEngine;
    }

protected:
    virtual KoView* createViewInstance( QWidget* parent, const char* name );

public slots:
    void setForcedUserTemplate( const QString &/*name*/ )
    {
        ;
    }

private slots:
    void slotPreferredTemplate( const QString & );

private:
    QString m_reportData;
    Kugar::MReportEngine *m_reportEngine;
    bool m_templateOk;
    KURL m_docURL;
};


#endif