-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[ui] Eval expression directly in specific TextFields #2836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ui] Eval expression directly in specific TextFields #2836
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2836 +/- ##
========================================
Coverage 77.79% 77.79%
========================================
Files 50 50
Lines 6725 6725
========================================
Hits 5232 5232
Misses 1493 1493 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f95c885 to
b071519
Compare
04cb651 to
e53a9ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces mathematical expression evaluation capabilities to specific text fields in the UI, allowing users to input mathematical expressions that are automatically evaluated and replaced with their computed results.
- Adds a new
ExpressionTextFieldcomponent that evaluates math expressions and handles error cases with visual indicators - Implements a JavaScript-based math evaluator supporting common mathematical functions and constants
- Replaces standard text fields with expression-enabled fields in slider controls and HDR image toolbar
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| meshroom/ui/qml/Controls/mathEvaluator.js | JavaScript math evaluator library supporting functions, constants, and expression parsing |
| meshroom/ui/qml/Controls/ExpressionTextField.qml | New TextField component with expression evaluation and error handling capabilities |
| meshroom/ui/qml/Controls/qmldir | Module registration for the new components |
| meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml | Replaces TextField with ExpressionTextField for slider components |
| meshroom/ui/qml/Viewer/HdrImageToolbar.qml | Updates gain and gamma controls to use ExpressionTextField |
| meshroom/core/desc/attribute.py | Adds NaN validation for integer attributes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
e53a9ff to
7c9e85b
Compare
…umber parsing, ...
…bel.evaluatedValue
7f26db7 to
5bc6fdb
Compare
ExpressionTextFieldcomponent that is evaluating and replacing the text field when entered math expressionsFor now this is used :
HdrImageToolbarcomponent and on the gamma and gain settingsSome additional examples :
