1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Riebeling
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
22 #include "ui_sysinfofrm.h"
26 Sysinfo::Sysinfo(QWidget
*parent
) : QDialog(parent
)
32 connect(ui
.buttonOk
, SIGNAL(clicked()), this, SLOT(close()));
33 connect(ui
.buttonRefresh
, SIGNAL(clicked()), this, SLOT(updateSysinfo()));
36 void Sysinfo::updateSysinfo(void)
39 info
+= tr("<b>OS</b><br/>") + Detect::osVersionString() + "<hr/>";
40 info
+= tr("<b>Username:</b><br/>%1<hr/>").arg(Detect::userName());
41 #if defined(Q_OS_WIN32)
42 info
+= tr("<b>Permissions:</b><br/>%1<hr/>").arg(Detect::userPermissionsString());
44 info
+= tr("<b>Attached USB devices:</b><br/>");
45 QMap
<uint32_t, QString
> usbids
= Detect::listUsbDevices();
46 QList
<uint32_t> usbkeys
= usbids
.keys();
47 for(int i
= 0; i
< usbkeys
.size(); i
++)
48 info
+= tr("VID: %1 PID: %2, %3<br/>")
49 .arg((usbkeys
.at(i
)&0xffff0000)>>16, 4, 16, QChar('0'))
50 .arg(usbkeys
.at(i
)&0xffff, 4, 16, QChar('0'))
51 .arg(usbids
.value(usbkeys
.at(i
)));
53 ui
.textBrowser
->setHtml(info
);