Re: [Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-17 Thread hubbatov
Where can i get it? Thanks -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Labeling-in-vector-layer-development-on-Qt-tp5103733p5104166.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___

Re: [Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-17 Thread hubbatov
Here you used label_style.qml, there is the string labeling/displayAll = false. It is that i needed, but it not worked for me... :( bool loadedStyle; m_layer-loadNamedStyle( path_to_style + /label_style.qml, loadedStyle); m_layer-setCustomProperty(labeling/fieldName, );

Re: [Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-17 Thread hubbatov
I did refreshing... nothing Also i tried m_layer-setCustomProperty(labeling/dataDefined/AlwaysShow, 1~~0LblAShow) - nothing too... It`s strange, why this not work. I looked at QGis sources and tried to do the same - again nothing... I thing there is something little nuance, but i don`t know

Re: [Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-16 Thread hubbatov
Solved, but this way is not good, i think :) layer-startEditing(); QListQgsField fields; fields.append(QgsField(XCoordinate, QVariant::Double)); layer-addAttribute(QgsField(XCoordinate, QVariant::Double)); fields.append(QgsField(YCoordinate, QVariant::Double));

Re: [Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-16 Thread hubbatov
One more problem: how to disable rendering too many labels (overlapped labels) ? I tried this code: bool inSets = QgsProject::instance()-readBoolEntry(PAL, /ShowingAllLabels); QgsPalLabeling* mPal = (QgsPalLabeling*)m_map-mapCanvas()-mapRenderer()-labelingEngine();

Re: [Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-14 Thread hubbatov
Does anybody knows how to solve this? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Labeling-in-vector-layer-development-on-Qt-tp5103733p5103812.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___

Re: [Qgis-developer] Opening KML files.

2014-02-14 Thread hubbatov
We built QGIS-2.0.1 + all deps for Windows7 x64. And when we checked GDAL, we found that it was built without exif option. After that we rebuilt GDAL - and all is ok now. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Opening-KML-files-tp5102244p5103867.html Sent from the

[Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-13 Thread hubbatov
Hi! I have a problem: how to disable signing of the composite objects in QgsVectorLayer using Qt? I can`t find such methods in QgsLabel, QgsVectorLayer or QgsLabelAttributes classes... Thanks! -- View this message in context:

Re: [Qgis-developer] Opening KML files.

2014-02-13 Thread hubbatov
libgdal was built without exif support Closed. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Opening-KML-files-tp5102244p5103735.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer

Re: [Qgis-developer] Labeling in vector layer (development on Qt)

2014-02-13 Thread hubbatov
Also i tried this: QgsPalLayerSettings lyr; lyr.readFromLayer(m_layer); lyr.labelPerPart = false; lyr.writeToLayer(m_layer); but it now worked too...What i`m doing wrong? -- View this message in context:

[Qgis-developer] Opening KML files.

2014-02-06 Thread hubbatov
Hi! Please, help me to understand this: on linux i can open KML file with ogr data provider and create QgsVectorLayer, but on Windows i can`t... So, where can be problem? Thanks. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Opening-KML-files-tp5102244.html Sent from the

Re: [Qgis-developer] Change selection color

2014-02-05 Thread hubbatov
Yes, it`s work! Thanks. And what about borders of selection? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Change-selection-color-tp5101986p5101995.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.

[Qgis-developer] Change selection color

2014-02-04 Thread hubbatov
Hi! I can`t change selection color using Qt in my app. Can anybody help with it? QgsMapCanvas::mapRenderer()-rendererContext()-setSelectionColor(QColor) not works :( P.S. Also it would be awesome if you tell me how to set selection color and selection border via Qt... Thanks! -- View this

Re: [Qgis-developer] Troubles with features (QgsVectorLayer)

2013-11-05 Thread hubbatov
Thanks for answer. But... QgsFeatureIds ids1; for(int i = 0; i 5; i++){ layer1-startEditing(); QgsFeature f; f.setGeometry(QgsGeometry::fromRect(QgsRectangle(i * 10, i * 10, (i + 1) * 10, (i + 1) * 10))); f.setValid(true); layer1-addFeature(f);

Re: [Qgis-developer] Troubles with features (QgsVectorLayer)

2013-11-05 Thread hubbatov
Thanks Matthias! -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Troubles-with-features-QgsVectorLayer-tp5087389p5087396.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing

[Qgis-developer] Troubles with features (QgsVectorLayer)

2013-11-04 Thread hubbatov
Try this code. When i add feature to layer it says to me that id is negative and not depend from layer (-2, -3, -4... for first and -6,-7,-8... for second layer), but feature iterator says that ids are positive (1, 2, 3 .. for first layer and 1, 2, 3 ... for second layer). Is this a bug? What i`m

Re: [Qgis-developer] Using QgsCategorizedSymbolRendererV2

2013-10-31 Thread hubbatov
Please, somebody help me! -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-QgsCategorizedSymbolRendererV2-tp5086683p5086771.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer

Re: [Qgis-developer] Using QgsCategorizedSymbolRendererV2

2013-10-31 Thread hubbatov
QgsSymbolV2 *defaultSymbol = QgsSymbolV2::defaultSymbol(layer-geometryType()); QgsCategorizedSymbolRendererV2* renderer = new QgsCategorizedSymbolRendererV2(, cropCategories(defaultSymbol)); renderer-setClassAttribute(fieldWithCropId); renderer-setSourceSymbol(defaultSymbol);

Re: [Qgis-developer] Can`t add feature to QgsVectorLayer

2013-10-30 Thread hubbatov
closed -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-t-add-feature-to-QgsVectorLayer-tp5086078p5086682.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list

[Qgis-developer] Using QgsCategorizedSymbolRendererV2

2013-10-30 Thread hubbatov
Hi! I write on C++. Question: how to use QgsCategorizedSymbolRendererV2? Input data: 1. Some features with unique fields (for example QgsField(id, QVariant::String)) 2. QgsVectorLayer with memory data provider and Polygon items Task: I need to draw this features with different colors. Now i

[Qgis-developer] Can`t add feature to QgsVectorLayer

2013-10-28 Thread hubbatov
I have this example, that worked in QGis 1.8 but in QGis 2.0 don`t. What i`m doing wrong? QgsFields fields; fields.append(QgsField(id, QVariant::String, id)); fields.append(QgsField(name, QVariant::String, name)); QgsFeature feature = QgsFeature(fields); qDebug() Add Attr

Re: [Qgis-developer] Problems with reprojecting to mercator

2013-10-25 Thread hubbatov
I did it! But there are some little bugs.. But idea is right. I was need to transform degrees to mercator points manually. Thanks! -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Problems-with-reprojecting-to-mercator-tp5082191p5084844.html Sent from the Quantum GIS -

Re: [Qgis-developer] Problems with reprojecting to mercator

2013-10-18 Thread hubbatov
Ok, how can i set extent to layers extent? QgsApplication a(argc,argv, true); QgsProviderRegistry::instance(/usr/local/lib/qgis/plugins); a.setPkgDataPath(QDir::homePath() + QDir::separator() + .harver/); QgsMapCanvas *canvas = new QgsMapCanvas(0, 0);

Re: [Qgis-developer] Problems with reprojecting to mercator

2013-10-17 Thread hubbatov
First of all thanks for reply, Kaosmos I wrote as you said. m_mapCanvas-mapRenderer()-setProjectionsEnabled(true); m_mapCanvas-mapRenderer()-setDestinationCrs(m_mapCanvas-pseudoMercator()); m_mapCanvas-mapRenderer()-setMapUnits(m_mapCanvas-pseudoMercator().mapUnits()); I created custom layer

Re: [Qgis-developer] Problems with reprojecting to mercator

2013-10-15 Thread hubbatov
Hey? Nobody knows how to do this? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Problems-with-reprojecting-to-mercator-tp5082191p5083593.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___