27 #include "../../../dataaccess/dataset/AttributeConverterManager.h" 28 #include "../../../dataaccess/dataset/DataSetAdapter.h" 29 #include "../../../dataaccess/dataset/DataSetType.h" 30 #include "../../../dataaccess/dataset/DataSetTypeConverter.h" 31 #include "../../../dataaccess/datasource/DataSource.h" 32 #include "../../../dataaccess/datasource/DataSourceCatalog.h" 35 #include "ui_NewPropertyWidgetForm.h" 36 #include "ui_PropertyConverterDialogForm.h" 39 #include <QMessageBox> 40 #include <QGridLayout> 45 m_ui(new
Ui::PropertyConverterDialogForm),
46 m_propWidget(nullptr),
56 QGridLayout* layout =
new QGridLayout(
m_ui->m_widget);
64 std::vector<std::string> converters;
67 for(std::size_t t = 0; t < converters.size(); ++t)
69 m_ui->m_comboBox->addItem(converters[t].c_str());
72 m_ui->m_helpPushButton->setPageReference(
"widgets/property/property_converter.html");
91 int newrow =
m_ui->m_tableWidget->rowCount();
92 m_ui->m_tableWidget->insertRow(newrow);
94 QTableWidgetItem* itemCheck =
new QTableWidgetItem();
95 itemCheck->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsEnabled);
96 itemCheck->setCheckState(Qt::Unchecked);
97 m_ui->m_tableWidget->setItem(newrow, 0, itemCheck);
99 QTableWidgetItem* itemName =
new QTableWidgetItem(QString::fromUtf8(propName.c_str()));
100 itemName->setFlags(Qt::ItemIsEnabled);
101 m_ui->m_tableWidget->setItem(newrow, 1, itemName);
104 itemType->setFlags(Qt::ItemIsEnabled);
105 m_ui->m_tableWidget->setItem(newrow, 2, itemType);
108 m_ui->m_tableWidget->resizeColumnsToContents();
119 std::vector<std::string> names;
120 std::string converterName =
m_ui->m_comboBox->currentText().toUtf8().data();
123 int row =
m_ui->m_tableWidget->rowCount();
125 for(
int i = 0; i < row; ++i)
127 QTableWidgetItem* item =
m_ui->m_tableWidget->item(i, 0);
129 if(item && item->checkState() == Qt::Checked)
131 names.push_back(
m_ui->m_tableWidget->item(i, 1)->text().toUtf8().data());
Property * getProperty(std::size_t i) const
It returns the i-th property.
An atomic property like an integer or double.
A class that models the description of a dataset.
It models a property definition.
An converter for DataSetType.
static AttributeConverterManager & getInstance()
It returns a reference to the singleton instance.
std::size_t size() const
It returns the number of properties of the CompositeProperty.
int getType() const
It returns the property data type.
void add(const std::string &propertyName, te::dt::Property *p, const std::string &attributeConverterName="GenericAttributeConverter")
It adds a conversions to the given property of the input data set type.
A class used to define the PropertyConverterDialog class.
const std::string & getName() const
It returns the property name.