1 //=============================================================================
2 //  MuseScore
3 //  Music Composition & Notation
4 //
5 //  Copyright (C) 2011 Werner Schweer and others
6 //
7 //  This program is free software; you can redistribute it and/or modify
8 //  it under the terms of the GNU General Public License version 2
9 //  as published by the Free Software Foundation and appearing in
10 //  the file LICENSE.GPL
11 //=============================================================================
12 
13 #ifndef __INSPECTOR_IMAGE_H__
14 #define __INSPECTOR_IMAGE_H__
15 
16 #include "inspector.h"
17 #include "ui_inspector_image.h"
18 #include "libmscore/property.h"
19 
20 namespace Ms {
21 
22 //---------------------------------------------------------
23 //   InspectorImage
24 //---------------------------------------------------------
25 
26 class InspectorImage : public InspectorElementBase {
27       Q_OBJECT
28 
29       Ui::InspectorImage b;
30       qreal _aspectRatio; // used for widthChanged/heightChanged
31 
32       virtual void postInit();
33 
34    protected slots:
35       virtual void valueChanged(int idx) override;
36       void lockAspectRatioClicked(bool checked);
37       void widthChanged(qreal val);
38       void heightChanged(qreal val);
39 
40    public:
41       InspectorImage(QWidget* parent);
42 
43    protected:
44       void updateAspectRatio();
45       };
46 
47 
48 } // namespace Ms
49 #endif
50 
51