Re: [QGIS-Developer] Plugin for Layout

2021-09-25 Thread Raymond Nijssen

Hi Zsolt,

This code adds a button to the layout toolbar. I don't know of a way to 
add things to the layout menu as well.





def designer_opened(designer):
tb = designer.actionsToolbar()
action = QAction('Push me!', parent=designer)
tb.addAction(action)

iface.layoutDesignerOpened.connect(designer_opened)




By the way, you can add a grid to your layout map item and show 
coordinates. There a quite many options. Have you looked into that?


Hope this helps,
Raymond



On 25-09-2021 08:04, Gal Zsolt wrote:

Hello List!

I like to write a plugin to add map corner coordinates as label to the 
layout.


I write a python script wich do this.
I make a plugin where I  add a menu item to the Qgis main interface. 
Work. This solution is ugly: I select a menu item to make on action on 
other window (Layout designer window wiht may layout)!


Now I like to add a menu item to edit menu in the 
*LayoutDesignerInterface?*.


Reading the Python Api documentation and the Cookbook I don't understand 
how to make this.

Can someone help me where to find additional documentation about this?
I Google it without success.

Thanks in advance for any help!

Zsolt


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Plugin for Layout

2021-09-25 Thread Gal Zsolt
Hello List!

I like to write a plugin to add map corner coordinates as label to the layout.

I write a python script wich do this.

I make a plugin where I add a menu item to the Qgis main interface. Work. This 
solution is ugly: I select a menu item to make on action on other window 
(Layout designer window wiht may layout)!
Now I like to add a menu item to edit menu in the LayoutDesignerInterface?.

Reading the Python Api documentation and the Cookbook I don't understand how to 
make this.
Can someone help me where to find additional documentation about this?
I Google it without success.


Thanks in advance for any help!
Zsolt


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer