[QGIS-Developer] Proposed upgrades to the field calculator

Ethan Snyder Ethan.Snyder at rve.com
Fri May 6 10:21:17 PDT 2022


Hello Devs:

        I would like to propose some changes/upgrades to the field calculator. Please let me know your thoughts and suggestions.

        -- Primary/Major Changes --

        1. Make the Field Calculator window non-modal
                * This will allow 2-6 to become practical
                * Allows users to modify feature selections

        2. Add a dropdown to the top of the window to select a layer
                * Similar to the Layer Styling window (the floating & dock-able panel)
                * Limited to vector layers
                * Defaults to the currently selected layer (defaults to an empty option on top if not vector)

        3. Rename "Ok" button to "Apply" and rename "Cancel" button to "Close"
                * This allows users to keep the field calculator window opened for multiple edits
                * Use cases would be:
                        - Running the same or similar expression on multiple fields
                        - Assuming #2, running the same of similar expression on multiple layers
                        - Combination of the above 2

        4. Change the QGIS UI toolbar button for Field Calculator to a toggle button

        5. Add checkbox to show/hide fields that are hidden in the editor widget
                * Per the comment here: https://github.com/qgis/QGIS/blob/0aa409b4c67fd5f0dbc31efb3b5314c3f36b19f1/src/gui/vector/qgsfieldcalculator.cpp#L507-L509
                * Allows showing/hiding fields that are hidden without having to change the editor widget settings
                * Useful for needing to reset or bulk-change label placements overrides (i.e. adding 90 degrees to all non-null label rotations)

        6. *Optional* Make the Field Calculator window a dock-able panel?
                * May make more sense for ultra-wide screens, or with the function and docs part hidden
                * Requires #4


        -- Secondary/Minor Changes --

        7. Make it more obvious when field calculator is running against a selection
                * I've been bitten by this when I didn't realize it was using a selection, or I forgot to select a few features
                * Maybe have this checkbox on the bottom close to the "Ok/Apply" button?


        I believe these changes will help advance QGIS more into the "Data Science" field with being able to work with the data table(s) more efficiently.

Thank you for your time,

Ethan Snyder
GIS/GPS Technician
Remington & Vernick Engineers, Inc.
DISCLAIMER: This message and any documents attached may contain confidential information and are intended only for the individual(s) named. If you are not the intended recipient, or the employee or agent authorized to received for the intended recipient, you should not disseminate, distribute or copy this e-mail and any attached documents. If you have received this e-mail in error, please immediately notify the sender at Remington & Vernick Engineers by replying to this e-mail and delete the original e-mail and any reply e-mail messages from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Thank you.


More information about the QGIS-Developer mailing list