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&)));
68 propertiesComboBox->clear();
70 std::vector<std::string> pNames = m_ds->getPropertyNames(datasetName.toStdString());
72 for (
size_t i = 0; i < pNames.size(); ++i)
73 propertiesComboBox->addItem(pNames[i].c_str());
79 int propertyPos = propertiesComboBox->currentIndex();
81 m_property = m_ds->getProperty(dataSetComboBox->currentText().toStdString(), propertyPos).
get();
83 QMessageBox::StandardButton reply;
84 reply = QMessageBox::question(
this, tr(
"Remove Property"),
85 tr(
"Do you really want to remove the property \"%1\"?").arg(m_property->getName().c_str()),
86 QMessageBox::Yes | QMessageBox::Cancel);
88 if (reply == QMessageBox::Yes)
virtual std::vector< std::string > getDataSetNames()
It gets the dataset names available in the data source.
te::da::DataSource * m_ds
void helpPushButtonClicked()
It removes a property from a data set.
RemoveProperty(te::da::DataSource *ds, QWidget *parent=0)
void okPushButtonClicked()
void dataSetComboBoxChanged(const QString &dataSet)
void closeEvent(QCloseEvent *e)
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
void cancelPushButtonClicked()