47 #include "addEmptyWidget.hh" 50 addEmptyWidget::addEmptyWidget(std::vector< DataType > _types , QStringList _typeNames, QWidget *parent)
53 typeNames_(_typeNames)
57 typeBox->setDuplicatesEnabled(
false);
59 for (
int i=0; i < (int)types_.size(); i++)
60 typeBox->addItem(typeNames_[i],QVariant(types_[i].value()));
63 for (
int i=0; i < typeBox->count(); i++)
64 if (typeBox->itemText(i) == OpenFlipper::Options::lastDataType())
65 typeBox->setCurrentIndex(i);
67 connect(cancelButton,SIGNAL(clicked()),
this,SLOT(close()));
68 connect(addButton,SIGNAL(clicked()),
this,SLOT(slotAddEmpty()));
71 void addEmptyWidget::slotAddEmpty(){
72 int index = typeBox->currentIndex();
76 for (
int i=0; i < (int)types_.size(); i++)
77 if (types_[i] == type){
78 emit chosen(type,unused);
79 OpenFlipper::Options::lastDataType(typeBox->currentText());
const DataType DATA_UNKNOWN(0)
None of the other Objects.