27 #include "../../../dataaccess/dataset/DataSetType.h" 28 #include "../../../dataaccess/dataset/PrimaryKey.h" 29 #include "../utils/DoubleListWidget.h" 31 #include "ui_ConstraintWidgetForm.h" 32 #include "ui_DoubleListWidgetForm.h" 49 if(
m_ui->m_nameLineEdit->text().isEmpty())
54 std::string constraintName =
m_ui->m_nameLineEdit->text().toUtf8().data();
69 for(
size_t t = 0; t < vec.size(); ++t)
89 m_ui->m_nameLineEdit->setText(pk->
getName().c_str());
92 std::vector<std::string> pkPropsStr;
93 for(std::size_t i = 0; i < pkProps.size(); ++i)
95 pkPropsStr.push_back(pkProps[i]->getName());
99 std::vector<std::string> dtPropsStr;
100 for(std::size_t i = 0; i < dtProps.size(); ++i)
102 std::string propStr = dtProps[i]->getName();
104 if(std::find(pkPropsStr.begin(), pkPropsStr.end(), propStr) != pkPropsStr.end())
107 dtPropsStr.push_back(propStr);
virtual void setName(const std::string &name)
It sets the constraint name.
Property * getProperty(std::size_t i) const
It returns the i-th property.
void add(te::dt::Property *p)
It adds a property to the list of properties of the primary key.
A class that models the description of a dataset.
virtual Property * clone() const =0
It returns a clone of the object.
It models a property definition.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the primary key.
const std::vector< Property * > & getProperties() const
It returns the list of properties describing the CompositeProperty.
It describes a primary key (pk) constraint.
virtual const std::string & getName() const
It returns the constraint name.