kmail
customtemplates_kfg.h00001
00002
00003 #ifndef CTEMPLATES_H
00004 #define CTEMPLATES_H
00005
00006 #include <kconfigskeleton.h>
00007 #include <kdebug.h>
00008
00009 class CTemplates : public KConfigSkeleton
00010 {
00011 public:
00012
00013 CTemplates( const QString & name );
00014 ~CTemplates();
00015
00019 void setContent( const QString & v )
00020 {
00021 if (!isImmutable( QString::fromLatin1( "Content" ) ))
00022 mContent = v;
00023 }
00024
00028 QString content() const
00029 {
00030 return mContent;
00031 }
00032
00036 ItemString *contentItem()
00037 {
00038 return mContentItem;
00039 }
00040
00044 void setShortcut( const QString & v )
00045 {
00046 if (!isImmutable( QString::fromLatin1( "Shortcut" ) ))
00047 mShortcut = v;
00048 }
00049
00053 QString shortcut() const
00054 {
00055 return mShortcut;
00056 }
00057
00061 ItemString *shortcutItem()
00062 {
00063 return mShortcutItem;
00064 }
00065
00069 void setType( int v )
00070 {
00071 if (!isImmutable( QString::fromLatin1( "Type" ) ))
00072 mType = v;
00073 }
00074
00078 int type() const
00079 {
00080 return mType;
00081 }
00082
00086 ItemInt *typeItem()
00087 {
00088 return mTypeItem;
00089 }
00090
00094 void setTo( const QString & v )
00095 {
00096 if (!isImmutable( QString::fromLatin1( "To" ) ))
00097 mTo = v;
00098 }
00099
00103 QString to() const
00104 {
00105 return mTo;
00106 }
00107
00111 ItemString *toItem()
00112 {
00113 return mToItem;
00114 }
00115
00119 void setCC( const QString & v )
00120 {
00121 if (!isImmutable( QString::fromLatin1( "CC" ) ))
00122 mCC = v;
00123 }
00124
00128 QString cC() const
00129 {
00130 return mCC;
00131 }
00132
00136 ItemString *cCItem()
00137 {
00138 return mCCItem;
00139 }
00140
00141 protected:
00142 QString mParamname;
00143
00144
00145 QString mContent;
00146 QString mShortcut;
00147 int mType;
00148 QString mTo;
00149 QString mCC;
00150
00151 private:
00152 ItemString *mContentItem;
00153 ItemString *mShortcutItem;
00154 ItemInt *mTypeItem;
00155 ItemString *mToItem;
00156 ItemString *mCCItem;
00157 };
00158
00159 #endif
00160
|