Make ExtendedLegend work without having a chart
Do not insert non existing columns
d->sensors is what we derive columnCount() from, when the sensors are changed
or the model is reset we called beginInsertColumns for each sensor making the
outwards state of the model inconsistent. For example
when setting the sensors to a list of 4 sensors, beginInsertColumns would be
called 4 times, making some outside observers of the model think it would have
8 columns. So we need to initialize sensorInfos to avoid this.
Found when using the model with a QTransposeProxyModel.
Deprecate colorSource
It never had an effect
Allow using ExtendedLegend without setting a chart on it
This will be useful for SensorFaces that are not based on a QuickCharts chart.
We already implicitely require the type of sourceModel to be SensorDataModel
to format the sensor values. Make this explicit by stating the type. Use the data
provided by the model for the legend. The colors can be injected into the model
by the SensorFace to provide them to Legend. If "chart" is set, we continue
using it.
Edited by David Redondo