48
48
void SensorWieget::updateTimeValue()
50
50
QMap<QString, QVariant> tmpMap = systemproxy->get_sensor_info_qt();
51
QMap<QString,QVariant>::iterator it;
52
for (it = tmpMap.begin(); it != tmpMap.end(); ++it) {
53
if (it.value().toString().length() > 0) {
54
sensor_info_map.insert(it.key(), it.value());
51
if (tmpMap.isEmpty() || tmpMap.count() <= 0) {
57
if(sensor_info_map.count() > 0) {
58
page->resetSensor(sensor_info_map);
55
sensor_info_map.clear();
56
QMap<QString,QVariant>::iterator it;
57
for (it = tmpMap.begin(); it != tmpMap.end(); ++it) {
58
if (it.value().toString().length() > 0) {
59
sensor_info_map.insert(it.key(), it.value());
62
if (!sensor_info_map.isEmpty() && sensor_info_map.count() > 0) {
63
page->resetSensor(sensor_info_map);
62
68
void SensorWieget::initData()
64
70
QMap<QString, QVariant> tmpMap = systemproxy->get_sensor_info_qt();
65
QMap<QString,QVariant>::iterator it;
71
if (tmpMap.isEmpty() || tmpMap.count() <= 0) {
75
QMap<QString,QVariant>::iterator it;
76
for ( it = tmpMap.begin(); it != tmpMap.end(); ++it ) {
77
if (it.value().toString().length() > 0) {
78
sensor_info_map.insert(it.key(), it.value());
81
if (sensor_info_map.isEmpty() || sensor_info_map.count() <= 0) {
85
page = new ComputerPage(scroll_widget->zone, tr("Hardware sensor information"));
86
page->setMap(sensor_info_map, "");
87
page->setsensor(true);
89
scroll_widget->addScrollWidget(page);
93
/*QMap<QString,QVariant>::iterator it;
66
94
for ( it = tmpMap.begin(); it != tmpMap.end(); ++it ) {
67
95
if (it.value().toString().length() > 0) {
68
96
sensor_info_map.insert(it.key(), it.value());