Files
dota_factory/src/ui/SchematicChoiceDialog.h

32 lines
763 B
C++

#pragma once
#include <vector>
#include <QDialog>
#include "SchematicChoiceOption.h"
struct RecipesConfig;
class BuildingIconCache;
class ItemIconCache;
class SchematicChoiceDialog : public QDialog
{
Q_OBJECT
public:
// The icon caches draw the recipe lines of the "Unlocks recipes" list
// (REQ-DEF-SCHEMATIC-DROP, REQ-UI-ITEM-ICON, REQ-UI-BUILD-ICON). Not owned.
SchematicChoiceDialog(const std::vector<SchematicChoiceOption>& options,
const RecipesConfig& recipes, ItemIconCache* itemIcons,
BuildingIconCache* buildingIcons,
QWidget* parent = nullptr);
int getChosenIndex() const;
private:
void onOptionClicked(int index);
int m_chosenIndex;
};