diff --git a/Justfile b/Justfile
index a839a189..0bd0b3d1 100644
--- a/Justfile
+++ b/Justfile
@@ -13,7 +13,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
-PYTHON_DIR := invocation_directory() + '/' + if os_family() == 'windows' { '.venv/Scripts' } else { '.venv/bin' }
+PYTHON_VENV_DIR := '.venv'
+PYTHON_DIR := invocation_directory() + '/' + if os_family() == 'windows' { PYTHON_VENV_DIR + '/Scripts' } else { PYTHON_VENV_DIR + '/bin' }
PYTHON := PYTHON_DIR + if os_family() == 'windows' { '/python.exe' } else { '/python3' }
#
@@ -33,12 +34,12 @@ export QT_QUICK_CONTROLS_MATERIAL_VARIANT := 'dense'
##### Names #####
##### #####
-NAME_APPLICATION := 'myapp'
+NAME_APPLICATION := 'pynocchio'
NAME_DIRECTORY_BUILD := 'build'
NAME_DIRECTORY_BUILD_HELPERS := 'build-aux'
NAME_DIRECTORY_DATA := 'data'
NAME_DIRECTORY_I18N := 'i18n'
-NAME_DIRECTORY_PY_SOURCES := 'myapp'
+NAME_DIRECTORY_PY_SOURCES := 'pynocchio'
NAME_DIRECTORY_PY_TESTS := 'test'
NAME_DIRECTORY_QML_SOURCES := 'qml'
NAME_DIRECTORY_QML_TESTS := 'qml'
diff --git a/README.MD b/README.md
similarity index 100%
rename from README.MD
rename to README.md
diff --git a/docs/internationalization.md b/docs/internationalization.md
index 79d76bfb..c65ea0eb 100644
--- a/docs/internationalization.md
+++ b/docs/internationalization.md
@@ -9,7 +9,7 @@
* New `.ts` file appears in the `i18n` directory
* Translate the `ts` file using Qt Linguist 6
* To test the translation:
- * Add a new entry in the `MyAppLanguageModel.qml` file
+ * Add a new entry in the `PynocchioLanguageModel.qml` file
* Run
```shell
just build-develop
diff --git a/main.py b/main.py
index f6a4c514..5b3bf976 100755
--- a/main.py
+++ b/main.py
@@ -2,10 +2,10 @@
def main():
- from myapp.startup import perform_startup
+ from pynocchio.startup import perform_startup
perform_startup()
-if __name__ == '__main__':
+if __name__ == "__main__":
main()
diff --git a/myapp b/myapp
new file mode 100644
index 00000000..0fb06d14
--- /dev/null
+++ b/myapp
@@ -0,0 +1,1637 @@
+# Resource object code (Python 3)
+# Created by: object code
+# Created by: The Resource Compiler for Qt version 6.8.0
+# WARNING! All changes made in this file will be lost!
+
+from PySide6 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x01 \
+<\
+\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xdd\xa7\
+\x00\x00\x00\x05he_ILB\x00\x00\x00 \x04\xdc\
+\x93~\x00\x00\x001\x04\xeb\x98\xc7\x00\x00\x00i\x0cN\
+0\xd8\x00\x00\x00\x00\x0cv\x96\x81\x00\x00\x00\x9bi\x00\
+\x00\x00\xd5\x03\x00\x00\x00\x0c\x05\xd0\x05\xe0\x05\xd2\x05\xdc\
+\x05\xd9\x05\xea\x08\x00\x00\x00\x00\x06\x00\x00\x00\x07En\
+glish\x07\x00\x00\x00\x09Langua\
+ges\x01\x03\x00\x00\x00\x14\x05\xd2\x05\xb6\x05\xe8\x05\
+\xde\x05\xb8\x05\xe0\x05\xb4\x05\xd9\x05\xb8\x05\xea\x08\x00\x00\
+\x00\x00\x06\x00\x00\x00\x06German\x07\x00\x00\
+\x00\x09Languages\x01\x03\x00\x00\x00\
+\x0e\x05\xe2\x05\xb4\x05\xd1\x05\xe8\x05\xb4\x05\xd9\x05\xea\x08\
+\x00\x00\x00\x00\x06\x00\x00\x00\x06Hebrew\x07\
+\x00\x00\x00\x09Languages\x01\x03\x00\
+\x00\x00\x14\x05\xea\x05\xe2\x05\xe9\x05\xd4\x00 \x05\xd7\x05\
+\xd9\x05\xd9\x05\xdd\x00!\x08\x00\x00\x00\x00\x06\x00\x00\x00\
+\x09Have fun!\x07\x00\x00\x00\x08M\
+ainPage\x01\x88\x00\x00\x00\x02\x01\x01\
+\x00\x00\x01\x22\
+<\
+\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xdd\xa7\
+\x00\x00\x00\x05de_DEB\x00\x00\x00 \x04\xdc\
+\x93~\x00\x00\x005\x04\xeb\x98\xc7\x00\x00\x00g\x0cN\
+0\xd8\x00\x00\x00\x00\x0cv\x96\x81\x00\x00\x00\x9di\x00\
+\x00\x00\xd7\x03\x00\x00\x00\x10\x00E\x00n\x00g\x00l\
+\x00i\x00s\x00c\x00h\x08\x00\x00\x00\x00\x06\x00\x00\
+\x00\x07English\x07\x00\x00\x00\x09La\
+nguages\x01\x03\x00\x00\x00\x0e\x00D\x00\
+e\x00u\x00t\x00s\x00c\x00h\x08\x00\x00\x00\x00\
+\x06\x00\x00\x00\x06German\x07\x00\x00\x00\x09\
+Languages\x01\x03\x00\x00\x00\x12\x00\
+H\x00e\x00b\x00r\x00\xe4\x00i\x00s\x00c\x00\
+h\x08\x00\x00\x00\x00\x06\x00\x00\x00\x06Hebre\
+w\x07\x00\x00\x00\x09Languages\x01\
+\x03\x00\x00\x00\x14\x00V\x00i\x00e\x00l\x00 \x00\
+S\x00p\x00a\x00\xdf\x00!\x08\x00\x00\x00\x00\x06\x00\
+\x00\x00\x09Have fun!\x07\x00\x00\x00\
+\x08MainPage\x01\x88\x00\x00\x00\x02\x01\
+\x01\
+\x00\x00\x0f\x18\
+<\
+?xml version=\x221.\
+0\x22 encoding=\x22UTF\
+-8\x22 standalone=\x22\
+no\x22?>\x0a\x0a\
+\x00\x00\x00Q\
+[\
+Controls]\x0aStyle=\
+Material\x0a\x0a[Mater\
+ial]\x0aVariant=Den\
+se\x0aAccent=LightG\
+reen\x0aTheme=Dark\x0a\
+\
+\x00\x00\x01\x0c\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 height=\x222\
+4px\x22 viewBox=\x220 \
+0 24 24\x22 width=\x22\
+24px\x22 fill=\x22#000\
+000\x22>\
+\x00\x00\x00\xaf\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 height=\x222\
+4px\x22 viewBox=\x220 \
+0 24 24\x22 width=\x22\
+24px\x22 fill=\x22#000\
+000\x22>\
+\x00\x00\x01\x17\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 enable-ba\
+ckground=\x22new 0 \
+0 24 24\x22 height=\
+\x2224px\x22 viewBox=\x22\
+0 0 24 24\x22 width\
+=\x2224px\x22 fill=\x22#0\
+00000\x22>\
+\
+\x00\x00\x016\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 enable-ba\
+ckground=\x22new 0 \
+0 24 24\x22 height=\
+\x2224px\x22 viewBox=\x22\
+0 0 24 24\x22 width\
+=\x2224px\x22 fill=\x22#0\
+00000\x22><\
+/svg>\
+\x00\x00\x08\x19\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0a\x0aimp\
+ort app\x0a\x0a\x0aApplic\
+ationWindow {\x0a \
+ id: root\x0a\x0a \
+width: 1280\x0a \
+height: 720\x0a \
+flags: Qt.Framel\
+essWindowHint | \
+Qt.Window\x0a vi\
+sible: true\x0a\x0a \
+ LayoutMirroring\
+.enabled: Qt.app\
+lication.layoutD\
+irection === Qt.\
+RightToLeft\x0a \
+LayoutMirroring.\
+childrenInherit:\
+ true\x0a\x0a Pynoc\
+chioMainPage {\x0a \
+ appWindow\
+: _shared\x0a\x0a \
+ anchors {\x0a \
+ fill: r\
+oot.contentItem\x0a\
+ marg\
+ins: _private.wi\
+ndowBorder\x0a \
+ }\x0a }\x0a\x0a \
+Component.onComp\
+leted: {\x0a \
+ // load languag\
+e from settings\x0a\
+ // Qt.ui\
+Language = ...\x0a \
+ }\x0a\x0a QtObje\
+ct {\x0a id:\
+ _private // Im\
+plementation det\
+ails not exposed\
+ to child items\x0a\
+\x0a readonl\
+y property bool \
+maximized: root.\
+visibility === W\
+indow.Maximized\x0a\
+ readonly\
+ property bool f\
+ullscreen: root.\
+visibility === W\
+indow.FullScreen\
+\x0a readonl\
+y property int w\
+indowBorder: ful\
+lscreen || maxim\
+ized ? 0 : 1\x0a \
+ }\x0a\x0a QtObject\
+ {\x0a id: _\
+shared // Prope\
+rties and functi\
+ons exposed to c\
+hild items\x0a\x0a \
+ readonly pro\
+perty var visibi\
+lity: root.visib\
+ility\x0a\x0a f\
+unction startSys\
+temMove() {\x0a \
+ root.sta\
+rtSystemMove()\x0a \
+ }\x0a\x0a \
+ function showM\
+inimized() {\x0a \
+ root.sh\
+owMinimized()\x0a \
+ }\x0a\x0a \
+ function showMa\
+ximized() {\x0a \
+ root.sho\
+wMaximized()\x0a \
+ }\x0a\x0a \
+function showNor\
+mal() {\x0a \
+ root.showNor\
+mal()\x0a }\x0a\
+\x0a functio\
+n close() {\x0a \
+ root.clo\
+se()\x0a }\x0a \
+ }\x0a\x0a}\x0a\
+\x00\x00\x05\xaa\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0a\x0a\x0aItem {\x0a \
+ id: root\x0a\x0a r\
+equired property\
+ var appWindow\x0a\x0a\
+ width: paren\
+t.width\x0a heig\
+ht: headerBar.he\
+ight\x0a\x0a TapHan\
+dler {\x0a g\
+esturePolicy: Ta\
+pHandler.DragThr\
+eshold\x0a\x0a \
+onTapped: {\x0a \
+ if (tapC\
+ount === 2) {\x0a \
+ if\
+ (root.appWindow\
+.visibility === \
+Window.Maximized\
+) {\x0a \
+ root.app\
+Window.showNorma\
+l()\x0a \
+ } else {\x0a \
+ \
+ root.appWindow.\
+showMaximized()\x0a\
+ \
+}\x0a }\x0a\
+ }\x0a }\x0a\
+\x0a DragHandler\
+ {\x0a targe\
+t: null\x0a \
+grabPermissions:\
+ TapHandler.CanT\
+akeOverFromAnyth\
+ing\x0a\x0a onA\
+ctiveChanged: {\x0a\
+ if (\
+active) {\x0a \
+ root.a\
+ppWindow.startSy\
+stemMove()\x0a \
+ }\x0a \
+ }\x0a }\x0a\x0a Py\
+nocchioHeaderCon\
+tent {\x0a i\
+d: headerBar\x0a\x0a \
+ appWindow:\
+ root.appWindow\x0a\
+ }\x0a\x0a}\x0a\
+\x00\x00\x04\xdc\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick.Controls\x0a\x0aim\
+port shared\x0a\x0a\x0aPy\
+nocchioAutoWidth\
+Menu {\x0a title\
+: qsTranslate(\x22H\
+eaderBar\x22, \x22&Hel\
+p\x22)\x0a\x0a Action \
+{\x0a text: \
+qsTranslate(\x22Hea\
+derBar\x22, \x22&Actio\
+n 1\x22)\x0a sh\
+ortcut: \x22CTRL+N\x22\
+\x0a\x0a onTrig\
+gered: {\x0a \
+ console.log\
+(\x22Action 1 press\
+ed\x22)\x0a }\x0a \
+ }\x0a\x0a Action\
+ {\x0a text:\
+ qsTranslate(\x22He\
+aderBar\x22, \x22&Acti\
+on 2\x22)\x0a\x0a \
+onTriggered: {\x0a \
+ conso\
+le.log(\x22Action 2\
+ pressed\x22)\x0a \
+ }\x0a }\x0a\x0a \
+MenuSeparator { \
+}\x0a\x0a Action {\x0a\
+ text: qs\
+Translate(\x22Heade\
+rBar\x22, \x22&Action \
+3\x22)\x0a\x0a onT\
+riggered: {\x0a \
+ console.\
+log(\x22Action 3 pr\
+essed\x22)\x0a \
+}\x0a }\x0a\x0a}\x0a\
+\x00\x00\x06\x0a\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick.Controls\x0a\x0aim\
+port shared\x0a\x0a\x0aPy\
+nocchioAutoWidth\
+Menu {\x0a title\
+: qsTranslate(\x22H\
+eaderBar\x22, \x22&Men\
+u 1\x22)\x0a\x0a Actio\
+n {\x0a text\
+: qsTranslate(\x22H\
+eaderBar\x22, \x22&Act\
+ion 1\x22)\x0a \
+shortcut: \x22CTRL+\
+N\x22\x0a\x0a onTr\
+iggered: {\x0a \
+ console.l\
+og(\x22Action 1 pre\
+ssed\x22)\x0a }\
+\x0a }\x0a\x0a Acti\
+on {\x0a tex\
+t: qsTranslate(\x22\
+HeaderBar\x22, \x22&Ac\
+tion 2\x22)\x0a\x0a \
+ onTriggered: {\
+\x0a con\
+sole.log(\x22Action\
+ 2 pressed\x22)\x0a \
+ }\x0a }\x0a\x0a \
+ Action {\x0a \
+ text: qsTrans\
+late(\x22HeaderBar\x22\
+, \x22&Action 3\x22)\x0a\x0a\
+ onTrigge\
+red: {\x0a \
+ console.log(\x22\
+Action 3 pressed\
+\x22)\x0a }\x0a \
+ }\x0a\x0a Action {\
+\x0a text: q\
+sTranslate(\x22Head\
+erBar\x22, \x22&Action\
+ 4\x22)\x0a\x0a on\
+Triggered: {\x0a \
+ console\
+.log(\x22Action 4 p\
+ressed\x22)\x0a \
+ }\x0a }\x0a\x0a Me\
+nuSeparator { }\x0a\
+\x0a Action {\x0a \
+ text: qsTr\
+anslate(\x22HeaderB\
+ar\x22, \x22&Action 5\x22\
+)\x0a\x0a onTri\
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x90epr\x01\xda\x941\
+\xfd\x1a\xa3PhU\x15\
+\x00\x00\x08\xd1\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0aimpo\
+rt QtQuick.Dialo\
+gs\x0a\x0aimport share\
+d\x0aimport models\x0a\
+\x0a\x0aPynocchioAutoW\
+idthMenu {\x0a i\
+d: root\x0a\x0a tit\
+le: qsTranslate(\
+\x22HeaderBar\x22, \x22&O\
+ptions\x22)\x0a\x0a Py\
+nocchioAutoWidth\
+Menu {\x0a t\
+itle: qsTranslat\
+e(\x22HeaderBar\x22, \x22\
+&Language\x22)\x0a\x0a \
+ Repeater {\x0a\
+ mode\
+l: PynocchioLang\
+uageModel {}\x0a\x0a \
+ MenuIt\
+em {\x0a \
+ id: _itemDe\
+legate\x0a\x0a \
+ required\
+ property string\
+ language // fr\
+om model\x0a \
+ require\
+d property strin\
+g abbrev // fro\
+m model\x0a\x0a \
+ text: q\
+sTranslate(\x22Lang\
+uages\x22, _itemDel\
+egate.language)\x0a\
+\x0a \
+ onTriggered: {\x0a\
+ \
+ animationDel\
+ayTimer.start()\x0a\
+ \
+}\x0a\x0a \
+ Timer {\x0a \
+ i\
+d: animationDela\
+yTimer\x0a\x0a \
+ inte\
+rval: 125\x0a\x0a \
+ o\
+nTriggered: {\x0a \
+ \
+ Qt.uiLangu\
+age = _itemDeleg\
+ate.abbrev\x0a \
+ }\
+\x0a \
+ }\x0a }\
+\x0a }\x0a }\
+\x0a\x0a MenuSepara\
+tor {\x0a }\x0a\x0a \
+ Action {\x0a \
+ text: qsTransl\
+ate(\x22HeaderBar\x22,\
+ \x22Showcase trans\
+lated Qt interna\
+l strings\x22)\x0a\x0a \
+ property va\
+r factory: Compo\
+nent\x0a {\x0a \
+ Messa\
+geDialog {\x0a \
+ title\
+: qsTranslate(\x22M\
+essageBoxes\x22, \x22T\
+itle\x22)\x0a \
+ text: qsT\
+ranslate(\x22Messag\
+eBoxes\x22, \x22Change\
+ the language an\
+d look at the 'Y\
+es' and 'Cancel'\
+ buttons\x22)\x0a \
+ butto\
+ns: MessageDialo\
+g.Yes | MessageD\
+ialog.Cancel\x0a \
+ vis\
+ible: true\x0a \
+ }\x0a \
+ }\x0a\x0a onTr\
+iggered: {\x0a \
+ const dia\
+log = factory.cr\
+eateObject(root)\
+\x0a dia\
+log.closed.conne\
+ct(dialog.destro\
+y)\x0a d\
+ialog.open()\x0a \
+ }\x0a }\x0a\x0a}\x0a\
+\
+\x00\x00\x002\
+m\
+odule header\x0aPyn\
+occhioHeader Pyn\
+occhioHeader.qml\
+\x0a\
+\x00\x00\x03\xc5\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0a\x0a\x0aListModel \
+{\x0a readonly p\
+roperty var lang\
+uagesForTranslat\
+ionTool: [\x0a \
+ qsTranslate(\x22\
+Languages\x22, \x22Eng\
+lish\x22),\x0a \
+qsTranslate(\x22Lan\
+guages\x22, \x22German\
+\x22),\x0a ]\x0a\x0a L\
+istElement {\x0a \
+ language: \x22\
+English\x22\x0a \
+ abbrev: \x22en_US\x22\
+\x0a }\x0a ListE\
+lement {\x0a \
+ language: \x22Germ\
+an\x22\x0a abbr\
+ev: \x22de_DE\x22\x0a \
+}\x0a}\x0a\
+\x00\x00\x00@\
+m\
+odule models\x0aPyn\
+occhioLanguageMo\
+del PynocchioLan\
+guageModel.qml\x0a\
+\x00\x00\x06\xcd\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtTes\
+t\x0a\x0a\x0aTestCase {\x0a \
+ id: testCase\x0a\
+\x0a name: \x22Pyno\
+cchioLanguageMod\
+elTest\x22\x0a\x0a Com\
+ponent {\x0a \
+ id: objectUnder\
+Test\x0a\x0a Py\
+nocchioLanguageM\
+odel {}\x0a }\x0a\x0a \
+ function extr\
+actLanguagesFrom\
+(model: Pynocchi\
+oLanguageModel):\
+ Array {\
+\x0a const l\
+anguages = []\x0a \
+ for (let i\
+ = 0; i < model.\
+count; i++) {\x0a \
+ langua\
+ges.push(model.g\
+et(i).abbrev)\x0a \
+ }\x0a \
+return languages\
+\x0a }\x0a\x0a func\
+tion test_langua\
+geExists_data() \
+{\x0a return\
+ [\x0a {\
+tag: 'de_DE', ab\
+brev: 'de_DE'},\x0a\
+ {tag\
+: 'en_US', abbre\
+v: 'en_US'},\x0a \
+ ]\x0a }\x0a\x0a \
+ function test_\
+languageExists(d\
+ata) {\x0a c\
+onst control = c\
+reateTemporaryOb\
+ject(objectUnder\
+Test, testCase)\x0a\
+ verify(c\
+ontrol)\x0a\x0a \
+ const languages\
+ = extractLangua\
+gesFrom(control)\
+\x0a verify(\
+languages.includ\
+es(data.abbrev))\
+\x0a }\x0a\x0a func\
+tion test_langua\
+geDoesNotExist()\
+ {\x0a const\
+ control = creat\
+eTemporaryObject\
+(objectUnderTest\
+, testCase)\x0a \
+ verify(contr\
+ol)\x0a\x0a con\
+st languages = e\
+xtractLanguagesF\
+rom(control)\x0a \
+ verify(!lan\
+guages.includes(\
+'something-else'\
+))\x0a }\x0a\x0a}\x0a\
+\x00\x00\x003\
+q\
+mldir app\x0aPynocc\
+hioMainPage Pyno\
+cchioMainPage.qm\
+l\x0a\
+\x00\x00\x09\x8f\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0aimpo\
+rt QtQuick.Layou\
+ts\x0a\x0aimport heade\
+r\x0aimport pyobjec\
+ts\x0a\x0a\x0aPage {\x0a \
+id: root\x0a\x0a re\
+quired property \
+var appWindow\x0a\x0a \
+ anchors {\x0a \
+ fill: root\x0a\
+ }\x0a\x0a heade\
+r: PynocchioHead\
+er {\x0a app\
+Window: root.app\
+Window\x0a }\x0a\x0a \
+ ColumnLayout {\
+\x0a spacing\
+: 8\x0a widt\
+h: root.width\x0a\x0a \
+ //Image {\
+\x0a // s\
+ource: \x22qrc:/dat\
+a/app-icon.svg\x22\x0a\
+ // as\
+ynchronous: true\
+\x0a //\x0a \
+ // Layout\
+.alignment: Qt.A\
+lignHCenter\x0a \
+ // Layout\
+.preferredWidth:\
+ 308\x0a // \
+ Layout.prefer\
+redHeight: 226\x0a \
+ // Lay\
+out.topMargin: 3\
+0\x0a //}\x0a\x0a \
+ //Label {\
+\x0a // t\
+ext: Qt.applicat\
+ion.name + ' (' \
++ Qt.application\
+.version + ')'\x0a \
+ //\x0a \
+ // font {\x0a \
+ // \
+ bold: true\x0a \
+ // pi\
+xelSize: Qt.appl\
+ication.font.pix\
+elSize * 1.5\x0a \
+ // }\x0a \
+ //\x0a \
+// Layout.ali\
+gnment: Qt.Align\
+HCenter\x0a \
+// Layout.top\
+Margin: 45\x0a \
+ //}\x0a\x0a \
+Label {\x0a \
+ text: 'Runni\
+ng on ' + Qt.pla\
+tform.os\x0a\x0a \
+ font {\x0a \
+ bol\
+d: true\x0a \
+ pixelSiz\
+e: Qt.applicatio\
+n.font.pixelSize\
+ * 1.5\x0a \
+ }\x0a\x0a \
+ Layout.alignme\
+nt: Qt.AlignHCen\
+ter\x0a }\x0a\x0a \
+ //Label {\
+\x0a // t\
+ext: qsTranslate\
+(\x22MainPage\x22, \x22Ha\
+ve fun!\x22)\x0a \
+ // color: M\
+aterial.accent\x0a \
+ //\x0a \
+ // font {\x0a \
+ // \
+ bold: true\x0a \
+ // pi\
+xelSize: Qt.appl\
+ication.font.pix\
+elSize * 1.5\x0a \
+ // }\x0a \
+ //\x0a \
+// Layout.ali\
+gnment: Qt.Align\
+HCenter\x0a \
+// Layout.top\
+Margin: 45\x0a \
+ //}\x0a\x0a \
+//Label {\x0a \
+ // text: qs\
+Translate(\x22MainP\
+age\x22, \x22Exposed f\
+rom Python: '%1'\
+\x22).arg(Singleton\
+PyObject.exposed\
+_property)\x0a \
+ //\x0a //\
+ Layout.align\
+ment: Qt.AlignHC\
+enter\x0a //\
+ Layout.topMa\
+rgin: 45\x0a \
+ //}\x0a }\x0a\x0a}\x0a\
+\x00\x00\x05\x98\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0a\x0a\x0aMe\
+nu {\x0a id: roo\
+t\x0a\x0a /*\x0a Ta\
+ken and adapted \
+from:\x0a https:\
+//martin.rpdev.n\
+et/2018/03/13/qt\
+-quick-controls-\
+2-automatically-\
+set-the-width-of\
+-menus.html\x0a \
+*/\x0a\x0a readonly\
+ property bool m\
+Mirrored: count \
+> 0 && itemAt(0)\
+.mirrored\x0a\x0a x\
+: mMirrored ? -w\
+idth + parent.wi\
+dth : 0\x0a\x0a wid\
+th: {\x0a le\
+t result = 0\x0a \
+ let padding\
+ = 0\x0a for\
+ (let i = 0; i <\
+ root.count; ++i\
+) {\x0a \
+let item = root.\
+itemAt(i)\x0a\x0a \
+ if (!isMe\
+nuSeparator(item\
+)) {\x0a \
+ result = Ma\
+th.max(item.cont\
+entItem.implicit\
+Width, result)\x0a \
+ p\
+adding = Math.ma\
+x(item.padding, \
+padding)\x0a \
+ }\x0a }\
+\x0a return \
+result + padding\
+ * 2\x0a }\x0a\x0a \
+function isMenuS\
+eparator(item) {\
+\x0a return \
+item instanceof \
+MenuSeparator\x0a \
+ }\x0a\x0a}\x0a\
+\x00\x00\x00K\
+m\
+odule components\
+.shared\x0aPynocchi\
+oAutoWidthMenu P\
+ynocchioAutoWidt\
+hMenu.qml\x0a\
+"
+
+qt_resource_name = b"\
+\x00\x03\
+\x00\x00x<\
+\x00q\
+\x00m\x00l\
+\x00\x04\
+\x00\x06\xa8\xa1\
+\x00d\
+\x00a\x00t\x00a\
+\x00\x04\
+\x00\x06\xc4\xee\
+\x00i\
+\x001\x008\x00n\
+\x00\x08\
+\x0b=\xf8\xbd\
+\x00h\
+\x00e\x00_\x00I\x00L\x00.\x00q\x00m\
+\x00\x08\
+\x0b8\x88=\
+\x00d\
+\x00e\x00_\x00D\x00E\x00.\x00q\x00m\
+\x00\x05\
+\x00o\xa6S\
+\x00i\
+\x00c\x00o\x00n\x00s\
+\x00\x0c\
+\x07o='\
+\x00a\
+\x00p\x00p\x00-\x00i\x00c\x00o\x00n\x00.\x00s\x00v\x00g\
+\x00\x15\
+\x08\x1e\x16f\
+\x00q\
+\x00t\x00q\x00u\x00i\x00c\x00k\x00c\x00o\x00n\x00t\x00r\x00o\x00l\x00s\x002\x00.\
+\x00c\x00o\x00n\x00f\
+\x00\x14\
+\x03\xe9\x9d'\
+\x00c\
+\x00l\x00o\x00s\x00e\x00_\x00b\x00l\x00a\x00c\x00k\x00_\x002\x004\x00d\x00p\x00.\
+\x00s\x00v\x00g\
+\x00\x17\
+\x0d\xa5\x80\x07\
+\x00m\
+\x00i\x00n\x00i\x00m\x00i\x00z\x00e\x00_\x00b\x00l\x00a\x00c\x00k\x00_\x002\x004\
+\x00d\x00p\x00.\x00s\x00v\x00g\
+\x00\x1b\
+\x0bil\x07\
+\x00o\
+\x00p\x00e\x00n\x00_\x00i\x00n\x00_\x00f\x00u\x00l\x00l\x00_\x00b\x00l\x00a\x00c\
+\x00k\x00_\x002\x004\x00d\x00p\x00.\x00s\x00v\x00g\
+\x00\x1f\
+\x03\xe6\x1d\xe7\
+\x00c\
+\x00l\x00o\x00s\x00e\x00_\x00f\x00u\x00l\x00l\x00s\x00c\x00r\x00e\x00e\x00n\x00_\
+\x00b\x00l\x00a\x00c\x00k\x00_\x002\x004\x00d\x00p\x00.\x00s\x00v\x00g\
+\x00\x06\
+\x07\x9e\x88\xb4\
+\x00s\
+\x00h\x00a\x00r\x00e\x00d\
+\x00\x03\
+\x00\x00hp\
+\x00a\
+\x00p\x00p\
+\x00\x06\
+\x07E\xac3\
+\x00m\
+\x00o\x00d\x00e\x00l\x00s\
+\x00\x08\
+\x08\x01Z\x5c\
+\x00m\
+\x00a\x00i\x00n\x00.\x00q\x00m\x00l\
+\x00\x06\
+\x06\xebz\xc2\
+\x00h\
+\x00e\x00a\x00d\x00e\x00r\
+\x00\x13\
+\x04\xd7\xe6|\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00H\x00e\x00a\x00d\x00e\x00r\x00.\x00q\
+\x00m\x00l\
+\x00\x15\
+\x0a\xe4\x82|\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00H\x00e\x00l\x00p\x00M\x00e\x00n\x00u\
+\x00.\x00q\x00m\x00l\
+\x00\x15\
+\x0d4[\x9c\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00M\x00e\x00n\x00u\x00F\x00i\x00l\x00e\
+\x00.\x00q\x00m\x00l\
+\x00\x1a\
+\x02\xdcV\x5c\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00H\x00e\x00a\x00d\x00e\x00r\x00C\x00o\
+\x00n\x00t\x00e\x00n\x00t\x00.\x00q\x00m\x00l\
+\x00\x18\
+\x06\x1aM<\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00O\x00p\x00t\x00i\x00o\x00n\x00s\x00M\
+\x00e\x00n\x00u\x00.\x00q\x00m\x00l\
+\x00\x06\
+\x07\x84+\x02\
+\x00q\
+\x00m\x00l\x00d\x00i\x00r\
+\x00\x1a\
+\x0e\xe1\x94\xbc\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00L\x00a\x00n\x00g\x00u\x00a\x00g\x00e\
+\x00M\x00o\x00d\x00e\x00l\x00.\x00q\x00m\x00l\
+\x00\x1e\
+\x06K\xb7|\
+\x00t\
+\x00s\x00t\x00_\x00P\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00L\x00a\x00n\x00g\
+\x00u\x00a\x00g\x00e\x00M\x00o\x00d\x00e\x00l\x00.\x00q\x00m\x00l\
+\x00\x15\
+\x02\xdf\xee\xdc\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00M\x00a\x00i\x00n\x00P\x00a\x00g\x00e\
+\x00.\x00q\x00m\x00l\
+\x00\x1a\
+\x05\xf0\xb8\xfc\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00A\x00u\x00t\x00o\x00W\x00i\x00d\x00t\
+\x00h\x00M\x00e\x00n\x00u\x00.\x00q\x00m\x00l\
+"
+
+qt_resource_struct = b"\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x05\x00\x00\x00\x0d\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x0c\x00\x02\x00\x00\x00\x03\x00\x00\x00\x06\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x1a\x00\x02\x00\x00\x00\x02\x00\x00\x00\x04\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00>\x00\x00\x00\x00\x00\x01\x00\x00\x01$\
+\x00\x00\x01\x93\x12\x90b\xf2\
+\x00\x00\x00(\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x01\x93\x12\x90b\xf2\
+\x00\x00\x00T\x00\x02\x00\x00\x00\x04\x00\x00\x00\x09\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00d\x00\x00\x00\x00\x00\x01\x00\x00\x02J\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x00\x82\x00\x00\x00\x00\x00\x01\x00\x00\x11f\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x01P\x00\x00\x00\x00\x00\x01\x00\x00\x14\x99\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x11\xbb\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x01\x14\x00\x00\x00\x00\x00\x01\x00\x00\x13~\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x01\x00\x00\x12\xcb\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x01\xa6\x00\x02\x00\x00\x00\x02\x00\x00\x00\x1d\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\xda\x00\x02\x00\x00\x00\x06\x00\x00\x00\x17\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\xb2\x00\x02\x00\x00\x00\x03\x00\x00\x00\x14\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\x94\x00\x02\x00\x00\x00\x02\x00\x00\x00\x12\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\xc4\x00\x00\x00\x00\x00\x01\x00\x00\x15\xd3\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x03\xa6\x00\x00\x00\x00\x00\x01\x00\x00Pk\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00V\x07\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x034\x00\x00\x00\x00\x00\x01\x00\x00?\xd0\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00?\x8c\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02\xfa\x00\x00\x00\x00\x00\x01\x00\x00;\xc3\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02x\x00\x04\x00\x00\x00\x01\x00\x00.\x8c\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x01\xec\x00\x00\x00\x00\x00\x01\x00\x00\x1d\xf0\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02\xb2\x00\x00\x00\x00\x00\x01\x00\x002\xb8\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00;\x8d\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02\x18\x00\x00\x00\x00\x00\x01\x00\x00#\x9e\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02H\x00\x00\x00\x00\x00\x01\x00\x00(~\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x03v\x00\x00\x00\x00\x00\x01\x00\x00F\xd8\
+\x00\x00\x01\x93\x12\x90b\xf1\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00F\xa1\
+\x00\x00\x01\x93\x12\x90b\xf1\
+"
+
+def qInitResources():
+ QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+def qCleanupResources():
+ QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+qInitResources()
diff --git a/myapp/__init__.py b/pynocchio/__init__.py
similarity index 100%
rename from myapp/__init__.py
rename to pynocchio/__init__.py
diff --git a/myapp/application.py b/pynocchio/application.py
similarity index 54%
rename from myapp/application.py
rename to pynocchio/application.py
index c76df5b0..400b4968 100644
--- a/myapp/application.py
+++ b/pynocchio/application.py
@@ -13,25 +13,31 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-
+import logging
import platform
import sys
-from PySide6.QtCore import QUrl, QTranslator, QLocale, QLibraryInfo
+from PySide6.QtCore import QLibraryInfo, QLocale, QTranslator, QUrl
from PySide6.QtGui import QGuiApplication, QIcon
from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtWidgets import QFileDialog
+
+from pynocchio.utility import COMPACT_FILE_FORMATS, IMAGE_FILE_FORMATS, file_exist
+logging.basicConfig(level=logging.INFO)
+logger = logging.getLogger(__name__)
-class MyApplication(QGuiApplication):
+
+class PynocchioApplication(QGuiApplication):
def __init__(self, args):
super().__init__(args)
self._engine = QQmlApplicationEngine()
- self._translator_myapp = QTranslator()
+ self._translator_pynocchio = QTranslator()
self._translator_qt = QTranslator()
def set_window_icon(self):
- icon = QIcon(':/data/app-icon.svg')
+ icon = QIcon(":/data/app-icon.svg")
self.setWindowIcon(icon)
def set_up_signals(self):
@@ -45,36 +51,41 @@ def _retranslate(self):
locale = QLocale(self._engine.uiLanguage())
self.removeTranslator(self._translator_qt)
- self.removeTranslator(self._translator_myapp)
+ self.removeTranslator(self._translator_pynocchio)
self._translator_qt.load(locale, "qtbase", "_", QLibraryInfo.location(QLibraryInfo.TranslationsPath))
- self._translator_myapp.load(f':/i18n/{locale.name()}.qm')
+ self._translator_pynocchio.load(f":/i18n/{locale.name()}.qm")
self.installTranslator(self._translator_qt)
- self.installTranslator(self._translator_myapp)
+ self.installTranslator(self._translator_pynocchio)
self.setLayoutDirection(locale.textDirection())
def set_up_imports(self):
- self._engine.addImportPath(':/qml')
+ self._engine.addImportPath(":/qml")
def set_up_window_event_filter(self):
+
if platform.system() == "Windows":
- from myapp.framelesswindow.win import WindowsEventFilter
+ from pynocchio.framelesswindow.win import WindowsEventFilter
+
self._event_filter = WindowsEventFilter(border_width=5)
self.installNativeEventFilter(self._event_filter)
- elif platform.system() == 'Linux':
- from myapp.framelesswindow.linux import LinuxEventFilter
+
+ elif platform.system() == "Linux":
+ from pynocchio.framelesswindow.linux import LinuxEventFilter
+
self._event_filter = LinuxEventFilter(border_width=5)
self.installEventFilter(self._event_filter)
def start_engine(self):
- self._engine.load(QUrl.fromLocalFile(':/qml/main.qml'))
+ self._engine.load(QUrl.fromLocalFile(":/qml/main.qml"))
def set_up_window_effects(self):
- if sys.platform == 'win32':
+ if sys.platform == "win32":
hwnd = self.topLevelWindows()[0].winId()
- from myapp.framelesswindow.win import WindowsWindowEffect
+ from pynocchio.framelesswindow.win import WindowsWindowEffect
+
self._effects = WindowsWindowEffect()
self._effects.addShadowEffect(hwnd)
self._effects.addWindowAnimation(hwnd)
@@ -82,3 +93,28 @@ def set_up_window_effects(self):
def verify(self):
if not self._engine.rootObjects():
sys.exit(-1)
+
+ def on_action_open_file_triggered(self):
+
+ cb_formats = " ".join(["*" + cb for cb in COMPACT_FILE_FORMATS])
+ img_formats = " ".join(["*" + img for img in IMAGE_FILE_FORMATS])
+ all_files = f"{cb_formats} {img_formats}"
+
+ filename = QFileDialog().getOpenFileName(
+ self,
+ self.tr("Open Comic File"),
+ # self.model.current_directory,
+ self.tr(
+ f"all supported files ({all_files});; "
+ "zip files (*.zip *.cbz);; rar files (*.rar *.cbr);; "
+ f"tar files (*.tar *.cbt);; image files ({img_formats});; "
+ "all files (*)"
+ ),
+ )
+
+ if filename:
+ logger.info("Opening file")
+
+ # initial_page = self.get_page_from_temporary_bookmarks(filename[0])
+
+ # self.open_comics(filename[0], initial_page)
diff --git a/myapp/framelesswindow/__init__.py b/pynocchio/framelesswindow/__init__.py
similarity index 100%
rename from myapp/framelesswindow/__init__.py
rename to pynocchio/framelesswindow/__init__.py
diff --git a/myapp/framelesswindow/linux/__init__.py b/pynocchio/framelesswindow/linux/__init__.py
similarity index 100%
rename from myapp/framelesswindow/linux/__init__.py
rename to pynocchio/framelesswindow/linux/__init__.py
diff --git a/myapp/framelesswindow/linux/event.py b/pynocchio/framelesswindow/linux/event.py
similarity index 97%
rename from myapp/framelesswindow/linux/event.py
rename to pynocchio/framelesswindow/linux/event.py
index 99ed3003..4cef752e 100644
--- a/myapp/framelesswindow/linux/event.py
+++ b/pynocchio/framelesswindow/linux/event.py
@@ -19,7 +19,7 @@
from typing import Optional
-from PySide6.QtCore import QCoreApplication, QObject, QEvent, Qt
+from PySide6.QtCore import QCoreApplication, QEvent, QObject, Qt
from PySide6.QtGui import QCursor, QGuiApplication, QWindow
diff --git a/myapp/framelesswindow/win/__init__.py b/pynocchio/framelesswindow/win/__init__.py
similarity index 100%
rename from myapp/framelesswindow/win/__init__.py
rename to pynocchio/framelesswindow/win/__init__.py
diff --git a/myapp/framelesswindow/win/c_structures.py b/pynocchio/framelesswindow/win/c_structures.py
similarity index 100%
rename from myapp/framelesswindow/win/c_structures.py
rename to pynocchio/framelesswindow/win/c_structures.py
diff --git a/myapp/framelesswindow/win/effect.py b/pynocchio/framelesswindow/win/effect.py
similarity index 100%
rename from myapp/framelesswindow/win/effect.py
rename to pynocchio/framelesswindow/win/effect.py
diff --git a/myapp/framelesswindow/win/event.py b/pynocchio/framelesswindow/win/event.py
similarity index 100%
rename from myapp/framelesswindow/win/event.py
rename to pynocchio/framelesswindow/win/event.py
diff --git a/pynocchio/generated_resources.py b/pynocchio/generated_resources.py
new file mode 100644
index 00000000..86b66f4a
--- /dev/null
+++ b/pynocchio/generated_resources.py
@@ -0,0 +1,1627 @@
+# Resource object code (Python 3)
+# Created by: object code
+# Created by: The Resource Compiler for Qt version 6.8.0
+# WARNING! All changes made in this file will be lost!
+
+from PySide6 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x01 \
+<\
+\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xdd\xa7\
+\x00\x00\x00\x05he_ILB\x00\x00\x00 \x04\xdc\
+\x93~\x00\x00\x001\x04\xeb\x98\xc7\x00\x00\x00i\x0cN\
+0\xd8\x00\x00\x00\x00\x0cv\x96\x81\x00\x00\x00\x9bi\x00\
+\x00\x00\xd5\x03\x00\x00\x00\x0c\x05\xd0\x05\xe0\x05\xd2\x05\xdc\
+\x05\xd9\x05\xea\x08\x00\x00\x00\x00\x06\x00\x00\x00\x07En\
+glish\x07\x00\x00\x00\x09Langua\
+ges\x01\x03\x00\x00\x00\x14\x05\xd2\x05\xb6\x05\xe8\x05\
+\xde\x05\xb8\x05\xe0\x05\xb4\x05\xd9\x05\xb8\x05\xea\x08\x00\x00\
+\x00\x00\x06\x00\x00\x00\x06German\x07\x00\x00\
+\x00\x09Languages\x01\x03\x00\x00\x00\
+\x0e\x05\xe2\x05\xb4\x05\xd1\x05\xe8\x05\xb4\x05\xd9\x05\xea\x08\
+\x00\x00\x00\x00\x06\x00\x00\x00\x06Hebrew\x07\
+\x00\x00\x00\x09Languages\x01\x03\x00\
+\x00\x00\x14\x05\xea\x05\xe2\x05\xe9\x05\xd4\x00 \x05\xd7\x05\
+\xd9\x05\xd9\x05\xdd\x00!\x08\x00\x00\x00\x00\x06\x00\x00\x00\
+\x09Have fun!\x07\x00\x00\x00\x08M\
+ainPage\x01\x88\x00\x00\x00\x02\x01\x01\
+\x00\x00\x01\x22\
+<\
+\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xdd\xa7\
+\x00\x00\x00\x05de_DEB\x00\x00\x00 \x04\xdc\
+\x93~\x00\x00\x005\x04\xeb\x98\xc7\x00\x00\x00g\x0cN\
+0\xd8\x00\x00\x00\x00\x0cv\x96\x81\x00\x00\x00\x9di\x00\
+\x00\x00\xd7\x03\x00\x00\x00\x10\x00E\x00n\x00g\x00l\
+\x00i\x00s\x00c\x00h\x08\x00\x00\x00\x00\x06\x00\x00\
+\x00\x07English\x07\x00\x00\x00\x09La\
+nguages\x01\x03\x00\x00\x00\x0e\x00D\x00\
+e\x00u\x00t\x00s\x00c\x00h\x08\x00\x00\x00\x00\
+\x06\x00\x00\x00\x06German\x07\x00\x00\x00\x09\
+Languages\x01\x03\x00\x00\x00\x12\x00\
+H\x00e\x00b\x00r\x00\xe4\x00i\x00s\x00c\x00\
+h\x08\x00\x00\x00\x00\x06\x00\x00\x00\x06Hebre\
+w\x07\x00\x00\x00\x09Languages\x01\
+\x03\x00\x00\x00\x14\x00V\x00i\x00e\x00l\x00 \x00\
+S\x00p\x00a\x00\xdf\x00!\x08\x00\x00\x00\x00\x06\x00\
+\x00\x00\x09Have fun!\x07\x00\x00\x00\
+\x08MainPage\x01\x88\x00\x00\x00\x02\x01\
+\x01\
+\x00\x00\x0f\x18\
+<\
+?xml version=\x221.\
+0\x22 encoding=\x22UTF\
+-8\x22 standalone=\x22\
+no\x22?>\x0a\x0a\
+\x00\x00\x00Q\
+[\
+Controls]\x0aStyle=\
+Material\x0a\x0a[Mater\
+ial]\x0aVariant=Den\
+se\x0aAccent=LightG\
+reen\x0aTheme=Dark\x0a\
+\
+\x00\x00\x01\x0c\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 height=\x222\
+4px\x22 viewBox=\x220 \
+0 24 24\x22 width=\x22\
+24px\x22 fill=\x22#000\
+000\x22>\
+\x00\x00\x00\xaf\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 height=\x222\
+4px\x22 viewBox=\x220 \
+0 24 24\x22 width=\x22\
+24px\x22 fill=\x22#000\
+000\x22>\
+\x00\x00\x01\x17\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 enable-ba\
+ckground=\x22new 0 \
+0 24 24\x22 height=\
+\x2224px\x22 viewBox=\x22\
+0 0 24 24\x22 width\
+=\x2224px\x22 fill=\x22#0\
+00000\x22>\
+\
+\x00\x00\x016\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 enable-ba\
+ckground=\x22new 0 \
+0 24 24\x22 height=\
+\x2224px\x22 viewBox=\x22\
+0 0 24 24\x22 width\
+=\x2224px\x22 fill=\x22#0\
+00000\x22><\
+/svg>\
+\x00\x00\x09\x84\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0aimpo\
+rt QtCore\x0aimport\
+ QtQuick.Dialogs\
+\x0aimport app\x0a\x0a\x0aAp\
+plicationWindow \
+{\x0a id: root\x0a\x0a\
+ width: 1280\x0a\
+ height: 720\x0a\
+ flags: Qt.Fr\
+amelessWindowHin\
+t | Qt.Window\x0a \
+ visible: true\x0a\
+\x0a LayoutMirro\
+ring.enabled: Qt\
+.application.lay\
+outDirection ===\
+ Qt.RightToLeft\x0a\
+ LayoutMirror\
+ing.childrenInhe\
+rit: true\x0a\x0a P\
+ynocchioMainPage\
+ {\x0a appWi\
+ndow: _shared\x0a\x0a \
+ anchors {\
+\x0a fil\
+l: root.contentI\
+tem\x0a \
+margins: _privat\
+e.windowBorder\x0a \
+ }\x0a }\x0a\x0a\
+ Component.on\
+Completed: {\x0a \
+ // load lan\
+guage from setti\
+ngs\x0a // Q\
+t.uiLanguage = .\
+..\x0a }\x0a\x0a Qt\
+Object {\x0a \
+ id: _private /\
+/ Implementation\
+ details not exp\
+osed to child it\
+ems\x0a\x0a rea\
+donly property b\
+ool maximized: r\
+oot.visibility =\
+== Window.Maximi\
+zed\x0a read\
+only property bo\
+ol fullscreen: r\
+oot.visibility =\
+== Window.FullSc\
+reen\x0a rea\
+donly property i\
+nt windowBorder:\
+ fullscreen || m\
+aximized ? 0 : 1\
+\x0a }\x0a\x0a QtOb\
+ject {\x0a i\
+d: _shared // P\
+roperties and fu\
+nctions exposed \
+to child items\x0a\x0a\
+ readonly\
+ property var vi\
+sibility: root.v\
+isibility\x0a\x0a \
+ function star\
+tSystemMove() {\x0a\
+ root\
+.startSystemMove\
+()\x0a }\x0a\x0a \
+ function s\
+howMinimized() {\
+\x0a roo\
+t.showMinimized(\
+)\x0a }\x0a\x0a \
+ function sh\
+owMaximized() {\x0a\
+ root\
+.showMaximized()\
+\x0a }\x0a\x0a \
+ function sho\
+wNormal() {\x0a \
+ root.sho\
+wNormal()\x0a \
+ }\x0a\x0a fun\
+ction close() {\x0a\
+ root\
+.close()\x0a \
+ }\x0a }\x0a\x0a Fi\
+leDialog {\x0a \
+ id: openDialog\x0a\
+ fileMode: \
+FileDialog.OpenF\
+ile\x0a select\
+edNameFilter.ind\
+ex: 1\x0a name\
+Filters: [\x22Comic\
+ Files (*.cbr *.\
+cbz)\x22, \x22Compact \
+files (*.zip *.r\
+ar)\x22]\x0a curr\
+entFolder: Stand\
+ardPaths.writabl\
+eLocation(Standa\
+rdPaths.HomeLoca\
+tion)\x0a onAc\
+cepted: {\x0a \
+ console.log('O\
+K')\x0a }\x0a }\x0a\
+\x0a}\x0a\
+\x00\x00\x04\x9b\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick.Controls\x0aimp\
+ort QtCore\x0aimpor\
+t shared\x0a\x0a\x0a\x0aPyno\
+cchioAutoWidthMe\
+nu {\x0a title: \
+qsTranslate(\x22Hea\
+derBar\x22, \x22&File\x22\
+)\x0a\x0a Action {\x0a\
+ id: open\
+Action\x0a t\
+ext: qsTranslate\
+(\x22HeaderBar\x22, \x22&\
+Open\x22)\x0a s\
+hortcut: Standar\
+dKey.Open\x0a \
+ onTriggered: {\
+\x0a con\
+sole.log(\x22Open P\
+ressed\x22)\x0a \
+ openDialog.\
+open()\x0a }\
+\x0a }\x0a\x0a Menu\
+Separator { }\x0a\x0a \
+ Action {\x0a \
+ text: qsTran\
+slate(\x22HeaderBar\
+\x22, \x22&Exit\x22)\x0a\x0a \
+ onTriggered\
+: {\x0a \
+console.log(\x22Exi\
+t\x22)\x0a \
+root.appWindow.c\
+lose()\x0a }\
+\x0a }\x0a\x0a}\x0a\
+\x00\x00\x05\xaa\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0a\x0a\x0aItem {\x0a \
+ id: root\x0a\x0a r\
+equired property\
+ var appWindow\x0a\x0a\
+ width: paren\
+t.width\x0a heig\
+ht: headerBar.he\
+ight\x0a\x0a TapHan\
+dler {\x0a g\
+esturePolicy: Ta\
+pHandler.DragThr\
+eshold\x0a\x0a \
+onTapped: {\x0a \
+ if (tapC\
+ount === 2) {\x0a \
+ if\
+ (root.appWindow\
+.visibility === \
+Window.Maximized\
+) {\x0a \
+ root.app\
+Window.showNorma\
+l()\x0a \
+ } else {\x0a \
+ \
+ root.appWindow.\
+showMaximized()\x0a\
+ \
+}\x0a }\x0a\
+ }\x0a }\x0a\
+\x0a DragHandler\
+ {\x0a targe\
+t: null\x0a \
+grabPermissions:\
+ TapHandler.CanT\
+akeOverFromAnyth\
+ing\x0a\x0a onA\
+ctiveChanged: {\x0a\
+ if (\
+active) {\x0a \
+ root.a\
+ppWindow.startSy\
+stemMove()\x0a \
+ }\x0a \
+ }\x0a }\x0a\x0a Py\
+nocchioHeaderCon\
+tent {\x0a i\
+d: headerBar\x0a\x0a \
+ appWindow:\
+ root.appWindow\x0a\
+ }\x0a\x0a}\x0a\
+\x00\x00\x04:\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick.Controls\x0a\x0aim\
+port shared\x0a\x0a\x0aPy\
+nocchioAutoWidth\
+Menu {\x0a title\
+: qsTranslate(\x22H\
+eaderBar\x22, \x22&Hel\
+p\x22)\x0a\x0a Action \
+{\x0a text: \
+qsTranslate(\x22Hea\
+derBar\x22, \x22&Repor\
+t a bug\x22)\x0a\x0a \
+ onTriggered: \
+{\x0a co\
+nsole.log(\x22Actio\
+n about pressed\x22\
+)\x0a }\x0a \
+}\x0a\x0a MenuSepar\
+ator { }\x0a\x0a Ac\
+tion {\x0a t\
+ext: qsTranslate\
+(\x22HeaderBar\x22, \x22&\
+About Pynocchio\x22\
+)\x0a\x0a onTri\
+ggered: {\x0a \
+ console.lo\
+g(\x22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81B\x810\x080\x92L\x94\xd7\
+\x04\x85\xc2\xa5\xaa\
+\x00\x00\x08\xd1\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0aimpo\
+rt QtQuick.Dialo\
+gs\x0a\x0aimport share\
+d\x0aimport models\x0a\
+\x0a\x0aPynocchioAutoW\
+idthMenu {\x0a i\
+d: root\x0a\x0a tit\
+le: qsTranslate(\
+\x22HeaderBar\x22, \x22&O\
+ptions\x22)\x0a\x0a Py\
+nocchioAutoWidth\
+Menu {\x0a t\
+itle: qsTranslat\
+e(\x22HeaderBar\x22, \x22\
+&Language\x22)\x0a\x0a \
+ Repeater {\x0a\
+ mode\
+l: PynocchioLang\
+uageModel {}\x0a\x0a \
+ MenuIt\
+em {\x0a \
+ id: _itemDe\
+legate\x0a\x0a \
+ required\
+ property string\
+ language // fr\
+om model\x0a \
+ require\
+d property strin\
+g abbrev // fro\
+m model\x0a\x0a \
+ text: q\
+sTranslate(\x22Lang\
+uages\x22, _itemDel\
+egate.language)\x0a\
+\x0a \
+ onTriggered: {\x0a\
+ \
+ animationDel\
+ayTimer.start()\x0a\
+ \
+}\x0a\x0a \
+ Timer {\x0a \
+ i\
+d: animationDela\
+yTimer\x0a\x0a \
+ inte\
+rval: 125\x0a\x0a \
+ o\
+nTriggered: {\x0a \
+ \
+ Qt.uiLangu\
+age = _itemDeleg\
+ate.abbrev\x0a \
+ }\
+\x0a \
+ }\x0a }\
+\x0a }\x0a }\
+\x0a\x0a MenuSepara\
+tor {\x0a }\x0a\x0a \
+ Action {\x0a \
+ text: qsTransl\
+ate(\x22HeaderBar\x22,\
+ \x22Showcase trans\
+lated Qt interna\
+l strings\x22)\x0a\x0a \
+ property va\
+r factory: Compo\
+nent\x0a {\x0a \
+ Messa\
+geDialog {\x0a \
+ title\
+: qsTranslate(\x22M\
+essageBoxes\x22, \x22T\
+itle\x22)\x0a \
+ text: qsT\
+ranslate(\x22Messag\
+eBoxes\x22, \x22Change\
+ the language an\
+d look at the 'Y\
+es' and 'Cancel'\
+ buttons\x22)\x0a \
+ butto\
+ns: MessageDialo\
+g.Yes | MessageD\
+ialog.Cancel\x0a \
+ vis\
+ible: true\x0a \
+ }\x0a \
+ }\x0a\x0a onTr\
+iggered: {\x0a \
+ const dia\
+log = factory.cr\
+eateObject(root)\
+\x0a dia\
+log.closed.conne\
+ct(dialog.destro\
+y)\x0a d\
+ialog.open()\x0a \
+ }\x0a }\x0a\x0a}\x0a\
+\
+\x00\x00\x002\
+m\
+odule header\x0aPyn\
+occhioHeader Pyn\
+occhioHeader.qml\
+\x0a\
+\x00\x00\x03\xc5\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0a\x0a\x0aListModel \
+{\x0a readonly p\
+roperty var lang\
+uagesForTranslat\
+ionTool: [\x0a \
+ qsTranslate(\x22\
+Languages\x22, \x22Eng\
+lish\x22),\x0a \
+qsTranslate(\x22Lan\
+guages\x22, \x22German\
+\x22),\x0a ]\x0a\x0a L\
+istElement {\x0a \
+ language: \x22\
+English\x22\x0a \
+ abbrev: \x22en_US\x22\
+\x0a }\x0a ListE\
+lement {\x0a \
+ language: \x22Germ\
+an\x22\x0a abbr\
+ev: \x22de_DE\x22\x0a \
+}\x0a}\x0a\
+\x00\x00\x00@\
+m\
+odule models\x0aPyn\
+occhioLanguageMo\
+del PynocchioLan\
+guageModel.qml\x0a\
+\x00\x00\x06\xcd\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtTes\
+t\x0a\x0a\x0aTestCase {\x0a \
+ id: testCase\x0a\
+\x0a name: \x22Pyno\
+cchioLanguageMod\
+elTest\x22\x0a\x0a Com\
+ponent {\x0a \
+ id: objectUnder\
+Test\x0a\x0a Py\
+nocchioLanguageM\
+odel {}\x0a }\x0a\x0a \
+ function extr\
+actLanguagesFrom\
+(model: Pynocchi\
+oLanguageModel):\
+ Array {\
+\x0a const l\
+anguages = []\x0a \
+ for (let i\
+ = 0; i < model.\
+count; i++) {\x0a \
+ langua\
+ges.push(model.g\
+et(i).abbrev)\x0a \
+ }\x0a \
+return languages\
+\x0a }\x0a\x0a func\
+tion test_langua\
+geExists_data() \
+{\x0a return\
+ [\x0a {\
+tag: 'de_DE', ab\
+brev: 'de_DE'},\x0a\
+ {tag\
+: 'en_US', abbre\
+v: 'en_US'},\x0a \
+ ]\x0a }\x0a\x0a \
+ function test_\
+languageExists(d\
+ata) {\x0a c\
+onst control = c\
+reateTemporaryOb\
+ject(objectUnder\
+Test, testCase)\x0a\
+ verify(c\
+ontrol)\x0a\x0a \
+ const languages\
+ = extractLangua\
+gesFrom(control)\
+\x0a verify(\
+languages.includ\
+es(data.abbrev))\
+\x0a }\x0a\x0a func\
+tion test_langua\
+geDoesNotExist()\
+ {\x0a const\
+ control = creat\
+eTemporaryObject\
+(objectUnderTest\
+, testCase)\x0a \
+ verify(contr\
+ol)\x0a\x0a con\
+st languages = e\
+xtractLanguagesF\
+rom(control)\x0a \
+ verify(!lan\
+guages.includes(\
+'something-else'\
+))\x0a }\x0a\x0a}\x0a\
+\x00\x00\x003\
+q\
+mldir app\x0aPynocc\
+hioMainPage Pyno\
+cchioMainPage.qm\
+l\x0a\
+\x00\x00\x09\x8f\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0aimpo\
+rt QtQuick.Layou\
+ts\x0a\x0aimport heade\
+r\x0aimport pyobjec\
+ts\x0a\x0a\x0aPage {\x0a \
+id: root\x0a\x0a re\
+quired property \
+var appWindow\x0a\x0a \
+ anchors {\x0a \
+ fill: root\x0a\
+ }\x0a\x0a heade\
+r: PynocchioHead\
+er {\x0a app\
+Window: root.app\
+Window\x0a }\x0a\x0a \
+ ColumnLayout {\
+\x0a spacing\
+: 8\x0a widt\
+h: root.width\x0a\x0a \
+ //Image {\
+\x0a // s\
+ource: \x22qrc:/dat\
+a/app-icon.svg\x22\x0a\
+ // as\
+ynchronous: true\
+\x0a //\x0a \
+ // Layout\
+.alignment: Qt.A\
+lignHCenter\x0a \
+ // Layout\
+.preferredWidth:\
+ 308\x0a // \
+ Layout.prefer\
+redHeight: 226\x0a \
+ // Lay\
+out.topMargin: 3\
+0\x0a //}\x0a\x0a \
+ //Label {\
+\x0a // t\
+ext: Qt.applicat\
+ion.name + ' (' \
++ Qt.application\
+.version + ')'\x0a \
+ //\x0a \
+ // font {\x0a \
+ // \
+ bold: true\x0a \
+ // pi\
+xelSize: Qt.appl\
+ication.font.pix\
+elSize * 1.5\x0a \
+ // }\x0a \
+ //\x0a \
+// Layout.ali\
+gnment: Qt.Align\
+HCenter\x0a \
+// Layout.top\
+Margin: 45\x0a \
+ //}\x0a\x0a \
+Label {\x0a \
+ text: 'Runni\
+ng on ' + Qt.pla\
+tform.os\x0a\x0a \
+ font {\x0a \
+ bol\
+d: true\x0a \
+ pixelSiz\
+e: Qt.applicatio\
+n.font.pixelSize\
+ * 1.5\x0a \
+ }\x0a\x0a \
+ Layout.alignme\
+nt: Qt.AlignHCen\
+ter\x0a }\x0a\x0a \
+ //Label {\
+\x0a // t\
+ext: qsTranslate\
+(\x22MainPage\x22, \x22Ha\
+ve fun!\x22)\x0a \
+ // color: M\
+aterial.accent\x0a \
+ //\x0a \
+ // font {\x0a \
+ // \
+ bold: true\x0a \
+ // pi\
+xelSize: Qt.appl\
+ication.font.pix\
+elSize * 1.5\x0a \
+ // }\x0a \
+ //\x0a \
+// Layout.ali\
+gnment: Qt.Align\
+HCenter\x0a \
+// Layout.top\
+Margin: 45\x0a \
+ //}\x0a\x0a \
+//Label {\x0a \
+ // text: qs\
+Translate(\x22MainP\
+age\x22, \x22Exposed f\
+rom Python: '%1'\
+\x22).arg(Singleton\
+PyObject.exposed\
+_property)\x0a \
+ //\x0a //\
+ Layout.align\
+ment: Qt.AlignHC\
+enter\x0a //\
+ Layout.topMa\
+rgin: 45\x0a \
+ //}\x0a }\x0a\x0a}\x0a\
+\x00\x00\x05\x98\
+/\
+*\x0aCopyright\x0a\x0aThi\
+s program is fre\
+e software: you \
+can redistribute\
+ it and/or modif\
+y\x0ait under the t\
+erms of the GNU \
+General Public L\
+icense as publis\
+hed by\x0athe Free \
+Software Foundat\
+ion, either vers\
+ion 3 of the Lic\
+ense, or\x0a(at you\
+r option) any la\
+ter version.\x0a\x0aTh\
+is program is di\
+stributed in the\
+ hope that it wi\
+ll be useful,\x0abu\
+t WITHOUT ANY WA\
+RRANTY; without \
+even the implied\
+ warranty of\x0aMER\
+CHANTABILITY or \
+FITNESS FOR A PA\
+RTICULAR PURPOSE\
+. See the\x0aGNU G\
+eneral Public Li\
+cense for more d\
+etails.\x0a\x0aYou sho\
+uld have receive\
+d a copy of the \
+GNU General Publ\
+ic License\x0aalong\
+ with this progr\
+am. If not, see\
+ .\
+\x0a*/\x0a\x0aimport QtQu\
+ick\x0aimport QtQui\
+ck.Controls\x0a\x0a\x0aMe\
+nu {\x0a id: roo\
+t\x0a\x0a /*\x0a Ta\
+ken and adapted \
+from:\x0a https:\
+//martin.rpdev.n\
+et/2018/03/13/qt\
+-quick-controls-\
+2-automatically-\
+set-the-width-of\
+-menus.html\x0a \
+*/\x0a\x0a readonly\
+ property bool m\
+Mirrored: count \
+> 0 && itemAt(0)\
+.mirrored\x0a\x0a x\
+: mMirrored ? -w\
+idth + parent.wi\
+dth : 0\x0a\x0a wid\
+th: {\x0a le\
+t result = 0\x0a \
+ let padding\
+ = 0\x0a for\
+ (let i = 0; i <\
+ root.count; ++i\
+) {\x0a \
+let item = root.\
+itemAt(i)\x0a\x0a \
+ if (!isMe\
+nuSeparator(item\
+)) {\x0a \
+ result = Ma\
+th.max(item.cont\
+entItem.implicit\
+Width, result)\x0a \
+ p\
+adding = Math.ma\
+x(item.padding, \
+padding)\x0a \
+ }\x0a }\
+\x0a return \
+result + padding\
+ * 2\x0a }\x0a\x0a \
+function isMenuS\
+eparator(item) {\
+\x0a return \
+item instanceof \
+MenuSeparator\x0a \
+ }\x0a\x0a}\x0a\
+\x00\x00\x00K\
+m\
+odule components\
+.shared\x0aPynocchi\
+oAutoWidthMenu P\
+ynocchioAutoWidt\
+hMenu.qml\x0a\
+"
+
+qt_resource_name = b"\
+\x00\x03\
+\x00\x00x<\
+\x00q\
+\x00m\x00l\
+\x00\x04\
+\x00\x06\xa8\xa1\
+\x00d\
+\x00a\x00t\x00a\
+\x00\x04\
+\x00\x06\xc4\xee\
+\x00i\
+\x001\x008\x00n\
+\x00\x08\
+\x0b=\xf8\xbd\
+\x00h\
+\x00e\x00_\x00I\x00L\x00.\x00q\x00m\
+\x00\x08\
+\x0b8\x88=\
+\x00d\
+\x00e\x00_\x00D\x00E\x00.\x00q\x00m\
+\x00\x05\
+\x00o\xa6S\
+\x00i\
+\x00c\x00o\x00n\x00s\
+\x00\x0c\
+\x07o='\
+\x00a\
+\x00p\x00p\x00-\x00i\x00c\x00o\x00n\x00.\x00s\x00v\x00g\
+\x00\x15\
+\x08\x1e\x16f\
+\x00q\
+\x00t\x00q\x00u\x00i\x00c\x00k\x00c\x00o\x00n\x00t\x00r\x00o\x00l\x00s\x002\x00.\
+\x00c\x00o\x00n\x00f\
+\x00\x14\
+\x03\xe9\x9d'\
+\x00c\
+\x00l\x00o\x00s\x00e\x00_\x00b\x00l\x00a\x00c\x00k\x00_\x002\x004\x00d\x00p\x00.\
+\x00s\x00v\x00g\
+\x00\x17\
+\x0d\xa5\x80\x07\
+\x00m\
+\x00i\x00n\x00i\x00m\x00i\x00z\x00e\x00_\x00b\x00l\x00a\x00c\x00k\x00_\x002\x004\
+\x00d\x00p\x00.\x00s\x00v\x00g\
+\x00\x1b\
+\x0bil\x07\
+\x00o\
+\x00p\x00e\x00n\x00_\x00i\x00n\x00_\x00f\x00u\x00l\x00l\x00_\x00b\x00l\x00a\x00c\
+\x00k\x00_\x002\x004\x00d\x00p\x00.\x00s\x00v\x00g\
+\x00\x1f\
+\x03\xe6\x1d\xe7\
+\x00c\
+\x00l\x00o\x00s\x00e\x00_\x00f\x00u\x00l\x00l\x00s\x00c\x00r\x00e\x00e\x00n\x00_\
+\x00b\x00l\x00a\x00c\x00k\x00_\x002\x004\x00d\x00p\x00.\x00s\x00v\x00g\
+\x00\x06\
+\x07\x9e\x88\xb4\
+\x00s\
+\x00h\x00a\x00r\x00e\x00d\
+\x00\x03\
+\x00\x00hp\
+\x00a\
+\x00p\x00p\
+\x00\x06\
+\x07E\xac3\
+\x00m\
+\x00o\x00d\x00e\x00l\x00s\
+\x00\x08\
+\x08\x01Z\x5c\
+\x00m\
+\x00a\x00i\x00n\x00.\x00q\x00m\x00l\
+\x00\x06\
+\x06\xebz\xc2\
+\x00h\
+\x00e\x00a\x00d\x00e\x00r\
+\x00\x15\
+\x0a\xac\xa8|\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00F\x00i\x00l\x00e\x00M\x00e\x00n\x00u\
+\x00.\x00q\x00m\x00l\
+\x00\x13\
+\x04\xd7\xe6|\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00H\x00e\x00a\x00d\x00e\x00r\x00.\x00q\
+\x00m\x00l\
+\x00\x15\
+\x0a\xe4\x82|\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00H\x00e\x00l\x00p\x00M\x00e\x00n\x00u\
+\x00.\x00q\x00m\x00l\
+\x00\x1a\
+\x02\xdcV\x5c\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00H\x00e\x00a\x00d\x00e\x00r\x00C\x00o\
+\x00n\x00t\x00e\x00n\x00t\x00.\x00q\x00m\x00l\
+\x00\x18\
+\x06\x1aM<\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00O\x00p\x00t\x00i\x00o\x00n\x00s\x00M\
+\x00e\x00n\x00u\x00.\x00q\x00m\x00l\
+\x00\x06\
+\x07\x84+\x02\
+\x00q\
+\x00m\x00l\x00d\x00i\x00r\
+\x00\x1a\
+\x0e\xe1\x94\xbc\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00L\x00a\x00n\x00g\x00u\x00a\x00g\x00e\
+\x00M\x00o\x00d\x00e\x00l\x00.\x00q\x00m\x00l\
+\x00\x1e\
+\x06K\xb7|\
+\x00t\
+\x00s\x00t\x00_\x00P\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00L\x00a\x00n\x00g\
+\x00u\x00a\x00g\x00e\x00M\x00o\x00d\x00e\x00l\x00.\x00q\x00m\x00l\
+\x00\x15\
+\x02\xdf\xee\xdc\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00M\x00a\x00i\x00n\x00P\x00a\x00g\x00e\
+\x00.\x00q\x00m\x00l\
+\x00\x1a\
+\x05\xf0\xb8\xfc\
+\x00P\
+\x00y\x00n\x00o\x00c\x00c\x00h\x00i\x00o\x00A\x00u\x00t\x00o\x00W\x00i\x00d\x00t\
+\x00h\x00M\x00e\x00n\x00u\x00.\x00q\x00m\x00l\
+"
+
+qt_resource_struct = b"\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x05\x00\x00\x00\x0d\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x0c\x00\x02\x00\x00\x00\x03\x00\x00\x00\x06\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x1a\x00\x02\x00\x00\x00\x02\x00\x00\x00\x04\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00>\x00\x00\x00\x00\x00\x01\x00\x00\x01$\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x00(\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x00T\x00\x02\x00\x00\x00\x04\x00\x00\x00\x09\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00d\x00\x00\x00\x00\x00\x01\x00\x00\x02J\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x00\x82\x00\x00\x00\x00\x00\x01\x00\x00\x11f\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x01P\x00\x00\x00\x00\x00\x01\x00\x00\x14\x99\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x11\xbb\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x01\x14\x00\x00\x00\x00\x00\x01\x00\x00\x13~\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x01\x00\x00\x12\xcb\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x01\xa6\x00\x02\x00\x00\x00\x02\x00\x00\x00\x1d\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\xda\x00\x02\x00\x00\x00\x06\x00\x00\x00\x17\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\xb2\x00\x02\x00\x00\x00\x03\x00\x00\x00\x14\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\x94\x00\x02\x00\x00\x00\x02\x00\x00\x00\x12\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x01\xc4\x00\x00\x00\x00\x00\x01\x00\x00\x15\xd3\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x03\xa6\x00\x00\x00\x00\x00\x01\x00\x00O\xc3\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00U_\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x034\x00\x00\x00\x00\x00\x01\x00\x00?(\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00>\xe4\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02\xfa\x00\x00\x00\x00\x00\x01\x00\x00;\x1b\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02x\x00\x04\x00\x00\x00\x01\x00\x00-\xe6\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02\x1c\x00\x00\x00\x00\x00\x01\x00\x00#\xfa\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02\xb2\x00\x00\x00\x00\x00\x01\x00\x002\x10\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00:\xe5\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x01\xec\x00\x00\x00\x00\x00\x01\x00\x00\x1f[\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02H\x00\x00\x00\x00\x00\x01\x00\x00)\xa8\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x03v\x00\x00\x00\x00\x00\x01\x00\x00F0\
+\x00\x00\x01\x93\x12\xe922\
+\x00\x00\x02\xe8\x00\x00\x00\x00\x00\x01\x00\x00E\xf9\
+\x00\x00\x01\x93\x12\xe922\
+"
+
+def qInitResources():
+ QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+def qCleanupResources():
+ QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+qInitResources()
diff --git a/myapp/pyobjects/__init__.py b/pynocchio/pyobjects/__init__.py
similarity index 100%
rename from myapp/pyobjects/__init__.py
rename to pynocchio/pyobjects/__init__.py
diff --git a/myapp/pyobjects/example_singleton.py b/pynocchio/pyobjects/example_singleton.py
similarity index 100%
rename from myapp/pyobjects/example_singleton.py
rename to pynocchio/pyobjects/example_singleton.py
diff --git a/myapp/startup.py b/pynocchio/startup.py
similarity index 79%
rename from myapp/startup.py
rename to pynocchio/startup.py
index c7f18916..a8f9f6ff 100644
--- a/myapp/startup.py
+++ b/pynocchio/startup.py
@@ -24,9 +24,9 @@ class StartUp:
@staticmethod
def configure_qt_application_data():
from PySide6.QtCore import QCoreApplication
- QCoreApplication.setApplicationName('my app name')
- QCoreApplication.setOrganizationName('my org name')
- QCoreApplication.setApplicationVersion('my app version')
+ QCoreApplication.setApplicationName('Pynocchio')
+ QCoreApplication.setOrganizationName('Pynocchio')
+ QCoreApplication.setApplicationVersion('4.0.0')
@staticmethod
def configure_environment_variables():
@@ -36,18 +36,16 @@ def configure_environment_variables():
@staticmethod
def import_resources():
- # noinspection PyUnresolvedReferences
- import myapp.generated_resources
+ import pynocchio.generated_resources
@staticmethod
def import_bindings():
- # noinspection PyUnresolvedReferences
- import myapp.pyobjects
+ import pynocchio.pyobjects
@staticmethod
def start_application():
- from myapp.application import MyApplication
- app = MyApplication(sys.argv)
+ from pynocchio.application import PynocchioApplication
+ app = PynocchioApplication(sys.argv)
app.set_window_icon()
app.set_up_signals()
diff --git a/pynocchio/utility.py b/pynocchio/utility.py
new file mode 100644
index 00000000..fb56340c
--- /dev/null
+++ b/pynocchio/utility.py
@@ -0,0 +1,61 @@
+import os
+
+from PySide6 import QtGui
+
+IMAGE_FILE_FORMATS = [f".{str(ext)}" for ext in QtGui.QImageReader.supportedImageFormats()]
+
+COMPACT_FILE_FORMATS = [
+ ".cbr",
+ ".cbz",
+ ".rar",
+ ".zip",
+ ".tar",
+ ".cbt",
+]
+
+SUPPORTED_FILES = IMAGE_FILE_FORMATS + COMPACT_FILE_FORMATS
+
+
+def get_file_extension(filename):
+ return os.path.splitext(filename)[1]
+
+
+def get_dir_name(file_path):
+ return os.path.dirname(file_path)
+
+
+def get_base_name(file_path):
+ return os.path.basename(file_path)
+
+
+def get_parent_path(file_path):
+ return os.path.split(os.path.abspath(os.path.dirname(file_path)))[0]
+
+
+def join_path(root_dir, directory, filename):
+ return os.path.join(root_dir, directory, filename)
+
+
+def path_exist(file_path):
+ return os.path.lexists(file_path)
+
+
+def file_exist(file_path):
+ return os.path.exists(file_path)
+
+
+def is_dir(file_path):
+ return os.path.isdir(file_path)
+
+
+def is_file(filename):
+ return os.path.isfile(filename)
+
+
+def convert_string_to_boolean(string):
+ if string == "True":
+ return True
+ elif string == "False":
+ return False
+ else:
+ raise ValueError
diff --git a/qml/app/MyAppMainPage.qml b/qml/app/MyAppMainPage.qml
deleted file mode 100644
index 8f3db87b..00000000
--- a/qml/app/MyAppMainPage.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-Copyright
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see .
-*/
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-import header
-import pyobjects
-
-
-Page {
- id: root
-
- required property var appWindow
-
- anchors {
- fill: root
- }
-
- header: MyAppHeader {
- appWindow: root.appWindow
- }
-
- ColumnLayout {
- spacing: 8
- width: root.width
-
- Image {
- source: "qrc:/data/app-icon.svg"
- asynchronous: true
-
- Layout.alignment: Qt.AlignHCenter
- Layout.preferredWidth: 308
- Layout.preferredHeight: 226
- Layout.topMargin: 30
- }
-
- Label {
- text: Qt.application.name + ' (' + Qt.application.version + ')'
-
- font {
- bold: true
- pixelSize: Qt.application.font.pixelSize * 1.5
- }
-
- Layout.alignment: Qt.AlignHCenter
- Layout.topMargin: 45
- }
-
- Label {
- text: 'Running on ' + Qt.platform.os
-
- font {
- bold: true
- pixelSize: Qt.application.font.pixelSize * 1.5
- }
-
- Layout.alignment: Qt.AlignHCenter
- }
-
- Label {
- text: qsTranslate("MainPage", "Have fun!")
- color: Material.accent
-
- font {
- bold: true
- pixelSize: Qt.application.font.pixelSize * 1.5
- }
-
- Layout.alignment: Qt.AlignHCenter
- Layout.topMargin: 45
- }
-
- Label {
- text: qsTranslate("MainPage", "Exposed from Python: '%1'").arg(SingletonPyObject.exposed_property)
-
- Layout.alignment: Qt.AlignHCenter
- Layout.topMargin: 45
- }
- }
-
-}
diff --git a/qml/app/PynocchioMainPage.qml b/qml/app/PynocchioMainPage.qml
new file mode 100644
index 00000000..85401891
--- /dev/null
+++ b/qml/app/PynocchioMainPage.qml
@@ -0,0 +1,97 @@
+/*
+Copyright
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+import header
+import pyobjects
+
+
+Page {
+ id: root
+
+ required property var appWindow
+
+ anchors {
+ fill: root
+ }
+
+ header: PynocchioHeader {
+ appWindow: root.appWindow
+ }
+
+ ColumnLayout {
+ spacing: 8
+ width: root.width
+
+ //Image {
+ // source: "qrc:/data/app-icon.svg"
+ // asynchronous: true
+ //
+ // Layout.alignment: Qt.AlignHCenter
+ // Layout.preferredWidth: 308
+ // Layout.preferredHeight: 226
+ // Layout.topMargin: 30
+ //}
+
+ //Label {
+ // text: Qt.application.name + ' (' + Qt.application.version + ')'
+ //
+ // font {
+ // bold: true
+ // pixelSize: Qt.application.font.pixelSize * 1.5
+ // }
+ //
+ // Layout.alignment: Qt.AlignHCenter
+ // Layout.topMargin: 45
+ //}
+
+ Label {
+ text: 'Running on ' + Qt.platform.os
+
+ font {
+ bold: true
+ pixelSize: Qt.application.font.pixelSize * 1.5
+ }
+
+ Layout.alignment: Qt.AlignHCenter
+ }
+
+ //Label {
+ // text: qsTranslate("MainPage", "Have fun!")
+ // color: Material.accent
+ //
+ // font {
+ // bold: true
+ // pixelSize: Qt.application.font.pixelSize * 1.5
+ // }
+ //
+ // Layout.alignment: Qt.AlignHCenter
+ // Layout.topMargin: 45
+ //}
+
+ //Label {
+ // text: qsTranslate("MainPage", "Exposed from Python: '%1'").arg(SingletonPyObject.exposed_property)
+ //
+ // Layout.alignment: Qt.AlignHCenter
+ // Layout.topMargin: 45
+ //}
+ }
+
+}
diff --git a/qml/app/qmldir b/qml/app/qmldir
index 4ba53f24..ae8e7362 100644
--- a/qml/app/qmldir
+++ b/qml/app/qmldir
@@ -1,2 +1,2 @@
qmldir app
-MyAppMainPage MyAppMainPage.qml
+PynocchioMainPage PynocchioMainPage.qml
diff --git a/qml/header/MyAppMenu1.qml b/qml/header/MyAppMenu1.qml
deleted file mode 100644
index fea7761a..00000000
--- a/qml/header/MyAppMenu1.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-Copyright
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see .
-*/
-
-import QtQuick.Controls
-
-import shared
-
-
-MyAppAutoWidthMenu {
- title: qsTranslate("HeaderBar", "&Menu 1")
-
- Action {
- text: qsTranslate("HeaderBar", "&Action 1")
- shortcut: "CTRL+N"
-
- onTriggered: {
- console.log("Action 1 pressed")
- }
- }
-
- Action {
- text: qsTranslate("HeaderBar", "&Action 2")
-
- onTriggered: {
- console.log("Action 2 pressed")
- }
- }
-
- Action {
- text: qsTranslate("HeaderBar", "&Action 3")
-
- onTriggered: {
- console.log("Action 3 pressed")
- }
- }
-
- Action {
- text: qsTranslate("HeaderBar", "&Action 4")
-
- onTriggered: {
- console.log("Action 4 pressed")
- }
- }
-
- MenuSeparator { }
-
- Action {
- text: qsTranslate("HeaderBar", "&Action 5")
-
- onTriggered: {
- console.log("Action 5 pressed")
- }
- }
-
-}
diff --git a/qml/header/MyAppMenu2.qml b/qml/header/PynocchioFileMenu.qml
similarity index 64%
rename from qml/header/MyAppMenu2.qml
rename to qml/header/PynocchioFileMenu.qml
index 556fdb6e..ce8c5d27 100644
--- a/qml/header/MyAppMenu2.qml
+++ b/qml/header/PynocchioFileMenu.qml
@@ -16,37 +16,32 @@ along with this program. If not, see .
*/
import QtQuick.Controls
-
+import QtCore
import shared
-MyAppAutoWidthMenu {
- title: qsTranslate("HeaderBar", "&Menu 2")
- Action {
- text: qsTranslate("HeaderBar", "&Action 1")
- shortcut: "CTRL+N"
-
- onTriggered: {
- console.log("Action 1 pressed")
- }
- }
+PynocchioAutoWidthMenu {
+ title: qsTranslate("HeaderBar", "&File")
Action {
- text: qsTranslate("HeaderBar", "&Action 2")
-
+ id: openAction
+ text: qsTranslate("HeaderBar", "&Open")
+ shortcut: StandardKey.Open
onTriggered: {
- console.log("Action 2 pressed")
+ console.log("Open Pressed")
+ openDialog.open()
}
}
MenuSeparator { }
Action {
- text: qsTranslate("HeaderBar", "&Action 3")
+ text: qsTranslate("HeaderBar", "&Exit")
onTriggered: {
- console.log("Action 3 pressed")
+ console.log("Exit")
+ root.appWindow.close()
}
}
diff --git a/qml/header/MyAppHeader.qml b/qml/header/PynocchioHeader.qml
similarity index 98%
rename from qml/header/MyAppHeader.qml
rename to qml/header/PynocchioHeader.qml
index 3c3da662..0a4fcfd5 100644
--- a/qml/header/MyAppHeader.qml
+++ b/qml/header/PynocchioHeader.qml
@@ -51,7 +51,7 @@ Item {
}
}
- MyAppHeaderContent {
+ PynocchioHeaderContent {
id: headerBar
appWindow: root.appWindow
diff --git a/qml/header/MyAppHeaderContent.qml b/qml/header/PynocchioHeaderContent.qml
similarity index 96%
rename from qml/header/MyAppHeaderContent.qml
rename to qml/header/PynocchioHeaderContent.qml
index 0676f4b6..df201306 100644
--- a/qml/header/MyAppHeaderContent.qml
+++ b/qml/header/PynocchioHeaderContent.qml
@@ -38,10 +38,9 @@ Item {
color: "transparent"
}
- MyAppMenu1 {}
- MyAppMenu2 {}
- MyAppOptionsMenu {}
- MyAppHelpMenu {}
+ PynocchioFileMenu {}
+ PynocchioOptionsMenu {}
+ PynocchioHelpMenu {}
}
Label {
diff --git a/qml/header/MyAppHelpMenu.qml b/qml/header/PynocchioHelpMenu.qml
similarity index 72%
rename from qml/header/MyAppHelpMenu.qml
rename to qml/header/PynocchioHelpMenu.qml
index 69593e81..0f86cf55 100644
--- a/qml/header/MyAppHelpMenu.qml
+++ b/qml/header/PynocchioHelpMenu.qml
@@ -20,30 +20,21 @@ import QtQuick.Controls
import shared
-MyAppAutoWidthMenu {
+PynocchioAutoWidthMenu {
title: qsTranslate("HeaderBar", "&Help")
Action {
- text: qsTranslate("HeaderBar", "&Action 1")
- shortcut: "CTRL+N"
+ text: qsTranslate("HeaderBar", "&Report a bug")
onTriggered: {
- console.log("Action 1 pressed")
- }
- }
-
- Action {
- text: qsTranslate("HeaderBar", "&Action 2")
-
- onTriggered: {
- console.log("Action 2 pressed")
+ console.log("Action about pressed")
}
}
MenuSeparator { }
Action {
- text: qsTranslate("HeaderBar", "&Action 3")
+ text: qsTranslate("HeaderBar", "&About Pynocchio")
onTriggered: {
console.log("Action 3 pressed")
diff --git a/qml/header/MyAppOptionsMenu.qml b/qml/header/PynocchioOptionsMenu.qml
similarity index 95%
rename from qml/header/MyAppOptionsMenu.qml
rename to qml/header/PynocchioOptionsMenu.qml
index e123cb03..6785e234 100644
--- a/qml/header/MyAppOptionsMenu.qml
+++ b/qml/header/PynocchioOptionsMenu.qml
@@ -23,16 +23,16 @@ import shared
import models
-MyAppAutoWidthMenu {
+PynocchioAutoWidthMenu {
id: root
title: qsTranslate("HeaderBar", "&Options")
- MyAppAutoWidthMenu {
+ PynocchioAutoWidthMenu {
title: qsTranslate("HeaderBar", "&Language")
Repeater {
- model: MyAppLanguageModel {}
+ model: PynocchioLanguageModel {}
MenuItem {
id: _itemDelegate
diff --git a/qml/header/qmldir b/qml/header/qmldir
index 59c24db6..a9aeff42 100644
--- a/qml/header/qmldir
+++ b/qml/header/qmldir
@@ -1,2 +1,2 @@
module header
-MyAppHeader MyAppHeader.qml
+PynocchioHeader PynocchioHeader.qml
diff --git a/qml/main.qml b/qml/main.qml
index 12152019..fae67a33 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -17,7 +17,8 @@ along with this program. If not, see .
import QtQuick
import QtQuick.Controls
-
+import QtCore
+import QtQuick.Dialogs
import app
@@ -32,7 +33,7 @@ ApplicationWindow {
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
- MyAppMainPage {
+ PynocchioMainPage {
appWindow: _shared
anchors {
@@ -80,4 +81,15 @@ ApplicationWindow {
}
}
+ FileDialog {
+ id: openDialog
+ fileMode: FileDialog.OpenFile
+ selectedNameFilter.index: 1
+ nameFilters: ["Comic Files (*.cbr *.cbz)", "Compact files (*.zip *.rar)"]
+ currentFolder: StandardPaths.writableLocation(StandardPaths.HomeLocation)
+ onAccepted: {
+ console.log('OK')
+ }
+ }
+
}
diff --git a/qml/models/MyAppLanguageModel.qml b/qml/models/PynocchioLanguageModel.qml
similarity index 89%
rename from qml/models/MyAppLanguageModel.qml
rename to qml/models/PynocchioLanguageModel.qml
index 0dcd35ee..5d198868 100644
--- a/qml/models/MyAppLanguageModel.qml
+++ b/qml/models/PynocchioLanguageModel.qml
@@ -22,7 +22,6 @@ ListModel {
readonly property var languagesForTranslationTool: [
qsTranslate("Languages", "English"),
qsTranslate("Languages", "German"),
- qsTranslate("Languages", "Hebrew"),
]
ListElement {
@@ -33,8 +32,4 @@ ListModel {
language: "German"
abbrev: "de_DE"
}
- ListElement {
- language: "Hebrew"
- abbrev: "he_IL"
- }
}
diff --git a/qml/models/qmldir b/qml/models/qmldir
index 506dc45e..71155941 100644
--- a/qml/models/qmldir
+++ b/qml/models/qmldir
@@ -1,2 +1,2 @@
module models
-MyAppLanguageModel MyAppLanguageModel.qml
+PynocchioLanguageModel PynocchioLanguageModel.qml
diff --git a/qml/models/tst_MyAppLanguageModel.qml b/qml/models/tst_PynocchioLanguageModel.qml
similarity index 89%
rename from qml/models/tst_MyAppLanguageModel.qml
rename to qml/models/tst_PynocchioLanguageModel.qml
index 75e2c791..ecc94f75 100644
--- a/qml/models/tst_MyAppLanguageModel.qml
+++ b/qml/models/tst_PynocchioLanguageModel.qml
@@ -22,15 +22,15 @@ import QtTest
TestCase {
id: testCase
- name: "MyAppLanguageModelTest"
+ name: "PynocchioLanguageModelTest"
Component {
id: objectUnderTest
- MyAppLanguageModel {}
+ PynocchioLanguageModel {}
}
- function extractLanguagesFrom(model: MyAppLanguageModel): Array {
+ function extractLanguagesFrom(model: PynocchioLanguageModel): Array {
const languages = []
for (let i = 0; i < model.count; i++) {
languages.push(model.get(i).abbrev)
@@ -42,7 +42,6 @@ TestCase {
return [
{tag: 'de_DE', abbrev: 'de_DE'},
{tag: 'en_US', abbrev: 'en_US'},
- {tag: 'he_IL', abbrev: 'he_IL'},
]
}
diff --git a/qml/shared/MyAppAutoWidthMenu.qml b/qml/shared/PynocchioAutoWidthMenu.qml
similarity index 100%
rename from qml/shared/MyAppAutoWidthMenu.qml
rename to qml/shared/PynocchioAutoWidthMenu.qml
diff --git a/qml/shared/qmldir b/qml/shared/qmldir
index 35b5150f..e211df76 100644
--- a/qml/shared/qmldir
+++ b/qml/shared/qmldir
@@ -1,2 +1,2 @@
module components.shared
-MyAppAutoWidthMenu MyAppAutoWidthMenu.qml
+PynocchioAutoWidthMenu PynocchioAutoWidthMenu.qml
diff --git a/requirements.txt b/requirements.txt
index ffb7031f..6f8c589f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,5 @@
PySide6-Essentials==6.8.0
pytest>=8.3.3
pywin32>=307; sys_platform == 'win32'
+peewee
+rarfile