All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CreateDataSet.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2001-2011 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 // Qt
21 #include <QtGui/QtGui>
22 #include <QtGui/QComboBox>
23 #include <QtGui/QMessageBox>
24 
25 // TerraLib
26 #include "../../../dataaccess.h"
27 
28 #include "CreateDataSet.h"
29 
31  : QDialog(parent), m_ds(ds), m_dataSetType(0)
32 {
33  if (m_ds == 0)
34  QMessageBox::critical(this, tr("Missing a Valid Data Source"), tr("Provide a valid data source!"));
35 
36  setupUi(this);
37 
38 
39  // Connect the signals/slots
40  connect(okPushButton, SIGNAL(clicked()), this, SLOT(okPushButtonClicked()));
41  connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(cancelPushButtonClicked()));
42  connect(helpPushButton, SIGNAL(clicked()), this, SLOT(helpPushButtonClicked()));
43 }
44 
46 {
47 }
48 
50 {
51  // Get the schema name of the dataset to be created
52  std::string schemaName = schemaNameLineEdit->text().toStdString();
53 
54  // Get the dataset name
55  std::string dataSetName = dataSetNameLineEdit->text().toStdString();
56 
57  // Set the full dataset name
58  std::string fullDataSetName = schemaName + "." + dataSetName;
59 
60  // Create the dataset type
61  m_dataSetType = new te::da::DataSetType(fullDataSetName);
62 
63  accept();
64 }
65 
67 {
68  reject();
69 }
70 
72 {
73 }
74 
76 {
77 }
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
Definition: DataSource.h:116
CreateDataSet(te::da::DataSource *ds, QWidget *parent=0)
A class that models the description of a dataset.
Definition: DataSetType.h:72
void closeEvent(QCloseEvent *e)
te::da::DataSource * m_ds
Definition: CreateDataSet.h:70
It creates a data set for a data source.