MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / SetParameter

Method SetParameter

Src/ParameterCompone/ParameterRecordUI.cpp:78–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78int CParameterRecordUI::SetParameter(CParameter *pParameter)
79{
80 m_pParameters = qobject_cast<CParameterRecord*>(pParameter);
81 if(!m_pParameters)
82 return 1;
83 ui->gbVideo->setChecked(m_pParameters->GetEnableVideo());
84 ui->gbAudio->setChecked(m_pParameters->GetEnableAudio());
85 ui->leFolder->setText(m_pParameters->GetVideoPath());
86#if HAVE_QT6_MULTIMEDIA
87 int nIndex = -1;
88 nIndex = ui->cmbFileFormat->findData((int)m_pParameters->GetFileFormat());
89 if(-1 < nIndex)
90 ui->cmbFileFormat->setCurrentIndex(nIndex);
91
92 nIndex = ui->cmbVideoEncode->findData((int)m_pParameters->GetVideoCodec());
93 if(-1 < nIndex)
94 ui->cmbVideoEncode->setCurrentIndex(nIndex);
95
96 nIndex = ui->cmbAudioEncode->findData((int)m_pParameters->GetAudioCodec());
97 if(-1 < nIndex)
98 ui->cmbAudioEncode->setCurrentIndex(nIndex);
99
100 nIndex = ui->cmbQuality->findData((int)m_pParameters->GetQuality());
101 if(-1 < nIndex)
102 ui->cmbQuality->setCurrentIndex(nIndex);
103
104 nIndex = ui->cmbEncodingMode->findData((int)m_pParameters->GetEncodingMode());
105 if(-1 < nIndex)
106 ui->cmbEncodingMode->setCurrentIndex(nIndex);
107#endif
108 ui->dsbFrameRate->setValue(m_pParameters->GetVideoFrameRate());
109 ui->sbSampleRate->setValue(m_pParameters->GetAudioSampleRate());
110
111 switch(m_pParameters->GetEndAction()) {
112 case CParameterRecord::ENDACTION::No:
113 ui->rbNoAction->setChecked(true);
114 break;
115 case CParameterRecord::ENDACTION::OpenFile:
116 ui->rbOpenFile->setChecked(true);
117 break;
118 case CParameterRecord::ENDACTION::OpenFolder:
119 ui->rbOpenFolder->setChecked(true);
120 break;
121 }
122
123 return 0;
124}
125
126int CParameterRecordUI::Accept()
127{

Callers

nothing calls this directly

Calls 11

GetEnableVideoMethod · 0.80
GetEnableAudioMethod · 0.80
GetVideoPathMethod · 0.80
GetFileFormatMethod · 0.80
GetVideoCodecMethod · 0.80
GetAudioCodecMethod · 0.80
GetQualityMethod · 0.80
GetEncodingModeMethod · 0.80
GetVideoFrameRateMethod · 0.80
GetAudioSampleRateMethod · 0.80
GetEndActionMethod · 0.80

Tested by

no test coverage detected