53 #include "addEmptyWidget.hh"
56 addEmptyWidget::addEmptyWidget(std::vector< DataType > _types , QStringList _typeNames, QWidget *parent)
59 typeNames_(_typeNames)
63 typeBox->setDuplicatesEnabled(
false);
65 for (
int i=0; i < (int)types_.size(); i++)
66 typeBox->addItem(typeNames_[i],QVariant(types_[i].value()));
69 for (
int i=0; i < typeBox->count(); i++)
70 if (typeBox->itemText(i) == OpenFlipper::Options::lastDataType())
71 typeBox->setCurrentIndex(i);
73 connect(cancelButton,SIGNAL(clicked()),
this,SLOT(close()));
74 connect(addButton,SIGNAL(clicked()),
this,SLOT(slotAddEmpty()));
77 void addEmptyWidget::slotAddEmpty(){
78 int index = typeBox->currentIndex();
82 for (
int i=0; i < (int)types_.size(); i++)
83 if (types_[i] == type){
84 emit chosen(type,unused);
85 OpenFlipper::Options::lastDataType(typeBox->currentText());
const DataType DATA_UNKNOWN(0)
None of the other Objects.