Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
PointIdentifiers.h
1 #ifndef POINT_IDENTIFIERS_H
2 #define POINT_IDENTIFIERS_H
3 
4 #include <QHash>
5 #include <QString>
6 
7 class QXmlStreamReader;
8 class QXmlStreamWriter;
9 
10 typedef QHash<QString, bool> PointIdentifiersInternal;
11 
14 {
15 public:
18 
20  bool contains(const QString &pointIdentifier) const;
21 
23  int count() const;
24 
27  QString getKey (int i) const;
28 
30  bool getValue (const QString &pointIdentifier) const;
31 
33  void loadXml (QXmlStreamReader &reader);
34 
36  void saveXml (QXmlStreamWriter &writer) const;
37 
39  void setKeyValue (const QString &pointIdentifier,
40  bool value);
41 
42 private:
43 
44  PointIdentifiersInternal m_pointIdentifiers;
45 };
46 
47 #endif // POINT_IDENTIFIERS_H
Hash table class that tracks point identifiers as the key, with a corresponding boolean value...
bool getValue(const QString &pointIdentifier) const
Get value for key.
void saveXml(QXmlStreamWriter &writer) const
Serialize table to xml.
QString getKey(int i) const
Get key for index.
bool contains(const QString &pointIdentifier) const
True if specified entry exists in the table.
void setKeyValue(const QString &pointIdentifier, bool value)
Set key/value pair.
PointIdentifiers()
Single constructor.
void loadXml(QXmlStreamReader &reader)
Load from serialized xml.
int count() const
Number of entries.