Hobrasoft httpd server
Embedded HTTP server for Qt and C++
list.h
Go to the documentation of this file.
1 
5 #ifndef _List_H_
6 #define _List_H_
7 
8 #include <QObject>
9 #include <QHash>
10 #include <QVariantList>
11 
12 namespace Example {
13 
14 class Item;
15 
19 class List : public QObject {
20  Q_OBJECT
21  public:
22  List(QObject *parent);
23 
24  QVariantList webStatus() const;
25 
29  void insert(Item *);
30 
34  bool contains(const QString& id) const;
35 
39  Item *item(const QString& id) const;
40 
41  signals:
45  void statusChanged(const Item *);
46 
47  private:
48  #ifndef DOXYGEN_SHOULD_SKIP_THIS
49  QHash<QString, Item *> m_items;
50  #endif
51 
52 
53 };
54 
55 }
56 
57 #endif
List of all items.
Definition: list.h:19
Namespace for Example.
Definition: application.h:11
Item * item(const QString &id) const
Returns pointer to an item with given id or NULL if the item does not exist.
Definition: list.cpp:37
One data item in the example.
Definition: item.h:20
bool contains(const QString &id) const
Returns true if item with the given id exists.
Definition: list.cpp:32
void statusChanged(const Item *)
Signal is invoked when some item status changed.
void insert(Item *)
Insert one item to the list.
Definition: list.cpp:26