camera: Single/Double (QtMultimediaCamera)
This commit is contained in:
@@ -24,7 +24,7 @@ bool StillImageCamera::IsPreviewAvailable() {
|
||||
return !image.isNull();
|
||||
}
|
||||
|
||||
const std::string StillImageCameraFactory::getFilePath() {
|
||||
const std::string StillImageCameraFactory::GetFilePath() {
|
||||
QList<QByteArray> types = QImageReader::supportedImageFormats();
|
||||
QList<QString> temp_filters;
|
||||
for (QByteArray type : types) {
|
||||
@@ -32,7 +32,6 @@ const std::string StillImageCameraFactory::getFilePath() {
|
||||
}
|
||||
|
||||
QString filter = QObject::tr("Supported image files (%1)").arg(temp_filters.join(" "));
|
||||
|
||||
return QFileDialog::getOpenFileName(nullptr, QObject::tr("Open File"), ".", filter)
|
||||
.toStdString();
|
||||
}
|
||||
@@ -41,7 +40,7 @@ std::unique_ptr<CameraInterface> StillImageCameraFactory::Create(
|
||||
const std::string& config, const Service::CAM::Flip& flip) const {
|
||||
std::string real_config = config;
|
||||
if (config.empty()) {
|
||||
real_config = getFilePath();
|
||||
real_config = GetFilePath();
|
||||
}
|
||||
QImage image(QString::fromStdString(real_config));
|
||||
if (image.isNull()) {
|
||||
|
||||
Reference in New Issue
Block a user