Re: [Qgis-user] Trigger actions of CADDigitize plugin from pyqgis

2016-05-10 Thread Tudorache, Marian
Hi,

Any news about the new reease of CADDigitize?

Thanks,
Marian

From: lb [mailto:co...@tuxfamily.org]
Sent: April-15-16 3:11 AM
To: Tudorache, Marian; qgis-user@lists.osgeo.org
Subject: Re: Trigger actions of CADDigitize plugin from pyqgis

Hi Marian,

Just wait some days, I will release the next version (0.2.0) of CADDigitize. I 
partially rewrite it from scratch.
You can see the repo here: https://gitlab.com/lbartoletti/CADDigitize/

Regards.
On 14.04.2016 15:26, Tudorache, Marian wrote:
Hi everyone,

I have a question about how to use CADDigitize plugin from pyqgis.

1.  I would like to get the active instance of this plugin from 
QgisInterface (iface). I understand when the plugin is installed there is a 
reference of this plugin recorded here (iface).
Is it possible to do this?

Thanks,
Marian

From: 
qgis-user-boun...@lists.osgeo.org 
[mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of lb
Sent: September-20-15 2:25 AM
To: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] About QgsGeometry::buffer

Hi,

Buffer require some parameter since you can choose the "style" of buffer. You 
have some example on PostGis documentation (parameters are the same)
http://postgis.net/docs/ST_Buffer.html

QGis define this parameters in Settings->Options->Digitizing->Curve offset tool.

You can get this parameters via QSettings :
join = QSettings().value("Qgis/digitizing/offset_join_style", 0, type=int)
quad = QSettings().value("Qgis/digitizing/offset_quad_seg", 8, type=int)
endCap = quad
miter = QSettings().value("Qgis/digitizing/offset_miter_limit", 5, type=int)

Regards

l.bartoletti
Le 18/09/2015 23:12, Tudorache, Marian a écrit :
Hi everyone,

I would like to find more details about QgsGeometry::buffer with more styles.

In QGIS API Documentation there are two version of the buffer:
Simple version with distance and segments and with sytles.

The one with styles is defines as: ( distance, segments, endCapStyle, 
joinStyle, mitreLimit );

I do not understand the followings parameters:

endCapStyle: Round (1) / Flat (2) / Square (3) end cap style
joinStyle: Round (1) / Mitre (2) / Bevel (3) join style
mitreLimit: Limit on the mitre ratio used for very sharp corners

Does someone has some examples or recommend a book where to find more details 
please?
The QGIS API Documentation does not give me too much.


Thanks,
Marian


This electronic message, as well as any transmitted files included in the 
electronic message, may contain privileged or confidential information and is 
intended solely for the use of the individual(s) or entity to which it is 
addressed. If you have received this electronic message in error please notify 
the sender immediately and delete the electronic message. Any unauthorized 
copying, disclosure or distribution of the electronic message is strictly 
forbidden. NAV CANADA accepts no liability for any damage caused by any virus 
and/or other malicious code transmitted by this electronic communication.

Le présent message électronique et tout fichier qui peut y être joint peuvent 
contenir des renseignements privilégiés ou confidentiels destinés à l'usage 
exclusif des personnes ou des organismes à qui ils s'adressent. Si vous avez 
reçu ce message électronique par erreur, veuillez en informer l'expéditeur 
immédiatement et supprimez le. Toute reproduction, divulgation ou distribution 
du présent message électronique est strictement interdite. NAV CANADA n'assume 
aucune responsabilité en cas de dommage causé par tout virus ou autre programme 
malveillant transmis par ce message électronique.




___

Qgis-user mailing list

Qgis-user@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/qgis-user


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Trigger actions of CADDigitize plugin from pyqgis

2016-04-15 Thread John Layt
On 14 April 2016 at 14:26, Tudorache, Marian
 wrote:
> Hi everyone,
>
> I have a question about how to use CADDigitize plugin from pyqgis.
>
> 1.   I would like to get the active instance of this plugin from
> QgisInterface (iface). I understand when the plugin is installed there is a
> reference of this plugin recorded here (iface).
>
> Is it possible to do this?

Depends on what you want to do. If you just want to trigger the
actions (e.g. the equivalent to clicking the toolbar buttons), then
you may be able to access them via QgisInterface, but if you want to
script them you'd be better off importing the code into your script.

After a quick look at the code, I don't think the CADDigitize QActions
have object names or parents set that make it possible to find them
directly, nor do the QToolButtons on the toolbar. You could try
grabbing the list of toolbar buttons using something like the
following, but telling which is which is probably going to require
looking at the icon names or something like that.

   buttons = QgisInterface.instance().mainWindow().findChild(QToolBar,
"CADDigitize").findChildren(QToolButton)

You're probably better off just importing the code and calling the
functions you want directly, see
https://github.com/lbartoletti/CADDigitize/blob/master/CADDigitize/CADDigitize.py.
for hints on how to do that.

John.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Trigger actions of CADDigitize plugin from pyqgis

2016-04-15 Thread lb

Hi Marian,

Just wait some days, I will release the next version (0.2.0) of 
CADDigitize. I partially rewrite it from scratch.

You can see the repo here: https://gitlab.com/lbartoletti/CADDigitize/

Regards.

On 14.04.2016 15:26, Tudorache, Marian wrote:


Hi everyone,

I have a question about how to use CADDigitize plugin from pyqgis.

1.I would like to get the active instance of this plugin from 
QgisInterface (iface). I understand when the plugin is installed there 
is a reference of this plugin recorded here (iface).


Is it possible to do this?

Thanks,

Marian

*From:*qgis-user-boun...@lists.osgeo.org 
[mailto:qgis-user-boun...@lists.osgeo.org] *On Behalf Of *lb

