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

Method Accept

Src/ParameterCompone/ParameterRecordUI.cpp:126–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126int CParameterRecordUI::Accept()
127{
128 m_pParameters->SetEnableVideo(ui->gbVideo->isChecked());
129 m_pParameters->SetEnableAudio(ui->gbAudio->isChecked());
130 m_pParameters->SetVideoPath(ui->leFolder->text());
131 QString szFile = m_pParameters->GetVideoPath()
132 + QDir::separator()
133 + QDateTime::currentDateTime().toLocalTime()
134 .toString("yyyy_MM_dd_hh_mm_ss_zzz");
135 m_pParameters->SetImageFile(szFile + ".png");
136 m_pParameters->SetVideoFile(szFile);
137#if HAVE_QT6_MULTIMEDIA
138 int nData = ui->cmbFileFormat->currentData().toInt();
139 m_pParameters->SetFileFormat((QMediaFormat::FileFormat)nData);
140
141 nData = ui->cmbVideoEncode->currentData().toInt();
142 m_pParameters->SetVideoCodec((QMediaFormat::VideoCodec)nData);
143
144 nData = ui->cmbAudioEncode->currentData().toInt();
145 m_pParameters->SetAudioCodec((QMediaFormat::AudioCodec)nData);
146
147 nData = ui->cmbQuality->currentData().toInt();
148 m_pParameters->SetQuality((QMediaRecorder::Quality)nData);
149
150 nData = ui->cmbEncodingMode->currentData().toInt();
151 m_pParameters->SetEncodingMode((QMediaRecorder::EncodingMode)nData);
152#endif
153 m_pParameters->SetVideoFrameRate(ui->dsbFrameRate->value());
154 m_pParameters->SetAudioSampleRate(ui->sbSampleRate->value());
155
156 if(ui->rbNoAction->isChecked())
157 m_pParameters->SetEndAction(CParameterRecord::ENDACTION::No);
158 else if(ui->rbOpenFile->isChecked())
159 m_pParameters->SetEndAction(CParameterRecord::ENDACTION::OpenFile);
160 else if(ui->rbOpenFolder->isChecked())
161 m_pParameters->SetEndAction(CParameterRecord::ENDACTION::OpenFolder);
162 return 0;
163}
164
165void CParameterRecordUI::on_pbFolder_clicked()
166{

Callers

nothing calls this directly

Calls 14

SetEnableVideoMethod · 0.80
SetEnableAudioMethod · 0.80
SetVideoPathMethod · 0.80
GetVideoPathMethod · 0.80
SetImageFileMethod · 0.80
SetVideoFileMethod · 0.80
SetFileFormatMethod · 0.80
SetVideoCodecMethod · 0.80
SetAudioCodecMethod · 0.80
SetQualityMethod · 0.80
SetEncodingModeMethod · 0.80
SetVideoFrameRateMethod · 0.80

Tested by

no test coverage detected