Merged trunk into 0.3 branch: rev1067 to rev1077

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1179 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2011-03-01 23:26:31 +00:00
parent 87da5daed1
commit 287e458f4b
3 changed files with 19 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ ConductorPropertiesWidget::ConductorPropertiesWidget(const ConductorProperties &
/// construit l'interface du widget
void ConductorPropertiesWidget::buildInterface() {
setFocusPolicy(Qt::StrongFocus);
setMinimumSize(380, 350);
QVBoxLayout *main_layout = new QVBoxLayout(this);
@@ -291,3 +292,17 @@ void ConductorPropertiesWidget::setReadOnly(bool ro) {
color_button -> setDisabled(ro);
dashed_checkbox -> setDisabled(ro);
}
/**
Gere le focus de ce widget
*/
void ConductorPropertiesWidget::focusInEvent(QFocusEvent *event) {
if (properties_.type == ConductorProperties::Multi) {
text_field -> setFocus(Qt::ActiveWindowFocusReason);
text_field -> selectAll();
} else if (properties_.type == ConductorProperties::Single) {
phase_spinbox -> setFocus(Qt::ActiveWindowFocusReason);
phase_spinbox -> selectAll();
}
QWidget::focusInEvent(event);
}