3 @author: Sudheer K. <scifi1947 at gmail.com>
4 @license: GNU General Public License
6 Based on Nokia Qt Quick Demos with copyright notice below.
8 Source: http://doc.qt.nokia.com/4.7-snapshot/demos-declarative-twitter-twittercore-titlebar-qml.html
11 /****************************************************************************
13 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
14 ** All rights reserved.
15 ** Contact: Nokia Corporation (qt-info@nokia.com)
17 ** This file is part of the QtDeclarative module of the Qt Toolkit.
19 ** $QT_BEGIN_LICENSE:LGPL$
20 ** No Commercial Usage
21 ** This file contains pre-release code and may not be distributed.
22 ** You may use this file in accordance with the terms and conditions
23 ** contained in the Technology Preview License Agreement accompanying
26 ** GNU Lesser General Public License Usage
27 ** Alternatively, this file may be used under the terms of the GNU Lesser
28 ** General Public License version 2.1 as published by the Free Software
29 ** Foundation and appearing in the file LICENSE.LGPL included in the
30 ** packaging of this file. Please review the following information to
31 ** ensure the GNU Lesser General Public License version 2.1 requirements
32 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
34 ** In addition, as a special exception, Nokia gives you certain additional
35 ** rights. These rights are described in the Nokia Qt LGPL Exception
36 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
38 ** If you have questions regarding the use of this file, please contact
39 ** Nokia at qt-info@nokia.com.
50 ****************************************************************************/
56 property string title: "Markets Today"
57 property string buttonType: "Config"
58 signal settingsClicked
62 BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
66 width: parent.width; height: parent.height
71 leftMargin: 5; rightMargin: 10
72 verticalCenter: parent.verticalCenter
73 horizontalCenter: parent.horizontalCenter
75 elide: Text.ElideMiddle
77 font.bold: true; color: "White"; style: Text.Raised; styleColor: "Black"
90 source: "images/config.png"
92 anchors.centerIn: parent
96 id: configButtonMouseArea
99 titleBar.settingsClicked();
104 name: "pressed"; when: configButtonMouseArea.pressed
105 PropertyChanges { target: configButtonArea; color: "#9a9a9a"}
119 source: "images/close.png"
120 width: 32; height: 32
121 anchors.centerIn: parent
125 id: closeButtonMouseArea
127 onClicked: titleBar.closeClicked();
131 name: "pressed"; when: closeButtonMouseArea.pressed
132 PropertyChanges { target: closeButtonArea; color: "#9a9a9a"}
146 source: "images/back.png"
147 width: 32; height: 32
148 anchors.centerIn: parent
151 id: backButtonMouseArea
153 onClicked: titleBar.backClicked();
157 name: "pressed"; when: backButtonMouseArea.pressed
158 PropertyChanges { target: backButtonArea; color: "#9a9a9a"}
165 height: parent.height
166 anchors.right: parent.right
167 sourceComponent: buttonType == "Config" ? configButton : (buttonType == "Close"? closeButton: backButton)