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 return m_property->getName();
73 return newPropertyNameLineEdit->text().toStdString();
78 propertiesComboBox->clear();
80 std::vector<std::string> pNames = m_ds->getPropertyNames(datasetName.toStdString());
82 for (
size_t i = 0; i < pNames.size(); ++i)
83 propertiesComboBox->addItem(pNames[i].c_str());
89 int propertyPos = propertiesComboBox->currentIndex();
91 m_property = m_ds->getProperty(dataSetComboBox->currentText().toStdString(), propertyPos).
get();
void closeEvent(QCloseEvent *e)
virtual std::vector< std::string > getDataSetNames()
It gets the dataset names available in the data source.
void helpPushButtonClicked()
std::string getOldPropertyName()
std::string getNewPropertyName()
void dataSetComboBoxChanged(const QString &dataSet)
te::da::DataSource * m_ds
void okPushButtonClicked()
RenameProperty(te::da::DataSource *ds, QWidget *parent=0)
void cancelPushButtonClicked()
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
It changes the name of a property.