~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to kugar/part/kugar_part.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#ifndef _KUGAR_PART_H
7
7
#define _KUGAR_PART_H
8
8
 
9
 
#include <kparts/browserextension.h>
10
 
#include <klibloader.h>
 
9
 
 
10
#include <koDocument.h>
11
11
 
12
12
#include "kugar.h"
13
13
 
15
15
class KInstance;
16
16
class KugarBrowserExtension;
17
17
 
18
 
 
19
 
class KugarFactory : public KLibFactory
20
 
{
21
 
        Q_OBJECT
22
 
 
23
 
public:
24
 
        KugarFactory();
25
 
        virtual ~KugarFactory();
26
 
 
27
 
        virtual QObject* create(QObject *parent = 0,const char *name = 0,
28
 
                                const char *classname = "QObject",
29
 
                                const QStringList &args = QStringList());
30
 
        static KInstance *instance();
31
 
 
32
 
private:
33
 
        static KInstance *s_instance;
34
 
};
35
 
 
36
 
 
37
 
class KugarPart: public KParts::ReadOnlyPart
38
 
{
39
 
        Q_OBJECT
40
 
 
41
 
public:
42
 
        KugarPart(QWidget *parent,const char *name);
 
18
class KugarPart: public KoDocument
 
19
{
 
20
        Q_OBJECT
 
21
 
 
22
public:
 
23
        KugarPart( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0,
 
24
                const char* name = 0, bool singleViewMode = false);
43
25
        virtual ~KugarPart();
44
26
 
45
 
        void print();
 
27
        virtual bool initDoc();
 
28
 
 
29
        virtual bool loadXML( QIODevice *, const QDomDocument & );
 
30
//      virtual QDomDocument saveXML();
 
31
 
 
32
        virtual void paintContent( QPainter& painter, const QRect& rect,
 
33
                bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 ){;}
 
34
 
 
35
        MReportEngine *reportEngine(){return m_reportEngine;}
 
36
private:
 
37
        QString m_reportData;
 
38
        MReportEngine *m_reportEngine;
 
39
        bool m_templateOk;
 
40
        KURL m_docURL;
 
41
protected:
 
42
        virtual KoView* createViewInstance( QWidget* parent, const char* name );
46
43
        
47
 
        bool setReportTemplate(const QString &data)
48
 
        {
49
 
                return view -> setReportTemplate(data);
50
 
        }
51
 
 
52
 
protected:
53
 
        virtual bool openFile();
54
 
        virtual bool closeURL();
 
44
public slots:
 
45
        void setForcedUserTemplate(const QString &name){;}
55
46
 
56
47
private slots:
57
 
        void slotPreferedTemplate(const QString &);
58
 
 
59
 
private:
60
 
        MReportViewer *view;
61
 
        KugarBrowserExtension *m_extension;
62
 
};
63
 
 
64
 
 
65
 
class KugarBrowserExtension : public KParts::BrowserExtension
66
 
{
67
 
        Q_OBJECT
68
 
 
69
 
        friend class KugarPart;
70
 
 
71
 
public:
72
 
        KugarBrowserExtension(KugarPart *parent);
73
 
        virtual ~KugarBrowserExtension();
74
 
 
75
 
public slots:
76
 
        void print();
77
 
};
 
48
        void slotPreferredTemplate(const QString &);
 
49
 
 
50
};
 
51
 
78
52
 
79
53
#endif