00001
00002
00003 #ifndef LABPLOTPART_H
00004 #define LABPLOTPART_H
00005
00006 #include <kparts/part.h>
00007 #include <kparts/browserextension.h>
00008 #include <kparts/factory.h>
00009 #include <klibloader.h>
00010 #include "MainWin.h"
00011
00012 class KAboutData;
00013 class KInstance;
00014 class QLabel;
00015
00016 class LabPlotFactory : public KParts::Factory
00017 {
00018 Q_OBJECT
00019 public:
00020 LabPlotFactory();
00021 virtual ~LabPlotFactory();
00022
00023 virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent=0,
00024 const char *name=0, const char *classname = "QObject", const QStringList &args = QStringList() );
00025
00026 static KInstance *instance();
00027 static KAboutData *aboutData();
00028
00029 private:
00030 static KInstance *s_instance;
00031 };
00032
00033 class LabPlotBrowserExtension : public KParts::BrowserExtension
00034 {
00035 Q_OBJECT
00036 friend class LabPlotPart;
00037 public:
00038 LabPlotBrowserExtension(LabPlotPart *parent);
00039 virtual ~LabPlotBrowserExtension();
00040 };
00041
00042 class LabPlotPart: public KParts::ReadOnlyPart
00043 {
00044 Q_OBJECT
00045 public:
00046 LabPlotPart(QWidget *parentW, const char *wname,QObject *parent, const char *name);
00047 virtual ~LabPlotPart();
00048 virtual bool closeURL();
00049
00050 protected:
00051 virtual bool openFile();
00052
00053 private:
00054 QWidget *p;
00055 QWorkspace *ws;
00056 LabPlotBrowserExtension *m_extension;
00057 };
00058
00059 #endif
00060