27 #include "../../datasource/core/DataSourceType.h"
28 #include "../../datasource/core/DataSourceTypeManager.h"
29 #include "../../datasource/explorer/DataSetItem.h"
30 #include "../explorer/DataSetTreeView.h"
33 #include "ui_DataSetSelectorDialogForm.h"
36 #include <QtGui/QMessageBox>
40 m_ui(new Ui::DataSetSelectorDialogForm),
41 m_selectMode(CHECKED_ITEMS)
56 m_ui->m_helpPushButton->setPageReference(
"widgets/dataset_selector/dataset_selector.html");
65 m_selectorW->set(ds, useCheckableItems);
70 QString title(tr(
"Dataset Selection - %1"));
71 title = title.arg(QString::fromStdString(ds->getTitle()));
73 setWindowTitle(title);
80 title = tr(
"%1 - %2");
81 title = title.arg(QString::fromStdString(dsType->
getTitle())).arg(QString::fromStdString(ds->getTitle()));
83 m_ui->m_titleLabel->setText(title);
88 return m_selectorW->getCheckedDataSets();
93 return m_selectorW->getSelectedDataSets();
103 return m_selectorW.get();
108 updateSelectPushButton();
113 updateSelectPushButton();
118 updateSelectPushButton();
123 updateSelectPushButton();
128 if(m_selectMode == CHECKED_ITEMS)
129 m_ui->m_selectPushButton->setEnabled(m_selectorW->hasCheckedDataSets());
131 m_ui->m_selectPushButton->setEnabled(m_selectorW->hasSelectedDataSets());
const DataSourceType * get(const std::string &name) const
DataSetSelectorWidget * getSelectorWidget() const
DataSetSelectorDialog(QWidget *parent=0, Qt::WindowFlags f=0)
A wizard for selecting datasets from a data source.
void onDataSetToggled(DataSetItem *item)
A base class for the suppported types of data source.
void onDataSetGroupClicked(DataSetGroupItem *item)
void onDataSetGroupToggled(DataSetGroupItem *item)
std::list< te::da::DataSetTypePtr > getSelectedDataSets() const
void updateSelectPushButton()
std::auto_ptr< DataSetSelectorWidget > m_selectorW
std::auto_ptr< Ui::DataSetSelectorDialogForm > m_ui
void set(const te::da::DataSourceInfoPtr &ds, bool useCheckableItems=false)
virtual std::string getTitle() const =0
void onDataSetClicked(DataSetItem *item)
static DataSourceTypeManager & getInstance()
It returns a reference to the singleton instance.
void setSelectMode(SelectModeType m)
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
std::list< te::da::DataSetTypePtr > getCheckedDataSets() const
A wizard for selecting datasets from a data source.