2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-09-28 12:49:55 +02:00
|
|
|
**
|
2013-01-28 17:12:19 +01:00
|
|
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2011-09-28 12:49:55 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-09-28 12:49:55 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2011-09-28 12:49:55 +02:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2011-09-28 12:49:55 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2011-09-28 12:49:55 +02:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-09-28 12:49:55 +02:00
|
|
|
|
2011-11-23 12:25:32 +01:00
|
|
|
import QtQuick 1.0
|
2012-03-15 11:45:05 +01:00
|
|
|
import widgets 1.0
|
2011-09-28 12:49:55 +02:00
|
|
|
|
2011-11-23 12:25:32 +01:00
|
|
|
Rectangle {
|
|
|
|
|
id: rectangle1
|
|
|
|
|
width: 1024
|
2012-12-12 11:11:46 +01:00
|
|
|
height: Math.min(3024, parent.height - y)
|
2011-11-23 12:25:32 +01:00
|
|
|
|
|
|
|
|
PageCaption {
|
|
|
|
|
id: pageCaption
|
|
|
|
|
|
|
|
|
|
x: 32
|
|
|
|
|
y: 8
|
|
|
|
|
|
|
|
|
|
anchors.rightMargin: 16
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
|
|
|
|
caption: qsTr("Examples")
|
|
|
|
|
}
|
|
|
|
|
|
2011-12-06 15:57:16 +01:00
|
|
|
CustomizedGridView {
|
2011-11-23 12:25:32 +01:00
|
|
|
anchors.rightMargin: 38
|
|
|
|
|
anchors.bottomMargin: 60
|
|
|
|
|
anchors.leftMargin: 38
|
|
|
|
|
anchors.topMargin: 102
|
2011-09-28 12:49:55 +02:00
|
|
|
anchors.fill: parent
|
2011-11-23 12:25:32 +01:00
|
|
|
|
2011-12-06 15:57:16 +01:00
|
|
|
model: examplesModel
|
2011-11-23 12:25:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SearchBar {
|
|
|
|
|
id: searchBar
|
|
|
|
|
|
|
|
|
|
y: 60
|
|
|
|
|
|
2013-06-11 11:51:42 +02:00
|
|
|
anchors.right: comboBox.left
|
|
|
|
|
anchors.rightMargin: 20
|
2011-11-23 12:25:32 +01:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.leftMargin: 60
|
|
|
|
|
|
|
|
|
|
placeholderText: qsTr("Search in Examples...")
|
|
|
|
|
onTextChanged: examplesModel.parseSearchString(text)
|
|
|
|
|
}
|
|
|
|
|
|
2013-02-04 10:28:16 +01:00
|
|
|
ComboBox {
|
|
|
|
|
id: comboBox
|
|
|
|
|
|
|
|
|
|
anchors.verticalCenter: searchBar.verticalCenter
|
|
|
|
|
|
2013-06-11 11:51:42 +02:00
|
|
|
width: 200
|
2013-02-04 10:28:16 +01:00
|
|
|
anchors.rightMargin: 80
|
|
|
|
|
anchors.right: parent.right
|
2013-03-04 17:15:09 +01:00
|
|
|
model: qtVersionModel
|
2013-02-04 10:28:16 +01:00
|
|
|
|
|
|
|
|
onCurrentIndexChanged: {
|
|
|
|
|
if (comboBox.model === undefined)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
examplesModel.filterForQtById(comboBox.model.getId(currentIndex))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
property int qtIndex: examplesModel.qtVersionIndex
|
|
|
|
|
|
|
|
|
|
onQtIndexChanged: {
|
|
|
|
|
if (comboBox.model === undefined)
|
|
|
|
|
return;
|
|
|
|
|
if (qtIndex != currentIndex)
|
|
|
|
|
currentIndex = qtIndex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-09-28 12:49:55 +02:00
|
|
|
}
|