2
* Copyright 2016 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#ifndef UCPAGEWRAPPER_P_H
18
#define UCPAGEWRAPPER_P_H
20
#include "ucpagetreenode_p.h"
23
class UCPageWrapperIncubator;
24
class UCPageWrapperPrivate : public UCPageTreeNodePrivate
26
Q_DECLARE_PUBLIC(UCPageWrapper)
29
UCPageWrapperPrivate ();
30
~UCPageWrapperPrivate ();
34
CustomVisible = LastPageTreeNodeFlag
38
Waiting, LoadingComponent, CreatingObject, NotifyPageLoaded, Ready, Error
45
QQuickItem *toItem (QObject *theObject);
46
void initItem (QQuickItem *theItem);
47
void copyProperties (QObject *target);
49
void createIncubator ();
50
void destroyIncubator ();
51
void onActiveChanged();
53
void setCanDestroy(bool canDestroy);
55
//state machine functions
57
void loadComponentState ();
58
void createObjectState ();
59
void initializeObjectIfReady ();
62
QVariant m_properties;
64
QQuickItem* m_parentPage;
65
QQuickItem* m_parentWrapper;
66
QQuickItem* m_pageHolder;
67
UCPageWrapperIncubator* m_incubator;
68
QQmlComponent *m_component;
69
QQmlContext *m_itemContext;
74
bool m_ownsComponent:1;
77
#endif // UCPAGEWRAPPER_P_H