Hobrasoft httpd server
Embedded HTTP server for Qt and C++
application.cpp
Go to the documentation of this file.
1 
5 #include "application.h"
6 #include "list.h"
7 #include "item.h"
8 
9 using namespace Example;
10 
11 Application::Application(QObject *parent) : QObject(parent) {
12  m_list = new List(this);
13  list()->insert( new Item("A", "Item A", 987, this) );
14  list()->insert( new Item("B", "Item B", 1597, this) );
15  list()->insert( new Item("C", "Item C", 2584, this) );
16  list()->insert( new Item("D", "Item D", 4181, this) );
17 }
18 
19 
21  return m_list;
22 }
List of all items.
Definition: list.h:19
Namespace for Example.
Definition: application.h:11
Application(QObject *)
Constructor - makes the list and add some items to it.
Definition: application.cpp:11
List * list() const
Returns pointer to list of all items.
Definition: application.cpp:20
One data item in the example.
Definition: item.h:20
void insert(Item *)
Insert one item to the list.
Definition: list.cpp:26