20 #ifndef __VADATA_INC__
21 #define __VADATA_INC__
28 #include <libbbb/libbbb.h>
29 #include <libbbb/refcnt.h>
31 #include <QStringList>
112 : s_name_(s_name), s_val_()
116 VarData (
const QString & s_name,
const QString & s_val )
117 : s_name_(s_name), s_val_(s_val)
121 VarData (
const QString & s_name,
const QStringList & s_val )
122 : s_name_(s_name), s_val_(s_val)
133 const QString & name (
void )
const
137 const QStringList & valueSL (
void )
const
141 int count (
void )
const
142 {
return s_val_.count(); }
145 bool isInteger (
int i = 0 )
const;
148 bool isDouble (
int i = 0 )
const;
151 bool isBool (
int i = 0 )
const;
154 QString value (
int i = 0 )
const
155 {
return ( i >= s_val_.count() ) ? QString() : s_val_.at(i); }
158 qint64 toInteger (
bool * b_ok = NULL,
int i = 0 )
const;
161 double toDouble (
bool * b_ok = NULL,
int i = 0 )
const;
164 bool toBool (
bool * b_ok = NULL,
int i = 0 )
const;
168 void setName (
const QString & s )
172 void setValue (
const QStringList & sl )
176 void set (
const QString & s_name,
const QStringList & sl_value )
177 { s_name_ = s_name; s_val_ = sl_value; }
181 void setValue ( QString s,
int index = 0 );
184 void setValue ( qint64 i,
int index = 0 );
187 void setValue (
bool b,
int index = 0 );
190 void setValue (
double d,
int index = 0 );
193 void setAllNew ( QString s );
196 void setAllNew ( qint64 i );
199 void setAllNew (
bool b );
202 void setAllNew (
double d );
206 void appendValue ( QString s );
209 void appendValue ( qint64 i );
212 void appendValue (
bool b );
215 void appendValue (
double d );
218 void append (
const QStringList & sl );
221 void extendToFit (
int i );
243 #endif // __VADATA_INC__