diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-09-30 17:06:27 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-01 09:03:34 +0000 |
commit | 98e7b3cca484df43838fe834dcaf1f97f45c659f (patch) | |
tree | e82c39559cd26e98382964d18651b5f62cfdfae7 /examples/labs/calendar/TumblerDelegate.qml | |
parent | 542dd7b77a236fef03e5569e44669fad6db0485d (diff) |
Rename QtQuick.Calendar 2.0 to Qt.labs.calendar 1.0
Change-Id: Ief7e28f6c595cb60f15a4960dada24a6c2f5ca3e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'examples/labs/calendar/TumblerDelegate.qml')
-rw-r--r-- | examples/labs/calendar/TumblerDelegate.qml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/examples/labs/calendar/TumblerDelegate.qml b/examples/labs/calendar/TumblerDelegate.qml new file mode 100644 index 00000000..e9c7a143 --- /dev/null +++ b/examples/labs/calendar/TumblerDelegate.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.6 +import QtQuick.Controls 2.0 +import QtQuick.Templates 2.0 as T + +Text { + text: isNaN(modelData) ? modelData : modelData + 1 + color: "#666666" + opacity: 0.4 + Math.max(0, 1 - Math.abs(T.Tumbler.displacement)) * 0.6 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + + Behavior on font.pixelSize { + NumberAnimation {} + } +} |