UrlLabel predates QDesktopServices' ability to ask the host OS to launch
a URL, and resorted to a Python workaround that on Windows resulted in
launchin Internet Explorer regardless of the default system browser.
The new StatefulLabel widget is designed to be customizable by optional
preferences entries, Qt stylesheets, and default styles, set on a
per-state basis, where "state" is a Qt property that can be changed
dynamically at runtime.
As suggested by @luzpaz, this adds a tooltip to the f(x) icon of all
of the widgets that use it: QuantitySpinBox, UIntSpinBox, IntSpinBox,
DoubleSpinBox, and ExpLineEdit. These five classes are divided across
three files, and all five classes duplicate the same basic code. In the
existing code, no tooltip is shown if there is no expression. If there
is an expression, it (alone) is used as the tooltip.
This commit modifies that behavior to have explanatory text as the
tooltip when there is no expression, and when there is, to prepend a
short string to the beginning.
To reduce further code duplication, this is implemented by adding a new
function to ExpressionLabel allowing the text of the expression to be set.
It checks that text and if it's empty, uses a preset default string as the
tooltip. If there is expression text, it instead prepends another
bit of text to the front and sets the entire expression+prefix as the
tooltip.
TODO: In the future a lot of the preexisting code duplication could be
removed by making the ExpressionLabel class do more internal management
of the expression.
Thanks to @kisolre for the assistance tracking these down, and
suggesting the default text used.
The UrlLabel in the About FreeCAD box was not styleable because its
rich-text contents overrode any styling applied to it. This commit
converts it to a plain text label that can then be styled in a
stylesheet using the Gui--UrlLabel selector. If no stylesheet is
applied, the UrlLabel styles itself using the old-school blue text with
an underline, but any applied stylesheet completely overrides this
default.
This does not affect the "clickability" of a UrlLabel widget, which is
handled independently of the label's content (including its textual
hyperlink, which was and still is ignored).
Since Py3.3: 'Py_ssize_t PyUnicode_GetSize(PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'PyObject* PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
* Display property from linked object, colored green,
* Change DlgPropertyLink to support external linking and sub-object
selection
* Improve large selection performance by using a timer
* Improve TAB key behavior in property editor
* Add context menu to show hidden properties, change property status,
set expression on any and property, and add/remove dynamic properties
* Optimize expression completer model construction, as the original
implementation gets prohibitively slow for moderate number of objects.
The size of the "..." button calculated by QMacStyle was not correct,
causing other widgets in the layout to be clipped.
Also, set the size of all "..." buttons the same way.
- New editor for MapMode with button to open attacher dialog
- Hide attachment properties when they are not applicable
- Disable super placement ui in attacher dialog when object is not attached
- Always select used mode in mode list