#ifndef ENUM_H #define ENUM_H #include #include #include #include #include #include "Field.h" class Enum : public Field { Q_OBJECT public: Enum(QWidget *parent, int db_id, int PropId, QString label = QString(), QGridLayout *layout = NULL, int row = 0, int col = 0); protected: int calculateLength() { return 1; } void SetValue(QVariant value); void SetList(QStringList list, int value) { this->list = list; comboBox->addItems(list); SetValue(value); } private: QStringList list; QComboBox *comboBox; }; #endif