DataSetTypeFilter.h
Go to the documentation of this file.
1
/* Copyright (C) 2008 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
/*!
21
\file terralib/qt/widgets/dataset/utils/DataSetTypeFilter.h
22
23
\brief Custom widget used filter a dataset type, creating a DataSetTypeConverter.
24
*/
25
26
#ifndef __TERRALIB_QT_WIDGETS_DATASET_UTILS_INTERNAL_DATASETTYPEFILTER_H
27
#define __TERRALIB_QT_WIDGETS_DATASET_UTILS_INTERNAL_DATASETTYPEFILTER_H
28
29
// TerrLib
30
#include "../../Config.h"
31
32
// Qt
33
#include <QGridLayout>
34
#include <QWidget>
35
36
// STL
37
#include <memory>
38
39
namespace
te
40
{
41
namespace
da
42
{
43
class
DataAccessPtr;
44
class
DataSetType;
45
class
DataSetTypeConverter;
46
class
DataSourceCapabilities;
47
}
48
49
namespace
qt
50
{
51
namespace
widgets
52
{
53
class
DoubleListWidget;
54
55
/*!
56
\class DataSetTypeFilter
57
58
\brief Custom widget used filter a dataset type, creating a DataSetTypeConverter.
59
60
\note If input DataSetType has primary key, the output will keep the same pk.
61
62
\note If input DataSetType has geom prop, the output will keep the geom prop.
63
64
65
*/
66
class
TEQTWIDGETSEXPORT
DataSetTypeFilter
:
public
QWidget
67
{
68
Q_OBJECT
69
70
public
:
71
72
/*! \brief Default constructor. */
73
DataSetTypeFilter
(QWidget* parent = 0, Qt::WindowFlags f = 0);
74
75
/*! \brief Virtual destructor. */
76
~
DataSetTypeFilter
();
77
78
public
:
79
80
/*!
81
\brief Inits the component based on the given dataSetType
82
83
\param dataSetType A valid dataSetType. This class will not take the ownership of the pointer
84
\param selectAllAttrs A flag used to select all attributes from input dataset type to output converter
85
*/
86
void
init(
const
te::da::DataSetType
* dataSetType,
bool
selectAllAttrs =
true
);
87
88
/*!
89
\brief Applies the selected attributes filter to the given Converter
90
91
\return The converter to be adapter
92
*/
93
void
applyFilterToConverter(
te::da::DataSetTypeConverter
* converter)
const
;
94
95
/*!
96
\brief Applies the selected attributes filter to the given DataAccess
97
98
\return The dataAccess to be adapter
99
*/
100
void
applyFilterToDataAccess(
te::da::DataAccessPtr
& dataAccess)
const
;
101
102
/*!
103
\brief Creates a new converter and applies the selected attributes filter
104
105
\return The new converter
106
*/
107
te::da::DataSetTypeConverter
* getConverter(
const
te::da::DataSetType
* dataSetType,
const
te::da::DataSourceCapabilities
&
capabilities
,
const
std::string& resultDataSetName)
const
;
108
109
private
:
110
111
std::unique_ptr<te::qt::widgets::DoubleListWidget>
m_doubleListWidget
;
112
};
113
}
114
}
115
}
116
117
#endif //__TERRALIB_QT_WIDGETS_DATASET_UTILS_INTERNAL_DATASETTYPEFILTER_H
te::qt::widgets::DataSetTypeFilter
Custom widget used filter a dataset type, creating a DataSetTypeConverter.
Definition:
DataSetTypeFilter.h:66
te::da::DataSetType
A class that models the description of a dataset.
Definition:
DataSetType.h:72
te::da::DataSourceCapabilities
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
Definition:
DataSourceCapabilities.h:55
te::da::DataSetTypeConverter
An converter for DataSetType.
Definition:
DataSetTypeConverter.h:59
te::da::DataAccessPtr
Definition:
DataAccess.h:274
capabilities
te::da::DataSourceCapabilities capabilities
Definition:
PostGISCapabilities.h:129
te
TerraLib.
Definition:
AddressGeocodingOp.h:51
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:63
te::qt::widgets::DataSetTypeFilter::m_doubleListWidget
std::unique_ptr< te::qt::widgets::DoubleListWidget > m_doubleListWidget
Definition:
DataSetTypeFilter.h:111
git_release
src
terralib
qt
widgets
dataset
utils
DataSetTypeFilter.h
Generated on Thu Dec 19 2019 11:46:46 for TerraLib by
1.8.14