Removing scripts in win/, moving QML Module to it's own folder, adding submodule for mixedmenu
All checks were successful
continuous-integration/drone/push Build is passing
|
@ -6,6 +6,11 @@ platform:
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: submodules
|
||||||
|
image: alpine/git
|
||||||
|
commands:
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Linux test
|
- name: Linux test
|
||||||
image: ad5001/ubuntu-pyside2-xvfb:hirsute-5.15.2
|
image: ad5001/ubuntu-pyside2-xvfb:hirsute-5.15.2
|
||||||
commands:
|
commands:
|
||||||
|
|
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "LogarithmPlotter/qml/eu/ad5001/MixedMenu"]
|
||||||
|
path = LogarithmPlotter/qml/eu/ad5001/MixedMenu
|
||||||
|
url = https://git.ad5001.eu/Ad5001/MixedMenu
|
|
@ -112,7 +112,7 @@ def run():
|
||||||
engine.rootContext().setContextProperty("TestBuild", "--test-build" in argv)
|
engine.rootContext().setContextProperty("TestBuild", "--test-build" in argv)
|
||||||
|
|
||||||
engine.addImportPath(os.path.realpath(os.path.join(os.getcwd(), "qml")))
|
engine.addImportPath(os.path.realpath(os.path.join(os.getcwd(), "qml")))
|
||||||
engine.load(os.path.realpath(os.path.join(os.getcwd(), "qml", "LogarithmPlotter.qml")))
|
engine.load(os.path.realpath(os.path.join(os.getcwd(), "qml", "eu", "ad5001", "LogarithmPlotter", "LogarithmPlotter.qml")))
|
||||||
|
|
||||||
os.chdir(pwd)
|
os.chdir(pwd)
|
||||||
if len(argv) > 0 and os.path.exists(argv[-1]) and argv[-1].split('.')[-1] in ['json', 'lgg', 'lpf']:
|
if len(argv) > 0 and os.path.exists(argv[-1]) and argv[-1].split('.')[-1] in ['json', 'lgg', 'lpf']:
|
||||||
|
|
|
@ -29,7 +29,7 @@ D.Dialog {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: logo
|
id: logo
|
||||||
source: "../../logplotter.svg"
|
source: "../../../../../logplotter.svg"
|
||||||
sourceSize.width: 64
|
sourceSize.width: 64
|
||||||
sourceSize.height: 64
|
sourceSize.height: 64
|
||||||
width: 64
|
width: 64
|
|
@ -17,7 +17,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
//import QtQuick.Controls 2.12
|
||||||
|
import eu.ad5001.MixedMenu 1.0
|
||||||
import "js/objects.js" as Objects
|
import "js/objects.js" as Objects
|
||||||
import "js/historylib.js" as HistoryLib
|
import "js/historylib.js" as HistoryLib
|
||||||
|
|
||||||
|
@ -28,20 +29,20 @@ MenuBar {
|
||||||
text: qsTr("&Load...")
|
text: qsTr("&Load...")
|
||||||
shortcut: StandardKey.Open
|
shortcut: StandardKey.Open
|
||||||
onTriggered: settings.load()
|
onTriggered: settings.load()
|
||||||
icon.name: 'document-open'
|
iconName: 'document-open'
|
||||||
|
|
||||||
}
|
}
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("&Save")
|
text: qsTr("&Save")
|
||||||
shortcut: StandardKey.Save
|
shortcut: StandardKey.Save
|
||||||
onTriggered: settings.save()
|
onTriggered: settings.save()
|
||||||
icon.name: 'document-save'
|
iconName: 'document-save'
|
||||||
}
|
}
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("Save &As...")
|
text: qsTr("Save &As...")
|
||||||
shortcut: StandardKey.SaveAs
|
shortcut: StandardKey.SaveAs
|
||||||
onTriggered: settings.saveAs()
|
onTriggered: settings.saveAs()
|
||||||
icon.name: 'document-save-as'
|
iconName: 'document-save-as'
|
||||||
|
|
||||||
}
|
}
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
@ -49,7 +50,7 @@ MenuBar {
|
||||||
text: qsTr("&Quit")
|
text: qsTr("&Quit")
|
||||||
shortcut: StandardKey.Quit
|
shortcut: StandardKey.Quit
|
||||||
onTriggered: Qt.quit()
|
onTriggered: Qt.quit()
|
||||||
icon.name: 'application-exit'
|
iconName: 'application-exit'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
|
@ -58,16 +59,16 @@ MenuBar {
|
||||||
text: qsTr("&Undo")
|
text: qsTr("&Undo")
|
||||||
shortcut: StandardKey.Undo
|
shortcut: StandardKey.Undo
|
||||||
onTriggered: history.undo()
|
onTriggered: history.undo()
|
||||||
icon.name: 'edit-undo'
|
iconName: 'edit-undo'
|
||||||
icon.color: enabled ? sysPalette.windowText : sysPaletteIn.windowText
|
iconColor: enabled ? sysPalette.windowText : sysPaletteIn.windowText
|
||||||
enabled: history.undoCount > 0
|
enabled: history.undoCount > 0
|
||||||
}
|
}
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("&Redo")
|
text: qsTr("&Redo")
|
||||||
shortcut: StandardKey.Redo
|
shortcut: StandardKey.Redo
|
||||||
onTriggered: history.redo()
|
onTriggered: history.redo()
|
||||||
icon.name: 'edit-redo'
|
iconName: 'edit-redo'
|
||||||
icon.color: enabled ? sysPalette.windowText : sysPaletteIn.windowText
|
iconColor: enabled ? sysPalette.windowText : sysPaletteIn.windowText
|
||||||
enabled: history.redoCount > 0
|
enabled: history.redoCount > 0
|
||||||
}
|
}
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
@ -75,7 +76,7 @@ MenuBar {
|
||||||
text: qsTr("&Copy diagram")
|
text: qsTr("&Copy diagram")
|
||||||
shortcut: StandardKey.Copy
|
shortcut: StandardKey.Copy
|
||||||
onTriggered: root.copyDiagramToClipboard()
|
onTriggered: root.copyDiagramToClipboard()
|
||||||
icon.name: 'edit-copy'
|
iconName: 'edit-copy'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
|
@ -88,9 +89,9 @@ MenuBar {
|
||||||
text: modelData
|
text: modelData
|
||||||
visible: Objects.types[modelData].createable()
|
visible: Objects.types[modelData].createable()
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
icon.source: './icons/'+modelData+'.svg' // Default to dark version
|
iconSource: './icons/'+modelData+'.svg' // Default to dark version
|
||||||
icon.name: modelData
|
iconName: modelData
|
||||||
icon.color: sysPalette.windowText
|
iconColor: sysPalette.windowText
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var newObj = Objects.createNewRegisteredObject(modelData)
|
var newObj = Objects.createNewRegisteredObject(modelData)
|
||||||
history.addToHistory(new HistoryLib.CreateNewObject(newObj.name, modelData, newObj.export()))
|
history.addToHistory(new HistoryLib.CreateNewObject(newObj.name, modelData, newObj.export()))
|
||||||
|
@ -103,7 +104,7 @@ MenuBar {
|
||||||
title: qsTr("&Help")
|
title: qsTr("&Help")
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("&About")
|
text: qsTr("&About")
|
||||||
icon.name: 'about'
|
iconName: 'about'
|
||||||
onTriggered: about.open()
|
onTriggered: about.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -35,7 +35,9 @@ ApplicationWindow {
|
||||||
SystemPalette { id: sysPaletteIn; colorGroup: SystemPalette.Disabled }
|
SystemPalette { id: sysPaletteIn; colorGroup: SystemPalette.Disabled }
|
||||||
History { id: history }
|
History { id: history }
|
||||||
|
|
||||||
menuBar: AppMenuBar {}
|
menuBar: appMenu.trueItem
|
||||||
|
|
||||||
|
AppMenuBar {id: appMenu}
|
||||||
|
|
||||||
About {id: about}
|
About {id: about}
|
||||||
|
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
1
LogarithmPlotter/qml/eu/ad5001/MixedMenu
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit bcae0ab4563f20bfaf9e6e1e19421d724ec7ba50
|
|
@ -1,2 +1,2 @@
|
||||||
|
|
||||||
recursive-include LogarithmPlotter/qml *.qml *.js *.qdoc qmldir *.svg
|
recursive-include LogarithmPlotter/qml *.qml *.js *.qdoc qmldir *.svg *.md LICENSE
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
cd ..
|
|
||||||
cp run.py logarithmplotter.py
|
|
||||||
python -m pip install -U pyinstaller
|
|
||||||
pyinstaller --add-data "qml;qml" --noconsole logarithmplotter.py --icon=win/logplotter.ico
|
|
||||||
rm logarithmplotter.py
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Giving pyinstaller another run
|
|
||||||
cd ..
|
|
||||||
rm $(find . -name "*.qmlc")
|
|
||||||
rm $(find . -name "*.pyc")
|
|
||||||
cp run.py logarithmplotter.py
|
|
||||||
wine python -m pip install -U pyinstaller
|
|
||||||
wine pyinstaller --add-data "qml;qml" --noconsole logarithmplotter.py --icon=win/logplotter.ico
|
|
||||||
rm logarithmplotter.py
|
|
|
@ -1,5 +0,0 @@
|
||||||
cd ..
|
|
||||||
cp * ../README.md ../LICENSE.md ../dist/logarithmplotter/
|
|
||||||
# Creating installer
|
|
||||||
cd ../dist/logarithmplotter/
|
|
||||||
"C:\Program Files (x86)\NSIS\makensis" installer.nsi
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Moving files
|
|
||||||
cp * ../README.md ../LICENSE.md ../dist/logarithmplotter/
|
|
||||||
# Creating installer
|
|
||||||
cd ../dist/logarithmplotter/
|
|
||||||
makensis installer.nsi
|
|