Re: [Qgis-developer] Set Composer scale with pyqgis

2016-07-07 Thread boesiii
Try:

map_item.setNewScale(canvas.scale())



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Set-Composer-scale-with-pyqgis-tp5275120p5275129.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [QGIS-UX] Print layout: canvas extent not updated

2016-06-20 Thread boesiii
I am from the ESRI world and what Paolo is describing is how ArcMap works, so
when I first started using QGIS I wanted QGIS to work the same and therefore
I created the plugin. 

http://plugins.qgis.org/plugins/syncComposerWithMap/

There is lots of room for improvement in the plugin.  A signal and slot
could be added so that it will synchronize always.  It could deal with
multiple map views better.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Print-layout-canvas-extent-not-updated-tp5271105p5272483.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Attribute Form Editor

2014-07-10 Thread boesiii
In Qgis 2.2 I had a form with tabs.  In each tab I repeated the same
attribute at the top along with other attributes that did not repeat.  When
I updated the attribute which repeated on each tab the same attribute would
update on each tab.  In 2.4, when I update the repeating attribute on one
tab it does not repeat the update on other tabs and will not save the change
unless all repeating attributes have the same value.

Shall I file a bug report?

http://osgeo-org.1560.x6.nabble.com/file/n5150550/form.png 
http://osgeo-org.1560.x6.nabble.com/file/n5150550/form2.png 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Attribute-Form-Editor-tp5150550.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Composer Map moveContent()

2014-07-09 Thread boesiii
I am working on a python plugin that works with composer maps and I was
trying to use the moveContent method but was not able to understand the
results.  When I try moveContent(1,1) I was expecting the composer map
content to pan 1 unit to the right and 1 unit down but the content moved a
much larger distance.  What units does this method work with? I am working
with feet.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Composer-Map-moveContent-tp5150386.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Problem with a plugin to select polylines

2012-10-18 Thread boesiii
Hello All,

I am starting to develop my own plugin by starting and following
instructions at www.qgisworkshop.org but the plugin does not work when the
data is a polyline.  Below is part of the plugin that deals with feature
selection.  What do I need to change so that it will select polylines?

def selectFeature(self, point, button):
   QMessageBox.information( self.iface.mainWindow(),Info, in
selectFeature function )
   # setup the provider select to filter results based on a rectangle
   pntGeom = QgsGeometry.fromPoint(point)
   # scale-dependent buffer of 2 pixels-worth of map units
   pntBuff = pntGeom.buffer( (self.canvas.mapUnitsPerPixel() * 1),0)
   rect = pntBuff.boundingBox()
   # get currentLayer and dataProvider
   cLayer = self.canvas.currentLayer()
   selectList = []
   if cLayer:
   provider = cLayer.dataProvider()
   feat = QgsFeature()
   # create the select statement
   provider.select([],rect) # the arguments mean no attributes
returned, and do a bbox filter with our buffered rectangle to limit the
amount of features
   while provider.nextFeature(feat):
   # if the feat geom returned from the selection
intersects our point then put it in a list
   if feat.geometry().intersects(pntGeom):
   selectList.append(feat.id())

   # make the actual selection
   cLayer.setSelectedFeatures(selectList)
   else:
   QMessageBox.information( self.iface.mainWindow(),Info, No
layer currently selected in TOC )

Thanks for the help,

Ed




--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Problem-with-a-plugin-to-select-polylines-tp5009694.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Error when using pyuic4 on Windows 7

2012-04-18 Thread boesiii
I was going to try and start to develop a plugin using this 

http://www.qgisworkshop.org/html/workshop/plugins_tutorial.html

and 

http://www.qgis.org/pyqgis-cookbook/plugins.html

but when I try to compile the UI file I get an error, see below: 

D:\Program Files (x86)\Quantum GIS Wroclaw\binpyuic4 -o
C:\workspaces\FlowDire 
ctionTest\ui_flowdirectiontest.py
C:\workspaces\FlowDirectionTest\ui_flowdirec 
tiontest.ui 
'import site' failed; use -v for traceback 
Traceback (most recent call last): 
  File
d:\PROGRA~3\QUANTU~1\apps\Python25\Lib\site-packages\PyQt4\uic\pyuic.py 
, line 34, in module
import optparse 
ImportError: No module named optparse 

I am using QGIS 1.7.4 on a Windows 7 64bit.  I used the Plugin Builder to
create all the necessary files.  I haven't written any other code yet. 

Thanks for you help. 

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Error-when-using-pyuic4-on-Windows-7-tp4894647p4894647.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: Error when using pyuic4 on Windows 7

2012-04-18 Thread boesiii
Additionally, I installed GNUWin and set the the PATH variable to point to
make.exe, then opened the command prompt, navigated to my plugin folder and
issued the MAKE command and received the following error:

C:\workspaces\FlowDirectionTestmake
pyuic4 -o ui_flowdirectiontest.py ui_flowdirectiontest.ui
process_begin: CreateProcess(NULL, pyuic4 -o ui_flowdirectiontest.py
ui_flowdire
ctiontest.ui, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [ui_flowdirectiontest.py] Error 2

What file is it trying to find?

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Error-when-using-pyuic4-on-Windows-7-tp4894647p4894752.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer