Skip to content
Snippets Groups Projects
Commit 32fc2219 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Device support: Show availability in settings widget.


Change-Id: If82b23ac71d8c94c6ff659cba10f2858234ddca6
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 674fce3a
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,7 @@
#include <utils/qtcassert.h>
#include <QFileInfo>
#include <QPixmap>
#include <QRegExp>
#include <QSettings>
#include <QSignalMapper>
......@@ -193,6 +194,18 @@ void DeviceSettingsWidget::displayCurrent()
m_ui->autoDetectionValueLabel->setText(current->isAutoDetected()
? tr("Yes (fingerprint is '%1')").arg(current->id().toString()) : tr("No"));
m_nameValidator->setDisplayName(current->displayName());
switch (current->availability()) {
case IDevice::DeviceAvailable:
m_ui->availableValueLabel->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/ConnectionOn.png")));
break;
case IDevice::DeviceUnavailable:
m_ui->availableValueLabel->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/ConnectionOff.png")));
break;
case IDevice::DeviceAvailabilityUnknown:
m_ui->availableValueLabel->setText(tr("Unknown"));
break;
}
m_ui->removeConfigButton->setEnabled(!current->isAutoDetected());
fillInValues();
}
......
......@@ -95,6 +95,16 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="availableKeyLabel">
<property name="text">
<string>Currently available:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="availableValueLabel"/>
</item>
</layout>
</item>
<item>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment