add,计划采集5:
实现部分计划采集功能:
This commit is contained in:
@ -81,6 +81,11 @@ void SingleLensReflexCameraWindow::onSelectDataFolder()
|
||||
QString::fromLocal8Bit("选择数据保存路径"),
|
||||
ui.dataFolderLineEdit->text());
|
||||
|
||||
setDataFolder(dir);
|
||||
}
|
||||
|
||||
void SingleLensReflexCameraWindow::setDataFolder(QString dir)
|
||||
{
|
||||
if (!dir.isEmpty())
|
||||
{
|
||||
ui.dataFolderLineEdit->setText(dir);
|
||||
@ -92,6 +97,11 @@ void SingleLensReflexCameraWindow::onSelectDataFolder()
|
||||
}
|
||||
}
|
||||
|
||||
void SingleLensReflexCameraWindow::setCaptureInterval(int captureIntervalSeconds)
|
||||
{
|
||||
m_SingleLensReflexCameraOperation->setCaptureInterval(captureIntervalSeconds);
|
||||
}
|
||||
|
||||
void SingleLensReflexCameraWindow::openSLRCamera()
|
||||
{
|
||||
if (!m_SingleLensReflexCameraOperation->getRecordStatus())
|
||||
@ -200,6 +210,7 @@ SingleLensReflexCameraOperation::SingleLensReflexCameraOperation()
|
||||
m_isSessionOpen = false;
|
||||
m_isLiveViewActive = false;
|
||||
m_imageCounter = 0;
|
||||
m_captureIntervalMilliseconds = 3000;
|
||||
|
||||
// 设置保存路径(从 AppSettings 获取,如果为空则使用默认的 CapturedImages 目录)
|
||||
m_savePath = AppSettings::instance().slrDataFolder();
|
||||
@ -780,13 +791,18 @@ void SingleLensReflexCameraOperation::takePhoto()
|
||||
// 启动拍照定时器(每3秒拍一张)
|
||||
if (m_captureTimer && !m_captureTimer->isActive())
|
||||
{
|
||||
m_captureTimer->start(3000);
|
||||
std::cout << "capture timer started (1 photo 3 second)" << std::endl;
|
||||
m_captureTimer->start(m_captureIntervalMilliseconds);
|
||||
//std::cout << "capture timer started (1 photo 3 second)" << std::endl;
|
||||
|
||||
emit CaptureStartedSignal();
|
||||
}
|
||||
}
|
||||
|
||||
void SingleLensReflexCameraOperation::setCaptureInterval(int captureIntervalSeconds)
|
||||
{
|
||||
m_captureIntervalMilliseconds = captureIntervalSeconds * 1000;
|
||||
}
|
||||
|
||||
void SingleLensReflexCameraOperation::stopTakePhoto()
|
||||
{
|
||||
if (m_captureTimer && m_captureTimer->isActive())
|
||||
|
||||
Reference in New Issue
Block a user