mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-22 10:04:53 -05:00
29 lines
651 B
C++
29 lines
651 B
C++
#ifndef NEWEVENTTOOLBUTTON_H
|
|
#define NEWEVENTTOOLBUTTON_H
|
|
|
|
#include "events.h"
|
|
#include <QToolButton>
|
|
|
|
class NewEventToolButton : public QToolButton
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit NewEventToolButton(QWidget *parent = nullptr);
|
|
|
|
Event::Type getSelectedEventType() const { return this->selectedEventType; }
|
|
bool selectEventType(Event::Type type);
|
|
void setEventTypeVisible(Event::Type type, bool visible);
|
|
|
|
signals:
|
|
void newEventAdded(Event::Type);
|
|
|
|
private:
|
|
QMap<Event::Type,QAction*> typeToAction;
|
|
Event::Type selectedEventType;
|
|
QMenu* menu;
|
|
|
|
void addEventType(Event::Type type);
|
|
};
|
|
|
|
#endif // NEWEVENTTOOLBUTTON_H
|