Merge PTZListModel and PTZPresetModel - #330
Conversation
|
The Windows job is red on a single narrowing conversion that
int PTZDevice::presetAtDisplayRow(int row) const
{
if (row < 0 || row >= presetCount())
return -1;
- return m_presetsDisplayOrder[row];
+ return static_cast<int>(m_presetsDisplayOrder[row]);
}The other four jobs are already green, so that should be all that is left. One heads-up for merge order: this PR moves the preset data into |
To remove the need for UI elements to access PTZDevice instances directly, pipe all of the change notifications through the dataChanged() signal. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This patch adds methods to the PTZListModel for reading/modifying the device settings and fetching the properties. This way the UI views don't need direct access to the PTZDevice instance. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This moves state data out of the PTZPresetModel so that all configuration is stored in the PTZDevice. In a follow on patch The PTZPresetModel behaviour will be merged into PTZListModel. This is a preparatory step. On its own this isn't a great change. The moved data items are made public in PTZDevice and the PTZPresetModel still accesses them directly. This is to keep this change simple. After all the code is moved over then the elements will be made protected again. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Restructuring code, no functional changes Moves the preset save and restore code into the PTZDevice object itself and removes it from the PTZPresetModel. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Refactor only, no functional change Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Refactor only, no functional change Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Refactor only, no functional change Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Refactor only, no functional change Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Refactor only, no functional change Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Refactor only, no functional change Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Replaces direct access to the data and uses a method call to create new presets instead. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
e30938e to
a7900d7
Compare
|
Re-read the series against current Thanks for taking the narrowing fix —
|
Good catch, thanks. |
a7900d7 to
a9487eb
Compare
Merging the two models together simplifies the overall data model and makes it trivial to switch the view displayed in the presets list. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Eddy Weiz <eddyweiz@gmail.com>
a9487eb to
ad2495a
Compare
Removes the split-model design to clean up the separation between backend drivers and frontend UI