blob: fd83dbeab830a8de3c262c46c90e62001ad47fb4 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#ifndef QQMLANDROIDLAYOUTPARAMS_P_H
#define QQMLANDROIDLAYOUTPARAMS_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qqmlandroidobject_p.h"
#include "qqmlandroidoptional_p.h"
#include <QtQml/qqml.h>
QT_BEGIN_NAMESPACE
class QQmlAndroidView;
class QQmlAndroidLayoutParams : public QQmlAndroidObject
{
Q_OBJECT
Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
Q_ENUMS(Size)
public:
explicit QQmlAndroidLayoutParams(QQmlAndroidView *view);
static QQmlAndroidLayoutParams *qmlAttachedProperties(QObject *object);
enum Size {
FILL_PARENT = -1,
MATCH_PARENT = -1,
WRAP_CONTENT = -2
};
int width() const;
void setWidth(int width);
int height() const;
void setHeight(int height);
public Q_SLOTS:
void invalidate();
Q_SIGNALS:
void widthChanged();
void heightChanged();
protected:
QAndroidJniObject onCreate() Q_DECL_OVERRIDE;
void onInflate(QAndroidJniObject &instance) Q_DECL_OVERRIDE;
bool event(QEvent *event) Q_DECL_OVERRIDE;
private:
bool m_dirty;
QQmlAndroidView *m_view;
QQmlAndroidOptional<int> m_width;
QQmlAndroidOptional<int> m_height;
};
QT_END_NAMESPACE
QML_DECLARE_TYPEINFO(QQmlAndroidLayoutParams, QML_HAS_ATTACHED_PROPERTIES)
#endif // QQMLANDROIDLAYOUTPARAMS_P_H
|