MagicSmoke  $VERSION$
eventsummary.h
Go to the documentation of this file.
1 //
2 // C++ Interface: eventsummary
3 //
4 // Description:
5 //
6 //
7 // Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008-2011
8 //
9 // Copyright: See README/COPYING.GPL files that come with this distribution
10 //
11 //
12 
13 #ifndef MAGICSMOKE_EVENTSUMMARY_H
14 #define MAGICSMOKE_EVENTSUMMARY_H
15 
16 #include <QDialog>
17 #include <QMap>
18 
19 #include "MOOrder"
20 #include "MOEvent"
21 #include "odtrender.h"
22 
23 class QTableView;
24 class QStandardItemModel;
25 class QLabel;
26 
28 class MEventSummary:public QDialog
29 {
30  Q_OBJECT
31  public:
33  MEventSummary(QWidget*parent,qint64 eventid);
36 
38  void setTestTemplateFile(const QString&);
39 
40  private slots:
42  void print();
44  void saveas();
45 
46  //used for ODT rendering:
47  void getVariable(QString,QVariant&);
48  void getLoopIterations(QString,int&);
49  void getLoopVariable(QString,int,QString,QVariant&);
50  void setLoopIteration(QString,int);
51 
52  private:
53  qint64 eventid;
54  MOEvent event;
55  int nreserved,ncancelled,ntotaltickets,ntotalmoney;
56  struct Tickets{
57  Tickets(){}
58  Tickets(int p,QString c=QString()):price(p),category(c){}
59  int price=0,bought=0,used=0,unused=0;
60  QString category;
61  };
62  QList<Tickets>tickets;
63  struct Comment{
64  int custid,orderid;
65  QString custname,comment;
66  };
67  QList<Comment>comments;
68  QList<int>orderids;
69  QMap<int,MOOrder>orders;
70  QMap<int,MOCustomerInfo>customers;
71  QMap<QString,int>loopiter;
72  QString testTemplate;
73 
74  //get summary
75  void getSummaryData();
76 };
77 
78 #endif
encapsulation of an event, this class wraps the auto-generated event class to provide some convenienc...
Definition: event.h:25
void setTestTemplateFile(const QString &)
set a test template
Definition: eventsummary.cpp:114
shows a summary for the event
Definition: eventsummary.h:28
MEventSummary(QWidget *parent, qint64 eventid)
creates a new summary dialog, requests data from server
Definition: eventsummary.cpp:32
~MEventSummary()
deletes MEventSummary
Definition: eventsummary.cpp:112