From 36e3c3cba2368249206d77f29726cd71974f3ac0 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 27 Jan 2022 21:36:34 +0100 Subject: [PATCH] Moving all dialogs & settings to their own directory, fixing label bugs with Points & Text. --- LogarithmPlotter/i18n/lp_de.ts | 64 +++++++++---------- LogarithmPlotter/i18n/lp_en.ts | 64 +++++++++---------- LogarithmPlotter/i18n/lp_es.ts | 64 +++++++++---------- LogarithmPlotter/i18n/lp_fr.ts | 64 +++++++++---------- LogarithmPlotter/i18n/lp_hu.ts | 64 +++++++++---------- LogarithmPlotter/i18n/lp_nb_NO.ts | 64 +++++++++---------- LogarithmPlotter/i18n/lp_template.ts | 64 +++++++++---------- .../LogarithmPlotter/LogarithmPlotter.qml | 10 +-- .../ObjectLists/EditorDialog.qml | 12 ++-- .../LogarithmPlotter/{ => Popup}/About.qml | 2 +- .../LogarithmPlotter/{ => Popup}/Alert.qml | 0 .../{ => Popup}/FileDialog.qml | 0 .../{ => Popup}/GreetScreen.qml | 4 +- .../eu/ad5001/LogarithmPlotter/Popup/qmldir | 8 +++ .../{ => Setting}/ComboBoxSetting.qml | 2 +- .../LogarithmPlotter/{ => Setting}/Icon.qml | 0 .../{ => Setting}/ListSetting.qml | 2 +- .../{ => Setting}/TextSetting.qml | 2 +- .../eu/ad5001/LogarithmPlotter/Setting/qmldir | 7 ++ .../eu/ad5001/LogarithmPlotter/Settings.qml | 28 ++++---- .../ad5001/LogarithmPlotter/js/objs/point.js | 16 ++--- .../ad5001/LogarithmPlotter/js/objs/text.js | 14 ++-- .../qml/eu/ad5001/LogarithmPlotter/qmldir | 5 +- 23 files changed, 288 insertions(+), 272 deletions(-) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Popup}/About.qml (98%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Popup}/Alert.qml (100%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Popup}/FileDialog.qml (100%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Popup}/GreetScreen.qml (96%) create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Setting}/ComboBoxSetting.qml (97%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Setting}/Icon.qml (100%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Setting}/ListSetting.qml (98%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/{ => Setting}/TextSetting.qml (98%) create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/qmldir diff --git a/LogarithmPlotter/i18n/lp_de.ts b/LogarithmPlotter/i18n/lp_de.ts index 38ecf3b..16a0eb7 100644 --- a/LogarithmPlotter/i18n/lp_de.ts +++ b/LogarithmPlotter/i18n/lp_de.ts @@ -4,23 +4,23 @@ About - + About LogarithmPlotter Über LogarithmPlotter - + LogarithmPlotter v%1 LogarithmPlotter v%1 - + 2D plotter software to make BODE plots, sequences and repartition functions. 2D-Grafiksoftware zur Erstellung von Bode-Diagramms, Folgen und Verteilungsfunktionen. - + Report a bug Bug melden @@ -170,12 +170,12 @@ FileDialog - + Export Logarithm Plot file Logarithmusgrafik exportieren - + Import Logarithm Plot file Logarithmusgrafik importieren @@ -183,34 +183,34 @@ GreetScreen - + Welcome to LogarithmPlotter Willkommen bei LogarithmPlotter - + Version %1 Version %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. Nehmen Sie sich ein paar Sekunden Zeit, um LogarithmPlotter zu konfigurieren. Diese Einstellungen können jederzeit über das Menü "Einstellungen" geändert werden. - + Check for updates on startup (requires online connectivity) Beim Start nach Updates suchen (Online-Verbindung erforderlich) - + Reset redo stack when a new action is added to history Redo-Stapel zurücksetzen, wenn eine neue Aktion zur Historie hinzugefügt wird - + Done Schließen @@ -236,7 +236,7 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" ListSetting - + + Add Entry + Neuer Eintrag @@ -366,97 +366,97 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Settings - + X Zoom Zoom auf X - + Y Zoom Zoom auf Y - + Min X Minimum X - + Max Y Maximum Y - + Max X Maximum X - + Min Y Minimum Y - + X Axis Step X-Achsen-Schritt - + Y Axis Step Y-Achsen-Schritt - + Line width Linienbreite - + Text size (px) Textgröße (px) - + X Label Etikett der X-Achse - + Y Label Etikett der Y-Achse - + X Log scale Logarithmische Skala in X - + Show X graduation X-Teilung anzeigen - + Show Y graduation Y-Teilung anzeigen - + Copy to clipboard Kopieren in die Zwischenablage - + Save plot Grafik speichern - + Save plot as Grafik speichern unter - + Load plot Grafik laden diff --git a/LogarithmPlotter/i18n/lp_en.ts b/LogarithmPlotter/i18n/lp_en.ts index 7445829..75227d5 100644 --- a/LogarithmPlotter/i18n/lp_en.ts +++ b/LogarithmPlotter/i18n/lp_en.ts @@ -4,23 +4,23 @@ About - + About LogarithmPlotter About LogarithmPlotter - + LogarithmPlotter v%1 LogarithmPlotter v%1 - + 2D plotter software to make BODE plots, sequences and repartition functions. 2D plotter software to make Bode plots, sequences and distribution functions. - + Report a bug Report a bug @@ -170,12 +170,12 @@ FileDialog - + Export Logarithm Plot file Export Logarithm Plot file - + Import Logarithm Plot file Import Logarithm Plot file @@ -183,34 +183,34 @@ GreetScreen - + Welcome to LogarithmPlotter Welcome to LogarithmPlotter - + Version %1 Version %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. - + Check for updates on startup (requires online connectivity) Check for updates on startup (requires online connectivity) - + Reset redo stack when a new action is added to history Reset redo stack when a new action is added to history - + Done Done @@ -236,7 +236,7 @@ These settings can be changed at any time from the "Settings" menu. ListSetting - + + Add Entry + Add Entry @@ -366,97 +366,97 @@ These settings can be changed at any time from the "Settings" menu. Settings - + X Zoom X Zoom - + Y Zoom Y Zoom - + Min X Min X - + Max Y Max Y - + Max X Max X - + Min Y Min Y - + X Axis Step X Axis Step - + Y Axis Step Y Axis Step - + Line width Line width - + Text size (px) Text size (px) - + X Label X Label - + Y Label Y Label - + X Log scale X Log scale - + Show X graduation Show X graduation - + Show Y graduation Show Y graduation - + Copy to clipboard Copy to clipboard - + Save plot Save plot - + Save plot as Save plot as - + Load plot Load plot diff --git a/LogarithmPlotter/i18n/lp_es.ts b/LogarithmPlotter/i18n/lp_es.ts index 51ca2a7..50d03a8 100644 --- a/LogarithmPlotter/i18n/lp_es.ts +++ b/LogarithmPlotter/i18n/lp_es.ts @@ -4,23 +4,23 @@ About - + About LogarithmPlotter Sobre LogarithmPlotter - + LogarithmPlotter v%1 - + 2D plotter software to make BODE plots, sequences and repartition functions. - + Report a bug @@ -170,12 +170,12 @@ FileDialog - + Export Logarithm Plot file - + Import Logarithm Plot file @@ -183,33 +183,33 @@ GreetScreen - + Welcome to LogarithmPlotter - + Version %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. - + Check for updates on startup (requires online connectivity) - + Reset redo stack when a new action is added to history - + Done @@ -235,7 +235,7 @@ These settings can be changed at any time from the "Settings" menu. ListSetting - + + Add Entry @@ -365,97 +365,97 @@ These settings can be changed at any time from the "Settings" menu. Settings - + X Zoom - + Y Zoom - + Min X - + Max Y - + Max X - + Min Y - + X Axis Step - + Y Axis Step - + Line width - + Text size (px) - + X Label - + Y Label - + X Log scale - + Show X graduation - + Show Y graduation - + Copy to clipboard - + Save plot - + Save plot as - + Load plot diff --git a/LogarithmPlotter/i18n/lp_fr.ts b/LogarithmPlotter/i18n/lp_fr.ts index c344d3e..dc6b6b3 100644 --- a/LogarithmPlotter/i18n/lp_fr.ts +++ b/LogarithmPlotter/i18n/lp_fr.ts @@ -4,23 +4,23 @@ About - + About LogarithmPlotter À propos de LogarithmPlotter - + LogarithmPlotter v%1 LogarithmPlotter v%1 - + 2D plotter software to make BODE plots, sequences and repartition functions. Logiciel de traçage 2D pour les diagrammes de Bode, les suites et les fonctions de répartition. - + Report a bug Rapport de bug @@ -172,12 +172,12 @@ FileDialog - + Export Logarithm Plot file Exporter le graphe Logarithmique - + Import Logarithm Plot file Importer un graphe Logarithmique @@ -185,24 +185,24 @@ GreetScreen - + Welcome to LogarithmPlotter Bienvenue sur LogarithmPlotter - + Version %1 Version %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. Prenez quelques secondes pour configurer LogarithmPlotter. Ces paramètres peuvent être modifiés à tout moment à partir du menu "Paramètres". - + Done Fermer @@ -213,12 +213,12 @@ These settings can always be changed at any time from the "Settings" m These settings can always be changed at any time from the "Settings" menu. - + Check for updates on startup (requires online connectivity) Vérifier les mises à jour au démarrage (nécessite d'être connecté à internet) - + Reset redo stack when a new action is added to history Réinitialiser la pile d'action "Rétablir" lorsqu'une nouvelle action est ajoutée à l'historique @@ -244,7 +244,7 @@ These settings can always be changed at any time from the "Settings" m ListSetting - + + Add Entry + Nouvelle entrée @@ -374,97 +374,97 @@ These settings can always be changed at any time from the "Settings" m Settings - + X Zoom Zoom en X - + Y Zoom Zoom en Y - + Min X Min X - + Max Y Max Y - + Max X Max X - + Min Y Min Y - + X Axis Step Pas de l'axe X - + Y Axis Step Pas de l'axe Y - + Line width Taille des lignes - + Text size (px) Taille du texte (px) - + X Label Label de l'axe X - + Y Label Label de l'axe Y - + X Log scale Échelle logarithmique en X - + Show X graduation Montrer la graduation de l'axe X - + Show Y graduation Montrer la graduation de l'axe Y - + Copy to clipboard Copier vers le presse-papiers - + Save plot Sauvegarder le graphe - + Save plot as Sauvegarder le graphe sous - + Load plot Charger un graphe diff --git a/LogarithmPlotter/i18n/lp_hu.ts b/LogarithmPlotter/i18n/lp_hu.ts index 7108a02..49833c7 100644 --- a/LogarithmPlotter/i18n/lp_hu.ts +++ b/LogarithmPlotter/i18n/lp_hu.ts @@ -4,23 +4,23 @@ About - + About LogarithmPlotter LogarithmPlotter névjegye - + LogarithmPlotter v%1 LogarithmPlotter %1 verzió - + 2D plotter software to make BODE plots, sequences and repartition functions. Síkbeli ábrázolásszoftver Bode-ábrák, sorozatok és eloszlási funkciók készítéséhez. - + Report a bug Hiba bejelentése @@ -170,12 +170,12 @@ FileDialog - + Export Logarithm Plot file Logaritmus-ábra-fájl exportálása - + Import Logarithm Plot file Logaritmus-ábra-fájl importálása @@ -183,34 +183,34 @@ GreetScreen - + Welcome to LogarithmPlotter Isten hozott a LogarithmPlotter! - + Version %1 %1 verzió - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. Szánjon néhány másodpercet a LogarithmPlotter beállításához. Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. - + Check for updates on startup (requires online connectivity) Frissítések keresése indításkor (online kapcsolat szükséges) - + Reset redo stack when a new action is added to history Ismétlési verem alaphelyzet visszaállítása, ha új műveletet adnak az előzményekhez - + Done Kész @@ -236,7 +236,7 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. ListSetting - + + Add Entry + Bejegyzés hozzáadása @@ -366,97 +366,97 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. Settings - + X Zoom X-nagyítás - + Y Zoom Y-nagyítás - + Min X Legkisebb X - + Max Y Legnagyobb Y - + Max X Legnagyobb X - + Min Y Legkisebb Y - + X Axis Step X tengely lépésköze - + Y Axis Step Y tengely lépésköze - + Line width Vonalvastagság - + Text size (px) Szövegméret (képpont) - + X Label X címke - + Y Label Y címke - + X Log scale X tengely logaritmikus skálával - + Show X graduation X érettségi megjelenítése - + Show Y graduation Y érettségi megjelenítése - + Copy to clipboard Másolás a vágólapra - + Save plot Ábra mentése - + Save plot as Ábra mentése másként - + Load plot Ábra betöltése diff --git a/LogarithmPlotter/i18n/lp_nb_NO.ts b/LogarithmPlotter/i18n/lp_nb_NO.ts index c6090a0..d4a9437 100644 --- a/LogarithmPlotter/i18n/lp_nb_NO.ts +++ b/LogarithmPlotter/i18n/lp_nb_NO.ts @@ -4,23 +4,23 @@ About - + About LogarithmPlotter Om - + LogarithmPlotter v%1 LogarithmPlotter v%1 - + 2D plotter software to make BODE plots, sequences and repartition functions. 2D-plotterprogramvare laget for opprettelse av Bode-diagram, sekvenser, og distribusjonsfunksjoner. - + Report a bug Rapporter en feil @@ -170,12 +170,12 @@ FileDialog - + Export Logarithm Plot file Eksporter logaritmeplott-fil - + Import Logarithm Plot file Importer logaritmeplott-fil @@ -183,34 +183,34 @@ GreetScreen - + Welcome to LogarithmPlotter Velkommen til LogarithmPlotter - + Version %1 Versjon %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. Sett opp LogarithmPlotter. Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. - + Check for updates on startup (requires online connectivity) Se etter nye versjoner ved programstart. (Krever tilkobling til Internett.) - + Reset redo stack when a new action is added to history Tilbakesitll angrehistorikk når en ny handling legges til - + Done @@ -236,7 +236,7 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. ListSetting - + + Add Entry @@ -366,97 +366,97 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Settings - + X Zoom X-forstørrelse - + Y Zoom Y-forstørrelse - + Min X Min. X - + Max Y Maks. Y - + Max X Maks. X - + Min Y Min. Y - + X Axis Step X-aksesteg - + Y Axis Step Y-aksesteg - + Line width Linjebredde - + Text size (px) Tekststørrelse (piksler) - + X Label Navn på X-akse - + Y Label Navn på Y-akse - + X Log scale Logaritmisk skala i x - + Show X graduation Vis X-inndeling - + Show Y graduation Vis Y-inndeling - + Copy to clipboard Kopier til utklippstavle - + Save plot Lagre plott - + Save plot as Lagre plott som - + Load plot Last inn plott diff --git a/LogarithmPlotter/i18n/lp_template.ts b/LogarithmPlotter/i18n/lp_template.ts index 1cb4e50..728fd51 100644 --- a/LogarithmPlotter/i18n/lp_template.ts +++ b/LogarithmPlotter/i18n/lp_template.ts @@ -4,23 +4,23 @@ About - + About LogarithmPlotter - + LogarithmPlotter v%1 - + 2D plotter software to make BODE plots, sequences and repartition functions. - + Report a bug @@ -170,12 +170,12 @@ FileDialog - + Export Logarithm Plot file - + Import Logarithm Plot file @@ -183,33 +183,33 @@ GreetScreen - + Welcome to LogarithmPlotter - + Version %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. - + Check for updates on startup (requires online connectivity) - + Reset redo stack when a new action is added to history - + Done @@ -235,7 +235,7 @@ These settings can be changed at any time from the "Settings" menu. ListSetting - + + Add Entry @@ -365,97 +365,97 @@ These settings can be changed at any time from the "Settings" menu. Settings - + X Zoom - + Y Zoom - + Min X - + Max Y - + Max X - + Min Y - + X Axis Step - + Y Axis Step - + Line width - + Text size (px) - + X Label - + Y Label - + X Log scale - + Show X graduation - + Show Y graduation - + Copy to clipboard - + Save plot - + Save plot as - + Load plot diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml index dc48111..eb2d6c7 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml @@ -26,6 +26,7 @@ import "js/objs/autoload.js" as ALObjects import "js/objects.js" as Objects import eu.ad5001.LogarithmPlotter.ObjectLists 1.0 +import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup ApplicationWindow { @@ -39,18 +40,17 @@ ApplicationWindow { SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } SystemPalette { id: sysPaletteIn; colorGroup: SystemPalette.Disabled } - menuBar: appMenu.trueItem - GreetScreen {} - AppMenuBar {id: appMenu} History { id: history } - About {id: about} + Popup.GreetScreen {} - Alert { + Popup.About {id: about} + + Popup.Alert { id: alert anchors.bottom: parent.bottom anchors.bottomMargin: 5 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml index 4e3ac3f..53d566e 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml @@ -19,7 +19,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Dialogs 1.3 as D -import eu.ad5001.LogarithmPlotter 1.0 +import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting import "../js/objects.js" as Objects import "../js/objs/common.js" as ObjectsCommons import "../js/historylib.js" as HistoryLib @@ -53,7 +53,7 @@ D.Dialog { width: objEditor.width - 20 spacing: 10 - TextSetting { + Setting.TextSetting { id: nameProperty height: 30 label: qsTr("Name") @@ -77,7 +77,7 @@ D.Dialog { } } - ComboBoxSetting { + Setting.ComboBoxSetting { id: labelContentProperty height: 30 width: dlgProperties.width @@ -118,7 +118,7 @@ D.Dialog { } // Setting for text & number settings as well as domains & expressions - TextSetting { + Setting.TextSetting { id: customPropText height: visible ? 30 : 0 width: parent.width @@ -174,7 +174,7 @@ D.Dialog { } // Setting when selecting data from an enum, or an object of a certain type. - ComboBoxSetting { + Setting.ComboBoxSetting { id: customPropCombo width: dlgProperties.width height: visible ? 30 : 0 @@ -234,7 +234,7 @@ D.Dialog { } // Setting to edit lists or dictionaries (e.g sequences & repartition function values) - ListSetting { + Setting.ListSetting { id: customPropListDict width: parent.width height: visible ? implicitHeight : 0 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/About.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/About.qml similarity index 98% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/About.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/About.qml index 29fd3f7..2575c2f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/About.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/About.qml @@ -29,7 +29,7 @@ D.Dialog { Image { id: logo - source: "icons/logarithmplotter.svg" + source: "../icons/logarithmplotter.svg" sourceSize.width: 64 sourceSize.height: 64 width: 64 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Alert.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Alert.qml similarity index 100% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Alert.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Alert.qml diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/FileDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/FileDialog.qml similarity index 100% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/FileDialog.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/FileDialog.qml diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/GreetScreen.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml similarity index 96% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/GreetScreen.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml index 9518767..1473060 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/GreetScreen.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml @@ -24,7 +24,7 @@ Popup { id: greetingPopup x: (parent.width-width)/2 y: Math.max(20, (parent.height-height)/2) - width: Math.max(welcome.width, checkForUpdatesSetting.width, resetRedoStackSetting.width)+20 + width: Math.max(welcome.width+70, checkForUpdatesSetting.width, resetRedoStackSetting.width)+20 height: Math.min(parent.height-40, 500) modal: true focus: true @@ -40,7 +40,7 @@ Popup { Image { id: logo - source: "icons/logarithmplotter.svg" + source: "../icons/logarithmplotter.svg" sourceSize.width: 48 sourceSize.height: 48 width: 48 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir new file mode 100644 index 0000000..3e5a408 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir @@ -0,0 +1,8 @@ +module eu.ad5001.LogarithmPlotter.Popup + +About 1.0 About.qml +Alert 1.0 Alert.qml +FileDialog 1.0 FileDialog.qml +GreetScreen 1.0 GreetScreen.qml + + diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ComboBoxSetting.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ComboBoxSetting.qml similarity index 97% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ComboBoxSetting.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ComboBoxSetting.qml index ece456b..6af4631 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ComboBoxSetting.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ComboBoxSetting.qml @@ -41,7 +41,7 @@ Item { id: iconLabel anchors.top: parent.top anchors.topMargin: icon == "" ? 0 : 3 - source: control.visible ? control.icon : "" + source: control.visible ? "../" + control.icon : "" width: height height: icon == "" && visible ? 0 : 24 color: sysPalette.windowText diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Icon.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/Icon.qml similarity index 100% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Icon.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/Icon.qml diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ListSetting.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ListSetting.qml similarity index 98% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ListSetting.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ListSetting.qml index c85a684..4579bbf 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ListSetting.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ListSetting.qml @@ -28,7 +28,7 @@ Column { id: iconLabel anchors.top: parent.top anchors.topMargin: icon == "" ? 0 : 3 - source: control.visible ? control.icon : "" + source: control.visible ? "../" + control.icon : "" width: height height: icon == "" || !visible ? 0 : 24 color: sysPalette.windowText diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/TextSetting.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/TextSetting.qml similarity index 98% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/TextSetting.qml rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/TextSetting.qml index b1941f5..0b7ed9f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/TextSetting.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/TextSetting.qml @@ -37,7 +37,7 @@ Item { id: iconLabel anchors.top: parent.top anchors.topMargin: icon == "" ? 0 : 3 - source: control.visible ? control.icon : "" + source: control.visible ? "../" + control.icon : "" width: height height: icon == "" || !visible ? 0 : 24 color: sysPalette.windowText diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/qmldir b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/qmldir new file mode 100644 index 0000000..22ad816 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/qmldir @@ -0,0 +1,7 @@ +module eu.ad5001.LogarithmPlotter.Setting + +ComboBoxSetting 1.0 ComboBoxSetting.qml +Icon 1.0 Icon.qml +ListSetting 1.0 ListSetting.qml +TextSetting 1.0 TextSetting.qml + diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml index 8dad5f4..1be0949 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml @@ -18,6 +18,8 @@ import QtQuick.Controls 2.12 import QtQuick 2.12 +import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting +import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup import "js/utils.js" as Utils ScrollView { @@ -48,7 +50,7 @@ ScrollView { width: parent.width bottomPadding: 20 - FileDialog { + Popup.FileDialog { id: fdiag onAccepted: { var filePath = fileUrl.toString().substr(7) @@ -66,7 +68,7 @@ ScrollView { } // Zoom - TextSetting { + Setting.TextSetting { id: zoomX height: 30 isDouble: true @@ -81,7 +83,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: zoomY height: 30 isDouble: true @@ -96,7 +98,7 @@ ScrollView { } // Positioning the graph - TextSetting { + Setting.TextSetting { id: minX height: 30 isDouble: true @@ -115,7 +117,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: maxY height: 30 isDouble: true @@ -130,7 +132,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: maxX height: 30 isDouble: true @@ -149,7 +151,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: minY height: 30 isDouble: true @@ -168,7 +170,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: xAxisStep height: 30 label: qsTr("X Axis Step") @@ -182,7 +184,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: yAxisStep height: 30 label: qsTr("Y Axis Step") @@ -195,7 +197,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: lineWidth height: 30 isDouble: true @@ -210,7 +212,7 @@ ScrollView { } } - TextSetting { + Setting.TextSetting { id: textSize height: 30 isDouble: true @@ -225,7 +227,7 @@ ScrollView { } } - ComboBoxSetting { + Setting.ComboBoxSetting { id: xAxisLabel height: 30 width: settings.settingWidth @@ -251,7 +253,7 @@ ScrollView { Component.onCompleted: editText = settings.xaxislabel } - ComboBoxSetting { + Setting.ComboBoxSetting { id: yAxisLabel height: 30 width: settings.settingWidth diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js index 2f00de7..f599973 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js @@ -31,7 +31,7 @@ class Point extends Common.DrawableObject { /*static properties() {return { 'x': 'Expression', 'y': 'Expression', - 'labelPosition': new P.Enum('top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right'), + 'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), 'pointStyle': new P.Enum('●', '✕', '+'), }}*/ static properties() {return { @@ -42,7 +42,7 @@ class Point extends Common.DrawableObject { }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', - x = 1, y = 0, labelPosition = 'top', pointStyle = '●') { + x = 1, y = 0, labelPosition = 'above', pointStyle = '●') { if(name == null) name = Common.getNewName('ABCDEFJKLMNOPQRSTUVW') super(name, visible, color, labelContent) this.type = 'Point' @@ -84,10 +84,10 @@ class Point extends Common.DrawableObject { ctx.font = `${canvas.textsize}px sans-serif` var textSize = ctx.measureText(text).width switch(this.labelPosition) { - case 'top': + case 'above': canvas.drawVisibleText(ctx, text, canvasX-textSize/2, canvasY-16) break; - case 'bottom': + case 'below': canvas.drawVisibleText(ctx, text, canvasX-textSize/2, canvasY+16) break; case 'left': @@ -96,16 +96,16 @@ class Point extends Common.DrawableObject { case 'right': canvas.drawVisibleText(ctx, text, canvasX+10, canvasY+4) break; - case 'top-left': + case 'above-left': canvas.drawVisibleText(ctx, text, canvasX-textSize-10, canvasY-16) break; - case 'top-right': + case 'above-right': canvas.drawVisibleText(ctx, text, canvasX+10, canvasY-16) break; - case 'bottom-left': + case 'below-left': canvas.drawVisibleText(ctx, text, canvasX-textSize-10, canvasY+16) break; - case 'bottom-right': + case 'below-right': canvas.drawVisibleText(ctx, text, canvasX+10, canvasY+16) break; diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js index e2cc780..2f61e3d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js @@ -30,7 +30,7 @@ class Text extends Common.DrawableObject { /*static properties() {return { 'x': 'Expression', 'y': 'Expression', - 'labelPosition': new P.Enum('center', 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right'), + 'labelPosition': new P.Enum('center', 'above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), 'text': 'string', }}*/ static properties() {return { @@ -69,10 +69,10 @@ class Text extends Common.DrawableObject { case 'center': canvas.drawVisibleText(ctx, this.text, canvasX-textSize/2, canvasY+4) break; - case 'top': + case 'above': canvas.drawVisibleText(ctx, this.text, canvasX-textSize/2, canvasY-16) break; - case 'bottom': + case 'below': canvas.drawVisibleText(ctx, this.text, canvasX-textSize/2, canvasY+16) break; case 'left': @@ -81,16 +81,16 @@ class Text extends Common.DrawableObject { case 'right': canvas.drawVisibleText(ctx, this.text, canvasX+5, canvasY+4) break; - case 'top-left': + case 'above-left': canvas.drawVisibleText(ctx, this.text, canvasX-textSize-5, canvasY-16) break; - case 'top-right': + case 'above-right': canvas.drawVisibleText(ctx, this.text, canvasX+5, canvasY-16) break; - case 'bottom-left': + case 'below-left': canvas.drawVisibleText(ctx, this.text, canvasX-textSize-5, canvasY+16) break; - case 'bottom-right': + case 'below-right': canvas.drawVisibleText(ctx, this.text, canvasX+5, canvasY+16) break; diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/qmldir b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/qmldir index 0f6db44..7751252 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/qmldir +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/qmldir @@ -1,6 +1,5 @@ module eu.ad5001.LogarithmPlotter -TextSetting 1.0 TextSetting.qml -ListSetting 1.0 ListSetting.qml -ComboBoxSetting 1.0 ComboBoxSetting.qml Icon 1.0 Icon.qml +Settings 1.0 Settings.qml +Alert 1.0 Alert.qml