~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to src/qtsplitterbase.h

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2014-03-24 15:52:37 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140324155237-3kod0m3wr2a2ag39
Tags: 1.0.1-0ubuntu1
* New upstream release (LP: #1294936).
* Modify display mode of weather forecast and system settings.
* Add file manager and font style settings.
* Improve system settings and restoring default settings.
* Cache user account (not password).
* Change the position of window control buttons.
* Add configuration for Kingsoft KuaiPan cloud client.
* Add the instruction of Youker Assistant.
* Open related folders when scanning items got double-clicked.
* Notify users when operating the Kingsoft disk cloud configuration.
* Modify Dbus starting method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
**
3
 
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4
 
** All rights reserved.
5
 
** Contact: Nokia Corporation (qt-info@nokia.com)
6
 
**
7
 
** This file is part of the Qt Components project on Qt Labs.
8
 
**
9
 
** No Commercial Usage
10
 
** This file contains pre-release code and may not be distributed.
11
 
** You may use this file in accordance with the terms and conditions contained
12
 
** in the Technology Preview License Agreement accompanying this package.
13
 
**
14
 
** GNU Lesser General Public License Usage
15
 
** Alternatively, this file may be used under the terms of the GNU Lesser
16
 
** General Public License version 2.1 as published by the Free Software
17
 
** Foundation and appearing in the file LICENSE.LGPL included in the
18
 
** packaging of this file.  Please review the following information to
19
 
** ensure the GNU Lesser General Public License version 2.1 requirements
20
 
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
21
 
**
22
 
** If you have questions regarding the use of this file, please contact
23
 
** Nokia at qt-info@nokia.com.
24
 
**
25
 
****************************************************************************/
26
 
 
27
 
#ifndef QTSPLITTERBASE_H
28
 
#define QTSPLITTERBASE_H
29
 
 
30
 
#include <QtDeclarative>
31
 
 
32
 
 
33
 
class QtSplitterAttached : public QObject
34
 
{
35
 
    Q_OBJECT
36
 
    Q_PROPERTY(qreal minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged)
37
 
    Q_PROPERTY(qreal maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged)
38
 
    Q_PROPERTY(qreal minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged)
39
 
    Q_PROPERTY(qreal maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged)
40
 
    Q_PROPERTY(qreal percentageSize READ percentageSize WRITE setPercentageSize NOTIFY percentageWidthSize)
41
 
    Q_PROPERTY(bool expanding READ expanding WRITE setExpanding NOTIFY expandingChanged)
42
 
    Q_PROPERTY(int itemIndex READ itemIndex WRITE setItemIndex NOTIFY itemIndexChanged)
43
 
 
44
 
public:
45
 
    explicit QtSplitterAttached(QObject *object);
46
 
 
47
 
    qreal minimumWidth() const { return m_minimumWidth; }
48
 
    void setMinimumWidth(qreal width);
49
 
 
50
 
    qreal maximumWidth() const { return m_maximumWidth; }
51
 
    void setMaximumWidth(qreal width);
52
 
 
53
 
    qreal minimumHeight() const { return m_minimumHeight; }
54
 
    void setMinimumHeight(qreal width);
55
 
 
56
 
    qreal maximumHeight() const { return m_maximumHeight; }
57
 
    void setMaximumHeight(qreal width);
58
 
 
59
 
    bool expanding() const { return m_expanding; }
60
 
    void setExpanding(bool expanding);
61
 
 
62
 
    qreal percentageSize() const { return m_percentageSize; }
63
 
 
64
 
    int itemIndex() const { return m_itemIndex; }
65
 
 
66
 
    void setPercentageSize(qreal arg) { m_percentageSize = arg; }
67
 
    void setItemIndex(int arg) {
68
 
        if (m_itemIndex != arg) {
69
 
            m_itemIndex = arg;
70
 
            emit itemIndexChanged(arg);
71
 
        }
72
 
    }
73
 
 
74
 
signals:
75
 
    void minimumWidthChanged(qreal arg);
76
 
    void maximumWidthChanged(qreal arg);
77
 
    void minimumHeightChanged(qreal arg);
78
 
    void maximumHeightChanged(qreal arg);
79
 
    void expandingChanged(bool arg);
80
 
    void percentageWidthSize(qreal arg);
81
 
    void itemIndexChanged(int arg);
82
 
 
83
 
private:
84
 
    qreal m_minimumWidth;
85
 
    qreal m_maximumWidth;
86
 
    qreal m_minimumHeight;
87
 
    qreal m_maximumHeight;
88
 
    qreal m_percentageSize;
89
 
    int m_itemIndex;
90
 
    bool m_expanding;
91
 
 
92
 
    friend class QtSplitterBase;
93
 
};
94
 
 
95
 
 
96
 
class QtSplitterBase : public QDeclarativeItem
97
 
{
98
 
    Q_OBJECT
99
 
public:
100
 
    explicit QtSplitterBase(QDeclarativeItem *parent = 0);
101
 
    ~QtSplitterBase() {}
102
 
 
103
 
    static QtSplitterAttached *qmlAttachedProperties(QObject *object);
104
 
};
105
 
 
106
 
QML_DECLARE_TYPEINFO(QtSplitterBase, QML_HAS_ATTACHED_PROPERTIES)
107
 
 
108
 
#endif // QTSPLITTERBASE_H