Commit d319b10d authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: GUI fix in device configuration wizard.

The list of possible devices is much better represented as a combo box.

Change-Id: Ia68472ec5082b0d40b584bf48c245a823dce04f3
Reviewed-on: http://codereview.qt.nokia.com/580

Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 0c1d3e98
......@@ -99,9 +99,13 @@ public:
m_ui->setupUi(this);
setTitle(tr("General Information"));
setSubTitle(QLatin1String(" ")); // For Qt bug (background color)
m_ui->fremantleButton->setText(MaemoGlobal::osTypeToString(LinuxDeviceConfiguration::Maemo5OsType));
m_ui->harmattanButton->setText(MaemoGlobal::osTypeToString(LinuxDeviceConfiguration::HarmattanOsType));
m_ui->meegoButton->setText(MaemoGlobal::osTypeToString(LinuxDeviceConfiguration::MeeGoOsType));
m_ui->osTypeComboBox->addItem(MaemoGlobal::osTypeToString(LinuxDeviceConfiguration::Maemo5OsType),
LinuxDeviceConfiguration::Maemo5OsType);
m_ui->osTypeComboBox->addItem(MaemoGlobal::osTypeToString(LinuxDeviceConfiguration::HarmattanOsType),
LinuxDeviceConfiguration::HarmattanOsType);
m_ui->osTypeComboBox->addItem(MaemoGlobal::osTypeToString(LinuxDeviceConfiguration::MeeGoOsType),
LinuxDeviceConfiguration::MeeGoOsType);
QButtonGroup *buttonGroup = new QButtonGroup(this);
buttonGroup->setExclusive(true);
......@@ -110,14 +114,8 @@ public:
connect(buttonGroup, SIGNAL(buttonClicked(int)),
SLOT(handleDeviceTypeChanged()));
buttonGroup = new QButtonGroup(this);
buttonGroup->setExclusive(true);
buttonGroup->addButton(m_ui->fremantleButton);
buttonGroup->addButton(m_ui->harmattanButton);
buttonGroup->addButton(m_ui->meegoButton);
m_ui->nameLineEdit->setText(QLatin1String("(New Configuration)"));
m_ui->harmattanButton->setChecked(true);
m_ui->osTypeComboBox->setCurrentIndex(m_ui->osTypeComboBox->findData(LinuxDeviceConfiguration::HarmattanOsType));
m_ui->hwButton->setChecked(true);
handleDeviceTypeChanged();
m_ui->hostNameLineEdit->setText(defaultHost(deviceType()));
......@@ -143,9 +141,7 @@ public:
QString osType() const
{
return m_ui->fremantleButton->isChecked() ? LinuxDeviceConfiguration::Maemo5OsType
: m_ui->harmattanButton->isChecked() ? LinuxDeviceConfiguration::HarmattanOsType
: LinuxDeviceConfiguration::MeeGoOsType;
return m_ui->osTypeComboBox->itemData(m_ui->osTypeComboBox->currentIndex()).toString();
}
LinuxDeviceConfiguration::DeviceType deviceType() const
......
......@@ -37,25 +37,7 @@
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="fremantleButton">
<property name="text">
<string>Maemo 5 (Fremantle)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="harmattanButton">
<property name="text">
<string>Maemo 6 (Harmattan)</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="meegoButton">
<property name="text">
<string>Meego</string>
</property>
</widget>
<widget class="QComboBox" name="osTypeComboBox"/>
</item>
<item>
<spacer name="horizontalSpacer">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment