VAPOR3 3.9.4
PEnumDropdown.h
Go to the documentation of this file.
1#pragma once
2
3#include "PLineItem.h"
4#include <vector>
5//#include "VaporWidgetsFwd.h"
6
7class VComboBox;
8
12
13class PEnumDropdown : public PLineItem {
14 Q_OBJECT
15
16 VComboBox * _vComboBox;
17 const std::vector<long> _enumMap;
18
19public:
21 PEnumDropdown(const std::string &tag, const std::vector<std::string> &items, const std::vector<long> &itemValues = {}, const std::string &label = "");
22
23protected:
24 void updateGUI() const override;
25
26private slots:
27 void dropdownIndexChanged(int index);
28};
PEnumDropdown(const std::string &tag, const std::vector< std::string > &items, const std::vector< long > &itemValues={}, const std::string &label="")
If itemValues is empty, the item values will be initialized to the index of each item.
void updateGUI() const override