Show player picture left of device configuration.

After shrinking the size of the Rockbox logo shown and making the selected
device display two lines there is now enough room to also show an icon of the
player. The icon is scaled depending on the application font size, so for
setups configured with a larger font it still should show up in a reasonable
size.

Change-Id: I8f62f3292c62f820309157db73741b57fd6371ef
This commit is contained in:
Dominik Riebeling 2012-06-20 21:00:43 +02:00
parent 40e306ba37
commit f419128a6b
56 changed files with 138 additions and 13 deletions

View file

@ -59,6 +59,7 @@ const static struct {
{ SystemInfo::CurName, ":platform:/name", "" },
{ SystemInfo::CurBuildserverModel, ":platform:/buildserver_modelname", "" },
{ SystemInfo::CurConfigureModel, ":platform:/configure_modelname", "" },
{ SystemInfo::CurPlayerPicture, ":platform:/playerpic", "" },
};
//! pointer to setting object to NULL

View file

@ -63,6 +63,7 @@ class SystemInfo : public QObject
CurName,
CurBuildserverModel,
CurConfigureModel,
CurPlayerPicture,
};
enum PlatformType {

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -116,6 +116,7 @@ bootloadername=
manualname=
brand=Archos
configure_modelname=archosplayer
playerpic=archosplayer
encoder=lame
[archosrecorder]
@ -126,6 +127,7 @@ bootloadername=
manualname=
brand=Archos
configure_modelname=archosrecorder
playerpic=archosrecorder
encoder=lame
[archosrecorder.8mb]
@ -136,6 +138,7 @@ bootloadername=
manualname=recorder
brand=Archos
configure_modelname=archosrecorder
playerpic=archosrecorder
encoder=lame
[archosrecorderv2]
@ -146,6 +149,7 @@ bootloadername=
manualname=
brand=Archos
configure_modelname=archosrecorderv2
playerpic=archosrecorderv2
encoder=lame
[archosfmrecorder]
@ -156,6 +160,7 @@ bootloadername=
manualname=
brand=Archos
configure_modelname=archosfmrecorder
playerpic=archosfmrecorder
encoder=lame
[archosfmrecorder.8mb]
@ -166,6 +171,7 @@ bootloadername=
manualname=archosfmrecorder
brand=Archos
configure_modelname=archosfmrecorder
playerpic=archosfmrecorder
encoder=lame
[archosondiosp]
@ -176,6 +182,7 @@ bootloadername=
manualname=
brand=Archos
configure_modelname=archosondiosp
playerpic=archosondiosp
encoder=lame
[archosondiofm]
@ -186,6 +193,7 @@ bootloadername=
manualname=
brand=Archos
configure_modelname=archosondiofm
playerpic=archosondiofm
encoder=lame
[iriverh100]
@ -199,6 +207,7 @@ manualname=iriverh100
brand=Iriver
usbid=0x10063001
configure_modelname=iriverh100
playerpic=iriverh100
encoder=rbspeex
[iriverh120]
@ -212,6 +221,7 @@ manualname=iriverh100
brand=Iriver
usbid=0x10063002
configure_modelname=iriverh120
playerpic=iriverh100
encoder=rbspeex
[iriverh300]
@ -225,6 +235,7 @@ manualname=iriverh300
brand=Iriver
usbid=0x10063003
configure_modelname=iriverh300
playerpic=iriverh300
encoder=rbspeex
[iriverh10_5gb]
@ -237,6 +248,7 @@ manualname=
brand=Iriver
usbid=0x41022002
configure_modelname=iriverh10_5gb
playerpic=iriverh10_5gb
encoder=rbspeex
[iriverh10_5gb.mtp]
@ -249,6 +261,7 @@ manualname=
brand=Iriver
usbid=0x41022105, 0x41022102
configure_modelname=iriverh10_5gb
playerpic=iriverh10_5gb
encoder=rbspeex
[iriverh10]
@ -262,6 +275,7 @@ brand=Iriver
usbid=0x0b7000ba
usberror=0x41022101
configure_modelname=iriverh10
playerpic=iriverh10
encoder=rbspeex
[ipod1g2g]
@ -272,6 +286,7 @@ bootloadername=/ipod/bootloader-ipod1g2g.ipod
manualname=
brand=Apple
configure_modelname=ipod1g2g
playerpic=ipod1g2g
encoder=rbspeex
[ipodcolor]
@ -282,6 +297,7 @@ bootloadername=/ipod/bootloader-ipodcolor.ipod
manualname=
brand=Apple
configure_modelname=ipodcolor
playerpic=ipodcolor
encoder=rbspeex
[ipodnano1g]
@ -292,6 +308,7 @@ bootloadername=/ipod/bootloader-ipodnano1g.ipod
manualname=
brand=Apple
configure_modelname=ipodnano1g
playerpic=ipodnano1g
encoder=rbspeex
[ipodnano2g]
@ -302,6 +319,7 @@ bootloadername=/ipod/bootloader-ipodnano2g.ipodx
manualname=
brand=Apple
configure_modelname=ipodnano2g
playerpic=ipodnano2g
encoder=rbspeex
[ipod4g]
@ -312,6 +330,7 @@ bootloadername=/ipod/bootloader-ipod4g.ipod
manualname=
brand=Apple
configure_modelname=ipod4g
playerpic=ipod4g
encoder=rbspeex
[ipodvideo]
@ -322,6 +341,7 @@ bootloadername=/ipod/bootloader-ipodvideo.ipod
manualname=
brand=Apple
configure_modelname=ipodvideo
playerpic=ipodvideo
encoder=rbspeex
[ipodclassic]
@ -344,6 +364,7 @@ manualname=
brand=Apple
usbid=0x05ac1201
configure_modelname=ipod3g
playerpic=ipod3g
encoder=rbspeex
[ipodmini1g]
@ -353,6 +374,7 @@ bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodmini1g.ipod
brand=Apple
configure_modelname=ipodmini1g
playerpic=ipodmini1g
encoder=rbspeex
[ipodmini2g]
@ -363,6 +385,7 @@ bootloadername=/ipod/bootloader-ipodmini2g.ipod
manualname=ipodmini1g
brand=Apple
configure_modelname=ipodmini2g
playerpic=ipodmini1g
encoder=rbspeex
[iaudiox5]
@ -375,6 +398,7 @@ manualname=
brand=Cowon
usbid=0x0e210510, 0x0e210513
configure_modelname=iaudiox5
playerpic=iaudiox5
encoder=rbspeex
[iaudiox5.v]
@ -386,6 +410,7 @@ bootloaderfile=/FIRMWARE/x5v_fw.bin
manualname=
brand=Cowon
configure_modelname=iaudiox5
playerpic=iaudiox5
encoder=rbspeex
[iaudiom5]
@ -398,6 +423,7 @@ manualname=
brand=Cowon
usbid=0x0e210520
configure_modelname=iaudiom5
playerpic=iaudiom5
encoder=rbspeex
[iaudiom3]
@ -410,6 +436,7 @@ manualname=
brand=Cowon
usbid=0x0e210500
configure_modelname=iaudiom3
playerpic=iaudiom3
encoder=rbspeex
[gigabeatfx]
@ -422,6 +449,7 @@ manualname=
brand=Toshiba
usbid=0x09300009
configure_modelname=gigabeatfx
playerpic=gigabeatfx
encoder=rbspeex
[gigabeats]
@ -432,6 +460,7 @@ manualname=
brand=Toshiba
usbid=0x09300010
configure_modelname=gigabeats
playerpic=gigabeats
encoder=rbspeex
status=disabled
@ -445,6 +474,7 @@ brand=Sandisk
usbid=0x07817421
usberror=0x07817420
configure_modelname=sansae200
playerpic=sansae200
encoder=rbspeex
[sansac200]
@ -456,6 +486,7 @@ manualname=
brand=Sandisk
usbid=0x07817450, 0x07817451
configure_modelname=sansac200
playerpic=sansac200
encoder=rbspeex
[sansae200v2]
@ -470,6 +501,7 @@ brand=Sandisk
usbid=0x07817423
usberror=0x07817422
configure_modelname=sansae200v2
playerpic=sansae200
encoder=rbspeex
[sansac200v2]
@ -484,6 +516,7 @@ brand=Sandisk
usbid=0x07817452
usberror=0x07817451
configure_modelname=sansac200v2
playerpic=sansac200
encoder=rbspeex
[sansafuze]
@ -498,6 +531,7 @@ brand=Sandisk
usbid=0x078174c1
usberror=0x078174c0
configure_modelname=sansafuze
playerpic=sansafuze
encoder=rbspeex
[sansafuzev2]
@ -512,6 +546,7 @@ brand=Sandisk
usbid=0x078174c3
usberror=0x078174c2
configure_modelname=sansafuzev2
playerpic=sansafuze
encoder=rbspeex
[sansafuzeplus]
@ -526,6 +561,7 @@ brand=Sandisk
usbid=0x078174e1
usberror=
configure_modelname=sansafuzeplus
playerpic=sansafuzeplus
encoder=rbspeex
[sansam200v4]
@ -540,6 +576,7 @@ brand=Sandisk
usbid=
usberror=
configure_modelname=sansam200v4
playerpic=sansam200v4
encoder=rbspeex
status=disabled
@ -555,6 +592,7 @@ brand=Sandisk
usbid=0x07817433
usberror=0x07817432
configure_modelname=sansaclip
playerpic=sansaclip
encoder=rbspeex
[sansaclipv2]
@ -569,6 +607,7 @@ brand=Sandisk
usbid=0x07817435
usberror=0x07817434
configure_modelname=sansaclipv2
playerpic=sansaclip
encoder=rbspeex
[sansaclipplus]
@ -583,6 +622,7 @@ brand=Sandisk
usbid=0x078174d1
usberror=0x078174d0
configure_modelname=sansaclipplus
playerpic=sansaclipplus
encoder=rbspeex
[sansaclipzip]
@ -597,6 +637,7 @@ brand=Sandisk
usbid=0x078174e5
usberror=0x078174e4
configure_modelname=sansaclipzip
playerpic=sansaclipzip
encoder=rbspeex
[mrobe100]
@ -609,6 +650,7 @@ manualname=
brand=Olympus
usbid=0x07b40280
configure_modelname=mrobe100
playerpic=mrobe100
encoder=rbspeex
[ondavx747]
@ -622,6 +664,7 @@ manualname=
brand=Onda
usbid=0x07c4a4a5
configure_modelname=ondavx747
playerpic=vx747
encoder=rbspeex
status=disabled
@ -636,6 +679,7 @@ manualname=
brand=Onda
usbid=0x07c4a4a5
configure_modelname=ondavx747p
playerpic=vx747
encoder=rbspeex
status=disabled
@ -650,6 +694,7 @@ manualname=
brand=Onda
usbid=0x07c4a4a5
configure_modelname=ondavx777
playerpic=vx777
encoder=rbspeex
status=disabled
@ -663,6 +708,7 @@ manualname=
brand=Samsung
usbid=0x04e85023
configure_modelname=samsungyh820
playerpic=samsungyh820
encoder=rbspeex
[samsungyh920]
@ -675,6 +721,7 @@ manualname=
brand=Samsung
usbid=0x04e85022, 0x04e8501d
configure_modelname=samsungyh920
playerpic=samsungyh920
encoder=rbspeex
[samsungyh925]
@ -687,6 +734,7 @@ manualname=
brand=Samsung
usbid=0x04e85024
configure_modelname=samsungyh925
playerpic=samsungyh925
encoder=rbspeex
[cowond2]
@ -701,6 +749,7 @@ brand=Cowon
usbid=0x0e210800, 0x0e210860, 0x0e210870, 0x0e210880, 0x0e210890
usberror=0x0e210801, 0x0e210861, 0x0e210871, 0x0e210881, 0x0e210891
configure_modelname=cowond2
playerpic=cowond2
encoder=rbspeex
status=disabled
@ -715,6 +764,7 @@ brand=Packard Bell
usbid=0x04098038
usberror=0x04098039
configure_modelname=vibe500
playerpic=vibe500
encoder=rbspeex
[mpiohd200]
@ -728,6 +778,7 @@ manualname=
brand=MPIO
usbid=0x27351004
configure_modelname=mpiohd200
playerpic=mpiohd200
encoder=rbspeex
[mpiohd300]
@ -741,6 +792,7 @@ manualname=
brand=MPIO
usbid=0x27351005
configure_modelname=mpiohd300
playerpic=mpiohd300
encoder=rbspeex
[gogearhdd1630]
@ -753,6 +805,7 @@ manualname=
brand=Philips
usbid=0x0471014c
configure_modelname=gogearhdd1630
playerpic=gogearhdd1630
encoder=rbspeex
[gogearhdd6330]
@ -765,6 +818,7 @@ manualname=
brand=Philips
usbid=0x0471014b
configure_modelname=gogearhdd6330
playerpic=gogearhdd6330
encoder=rbspeex
[gogearsa9200]
@ -776,6 +830,7 @@ manualname=
brand=Philips
usbid=0x0471014f
configure_modelname=gogearsa9200
playerpic=gogearsa9200
encoder=rbspeex
status=disabled

View file

@ -364,20 +364,28 @@ void RbUtilQt::updateDevice()
ui.menuA_ctions->setEnabled(configurationValid);
// displayed device info
QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
QString brand = SystemInfo::value(SystemInfo::CurBrand).toString();
QString name = SystemInfo::value(SystemInfo::CurName).toString() +
" (" + ServerInfo::value(ServerInfo::CurStatus).toString() + ")";
QString mountdisplay = QDir::toNativeSeparators(mountpoint);
QString label = Utils::filesystemName(mountpoint);
if(!label.isEmpty())
mountdisplay += " (" + label + ")";
if(name.isEmpty()) name = "<none>";
if(mountpoint.isEmpty())
mountpoint = "<invalid>";
QString name
= QString("%1 (%2)").arg(SystemInfo::value(SystemInfo::CurName).toString(),
ServerInfo::value(ServerInfo::CurStatus).toString());
ui.labelDevice->setText(tr("<b>%1 %2</b>").arg(brand, name));
QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
QString mountdisplay = QDir::toNativeSeparators(mountpoint);
if(!mountdisplay.isEmpty()) {
QString label = Utils::filesystemName(mountpoint);
if(!label.isEmpty()) mountdisplay += QString(" (%1)").arg(label);
ui.labelMountpoint->setText(tr("<b>%1</b>").arg(mountdisplay));
}
else {
mountdisplay = "(unknown)";
}
QPixmap pm;
QString m = SystemInfo::value(SystemInfo::CurPlayerPicture).toString();
pm.load(":/icons/players/" + m + "-small.png");
pm = pm.scaledToHeight(QFontMetrics(QApplication::font()).height() * 3);
ui.labelPlayerPic->setPixmap(pm);
// hide quickstart buttons if no release available
bool installable = !ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty();

View file

@ -42,6 +42,56 @@
<file>icons/wizard.jpg</file>
<file alias="icons/rockbox-clef.svg">../../docs/logo/rockbox-clef.svg</file>
</qresource>
<qresource>
<file>icons/players/archosfmrecorder-small.png</file>
<file>icons/players/archosondiofm-small.png</file>
<file>icons/players/archosondiosp-small.png</file>
<file>icons/players/archosplayer-small.png</file>
<file>icons/players/archosrecorder-small.png</file>
<file>icons/players/archosrecorderv2-small.png</file>
<file>icons/players/cowond2-small.png</file>
<file>icons/players/gigabeatfx-small.png</file>
<file>icons/players/gigabeats-small.png</file>
<file>icons/players/gogearhdd1630-small.png</file>
<file>icons/players/gogearhdd6330-small.png</file>
<file>icons/players/gogearsa9200-small.png</file>
<file>icons/players/hifimanhm60x-small.png</file>
<file>icons/players/hifimanhm801-small.png</file>
<file>icons/players/iaudiom3-small.png</file>
<file>icons/players/iaudiom5-small.png</file>
<file>icons/players/iaudiox5-small.png</file>
<file>icons/players/ipod1g2g-small.png</file>
<file>icons/players/ipod3g-small.png</file>
<file>icons/players/ipod4g-small.png</file>
<file>icons/players/ipodcolor-small.png</file>
<file>icons/players/ipodmini1g-small.png</file>
<file>icons/players/ipodnano1g-small.png</file>
<file>icons/players/ipodnano2g-small.png</file>
<file>icons/players/ipodvideo-small.png</file>
<file>icons/players/iriverh100-small.png</file>
<file>icons/players/iriverh10_5gb-small.png</file>
<file>icons/players/iriverh10-small.png</file>
<file>icons/players/iriverh300-small.png</file>
<file>icons/players/mpiohd200-small.png</file>
<file>icons/players/mpiohd300-small.png</file>
<file>icons/players/mrobe100-small.png</file>
<file>icons/players/mrobe500-small.png</file>
<file>icons/players/samsungyh820-small.png</file>
<file>icons/players/samsungyh920-small.png</file>
<file>icons/players/samsungyh925-small.png</file>
<file>icons/players/samsungypr0-small.png</file>
<file>icons/players/sansac200-small.png</file>
<file>icons/players/sansaclipplus-small.png</file>
<file>icons/players/sansaclip-small.png</file>
<file>icons/players/sansaclipzip-small.png</file>
<file>icons/players/sansaconnect-small.png</file>
<file>icons/players/sansae200-small.png</file>
<file>icons/players/sansafuzeplus-small.png</file>
<file>icons/players/sansafuze-small.png</file>
<file>icons/players/vibe500-small.png</file>
<file>icons/players/vx747-small.png</file>
<file>icons/players/vx777-small.png</file>
</qresource>
<qresource prefix="/ini">
<file>rbutil.ini</file>
</qresource>

View file

@ -97,7 +97,17 @@
</property>
</spacer>
</item>
<item row="0" column="3">
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="labelPlayerPic">
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="4" rowspan="2">
<widget class="QPushButton" name="buttonChangeDevice">
<property name="text">
<string>&amp;Change</string>