2014-06-04 18:23:07 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:58:39 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2014-06-04 18:23:07 +02:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** 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
|
2016-01-15 14:58:39 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2014-06-04 18:23:07 +02:00
|
|
|
**
|
2016-01-15 14:58:39 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2014-06-04 18:23:07 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
import QtQuick 2.1
|
|
|
|
|
import QtQuick.Controls 1.0
|
|
|
|
|
import QtQuick.Layouts 1.0
|
|
|
|
|
import QtQuick.Controls.Styles 1.2
|
|
|
|
|
|
2016-12-13 11:44:49 +01:00
|
|
|
import TimelineTheme 1.0
|
|
|
|
|
|
2014-06-04 18:23:07 +02:00
|
|
|
ToolBar {
|
|
|
|
|
id: buttons
|
|
|
|
|
|
|
|
|
|
signal jumpToPrev()
|
|
|
|
|
signal jumpToNext()
|
|
|
|
|
signal zoomControlChanged()
|
|
|
|
|
signal rangeSelectChanged()
|
|
|
|
|
signal lockChanged()
|
|
|
|
|
|
|
|
|
|
function updateLockButton(locked) {
|
|
|
|
|
lockButton.checked = !locked;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function lockButtonChecked() {
|
|
|
|
|
return lockButton.checked;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateRangeButton(rangeMode) {
|
|
|
|
|
rangeButton.checked = rangeMode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function rangeButtonChecked() {
|
|
|
|
|
return rangeButton.checked
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
style: ToolBarStyle {
|
|
|
|
|
padding {
|
|
|
|
|
left: 0
|
|
|
|
|
right: 0
|
|
|
|
|
top: 0
|
|
|
|
|
bottom: 0
|
|
|
|
|
}
|
|
|
|
|
background: Rectangle {
|
|
|
|
|
anchors.fill: parent
|
2016-12-13 11:44:49 +01:00
|
|
|
color: Theme.color(Theme.PanelStatusBarBackgroundColor)
|
2014-06-04 18:23:07 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
spacing: 0
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
ImageToolButton {
|
2014-06-04 18:23:07 +02:00
|
|
|
id: jumpToPrevButton
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
imageSource: "image://icons/prev"
|
2014-06-04 18:23:07 +02:00
|
|
|
tooltip: qsTr("Jump to previous event.")
|
|
|
|
|
onClicked: buttons.jumpToPrev()
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
ImageToolButton {
|
2014-06-04 18:23:07 +02:00
|
|
|
id: jumpToNextButton
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
imageSource: "image://icons/next"
|
2014-06-04 18:23:07 +02:00
|
|
|
tooltip: qsTr("Jump to next event.")
|
|
|
|
|
onClicked: buttons.jumpToNext()
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
ImageToolButton {
|
2014-06-04 18:23:07 +02:00
|
|
|
id: zoomControlButton
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
imageSource: "image://icons/zoom"
|
2014-06-04 18:23:07 +02:00
|
|
|
tooltip: qsTr("Show zoom slider.")
|
|
|
|
|
checkable: true
|
|
|
|
|
checked: false
|
|
|
|
|
onCheckedChanged: buttons.zoomControlChanged()
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
ImageToolButton {
|
2014-06-04 18:23:07 +02:00
|
|
|
id: rangeButton
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
imageSource: "image://icons/" + (checked ? "rangeselected" : "rangeselection");
|
2014-06-04 18:23:07 +02:00
|
|
|
tooltip: qsTr("Select range.")
|
|
|
|
|
checkable: true
|
|
|
|
|
checked: false
|
|
|
|
|
onCheckedChanged: buttons.rangeSelectChanged()
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
ImageToolButton {
|
2014-06-04 18:23:07 +02:00
|
|
|
id: lockButton
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
|
2016-06-17 16:21:04 +02:00
|
|
|
imageSource: "image://icons/selectionmode"
|
2014-06-04 18:23:07 +02:00
|
|
|
tooltip: qsTr("View event information on mouseover.")
|
|
|
|
|
checkable: true
|
|
|
|
|
checked: false
|
|
|
|
|
onCheckedChanged: buttons.lockChanged()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|