6 #include "../../se/SymbologyPreview.h" 8 #include "../../../../core/uri/URI.h" 9 #include "../../../../core/uri/Utils.h" 10 #include "../../../../dataaccess/datasource/DataSourceInfoManager.h" 11 #include "../../../../maptools/DataSetLayer.h" 12 #include "../../../../maptools/DataSetAdapterLayer.h" 13 #include "../../../../maptools/Utils.h" 15 #include "../../../../se/Style.h" 16 #include "../../../../se/Utils.h" 18 #include "../../../../srs/SpatialReferenceSystemManager.h" 23 QString toolTip = QObject::tr(
"DataSet") +
": " + ((l->getType() ==
"DATASETADAPTERLAYER") ?
25 (l->getType() ==
"DATASETLAYER") ?
34 const std::string&
id = l->getDataSourceId();
39 QString toolTip = QObject::tr(
"Connection Info") +
":\n";
41 toolTip += QObject::tr(
"\tScheme: ") + (connInfo.
scheme() +
"\n").c_str();
43 if(!connInfo.
user().empty())
44 toolTip += QObject::tr(
"\tUser: ") + (connInfo.
user() +
"\n").c_str();
46 if(!connInfo.
host().empty())
47 toolTip += QObject::tr(
"\tHost: ") + (connInfo.
host() +
"\n").c_str();
49 if(!connInfo.
port().empty())
50 toolTip += QObject::tr(
"\tPort: ") + (connInfo.
port() +
"\n").c_str();
52 if(!connInfo.
path().empty())
53 toolTip += QObject::tr(
"\tPath: ") + (connInfo.
path() +
"\n").c_str();
56 std::map<std::string, std::string>::iterator itBegin = kvp.begin();
57 std::map<std::string, std::string>::iterator itEnd = kvp.end();
59 while (itBegin != itEnd)
61 toolTip += itBegin->first.c_str();
63 toolTip += itBegin->second.c_str();
68 toolTip += QObject::tr(
"SRID: ");
69 toolTip += QString::number(l->getSRID());
70 toolTip += QObject::tr(
" - ");
82 return QObject::tr(
"Invalid Layer");
96 if (
m_layer->getStyle() !=
nullptr)
104 std::vector<TreeItem*> items;
137 return TreeItem::flags() | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsUserCheckable;
147 std::vector<TreeItem*> items;
151 if(
m_layer->getChart() !=
nullptr)
std::string path() const
Retrieving the path.
std::string scheme() const
Retrieving the scheme.
A class that represents a style of a layer in a LayerTreeModel.
QString BuildToolIip(te::qt::widgets::LayerItem const *item)
QString GetDataSetName(te::map::AbstractLayerPtr l)
std::string query() const
Retrieving the query.
QString GetTooltip(te::map::AbstractLayerPtr l)
A layer with reference to a DataSetTypeConverter.
static DataSourceInfoManager & getInstance()
It returns a reference to the singleton instance.
std::string port() const
Retrieving the port.
std::string host() const
Retrieving the host.
A class for representing an Uniform Resource Identifier (URI).
A class that represents a chart of a layer in a LayerTreeModel.
TECOREEXPORT std::map< std::string, std::string > Expand(const std::string &query_str)
Split a query string into its components.
A layer with reference to a dataset.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
std::string user() const
Retrieving the user information.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr