--- /dev/null
+//
+// C++ Implementation: eventedit
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#include "eventedit.h"
+
+MEventEditor::MEventEditor(QWidget*w,qint32 id)
+ :QDialog(w)
+{
+ setWindowTitle("Event Editor");
+}
--- /dev/null
+//
+// C++ Interface: eventedit
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#ifndef SMOKE_EVENT_EDIT_H
+#define SMOKE_EVENT_EDIT_H
+
+#include <QDialog>
+
+class MEventEditor:public QDialog
+{
+ public:
+ MEventEditor(QWidget*,qint32 id=-1);
+};
+
+
+#endif
#include "overview.h"
#include "webrequest.h"
+#include "eventedit.h"
#include <QSettings>
#include <QMessageBox>
m=mb->addMenu(tr("&Event"));
m->addAction(tr("&Show details..."));
- m->addAction(tr("&New Event..."));
+ m->addAction(tr("&New Event..."),this,SLOT(newEvent()))->setEnabled(req->hasRole("createevent"));
m->addAction(tr("&Cancel Event..."));
m=mb->addMenu(tr("&Customer"));
hl->addWidget(new QTableView,10);
hl->addSpacing(5);
hl->addLayout(vl=new QVBoxLayout,0);
- vl->addWidget(new QPushButton(tr("New Event...")),0);
+ QPushButton*p;
+ vl->addWidget(p=new QPushButton(tr("New Event...")),0);
+ connect(p,SIGNAL(clicked()),this,SLOT(newEvent()));
+ p->setEnabled(req->hasRole("createevent"));
vl->addWidget(new QPushButton(tr("Details...")),0);
vl->addSpacing(15);
vl->addWidget(new QPushButton(tr("Order Ticket...")),0);
QMessageBox::warning(this,tr("Warning"),tr("I was unable to renew the login at the server, the error was: %1").arg(req->errorString()));
setEnabled(true);
}
+
+void MOverview::newEvent()
+{
+ MEventEditor ed(this);
+ ed.exec();
+}