#ifndef SIMULATIONDIALOG_H #define SIMULATIONDIALOG_H #include #include "behavior.h" #include "map.h" class Simulation; class MapScene; class QListWidgetItem; class QLibrary; namespace Ui { class SimulationDialog; } class SimulationDialog : public QDialog { Q_OBJECT public: explicit SimulationDialog(QWidget *parent = 0); ~SimulationDialog(); Simulation* getSimulation(); protected: virtual void resizeEvent(QResizeEvent *); private slots: void refreshBehaviors(); void refreshGenerators(); void generateMap(); void updatePreview(); void selectBehavior(const QModelIndex &index); private: Ui::SimulationDialog *ui; std::vector m_genList; std::vector m_behaviorList; std::vector> m_selectedBehaviors; MapScene *m_map; QLibrary *m_currentGeneratorLib; QImage *m_currentPreview; bool m_availableGenerators; void updatePreviewPixmap(); signals: void sendError(QString); }; #endif // SIMULATIONDIALOG_H