objectselector.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * objectselector.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include <QWidget>
  12. #include "../../lib/rmg/CRmgTemplate.h"
  13. Q_DECLARE_METATYPE(CompoundMapObjectID);
  14. namespace Ui {
  15. class ObjectSelector;
  16. }
  17. class ObjectSelector : public QDialog
  18. {
  19. Q_OBJECT
  20. public:
  21. explicit ObjectSelector(ObjectConfig & obj);
  22. static void showObjectSelector(ObjectConfig & obj);
  23. private slots:
  24. void on_buttonBoxResult_accepted();
  25. void on_buttonBoxResult_rejected();
  26. private:
  27. Ui::ObjectSelector *ui;
  28. ObjectConfig & obj;
  29. std::map<CompoundMapObjectID, QString> advObjects;
  30. std::map<CompoundMapObjectID, QString> getAdventureMapItems();
  31. void fillBannedObjectCategories();
  32. void getBannedObjectCategories();
  33. void fillBannedObjects();
  34. void getBannedObjects();
  35. void fillCustomObjects();
  36. void getCustomObjects();
  37. void fillRequiredObjects();
  38. void getRequiredObjects();
  39. };