libkdepim
kpartsdesignerplugin.h00001
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 Q_PROPERTY( TQString url READ url WRITE setURL )
00035 Q_PROPERTY( TQString mimetype READ mimetype WRITE setMimetype )
00036 public:
00037 KPartsGenericPart( TQWidget* parentWidget, const char* name );
00038
00039 TQString url() const { return m_url; }
00040 void setURL( const TQString& url ) { m_url = url; load(); }
00041
00042
00043 TQString mimetype() const { return m_mimetype; }
00044 void setMimetype( const TQString& mimetype ) { m_mimetype = mimetype; load(); }
00045
00046 private:
00047 void load();
00048
00049 private:
00050 TQString m_mimetype;
00051 TQString m_url;
00052 KParts::ReadOnlyPart* m_part;
00053 };
00054
00058 class KPartsWidgetPlugin : public TQWidgetPlugin {
00059 public:
00060 TQStringList keys() const;
00061 TQWidget * create( const TQString & key, TQWidget * parent, const char * name );
00062 TQString group( const TQString & key ) const;
00063
00064 TQString includeFile( const TQString & key ) const;
00065 TQString toolTip( const TQString & key ) const;
00066 TQString whatsThis( const TQString & key ) const;
00067 bool isContainer( const TQString & key ) const;
00068 };
00069
00070 #endif
|