27 #include "../../../dataaccess/dataset/DataSetType.h"
28 #include "../../../dataaccess/dataset/Index.h"
31 #include "ui_DoubleListWidgetForm.h"
32 #include "ui_IndexWidgetForm.h"
35 #include <QtGui/QGridLayout>
36 #include <QtGui/QMessageBox>
40 m_ui(new Ui::IndexWidgetForm)
56 QGridLayout* layout =
new QGridLayout(
m_ui->m_widget);
64 std::vector<std::string> propValues;
87 if(m_ui->m_nameLineEdit->text().isEmpty())
92 std::string indexName = m_ui->m_nameLineEdit->text().toStdString();
95 int currIndex = m_ui->m_typeComboBox->currentIndex();
96 int indexType = m_ui->m_typeComboBox->itemData(currIndex).toInt();
101 std::vector<std::string> vec = m_doubleListWidget->getOutputValues();
114 for(
size_t t = 0; t < vec.size(); ++t)
127 if(m_ui->m_nameLineEdit->text().isEmpty())
129 QMessageBox::warning(
this, tr(
"Warning"), tr(
"Index name not defined."));
134 std::vector<std::string> vec = m_doubleListWidget->getOutputValues();
138 QMessageBox::warning(
this, tr(
"Warning"), tr(
"No property selected."));
te::qt::widgets::DoubleListWidget * m_doubleListWidget
It describes an index associated to a DataSetType.
Property * getProperty(std::size_t i) const
It returns the i-th property.
void setName(const std::string &name)
It sets the index name.
const std::string & getName() const
It returns the property name.
This file has the IndexWidget class.
te::da::Index * getIndex()
It returns the Index DataSet class object.
const std::vector< Property * > & getProperties() const
It returns the list of properties describing the CompositeProperty.
void setInputValues(std::vector< std::string > values)
bool checkParameters()
Check the interface parameters.
void add(te::dt::Property *p)
It adds the property to the list of properties of the index.
A class that models the description of a dataset.
void setIndexType(IndexType t)
It sets the index type.
IndexWidget(te::da::DataSetType *dsType, QWidget *parent=0, Qt::WindowFlags f=0)
It models a property definition.
std::auto_ptr< Ui::IndexWidgetForm > m_ui
te::da::DataSetType * m_dsType
virtual Property * clone() const =0
It returns a clone of the object.
Ui::IndexWidgetForm * getForm() const
Ui::DoubleListWidgetForm * getForm() const