21 #include "vcardline.h"
25 class VCardLine::VCardLinePrivate
31 VCardLine::VCardLine()
36 VCardLine::VCardLine(
const TQString &identifier )
39 mIdentifier = identifier;
42 VCardLine::VCardLine(
const TQString &identifier,
const TQVariant &value )
45 mIdentifier = identifier;
49 VCardLine::VCardLine(
const VCardLine& line )
52 mParamMap = line.mParamMap;
54 mIdentifier = line.mIdentifier;
57 VCardLine::~VCardLine()
63 VCardLine& VCardLine::operator=(
const VCardLine& line )
68 mParamMap = line.mParamMap;
70 mIdentifier = line.mIdentifier;
75 void VCardLine::setIdentifier(
const TQString& identifier )
77 mIdentifier = identifier;
80 TQString VCardLine::identifier()
const
85 void VCardLine::setValue(
const TQVariant& value )
90 TQVariant VCardLine::value()
const
95 void VCardLine::setGroup(
const TQString& group )
98 d =
new VCardLinePrivate();
103 TQString VCardLine::group()
const
111 bool VCardLine::hasGroup()
const
116 return d->mGroup.isEmpty();
119 TQStringList VCardLine::parameterList()
const
121 return mParamMap.keys();
124 void VCardLine::addParameter(
const TQString& param,
const TQString& value )
126 TQStringList &list = mParamMap[ param ];
127 if ( list.findIndex( value ) == -1 )
128 list.append( value );
131 TQStringList VCardLine::parameters(
const TQString& param )
const
133 ParamMap::ConstIterator it = mParamMap.find( param );
134 if ( it == mParamMap.end() )
135 return TQStringList();
140 TQString VCardLine::parameter(
const TQString& param )
const
142 ParamMap::ConstIterator it = mParamMap.find( param );
143 if ( it == mParamMap.end() )
144 return TQString::null;
146 if ( (*it).isEmpty() )
147 return TQString::null;
149 return (*it).first();
static data, shared by ALL addressee objects