summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/camera/imagesettings.h
blob: 13bd6dc4a7b5b2adad09d269ce108e6f7dc2dd68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef IMAGESETTINGS_H
#define IMAGESETTINGS_H

#include <QDialog>

QT_BEGIN_NAMESPACE
class QComboBox;
class QImageCapture;
namespace Ui { class ImageSettingsUi; }
QT_END_NAMESPACE

class ImageSettings : public QDialog
{
    Q_OBJECT

public:
    explicit ImageSettings(QImageCapture *imageCapture, QWidget *parent = nullptr);
    ~ImageSettings();

    void applyImageSettings() const;

    QString format() const;
    void setFormat(const QString &format);

protected:
    void changeEvent(QEvent *e) override;

private:
    QVariant boxValue(const QComboBox *box) const;
    void selectComboBoxItem(QComboBox *box, const QVariant &value);

    Ui::ImageSettingsUi *ui;
    QImageCapture *imagecapture;
};

#endif // IMAGESETTINGS_H