Add custom delegate for showing the mountpoint combo box entries.

The delegate will be used for the dropdown list and show both mountpoint (left
aligned) and label / size information (right aligned). This improves
readability compared to the previous implementation. Also, the mountpoint
itself is now the text of the combo box and the additional information is in
the Qt::UserRole to avoid having to handle a user entered mountpoint separately
(since previously the mountpoint was stored in Qt::UserRole, but an edited item
would have the value in Qt::TextRole).

Disable editing the combo box entry for release builds, it shouldn't be needed
by users.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30144 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2011-07-16 22:08:03 +00:00
parent 94bc289cd0
commit 99408dd45e
5 changed files with 106 additions and 11 deletions

View file

@ -132,6 +132,7 @@ QT += network
dbg {
CONFIG += debug thread qt warn_on
DEFINES -= QT_NO_DEBUG_OUTPUT
DEFINES += DBG
message("debug")
}
!dbg {