forked from qt-creator/qt-creator
Timeline: Remove filtering of models.
This is better done in a central place, where it applies to all views connected to the relevant models. Change-Id: I33ce2c48de6ca3cf37b10a9a9cb7ecac15c3d5bd Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -36,12 +36,11 @@ import QtQuick.Controls.Styles 1.2
|
|||||||
|
|
||||||
ToolBar {
|
ToolBar {
|
||||||
id: buttons
|
id: buttons
|
||||||
readonly property int buttonWidth: 25
|
readonly property int buttonWidth: 30
|
||||||
|
|
||||||
signal jumpToPrev()
|
signal jumpToPrev()
|
||||||
signal jumpToNext()
|
signal jumpToNext()
|
||||||
signal zoomControlChanged()
|
signal zoomControlChanged()
|
||||||
signal filterMenuChanged()
|
|
||||||
signal rangeSelectChanged()
|
signal rangeSelectChanged()
|
||||||
signal lockChanged()
|
signal lockChanged()
|
||||||
|
|
||||||
@@ -113,18 +112,6 @@ ToolBar {
|
|||||||
onCheckedChanged: buttons.zoomControlChanged()
|
onCheckedChanged: buttons.zoomControlChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
|
||||||
id: filterButton
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
implicitWidth: buttonWidth
|
|
||||||
|
|
||||||
iconSource: "qrc:/timeline/ico_filter.png"
|
|
||||||
tooltip: qsTr("Filter Categories")
|
|
||||||
checkable: true
|
|
||||||
onCheckedChanged: buttons.filterMenuChanged()
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
id: rangeButton
|
id: rangeButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
@@ -183,7 +183,6 @@ Rectangle {
|
|||||||
width: 150
|
width: 150
|
||||||
height: 24
|
height: 24
|
||||||
onZoomControlChanged: zoomSliderToolBar.visible = !zoomSliderToolBar.visible
|
onZoomControlChanged: zoomSliderToolBar.visible = !zoomSliderToolBar.visible
|
||||||
onFilterMenuChanged: filterMenu.visible = !filterMenu.visible
|
|
||||||
onJumpToNext: {
|
onJumpToNext: {
|
||||||
var next = timelineModelAggregator.nextItem(root.selectedModel, root.selectedItem,
|
var next = timelineModelAggregator.nextItem(root.selectedModel, root.selectedItem,
|
||||||
zoomControl.rangeStart);
|
zoomControl.rangeStart);
|
||||||
@@ -370,48 +369,6 @@ Rectangle {
|
|||||||
color: "#B0B0B0"
|
color: "#B0B0B0"
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: filterMenu
|
|
||||||
color: "#9b9b9b"
|
|
||||||
enabled: buttonsBar.enabled
|
|
||||||
visible: false
|
|
||||||
width: buttonsBar.width
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: buttonsBar.bottom
|
|
||||||
height: timelineModelAggregator.models.length * buttonsBar.height
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
id: filterMenuInner
|
|
||||||
model: timelineModelAggregator.models
|
|
||||||
CheckBox {
|
|
||||||
anchors.left: filterMenu.left
|
|
||||||
anchors.right: filterMenu.right
|
|
||||||
height: buttonsBar.height
|
|
||||||
y: index * height
|
|
||||||
enabled: !modelData.empty
|
|
||||||
checked: true
|
|
||||||
onCheckedChanged: modelData.hidden = !checked
|
|
||||||
|
|
||||||
style: CheckBoxStyle {
|
|
||||||
label: Text {
|
|
||||||
width: filterMenu.width - implicitHeight * 1.5
|
|
||||||
color: control.enabled ? "black" : "#808080"
|
|
||||||
text: modelData.displayName
|
|
||||||
textFormat: Text.PlainText
|
|
||||||
elide: Text.ElideRight
|
|
||||||
renderType: Text.NativeRendering
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: modelData
|
|
||||||
onEmptyChanged: checked = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: zoomSliderToolBar
|
id: zoomSliderToolBar
|
||||||
objectName: "zoomSliderToolBar"
|
objectName: "zoomSliderToolBar"
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 335 B |
@@ -25,7 +25,6 @@
|
|||||||
<file>ico_rangeselected.png</file>
|
<file>ico_rangeselected.png</file>
|
||||||
<file>ico_note.png</file>
|
<file>ico_note.png</file>
|
||||||
<file>ButtonsBar.qml</file>
|
<file>ButtonsBar.qml</file>
|
||||||
<file>ico_filter.png</file>
|
|
||||||
<file>timelineitems.vert</file>
|
<file>timelineitems.vert</file>
|
||||||
<file>timelineitems.frag</file>
|
<file>timelineitems.frag</file>
|
||||||
<file>notes.vert</file>
|
<file>notes.vert</file>
|
||||||
|
Reference in New Issue
Block a user