| 437 | } |
| 438 | |
| 439 | void QmitkPipInstallDialog::SetDetailsVisible(bool show) |
| 440 | { |
| 441 | // When the details view is visible, it should consume the extra vertical |
| 442 | // space; the spacer becomes Fixed(0, 0). When the details view is hidden, |
| 443 | // the spacer takes over and pushes the button row to the bottom. |
| 444 | m_Ui->verticalSpacer->changeSize( |
| 445 | 0, 0, QSizePolicy::Minimum, show ? QSizePolicy::Fixed : QSizePolicy::Expanding); |
| 446 | m_Ui->mainLayout->invalidate(); |
| 447 | |
| 448 | m_Ui->detailsView->setVisible(show); |
| 449 | m_Ui->detailsButton->setText(show ? "Hide details" : "Show details"); |
| 450 | |
| 451 | this->setFixedHeight(show ? m_ExpandedHeight : m_CompactHeight); |
| 452 | } |
no test coverage detected