PathChooser: Introduce read-only mode.

In that mode the lineedit is readonly and the browse button is
disabled. To be used in the new targetsetuppage
This commit is contained in:
dt
2011-02-21 12:45:21 +01:00
parent 7edd89ba85
commit aa66684b62
2 changed files with 15 additions and 0 deletions

View File

@@ -315,6 +315,17 @@ void PathChooser::setPath(const QString &path)
m_d->m_lineEdit->setText(QDir::toNativeSeparators(path));
}
bool PathChooser::isReadOnly() const
{
return m_d->m_lineEdit->isReadOnly();
}
void PathChooser::setReadOnly(bool b)
{
m_d->m_lineEdit->setReadOnly(b);
m_d->m_button->setEnabled(!b);
}
void PathChooser::slotBrowse()
{
emit beforeBrowsing();