Re: [QGIS-Developer] Access to shapeDigitizeToolBar menu's text

2024-03-15 Thread Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer
So this works but if the action I want to disable  happens to be the default 
action of the button it disables the entire button.

Also trying to capture what action the user selects and I tried

shape_digitize_tool_bar = iface.shapeDigitizeToolBar()
shape_digitize_tool_bar.actionTriggered[QAction].connect(self.shape_digitize_tool_bar_clicked)

but is never fired when I click on any of the buttons or select the menus

From: Jacky Volpes 
Sent: Wednesday, March 6, 2024 4:12 AM
To: Catania, Luke A ERDC-RDE-GRL-VA CIV ; 
qgis-developer@lists.osgeo.org
Subject: Re: [QGIS-Developer] Access to shapeDigitizeToolBar menu's text

Hi Luke,

It works with setDisabled on action_item.
Be careful not to call setDisabled on every action of a category, then yes, it 
disables the entire icon.

Updated snippet for example:

actions_list = []
sdtb = iface.shapeDigitizeToolBar()
for i, action_widget_item in enumerate(sdtb.actions()):
if action_widget_item.defaultWidget().menu() is None:
actions_list.append(action_widget_item.defaultWidget().defaultAction())
continue
actions_list += action_widget_item.defaultWidget().menu().actions()

actions_ids = ['rectangle-from-extent', 'circle-from-3-points']  # actions ids 
to disable
[a.setDisabled(True) for a in actions_list if a.data() in actions_ids]  # 
disable the actions

[cid:image001.png@01DA773B.F4AAC8E0]





Jacky Volpes



Ingénieur SIG - Oslandia



Le 05/03/2024 à 19:32, Catania, Luke A ERDC-RDE-GRL-VA CIV a écrit :
When I use setDisabled on either  action_widget_item.defaultWidget or 
action_item it sets the disables the entire icon as opposed to the specific 
action item found.  Maybe I am missing something.  Like I don’t want the user 
to be able to draw an Ellipse from Foci so I disable that, but it disables the 
entire icon of menus for drawing Elipses.

From: Jacky Volpes 
Sent: Tuesday, February 27, 2024 5:29 AM
To: Catania, Luke A ERDC-RDE-GRL-VA CIV 
; 
qgis-developer@lists.osgeo.org
Subject: Re: [QGIS-Developer] Access to shapeDigitizeToolBar menu's text

Hi Luke,

As you can see on the printed text, objects are QWigetAction, not QAction.
This is because you get each category of the tool bar, where then each one 
contains one or more digitizing QActions.
[cid:image002.png@01DA773B.F4AAC8E0]

Here is a snippet that can help you explore the tool bar:


sdtb = iface.shapeDigitizeToolBar()
for i, action_widget_item in enumerate(sdtb.actions()):
print(f"{i}: {action_widget_item.defaultWidget().text()}")
for j, action_item in 
enumerate(action_widget_item.defaultWidget().menu().actions()):
print (f"\t{j}: {action_item.data()}")  # id like
print (f"\t\ttranslated text: {action_item.text()}")


Regards,



Jacky Volpes



Ingénieur SIG - Oslandia

Le 27/02/2024 à 04:10, Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer a 
écrit :
Trying to get access to the button menus in shapeDigitizeToolBar.

from qgis.utils import iface

from PyQt5.QtWidgets import QWidgetAction
sdtb = iface.shapeDigitizeToolBar()
i=0
for action_item in sdtb.actions():
i=i+1
print (f"{i}: {action_item}")

This prints:

1: 
2: 
3: 
4: 
5: 

I want to access each button and the menus of the button so I can disable 
certain tools.  I need to get the text associated with the tools so I can key 
on that.

I can’t figure out how to get to them from QWidgetAction. I called all the 
methods on QAction that returns a string: data, iconText, statusTip, whatsThis 
and they all return empty strings.  So how are these menus labeled.

Thanks,
Luke




___

QGIS-Developer mailing list

QGIS-Developer@lists.osgeo.org

List info: Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked

Unsubscribe: 
Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked


___
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


Re: [QGIS-Developer] Call for Grant Proposals 2024

2024-03-15 Thread Anita Graser via QGIS-Developer
Dear devs,

Due to popular request, we are extending the deadline for proposals by one week 
until 21 March.

Please get your proposals in to make QGIS even better.

Regards,
Anita

Feb 15, 2024 20:11:31 Anita Graser :

> Dear QGIS Community,
> 
> Our previous rounds of grant proposals have been a great success. We are very 
> pleased to announce that this year’s round of grants is now available. The 
> call is open to anybody who wants to make a funded contribution to QGIS, 
> subject to the call conditions outlined in the application form. The deadline 
> for this round is on Tuesday 2024-03-14.
> 
> For more details, please read:
> http://blog.qgis.org/qgis-grants-9-call-for-grant-proposals-2024
> 
> We look forward to seeing all your great ideas for improving QGIS!
> 
> Anita
> -- 
> Anita Graser
> Home: http://anitagraser.com
> Mastodon: @underdark...@fosstodon.org
___
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] QGIS Full Stack Web Developer Report

2024-03-15 Thread Lova Andriarimalala via QGIS-Developer
Hello everyone,

Please see the report below for updates on the maintenance and development of 
QGIS-Django and QGIS-Feed, for this week.

  *   Deploy merged changes: QGIS-Django 
#356 and QGIS-Feed 
#70
  *   Submit new PRs:
 *   QGIS-Django #366: Fix GH actions 
test
 *   QGIS-Feed #77: Additional fix for spatial filter 
map
  *   Some improvements in an open PR: QGIS-Django #361: Add playwright CI test 
for plugin management
  *   Maintenance tasks: setting up a monitoring server for the QGIS-related 
websites and an updated server for the QGIS-Feed

Next week, we will continue with maintenance tasks and test some of the 
existing PRs.

Have a great weekend.

Best regards,
Lova


—
[Image]

Lova Andriarimalala
QGIS Full Stack Developer
Visit http://kartoza.com to find out about open source:
* Desktop GIS programming services
* Geospatial web development
* GIS Training
* Consulting Services
Office: +261(0)34 09 524 73



___
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