MagicSmoke  $VERSION$
eventedit.h
Go to the documentation of this file.
1 //
2 // C++ Interface: eventedit
3 //
4 // Description:
5 //
6 //
7 // Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007-2011
8 //
9 // Copyright: See README/COPYING.GPL files that come with this distribution
10 //
11 //
12 
13 #ifndef SMOKE_EVENT_EDIT_H
14 #define SMOKE_EVENT_EDIT_H
15 
16 #include <QDialog>
17 
18 #include "MOEvent"
19 
20 class MFlagWidget;
21 class QCheckBox;
22 class QDateTime;
23 class QDateTimeEdit;
24 class QLabel;
25 class QLineEdit;
26 class QSpinBox;
27 class QStandardItemModel;
28 class QTableView;
29 class QTextEdit;
30 
32 class MEventEditor:public QDialog
33 {
34  Q_OBJECT
35  public:
37  enum class OpenMode{
39  Auto,
41  Edit,
43  Create
44  };
46  MEventEditor(QWidget*w,qint64 id=-1):MEventEditor(w,OpenMode::Auto,id){}
48  MEventEditor(QWidget*,OpenMode,qint64 id=-1);
49  private slots:
51  void writeBack();
52 
54  void selectRoom();
56  void newRoom();
58  void selectSeatPlan();
60  void newSeatPlan();
61 
63  void selectArtist();
65  void newArtist();
66 
68  void startTimeChanged(const QDateTime&);
70  void endTimeChanged(const QDateTime&);
71 
73  void updatePrice();
75  void changePrice();
77  void addPrice();
79  void removePrice();
80 
81  private:
82  MOEvent event;
83  QDateTimeEdit*starttime,*endtime;
84  QLineEdit*title,*artist,*room,*cancelreason,*seatplan;
85  QTextEdit*description,*comment;
86  QCheckBox*cancelcheck;
87  QSpinBox*capacity;
88  QLabel*eventid;
89  MFlagWidget*flags;
90  QTableView*pricetable;
91  QStandardItemModel*pricemodel;
92  int seatplanid=-1;
93 };
94 
95 class MCentSpinBox;
96 class QSpinBox;
97 
99 class MEEPriceEdit:public QDialog
100 {
101  Q_OBJECT
102  protected:
103  friend class MEventEditor;
105  QSpinBox*cap,*ord;
106  QLabel*flg,*cname;
107  MEEPriceEdit(QWidget*,MOEventPrice,int);
108  private slots:
109  void setFlags();
110 };
111 
112 
113 
114 #endif
Auto-Detect by Event-ID.
encapsulation of an event, this class wraps the auto-generated event class to provide some convenienc...
Definition: event.h:25
Create a new event, if an ID is given use it as template only.
create and edit events
Definition: eventedit.h:32
QLabel * cname
Definition: eventedit.h:106
QSpinBox * cap
Definition: eventedit.h:105
MEventEditor(QWidget *w, qint64 id=-1)
opens the editor, retrieves the event automatically if given
Definition: eventedit.h:46
helper class for event editor: edits a price
Definition: eventedit.h:99
Definition: srcMOEventPrice.h:15
MCentSpinBox * price
Definition: eventedit.h:104
simple widget that displays flags and allows to edit them
Definition: flagedit.h:55
Definition: centbox.h:22
QLabel * flg
Definition: eventedit.h:106
QSpinBox * ord
Definition: eventedit.h:105
OpenMode
Mode for opening the editor window.
Definition: eventedit.h:37
MEEPriceEdit(QWidget *, MOEventPrice, int)
Definition: eventedit.cpp:273
Edit the existing event.