~morphis/qtubuntu-camera/change-hybris-dependency

« back to all changes in this revision

Viewing changes to src/aalimagecapturecontrol.h

  • Committer: CI Train Bot
  • Date: 2015-12-10 15:29:37 UTC
  • mfrom: (153.1.2 qtubuntu-camera)
  • Revision ID: ci-train-bot@canonical.com-20151210152937-1fe6banpl9ju3yyw
Resync trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#define AALIMAGECAPTURECONTROL_H
19
19
 
20
20
#include <QCameraImageCaptureControl>
 
21
#include <QSettings>
21
22
#include <QString>
22
23
#include <QTemporaryFile>
23
24
#include <storagemanager.h>
52
53
 
53
54
    bool isCaptureRunning() const;
54
55
 
55
 
    /// Find the highest optimal aspect ratio resolution, which depends
56
 
    /// on the type of camera currently selected:
57
 
    float getAspectRatio() const;
58
 
 
59
56
public Q_SLOTS:
60
57
    void init(CameraControl *control, CameraControlListener *listener);
61
58
    void onPreviewReady();
64
61
    void shutter();
65
62
 
66
63
private:
67
 
    QSize chooseOptimalSize(const QList<QSize> &sizes, bool updateAspectRatio = true);
68
 
    float getScreenAspectRatio();
69
 
    void getPriorityAspectRatios();
70
64
    void saveJpeg(void* data, uint32_t dataSize);
71
65
    bool updateJpegMetadata(void* data, uint32_t dataSize, QTemporaryFile* destination);
72
66
 
76
70
    StorageManager m_storageManager;
77
71
    bool m_ready;
78
72
    QString m_pendingCaptureFile;
79
 
    int m_photoWidth;
80
 
    int m_photoHeight;
81
 
    float m_aspectRatio;
82
73
    float m_screenAspectRatio;
83
74
    /// Maintains a list of highest priority aspect ratio to lowest, for the
84
75
    /// currently selected camera
85
76
    QList<float> m_prioritizedAspectRatios;
86
77
    QString m_galleryPath;
87
78
    QMediaPlayer *m_audioPlayer;
 
79
    QSettings m_settings;
88
80
};
89
81
 
90
82
#endif