Commit 694e9788 authored by kh1's avatar kh1
Browse files

Change QLineEdit to PathChooser.

Reviewed-by: ck
parent 1c40a4bc
......@@ -214,7 +214,8 @@ void MaemoSettingsWidget::initGui()
m_ui->setupUi(this);
m_ui->nameLineEdit->setValidator(&m_nameValidator);
m_ui->portLineEdit->setValidator(&m_portValidator);
m_ui->timeoutLineEdit->setValidator(&m_timeoutValidator);
m_ui->timeoutLineEdit->setValidator(&m_timeoutValidator);
m_ui->keyFileLineEdit->setExpectedKind(Utils::PathChooser::File);
foreach(const MaemoDeviceConfigurations::DeviceConfig &devConf, m_devConfs)
m_ui->configListWidget->addItem(devConf.name);
}
......@@ -271,7 +272,7 @@ void MaemoSettingsWidget::display(const MaemoDeviceConfigurations::DeviceConfig
m_ui->timeoutLineEdit->setText(QString::number(devConfig.timeout));
m_ui->userLineEdit->setText(devConfig.uname);
m_ui->pwdLineEdit->setText(devConfig.pwd);
m_ui->keyFileLineEdit->setText(devConfig.keyFile);
m_ui->keyFileLineEdit->setPath(devConfig.keyFile);
m_ui->detailsWidget->setEnabled(true);
m_nameValidator.setName(devConfig.name);
m_portValidator.setValue(devConfig.port);
......@@ -360,7 +361,7 @@ void MaemoSettingsWidget::passwordEditingFinished()
void MaemoSettingsWidget::keyFileEditingFinished()
{
currentConfig().keyFile = m_ui->keyFileLineEdit->text();
currentConfig().keyFile = m_ui->keyFileLineEdit->path();
}
void MaemoSettingsWidget::selectionChanged()
......
......@@ -42,6 +42,13 @@
<item row="0" column="1">
<widget class="QLineEdit" name="nameLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Device type:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2">
......@@ -68,6 +75,39 @@
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Authentication type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QWidget" name="widget_3" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QRadioButton" name="passwordButton">
<property name="text">
<string>Password</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="keyButton">
<property name="text">
<string>Key</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
......@@ -122,46 +162,6 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Device type:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Authentication type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QWidget" name="widget_3" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QRadioButton" name="passwordButton">
<property name="text">
<string>Password</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="keyButton">
<property name="text">
<string>Key</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="keyLabel">
<property name="text">
......@@ -170,11 +170,7 @@
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="keyFileLineEdit">
<property name="echoMode">
<enum>QLineEdit::Normal</enum>
</property>
</widget>
<widget class="Utils::PathChooser" name="keyFileLineEdit" native="true"/>
</item>
</layout>
</widget>
......@@ -218,6 +214,17 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
<slots>
<signal>editingFinished()</signal>
</slots>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
......@@ -419,12 +426,12 @@
<slot>keyFileEditingFinished()</slot>
<hints>
<hint type="sourcelabel">
<x>208</x>
<y>332</y>
<x>268</x>
<y>337</y>
</hint>
<hint type="destinationlabel">
<x>424</x>
<y>41</y>
<x>257</x>
<y>185</y>
</hint>
</hints>
</connection>
......
Supports Markdown
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