2 #ifndef _KGRAPHINTERFACEPART_H_
3 #define _KGRAPHINTERFACEPART_H_
5 #include <kparts/part.h>
6 #include <kparts/factory.h>
14 * This is a "Part". It that does all the real work in a KPart
18 * @author Schpilka Yannick <schpilka@gmail.com>
21 class KGraphInterfacePart
: public KParts::ReadWritePart
28 KGraphInterfacePart(QWidget
*parentWidget
, const char *widgetName
,
29 QObject
*parent
, const char *name
);
34 virtual ~KGraphInterfacePart();
37 * This is a virtual function inherited from KParts::ReadWritePart.
38 * A shell will use this to inform this Part if it should act
41 virtual void setReadWrite(bool rw
);
44 * Reimplemented to disable and enable Save action
46 virtual void setModified(bool modified
);
50 * This must be implemented by each part
52 virtual bool openFile();
55 * This must be implemented by each read-write part
57 virtual bool saveFile();
70 class KGraphInterfacePartFactory
: public KParts::Factory
74 KGraphInterfacePartFactory();
75 virtual ~KGraphInterfacePartFactory();
76 virtual KParts::Part
* createPartObject( QWidget
*parentWidget
, const char *widgetName
,
77 QObject
*parent
, const char *name
,
78 const char *classname
, const QStringList
&args
);
79 static KInstance
* instance();
82 static KInstance
* s_instance
;
83 static KAboutData
* s_about
;
86 #endif // _KGRAPHINTERFACEPART_H_