Warning, /maui/strike/src/views/widgets/BuildBar.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.14 0002 import QtQuick.Controls 2.14 0003 import QtQuick.Layouts 1.3 0004 0005 import org.kde.kirigami 2.14 as Kirigami 0006 import org.mauikit.controls 1.3 as Maui 0007 0008 import org.slike.strike 1.0 as Strike 0009 0010 Control 0011 { 0012 id: control 0013 0014 implicitHeight: _layout.implicitHeight + topPadding + bottomPadding 0015 implicitWidth: _layout.implicitWidth +leftPadding + rightPadding 0016 0017 padding: 0 0018 background: null 0019 0020 // enabled: _project.manager.status === Strike.Manager.Ready 0021 Popup 0022 { 0023 id: _projectMenu 0024 maxHeight: 200 0025 maxWidth: parent.width 0026 0027 ColumnLayout 0028 { 0029 anchors.fill: parent 0030 0031 Maui.ListBrowser 0032 { 0033 id: _projectsListView 0034 Layout.fillWidth: true 0035 model: _project.manager.projectsModel 0036 0037 delegate: Maui.ListBrowserDelegate 0038 { 0039 width: ListView.view.width 0040 iconSource: "alienarena" 0041 label1.text: model.title 0042 onClicked: 0043 { 0044 _projectsListView.currentIndex = index 0045 _cmakeProject.data = model.data 0046 } 0047 } 0048 } 0049 0050 Maui.LabelDelegate 0051 { 0052 Layout.fillWidth: true 0053 label: i18n("Targets") 0054 isSection: true 0055 } 0056 0057 Maui.ListBrowser 0058 { 0059 id: _targetsListView 0060 Layout.fillWidth: true 0061 Layout.fillHeight: true 0062 model: _cmakeProject.targetsModel 0063 0064 delegate: Maui.ListBrowserDelegate 0065 { 0066 width: ListView.view.width 0067 iconSource: "run-build" 0068 label1.text: model.name 0069 label2.text: model.type 0070 0071 onClicked: 0072 { 0073 _targetsListView.currentIndex = index 0074 _cmakeProject.target.setData(model.target) 0075 } 0076 } 0077 } 0078 } 0079 } 0080 0081 contentItem: RowLayout 0082 { 0083 id: _layout 0084 spacing: 2 0085 0086 Maui.ToolButtonMenu 0087 { 0088 id: _buildButton 0089 enabled: project.active 0090 Layout.fillHeight: true 0091 icon.name: manager.process.processRunning ? "media-playback-stop" : "run-build" 0092 0093 onClicked: 0094 { 0095 if(manager.process.processRunning) 0096 { 0097 if(manager.process.deployStatus === Strike.Process.Running) 0098 { 0099 manager.process.stopDeploy() 0100 } 0101 } 0102 } 0103 0104 MenuItem 0105 { 0106 text:i18n("Configure") 0107 icon.name: "run-build-configure" 0108 onTriggered: manager.process.configure() 0109 } 0110 0111 MenuItem 0112 { 0113 text:i18n("Build") 0114 icon.name: "run-build" 0115 onTriggered: manager.process.build() 0116 } 0117 0118 MenuItem 0119 { 0120 text:i18n("Run") 0121 icon.name: "media-playback-start" 0122 onTriggered: manager.process.deploy() 0123 } 0124 0125 MenuItem 0126 { 0127 text:i18n("Install") 0128 icon.name: "run-install" 0129 onTriggered: {} 0130 } 0131 0132 background: Kirigami.ShadowedRectangle 0133 { 0134 color: Maui.Theme.backgroundColor 0135 corners 0136 { 0137 topLeftRadius: Maui.Style.radiusV 0138 topRightRadius: 0 0139 bottomLeftRadius: Maui.Style.radiusV 0140 bottomRightRadius: 0 0141 } 0142 } 0143 } 0144 0145 Maui.ToolButtonMenu 0146 { 0147 id: _menuButton 0148 Layout.fillHeight: true 0149 Layout.fillWidth: true 0150 icon.source: _project.projectLogo 0151 icon.color: "transparent" 0152 enabled: currentEditor 0153 font.bold: true 0154 font.weight: Font.Bold 0155 //icon.height: Maui.Style.iconSizes.medium 0156 //icon.width: Maui.Style.iconSizes.medium 0157 text: _cmakeProject.title.length > 0 ? _cmakeProject.title : Maui.App.about.displayName 0158 display: ToolButton.TextBesideIcon 0159 0160 0161 menu.title: _cmakeProject.title 0162 menu.titleImageSource: _project.projectLogo 0163 0164 Maui.LabelDelegate 0165 { 0166 label: i18n("Targets") 0167 isSection:true 0168 } 0169 0170 Repeater 0171 { 0172 model: 3 0173 0174 MenuItem 0175 { 0176 text: "target " + index 0177 checkable: true 0178 } 0179 } 0180 0181 MenuSeparator{} 0182 0183 MenuItem 0184 { 0185 text: i18n("Clear CMake") 0186 } 0187 0188 0189 MenuSeparator{} 0190 0191 MenuItem 0192 { 0193 text: i18n("Open directory") 0194 } 0195 0196 MenuItem 0197 { 0198 text: i18n("Configure") 0199 } 0200 0201 MenuItem 0202 { 0203 text: i18n("Close") 0204 } 0205 background: Kirigami.ShadowedRectangle 0206 { 0207 color: Maui.Theme.backgroundColor 0208 corners 0209 { 0210 topLeftRadius: 0 0211 topRightRadius: Maui.Style.radiusV 0212 bottomLeftRadius: 0 0213 bottomRightRadius: Maui.Style.radiusV 0214 } 0215 0216 ProgressBar 0217 { 0218 id: _progress 0219 width: parent.width 0220 anchors.bottom: parent.bottom 0221 visible: manager.process.processRunning 0222 indeterminate: true 0223 0224 contentItem: Item 0225 { 0226 x: _progress.leftPadding 0227 y: _progress.topPadding 0228 width: _progress.availableWidth 0229 height: _progress.availableHeight 0230 0231 scale: _progress.mirrored ? -1 : 1 0232 0233 Repeater 0234 { 0235 model: 2 0236 0237 Rectangle 0238 { 0239 property real offset: 0 0240 0241 x: (_progress.indeterminate ? offset * parent.width : 0) 0242 y: (parent.height - height) / 2 0243 width: offset * (parent.width - x) 0244 height: 4 0245 0246 color: "violet" 0247 0248 SequentialAnimation on offset { 0249 loops: Animation.Infinite 0250 running: _progress.indeterminate && _progress.visible 0251 PauseAnimation { duration: index ? 520 : 0 } 0252 NumberAnimation { 0253 easing.type: Easing.OutCubic 0254 duration: 1240 0255 from: 0 0256 to: 1 0257 } 0258 PauseAnimation { duration: index ? 0 : 520 } 0259 } 0260 } 0261 } 0262 } 0263 0264 background: null 0265 } 0266 } 0267 } 0268 } 0269 }