00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DESIGNER_PARTPLUGIN_H
00022 #define DESIGNER_PARTPLUGIN_H
00023
00024 #include <tqwidgetplugin.h>
00025 #include <tqwidget.h>
00026 namespace KParts { class ReadOnlyPart; }
00027
00032 class KPartsGenericPart : public TQWidget {
00033 Q_OBJECT
00034 TQ_OBJECT
00035 TQ_PROPERTY( TQString url READ url WRITE setURL )
00036 TQ_PROPERTY( TQString mimetype READ mimetype WRITE setMimetype )
00037 public:
00038 KPartsGenericPart( TQWidget* parentWidget, const char* name );
00039
00040 TQString url() const { return m_url; }
00041 void setURL( const TQString& url ) { m_url = url; load(); }
00042
00043
00044 TQString mimetype() const { return m_mimetype; }
00045 void setMimetype( const TQString& mimetype ) { m_mimetype = mimetype; load(); }
00046
00047 private:
00048 void load();
00049
00050 private:
00051 TQString m_mimetype;
00052 TQString m_url;
00053 KParts::ReadOnlyPart* m_part;
00054 };
00055
00059 class KPartsWidgetPlugin : public TQWidgetPlugin {
00060 public:
00061 TQStringList keys() const;
00062 TQWidget * create( const TQString & key, TQWidget * parent, const char * name );
00063 TQString group( const TQString & key ) const;
00064
00065 TQString includeFile( const TQString & key ) const;
00066 TQString toolTip( const TQString & key ) const;
00067 TQString whatsThis( const TQString & key ) const;
00068 bool isContainer( const TQString & key ) const;
00069 };
00070
00071 #endif