Streamline our custom Label/LineEdit system #745
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Broadly speaking, the idea was to create two new classes,
SmartLabel
andSmartLineEdit
replace the inheritance hierarchies ofBtLabel
andBtLineEdit
. Having to create a new (albeit trivial) subclass of each of these for each new type of thing we want to measure was becoming unwieldy. Also, as @mikfire has previously noted, it's a pain to have to remember which version ofBtLineEdit
etc to use where in the .ui file.There is slightly more to it, specifically:
BtLabel
and all its subclasses (BtColorLabel
,BtDensityLabel
, etc) ->widgets/SmartLabel
BtLineEdit
and all its subclasses (BtGenericEdit
,BtMassEdit
, etc) ->widgets/SmartLineEdit
BtDigitWidget
and its subclasses (BtMassDigit
,BtGenericDigit
) ->widgets/SmartDigitWidget
UiAmountWithUnits
->SmartField
(base class forSmartLineEdit
andSmartDigitWidget
)SmartAmounts
namespace, plus macros to call themVarious bits of .ui files are simplified as, eg, signal connections are done in code now.
This should fix #733
Also includes fixes for #741 and #743