summaryrefslogtreecommitdiffstats
path: root/kugar/part/kugar_part.h
blob: cc778bf8d558078678f399fbc73162fccbe058b0 (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 <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
  TQ_OBJECT

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

    virtual bool initDoc( InitDocFlags flags, TQWidget* tqparentWidget = 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* tqparent, 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