00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KPIM_DESIGNERFIELDS_H
00023 #define KPIM_DESIGNERFIELDS_H
00024
00025 #include <klocale.h>
00026
00027 #include <tqmap.h>
00028 #include <tqpair.h>
00029 #include <tqstringlist.h>
00030
00031 #include <kdepimmacros.h>
00032
00033 namespace KPIM {
00034
00035 class KDE_EXPORT DesignerFields : public TQWidget
00036 {
00037 Q_OBJECT
00038 TQ_OBJECT
00039 public:
00040 DesignerFields( const TQString &uiFile, TQWidget *parent,
00041 const char *name = 0 );
00042
00043 class Storage
00044 {
00045 public:
00046 virtual ~Storage() {}
00047
00048 virtual TQStringList keys() = 0;
00049 virtual TQString read( const TQString &key ) = 0;
00050 virtual void write( const TQString &key, const TQString &value ) = 0;
00051 };
00052
00053 void load( Storage * );
00054 void save( Storage * );
00055
00056 void setReadOnly( bool readOnly );
00057
00058 TQString identifier() const;
00059 TQString title() const;
00060
00061 signals:
00062 void modified();
00063
00064 private:
00065 void initGUI( const TQString& );
00066
00067 TQMap<TQString, TQWidget *> mWidgets;
00068 TQValueList<TQWidget *> mDisabledWidgets;
00069 TQString mTitle;
00070 TQString mIdentifier;
00071 };
00072
00073 }
00074
00075 #endif