#ifndef __kdrawchem_part_h__
#define __kdrawchem_part_h__

#include <kparts/browserextension.h>
#include <klibloader.h>
#include "kdrawchemview.h"
#include "kdrawchemdoc.h"

class KAboutData;
class KInstance;
class KDrawChemView;
class KDrawChemDoc;
class KDrawChemBrowserExtension;
class QLabel;

class KDrawChemFactory : public KLibFactory
{
    Q_OBJECT
public:
    KDrawChemFactory();
    virtual ~KDrawChemFactory();

    virtual QObject* createObject(QObject* parent = 0, const char* name = 0,
                            const char* classname = "QObject",
                            const QStringList& args = QStringList());

    static KInstance *instance();
    static KAboutData *aboutData();

private:
    static KInstance *s_instance;
};

class KDrawChemPart: public KParts::ReadOnlyPart
{
    Q_OBJECT
public:
    KDrawChemPart(QWidget *parent, const char *name);
    virtual ~KDrawChemPart();

protected:
    virtual bool openFile();

private:
    //QLabel *widget;
     KDrawChemBrowserExtension *m_extension;
     KDrawChemView *m_view;
     KDrawChemDoc *m_doc;
	
};

class KDrawChemBrowserExtension : public KParts::BrowserExtension
{
    Q_OBJECT
    friend class KDrawChemPart;
public:
    KDrawChemBrowserExtension(KDrawChemPart *parent);
    virtual ~KDrawChemBrowserExtension();
};

#endif



