summaryrefslogtreecommitdiffstats
path: root/kugar/part/kugar_part.h
blob: 9d61361cf8ca3a54e9b43fcf8f30899d27eeeb82 (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
69
// Copyright (c) 2000 Phil Thompson <[email protected]>
//
// 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 TDEInstance;
class KugarBrowserExtension;

class KugarPart: public KoDocument
{
    Q_OBJECT
  

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

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

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

    virtual bool loadXML( TQIODevice *, const TQDomDocument & );
    //  virtual TQDomDocument saveXML();

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

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

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

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

private slots:
    void slotPreferredTemplate( const TQString & );

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


#endif