~uriboni/qtubuntu-camera/refactoring

« back to all changes in this revision

Viewing changes to src/aalviewfindersettingscontrol.h

  • Committer: Ugo Riboni
  • Date: 2016-03-21 14:17:28 UTC
  • Revision ID: ugo.riboni@canonical.com-20160321141728-b3ebn5y54fhr2sq2
Move AalViewfinderSettingsControl to use the session, and move a function from the service into it as it is the only client using it

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <QList>
22
22
#include <QSize>
23
23
 
24
 
class AalCameraService;
25
24
class AalCameraSession;
26
25
struct CameraControl;
27
26
struct CameraControlListener;
29
28
class AalViewfinderSettingsControl : public QCameraViewfinderSettingsControl
30
29
{
31
30
public:
32
 
    AalViewfinderSettingsControl(AalCameraService *service, AalCameraSession *session, QObject *parent = 0);
 
31
    AalViewfinderSettingsControl(AalCameraSession *session, QObject *parent = 0);
33
32
    ~AalViewfinderSettingsControl();
34
33
 
35
34
    bool isViewfinderParameterSupported(ViewfinderParameter parameter) const ;
49
48
private:
50
49
    void setSize(const QSize &size);
51
50
    QSize chooseOptimalSize(const QList<QSize> &sizes) const;
 
51
    QSize selectSizeWithAspectRatio(const QList<QSize> &sizes, float targetAspectRatio) const;
52
52
 
53
 
    AalCameraService *m_service;
54
53
    AalCameraSession *m_session;
55
54
    QSize m_currentSize;
56
55
    float m_aspectRatio;