From 09095046a4641ac6f175a906af879c8ce86c96d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikko=20Syrj=C3=A4?= Date: Sat, 31 Aug 2019 22:29:06 +0300 Subject: Moved language setting from toolbar to settings menu. --- help/eng/format.rst | 15 +++++++++++++++ help/eng/menu.rst | 8 ++++++++ help/eng/tools.rst | 5 ----- help/fin/format.rst | 15 +++++++++++++++ help/fin/menu.rst | 8 ++++++++ help/fin/tools.rst | 5 ----- locale/symedit.en_GB.qm | Bin 8157 -> 8346 bytes locale/symedit.en_GB.ts | 22 +++++++++++++++++----- locale/symedit.fi_FI.qm | Bin 8887 -> 9076 bytes locale/symedit.fi_FI.ts | 20 ++++++++++++++++---- locale/symedit.ts | 46 +++++++++++++++++++++++++++++----------------- main.qml | 37 ++++++++++++++++++++++++++----------- 12 files changed, 134 insertions(+), 47 deletions(-) diff --git a/help/eng/format.rst b/help/eng/format.rst index 696256d..8b7bad0 100644 --- a/help/eng/format.rst +++ b/help/eng/format.rst @@ -74,6 +74,21 @@ Parameters: angle (``G50``) Sets parameter to text alignment (1-12). Default is 9 (bottom left corner). Affects until changed. +1. Top right (``J1``) +2. Top center (``J2``) +3. Top left (``J3``) +4. Base right (``J4``) +5. Base center (``J5``) +6. Base left (``J6``) +7. Bottom right (``J7``) +8. Bottom center (``J8``) +9. Bottom left (``J9``) +10. Middle right (``J10``) +11. Middle center (``J11``) +12. Middle left (``J12``) + +.. image:: ../image/alignment.png + Parameters: alignment (``J9``) **S** - Text absolute size diff --git a/help/eng/menu.rst b/help/eng/menu.rst index f031076..ea07aa6 100644 --- a/help/eng/menu.rst +++ b/help/eng/menu.rst @@ -158,6 +158,14 @@ Tools See :doc:`tools`. +Settings +-------- + +Language +^^^^^^^^ + +Application language: english (eng) or finnish (fin). + Help ---- diff --git a/help/eng/tools.rst b/help/eng/tools.rst index 6aff0bd..50ff51c 100644 --- a/help/eng/tools.rst +++ b/help/eng/tools.rst @@ -113,11 +113,6 @@ Symbol size Symbol size in millimeters or meters in editing. Assumes scale 1:1000. Affects text scaling. -Language -^^^^^^^^ - -Application language: english (eng) or finnish (fin). - Color index ^^^^^^^^^^^ diff --git a/help/fin/format.rst b/help/fin/format.rst index b4372e0..e63ace2 100644 --- a/help/fin/format.rst +++ b/help/fin/format.rst @@ -74,6 +74,21 @@ Parametrit: kulma (``G50``) Asettaa parametrin tekstin asemoinniksi (1-12). Oletus on 9 (vasen alakulma). Voimassa kunnes muutetaan. +1. Ylhäällä oikealla (``J1``) +2. Ylhäällä keskellä (``J2``) +3. Ylhäällä vasemmalla (``J3``) +4. Alareunassa oikealla (``J4``) +5. Alareunassa keskellä (``J5``) +6. Alareunassa vasemmalla (``J6``) +7. Alhaalla oikealla (``J7``) +8. Alhaalla keskellä (``J8``) +9. Alhaalla vasemmalla (``J9``) +10. Puolivälissä oikealla (``J10``) +11. Puolivälissä keskellä (``J11``) +12. Puolivälissä vasemmalla (``J12``) + +.. image:: ../image/alignment.png + Parametrit: asemointi (``J9``) **S** - Tekstin absoluuttinen koko diff --git a/help/fin/menu.rst b/help/fin/menu.rst index f9d404e..e20fe22 100644 --- a/help/fin/menu.rst +++ b/help/fin/menu.rst @@ -158,6 +158,14 @@ Työkalut Katso :doc:`tools`. +Asetukset +--------- + +Kieli +^^^^^ + +Sovelluksen kieli: englanti (eng) tai suomi (fin). + Ohje ---- diff --git a/help/fin/tools.rst b/help/fin/tools.rst index a34c8a9..416551e 100644 --- a/help/fin/tools.rst +++ b/help/fin/tools.rst @@ -113,11 +113,6 @@ Symbolin koko Symbolin koko millimetreinä tai metreinä editoinnissa. Olettaa mittakaavaksi 1:1000. Vaikuttaa tekstien skaalaukseen. -Kieli -^^^^^ - -Sovelluksen kieli: englanti (eng) tai suomi (fin). - Värin indeksi ^^^^^^^^^^^^^ diff --git a/locale/symedit.en_GB.qm b/locale/symedit.en_GB.qm index b6d26dc..5031738 100644 Binary files a/locale/symedit.en_GB.qm and b/locale/symedit.en_GB.qm differ diff --git a/locale/symedit.en_GB.ts b/locale/symedit.en_GB.ts index 0a461bf..f3f6af6 100644 --- a/locale/symedit.en_GB.ts +++ b/locale/symedit.en_GB.ts @@ -145,7 +145,23 @@ Rotated text - + + + Settings + + + + Language + + + + English + + + + Finnish + + &Help @@ -277,10 +293,6 @@ Symbol Size - - - Language - <b>Symbol:</b> diff --git a/locale/symedit.fi_FI.qm b/locale/symedit.fi_FI.qm index af413ca..18b3a00 100644 Binary files a/locale/symedit.fi_FI.qm and b/locale/symedit.fi_FI.qm differ diff --git a/locale/symedit.fi_FI.ts b/locale/symedit.fi_FI.ts index 29152f4..6355cc0 100644 --- a/locale/symedit.fi_FI.ts +++ b/locale/symedit.fi_FI.ts @@ -145,6 +145,22 @@ Käännetty teksti + + + Asetukset + + + + Kieli + + + + Englanti + + + + Suomi + &Ohje @@ -277,10 +293,6 @@ Symbolin koko - - - Kieli - <b>Symboli:</b> diff --git a/locale/symedit.ts b/locale/symedit.ts index de92f40..09b5558 100644 --- a/locale/symedit.ts +++ b/locale/symedit.ts @@ -133,11 +133,35 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -237,10 +261,6 @@ - - - - @@ -377,14 +397,6 @@ - - - - - - - - diff --git a/main.qml b/main.qml index 5628e48..a2b71eb 100644 --- a/main.qml +++ b/main.qml @@ -112,6 +112,26 @@ ApplicationWindow MenuTool { text: qsTrId("id_menu_tool_text_rotated"); tool: Editor.Tool.TextRotated } } Menu + { + title: qsTrId("id_menu_settings") + Menu + { + title: qsTrId("id_menu_settings_lang") + MenuItem + { + text: qsTrId("id_menu_settings_eng") + checkable : true; checked: language === "eng" + onTriggered: setlanguage("eng") + } + MenuItem + { + text: qsTrId("id_menu_settings_fin") + checkable : true; checked: language === "fin" + onTriggered: setlanguage("fin") + } + } + } + Menu { title: qsTrId("id_menu_help") MenuItem { text: qsTrId("id_menu_help_contents"); shortcut: "F1"; onTriggered: help() } @@ -225,16 +245,6 @@ ApplicationWindow onCurrentIndexChanged: { symbolsize = currentIndex + 1; editor.update() } function setSize() { currentIndex = symbolsize - 1 } } - BarSeparator { } - Text { text: qsTrId("id_toolbar_language") } - ComboBox - { - id: langlist - implicitWidth: 60 - model: [ "eng", "fin" ] - onCurrentIndexChanged: { language = (currentIndex ? "fin" : "eng") } - function setLang() { currentIndex = (language === "eng" ? 0 : 1) } - } } RowLayout { @@ -406,7 +416,7 @@ ApplicationWindow snaplist.setSnap() widthlist.setWidth() symbollist.setSize() - langlist.setLang() +// langlist.setLang() colorlist.setColor() filllist.setFill() @@ -521,6 +531,11 @@ ApplicationWindow editor.update() } + function setlanguage(lang) + { + language = lang + } + function help() { manager.help("main") -- cgit v1.2.3