starting song editor

This commit is contained in:
Chris Cochrun 2022-02-10 12:44:23 -06:00
parent 3bd74d1ca6
commit f374115513
4 changed files with 183 additions and 90 deletions

View file

@ -9,20 +9,31 @@ import org.kde.kirigami 2.13 as Kirigami
ColumnLayout { ColumnLayout {
id: root id: root
Layout.fillHeight: true
Rectangle {
id: headerBackground
color: Kirigami.Theme.backgroundColor
height: 40
opacity: 1.0
Layout.fillWidth: true
Kirigami.Heading { Kirigami.Heading {
id: serviceTitle id: serviceTitle
text: "Service List" text: "Service List"
level: 1 anchors.centerIn: headerBackground
Layout.alignment: Qt.AlignHCenter padding: 5
level: 3
}
} }
ListView { ListView {
id: serviceItemList id: serviceItemList
Layout.fillWidth: true
Layout.fillHeight: true
model: listModel model: listModel
delegate: itemDelegate delegate: itemDelegate
/* flickDeceleration: 2000 */ clip: true
spacing: 2
Component { Component {
id: itemDelegate id: itemDelegate
@ -49,8 +60,6 @@ ColumnLayout {
anchors.leftMargin: 10 anchors.leftMargin: 10
active: hovered || pressed active: hovered || pressed
} }
}
ListModel { ListModel {
id: listModel id: listModel
ListElement { ListElement {
@ -126,4 +135,6 @@ ColumnLayout {
type: "video" type: "video"
} }
} }
}
} }

View file

@ -16,7 +16,6 @@ Controls.Page {
Item { Item {
id: mainItem id: mainItem
anchors.fill: parent anchors.fill: parent
height: parent.height
Controls.SplitView { Controls.SplitView {
id: splitMainView id: splitMainView
@ -40,9 +39,8 @@ Controls.Page {
Controls.SplitView.preferredWidth: 200 Controls.SplitView.preferredWidth: 200
} }
Rectangle { Presenter.SongEditor {
id: rightMainArea id: rightMainArea
color: "red"
Controls.SplitView.fillHeight: true Controls.SplitView.fillHeight: true
Controls.SplitView.fillWidth: true Controls.SplitView.fillWidth: true
Controls.SplitView.preferredWidth: 700 Controls.SplitView.preferredWidth: 700

View file

@ -0,0 +1,83 @@
import QtQuick 2.13
import QtQuick.Dialogs 1.0
import QtQuick.Controls 2.15 as Controls
import QtQuick.Window 2.13
import QtQuick.Layouts 1.2
import QtMultimedia 5.15
import QtAudioEngine 1.15
import org.kde.kirigami 2.13 as Kirigami
import "./" as Presenter
Item {
id: root
GridLayout {
id: mainLayout
columns: 2
rowSpacing: 5
columnSpacing: 20
Controls.ToolBar {
Layout.columnSpan: 2
id: toolbar
RowLayout {
anchors.fill: parent
Controls.ComboBox {
model: ["VictorMono", "Calibri", "Arial", "Quicksand"]
}
Controls.SpinBox {
editable: true
from: 5
to: 72
}
Controls.ComboBox {
model: ["Left", "Center", "Right", "Justify"]
implicitWidth: 100
}
Controls.ToolButton {
text: "B"
}
Controls.ToolButton {
text: "I"
}
Controls.ToolButton {
text: "U"
}
Controls.ToolSeparator {}
Controls.ToolButton {
text: "Effects"
}
}
}
Controls.TextField {
implicitWidth: 300
Layout.leftMargin: 20
}
Rectangle {
color: "red"
implicitWidth: 400
implicitHeight: 10
Layout.rightMargin: 20
}
Controls.TextArea {
implicitWidth: 300
implicitHeight: 500
Layout.bottomMargin: 30
Layout.leftMargin: 20
placeholderText: "Put lyrics here..."
}
Rectangle {
color: "red"
implicitWidth: 400
implicitHeight: 500
Layout.bottomMargin: 30
Layout.rightMargin: 20
}
}
}

View file

@ -10,5 +10,6 @@
<file>qml/presenter/Header.qml</file> <file>qml/presenter/Header.qml</file>
<file>qml/presenter/Actions.qml</file> <file>qml/presenter/Actions.qml</file>
<file>qml/presenter/PanelItem.qml</file> <file>qml/presenter/PanelItem.qml</file>
<file>qml/presenter/SongEditor.qml</file>
</qresource> </qresource>
</RCC> </RCC>