Exemplo n.º 1
0
QString LayerManager::layerData(const Coordinate & crdIn, const QString & attrName, QVariantList & items) 
{
	QString result;
    QStandardItem *rootItem = _tree->invisibleRootItem();
    for (int layerIndex = 0; layerIndex < rootItem->rowCount(); ++layerIndex) {
        LayerModel *layer = static_cast<LayerModel *>(rootItem->child(layerIndex));
		if (layer->isValid()) {
            QString txt = layer->layerData(crdIn, attrName, items);
			if (result != "" && txt != "")
				result += ";";
            result += txt;
		}
	}
	for (auto& cov : _mapInfoExtraLayer) {
		QString txt = cov->layerData(crdIn, attrName, items);
		if (result != "" && txt != "")
			result += ";";
		result += txt;
	}
	return result;
}