21 #include <QtGui/QtGui>
22 #include <QtGui/QComboBox>
23 #include <QtGui/QMessageBox>
26 #include "../../../dataaccess.h"
36 QMessageBox::critical(
this, tr(
"Missing a Valid Data Source"), tr(
"Provide a valid data source!"));
44 QStringList dataSetList;
46 size_t numDataSets = datasetNames.size();
47 for (
size_t i = 0; i < numDataSets; ++i)
48 dataSetList << (datasetNames[i]).c_str();
51 dataSetComboBox->addItems(dataSetList);
54 connect(dataSetComboBox, SIGNAL(currentIndexChanged(
const QString&)),
this, SLOT(
dataSetComboBoxChanged(
const QString&)));
56 connect(removeFromIndexPropertiesPushButton, SIGNAL(clicked()),
this, SLOT(removefromIndexPropertiesPushButtonClicked()));
68 dataSetPropertiesListWidget->clear();
69 indexPropertiesListWidget->clear();
71 std::auto_ptr<te::da::DataSetType> dt;
74 if(dataSetComboBox->currentText().isEmpty() ==
false)
75 dt = m_ds->getDataSetType(datasetNames.toStdString());
78 size_t numProperties = dt->size();
80 for (
size_t i = 0; i < numProperties; ++i)
81 dataSetPropertiesListWidget->addItem(dt->getProperty(i)->getName().c_str());
It adds an index associated to a DataSetType.
void helpPushButtonClicked()
virtual std::vector< std::string > getDataSetNames()
It gets the dataset names available in the data source.
te::da::DataSource * m_ds
void cancelPushButtonClicked()
void addToIndexPropertiesPushButtonClicked()
void closeEvent(QCloseEvent *e)
void okPushButtonClicked()
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
void removeFromIndexPropertiesPushButtonClicked()
AddIndex(te::da::DataSource *ds, QWidget *parent=0)
void dataSetComboBoxChanged(const QString &dataSet)