1
/****************************************************************************
2
** varlist.h - class for handling a list of string vars
3
** Copyright (C) 2001, 2002 Justin Karneges
5
** This program is free software; you can redistribute it and/or
6
** modify it under the terms of the GNU General Public License
7
** as published by the Free Software Foundation; either version 2
8
** of the License, or (at your option) any later version.
10
** This program is distributed in the hope that it will be useful,
11
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
** GNU General Public License for more details.
15
** You should have received a copy of the GNU General Public License
16
** along with this program; if not, write to the Free Software
17
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
19
****************************************************************************/
25
#include<qstringlist.h>
26
#include<qvaluelist.h>
35
const QString & key() const { return v_key; }
36
const QString & data() const { return v_data; }
38
void setKey(const QString &s) { v_key = s; }
39
void setData(const QString &s) { v_data = s; }
46
class VarList : public QValueList<VarListItem>
51
void set(const QString &, const QString &);
52
void unset(const QString &);
53
const QString & get(const QString &);
55
VarList::Iterator findByKey(const QString &);
56
VarList::Iterator findByNum(int);
58
QStringList varsToStringList();
59
QDomElement toXml(QDomDocument &doc, const QString &tagName);
60
void fromXml(const QDomElement &);