~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/plugin/ucpagetreenode_p.h

  • Committer: CI Train Bot
  • Author(s): Christian Dywan, Zsombor Egri, Zoltán Balogh, Tim Peeters, Albert Astals Cid, Michael Sheldon, Benjamin Zeller
  • Date: 2015-12-17 17:13:49 UTC
  • mfrom: (1000.739.27 OTA9-landing-2015-12-16)
  • Revision ID: ci-train-bot@canonical.com-20151217171349-8xwclnhnx8v9oz4m
OTA9-landing-2015-12-16
Approved by: Zoltan Balogh

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2015 Canonical Ltd.
 
3
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 */
 
16
#ifndef UCPAGETREENODE_P_H
 
17
#define UCPAGETREENODE_P_H
 
18
 
 
19
#include "ucstyleditembase_p.h"
 
20
 
 
21
class UCPageTreeNode;
 
22
class UCPageTreeNodePrivate : public UCStyledItemBasePrivate
 
23
{
 
24
    Q_DECLARE_PUBLIC(UCPageTreeNode)
 
25
 
 
26
public:
 
27
    UCPageTreeNodePrivate ();
 
28
    void init ();
 
29
    void updatePageTree ();
 
30
    UCPageTreeNode *getParentPageTreeNode ();
 
31
 
 
32
    enum PropertyFlags {
 
33
        CustomPropagated = 0x01,
 
34
        CustomActive     = 0x02,
 
35
        CustomPageStack  = 0x04
 
36
    };
 
37
 
 
38
    struct Node {
 
39
        UCPageTreeNode *m_node = 0;
 
40
        QList<Node> m_children;
 
41
    };
 
42
 
 
43
    void _q_activeBinding (bool active);
 
44
    void _q_pageStackBinding (QQuickItem *pageStack);
 
45
    void _q_propagatedBinding (QObject *propagated);
 
46
    void updateParentLeafNode ();
 
47
    void dumpNodeTree ();
 
48
    void initActive();
 
49
    void initPageStack();
 
50
    void initPropagated();
 
51
 
 
52
private:
 
53
    void dumpNode(const Node &n, const QString &oldDepth = QString(), const QString &depth = QString(), bool isRoot = true);
 
54
 
 
55
public:
 
56
    UCPageTreeNode *m_parentNode;
 
57
    QQuickItem* m_activeLeafNode;
 
58
    QQuickItem* m_pageStack;
 
59
    QObject* m_propagated;
 
60
    QQuickItem* m_toolbar;
 
61
    qint8 m_flags;
 
62
    bool m_isLeaf:1;
 
63
    bool m_active:1;
 
64
};
 
65
 
 
66
#endif // UCPAGETREENODE_P_H
 
67