[mythtv-commits] Ticket #2594: Add multiselect configuration control
MythTV
mythtv at cvs.mythtv.org
Wed Oct 18 18:00:53 UTC 2006
#2594: Add multiselect configuration control
-------------------------------------------+--------------------------------
Reporter: mythtv at dadeos.freeserve.co.uk | Owner: ijr
Type: enhancement | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium |
-------------------------------------------+--------------------------------
This patch expands the functionality of the SelectSetting class in order
to provide multi-select capability.
The new implementation stores a multi-selection (from a QListBox) as a ‘;’
delimited string in the database. It preserves the order in which
selections are made (in order to provide order preference) and treats
single-selection functionality (e.g. from a QComboBox) as a special case
of multi-selection.
The new implementation also provides an “expand” policing mechanism. This
is in order to filter erroneous settings (usually from the database) from
appearing in selections. Also to this end, it declares the “SetValue()”
member function as private so that the setting of a selection control to
an arbitrary value is prohibited. When the system contains a selection
option, for which a number of potential choices are available, and there
is the ability to set arbitrary values (which ultimately may not match any
of the expected selections) it can cause problems.
In order to facilitate a multi-selection widget, minor modification were
made to the MythListBox class. These result in Left/Right action mapping
to Select/Deselect the current item (in a toggle manner). These actions
used to cause navigation to the next/previous widget. I made this change
for two reasons, one is that it is in keeping with the logic of most of
the other widgets (namely, up/down cycles through widgets, and left/right
changes values), but also I have found that using left/right for
navigation often results in moving to the next widget and then changing
its value (if it’s a widget that doesn’t support left/right navigation). I
personally feel this provides a more uniform user experience (but would
accept that this navigation is not ideal with long lists).
A few bugs, or potential bugs, were addressed along the way. There was a
selection bug on first entering a MythListBox. There were also situations
where the selection displayed by the Qt widget could become out of sync
with the underlying SelectSetting state (mainly in situations where the
state was updated programmatically for which signals indicating a
selection change are not generated by the Qt widgets).
All of the other changes were required in order to overcome “SetValue()”
becoming private.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/2594>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list