| 449 | } |
| 450 | |
| 451 | int COperateDesktop::SetParameter(CParameterBase *p) |
| 452 | { |
| 453 | Q_ASSERT(!m_pPara); |
| 454 | m_pPara = p; |
| 455 | if(GetParameter()) |
| 456 | { |
| 457 | bool check = false; |
| 458 | check = connect(GetParameter(), SIGNAL(sigNameChanged()), |
| 459 | this, SLOT(slotUpdateName())); |
| 460 | Q_ASSERT(check); |
| 461 | check = connect(GetParameter(), SIGNAL(sigShowServerNameChanged()), |
| 462 | this, SLOT(slotUpdateName())); |
| 463 | Q_ASSERT(check); |
| 464 | check = connect(GetParameter(), &CParameter::sigChanged, |
| 465 | this, [&](){ |
| 466 | emit this->sigUpdateParameters(this); |
| 467 | }); |
| 468 | Q_ASSERT(check); |
| 469 | CFrmViewer* pViewer = m_pFrmViewer; |
| 470 | if(pViewer) { |
| 471 | check = connect(GetParameter(), SIGNAL(sigZoomFactorChanged(double)), |
| 472 | pViewer, SLOT(slotSetZoomFactor(double))); |
| 473 | Q_ASSERT(check); |
| 474 | check = connect( |
| 475 | GetParameter(), |
| 476 | SIGNAL(sigAdaptWindowsChanged(CFrmViewer::ADAPT_WINDOWS)), |
| 477 | pViewer, SLOT(slotSetAdaptWindows(CFrmViewer::ADAPT_WINDOWS))); |
| 478 | Q_ASSERT(check); |
| 479 | check = connect(GetParameter(), SIGNAL(sigEnableInputMethod(bool)), |
| 480 | pViewer, SLOT(slotEnableInputMethod(bool))); |
| 481 | Q_ASSERT(check); |
| 482 | } |
| 483 | } |
| 484 | return 0; |
| 485 | } |
| 486 | |
| 487 | int COperateDesktop::LoadAdaptWindows() |
| 488 | { |
no outgoing calls
no test coverage detected