MagicSmoke  $VERSION$
eventstab.h
Go to the documentation of this file.
1 //
2 // C++ Interface: overview
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 MAGICSMOKE_EVENTSTAB_H
14 #define MAGICSMOKE_EVENTSTAB_H
15 
16 #include <QDateTime>
17 #include <QDialog>
18 #include <QItemDelegate>
19 #include <QMainWindow>
20 #include <QTimer>
21 
22 class QAction;
23 class QCheckBox;
24 class QComboBox;
25 class QLabel;
26 class QLineEdit;
27 class QPushButton;
28 class QSpinBox;
29 class QStandardItemModel;
30 class QTabWidget;
31 class QTableView;
32 class MEventView;
33 
34 class MSInterface;
35 
37 class MEventsTab:public QWidget
38 {
39  Q_OBJECT
40  public:
42  MEventsTab(QString);
43 
45  QList<QMenu*>menu();
46 
48  ~MEventsTab();
49  private slots:
51  void newEvent();
53  void cloneEvent();
55  void editEvent();
57  void eventSummary();
59  void eventCancel();
61  void editPriceCat();
62  public slots:
64  int currentEventId()const;
66  QString currentEventStart()const;
68  QString currentEventTitle()const;
69 
71  void updateEvents();
72 
74  void updateDetails();
75 
79  void selectEventId(int&eid,bool&ok)const;
83  void selectEventIds(QList<int>&eids,bool multi=true)const;
84 
85  signals:
87  void eventOrderTicket();
89  void eventOrderTicket(qint64,qint64);
90 
91  private:
92  //the profile associated with this session
93  QString profilekey;
94  //widgets
95  QTableView*eventtable;
96  QStandardItemModel*eventmodel;
97  MEventView*eventdetail;
98  //event list
99  QAction*showoldevents;
100  //refresh timers
101  QTimer rtimer;
102  //table role definitions
103  enum ExtraTableRoles{
104  IdRole=Qt::UserRole,
105  SortRole,
106  ObjectRole
107  };
108 };
109 
110 #endif
QString currentEventTitle() const
returns the currently selected event title
Definition: eventstab.cpp:272
void selectEventIds(QList< int > &eids, bool multi=true) const
shows an event selection dialog and returns the selected event
Definition: eventstab.cpp:299
QList< QMenu * > menu()
create menu for this tab
Definition: eventstab.cpp:90
void updateDetails()
update details view when selection changes
Definition: eventstab.cpp:183
void updateEvents()
update list of events
Definition: eventstab.cpp:123
MEventsTab(QString)
construct the tab with QSettings-key for current profile
Definition: eventstab.cpp:60
~MEventsTab()
destruct events list tab
Definition: eventstab.cpp:179
Event Viewer.
Definition: eventview.h:26
void selectEventId(int &eid, bool &ok) const
shows an event selection dialog and returns the selected event
Definition: eventstab.cpp:291
Main Overview Window: Event List Tab.
Definition: eventstab.h:37
the MagicSmoke specific interface class - enhances the basic interface by some functionality needed i...
Definition: msinterface.h:29
QString currentEventStart() const
returns the currently selected event start time as string
Definition: eventstab.cpp:279
void eventOrderTicket()
order ticket from event tab
int currentEventId() const
returns the currently selected event (as ID) or -1 if none is selected
Definition: eventstab.cpp:264