*Sent:* September-20-15 2:25 AM
*To:* qgis-user@lists.osgeo.org
*Subject:* Re: [Qgis-user] About QgsGeometry::buffer

Hi,

Buffer require some parameter since you can choose the "style" of 
buffer. You have some example on PostGis documentation (parameters are 
the same)

http://postgis.net/docs/ST_Buffer.html

QGis define this parameters in Settings->Options->Digitizing->Curve 
offset tool.


You can get this parameters via QSettings :
join = QSettings().value("Qgis/digitizing/offset_join_style", 0, type=int)
quad = QSettings().value("Qgis/digitizing/offset_quad_seg", 8, type=int)
endCap = quad
miter = QSettings().value("Qgis/digitizing/offset_miter_limit", 5, 
type=int)


Regards

l.bartoletti

Le 18/09/2015 23:12, Tudorache, Marian a écrit :

Hi everyone,

I would like to find more details about QgsGeometry::buffer with
more styles.

In QGIS API Documentation there are two version of the buffer:

Simple version with distance and segments and with sytles.

The one with styles is defines as: ( distance, segments,
endCapStyle, joinStyle, mitreLimit );

I do not understand the followings parameters:

endCapStyle: Round (1) / Flat (2) / Square (3) end cap style

joinStyle: Round (1) / Mitre (2) / Bevel (3) join style

mitreLimit: Limit on the mitre ratio used for very sharp corners

Does someone has some examples or recommend a book where to find
more details please?

The QGIS API Documentation does not give me too much.

Thanks,

Marian



This electronic message, as well as any transmitted files included
in the electronic message, may contain privileged or confidential
information and is intended solely for the use of the
individual(s) or entity to which it is addressed. If you have
received this electronic message in error please notify the sender
immediately and delete the electronic message. Any unauthorized
copying, disclosure or distribution of the electronic message is
strictly forbidden. NAV CANADA accepts no liability for any damage
caused by any virus and/or other malicious code transmitted by
this electronic communication.

Le présent message électronique et tout fichier qui peut y être
joint peuvent contenir des renseignements privilégiés ou
confidentiels destinés à l’usage exclusif des personnes ou des
organismes à qui ils s’adressent. Si vous avez reçu ce message
électronique par erreur, veuillez en informer l’expéditeur
immédiatement et supprimez le. Toute reproduction, divulgation ou
distribution du présent message électronique est strictement
interdite. NAV CANADA n’assume aucune responsabilité en cas de
dommage causé par tout virus ou autre programme malveillant
transmis par ce message électronique.


___

Qgis-user mailing list

Qgis-user@lists.osgeo.org 

http://lists.osgeo.org/mailman/listinfo/qgis-user



___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Trigger actions of CADDigitize plugin from pyqgis

2016-04-14 Thread Tudorache, Marian
Hi everyone,

I have a question about how to use CADDigitize plugin from pyqgis.

1.   I would like to get the active instance of this plugin from 
QgisInterface (iface). I understand when the plugin is installed there is a 
reference of this plugin recorded here (iface).
Is it possible to do this?

Thanks,
Marian

From: qgis-user-boun...@lists.osgeo.org 
[mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of lb
Sent: September-20-15 2:25 AM
To: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] About QgsGeometry::buffer

Hi,

Buffer require some parameter since you can choose the "style" of buffer. You 
have some example on PostGis documentation (parameters are the same)
http://postgis.net/docs/ST_Buffer.html

QGis define this parameters in Settings->Options->Digitizing->Curve offset tool.

You can get this parameters via QSettings :
join = QSettings().value("Qgis/digitizing/offset_join_style", 0, type=int)
quad = QSettings().value("Qgis/digitizing/offset_quad_seg", 8, type=int)
endCap = quad
miter = QSettings().value("Qgis/digitizing/offset_miter_limit", 5, type=int)

Regards

l.bartoletti
Le 18/09/2015 23:12, Tudorache, Marian a écrit :
Hi everyone,

I would like to find more details about QgsGeometry::buffer with more styles.

In QGIS API Documentation there are two version of the buffer:
Simple version with distance and segments and with sytles.

The one with styles is defines as: ( distance, segments, endCapStyle, 
joinStyle, mitreLimit );

I do not understand the followings parameters:

endCapStyle: Round (1) / Flat (2) / Square (3) end cap style
joinStyle: Round (1) / Mitre (2) / Bevel (3) join style
mitreLimit: Limit on the mitre ratio used for very sharp corners

Does someone has some examples or recommend a book where to find more details 
please?
The QGIS API Documentation does not give me too much.


Thanks,
Marian


This electronic message, as well as any transmitted files included in the 
electronic message, may contain privileged or confidential information and is 
intended solely for the use of the individual(s) or entity to which it is 
addressed. If you have received this electronic message in error please notify 
the sender immediately and delete the electronic message. Any unauthorized 
copying, disclosure or distribution of the electronic message is strictly 
forbidden. NAV CANADA accepts no liability for any damage caused by any virus 
and/or other malicious code transmitted by this electronic communication.

Le présent message électronique et tout fichier qui peut y être joint peuvent 
contenir des renseignements privilégiés ou confidentiels destinés à l'usage 
exclusif des personnes ou des organismes à qui ils s'adressent. Si vous avez 
reçu ce message électronique par erreur, veuillez en informer l'expéditeur 
immédiatement et supprimez le. Toute reproduction, divulgation ou distribution 
du présent message électronique est strictement interdite. NAV CANADA n'assume 
aucune responsabilité en cas de dommage causé par tout virus ou autre programme 
malveillant transmis par ce message électronique.



___

Qgis-user mailing list

Qgis-user@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user