Loading...
Searching...
No Matches
DataSourceSelectorWidget.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/datasource/selector/DataSourceSelectorWidget.h
22
23 \brief A dialog for selecting a data source.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_DATASOURCE_SELECTOR_INTERNAL_DATASOURCESELECTORWIDGET_H
27#define __TERRALIB_QT_WIDGETS_DATASOURCE_SELECTOR_INTERNAL_DATASOURCESELECTORWIDGET_H
28
29// TerraLib
30#include "../../../../dataaccess/datasource/DataSourceInfo.h"
31#include "../../Config.h"
32
33// STL
34#include <list>
35#include <memory>
36
37// Qt
38#include <QAbstractItemView>
39#include <QWidget>
40
41namespace Ui { class DataSourceSelectorWidgetForm; }
42
43class QListWidgetItem;
44
45namespace te
46{
47 namespace qt
48 {
49 namespace widgets
50 {
51 /*!
52 \class DataSourceSelectorWidget
53
54 \brief A dialog for selecting a data source.
55
56 \ingroup widgets
57 */
59 {
60 Q_OBJECT
61
62 public:
63
64 enum
65 {
69 BUTTON_CREATE_DATASOURCE
70 };
71
72 DataSourceSelectorWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
73
75
76 Ui::DataSourceSelectorWidgetForm* getForm() const;
77
78 void setSelectionMode(QAbstractItemView::SelectionMode mode);
79
80 void setButtonsEnabled(bool enabled);
81
82 void setButtonEnabled(int button, bool enabled);
83
84 //void selectDataSourceType(int row);
85
86 std::list<te::da::DataSourceInfoPtr> getSelecteds() const;
87
88 void setDataSource(const QString& dsType);
89
91
93
95
97
98 void showSpecificDataSource(const QString& dsType);
99
100 //signals:
101
102 //void hasSelectedDataSource(bool selected);
103
104 //void created(const DataSourcePtr& ds);
105
106 //void updated(const DataSourcePtr& ds);
107
108 //void removing(const DataSourcePtr& ds);
109
110 //void selected(const DataSourcePtr& ds);
111
112 protected slots:
113
115
117
119
121
122 void dataSourceTypePressed(QListWidgetItem* item);
123
124 void dataSourcePressed(QListWidgetItem* item);
125
126 void dataSourceDoubleClicked(QListWidgetItem * item);
127
128 private:
129
130 std::unique_ptr<Ui::DataSourceSelectorWidgetForm> m_ui;
135 };
136 } // end namespace widgets
137 } // end namespace qt
138} // end namespace te
139
140#endif // __TERRALIB_QT_WIDGETS_DATASOURCE_SELECTOR_INTERNAL_DATASOURCESELECTORWIDGET_H
141
A dialog for selecting a data source.
void showDataSourceWithRasterSupport(bool visible)
std::list< te::da::DataSourceInfoPtr > getSelecteds() const
void setButtonEnabled(int button, bool enabled)
void dataSourceTypePressed(QListWidgetItem *item)
void setDataSource(const QString &dsType)
void showDataSourceWithDatabaseSupport(bool visible)
void setSelectionMode(QAbstractItemView::SelectionMode mode)
Ui::DataSourceSelectorWidgetForm * getForm() const
void showSpecificDataSource(const QString &dsType)
DataSourceSelectorWidget(QWidget *parent=0, Qt::WindowFlags f=0)
void dataSourceDoubleClicked(QListWidgetItem *item)
void showDataSourceWithFileSupport(bool visible)
void showDataSourceWithVectorialSupport(bool visible)
std::unique_ptr< Ui::DataSourceSelectorWidgetForm > m_ui
void dataSourcePressed(QListWidgetItem *item)
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63