27 #include "../../../../common/Translator.h"
28 #include "../../../../dataaccess/datasource/DataSource.h"
29 #include "../../../../dataaccess/datasource/DataSourceManager.h"
30 #include "../../Exception.h"
55 if(role == Qt::DecorationRole)
59 if(ds == 0 || !ds->isOpened())
60 return QVariant(QIcon::fromTheme(
"closed-datasource"));
62 return QVariant(QIcon::fromTheme(
"datasource"));
65 if(role == Qt::DisplayRole)
66 return QVariant(QString::fromStdString(m_ds->getTitle()));
73 QMenu* m =
new QMenu(parent);
75 QAction* aOpenDataSource = m->addAction(tr(
"&Open data source"));
77 connect(aOpenDataSource, SIGNAL(triggered()),
this, SLOT(openDataSource()));
87 if(!children().empty())
95 return Qt::NoItemFlags;
boost::shared_ptr< DataSource > DataSourcePtr
static DataSourceManager & getInstance()
It returns a reference to the singleton instance.
A class that represents a data source in a DataSourceTreeModel.
A class used to group a set of dataset items in a DataSourceTreeModel.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr