Last active
December 15, 2024 07:28
-
-
Save define-private-public/f01ff2f9bbb74eded144558a2e02966c to your computer and use it in GitHub Desktop.
Revisions
-
define-private-public revised this gist
Oct 10, 2022 . 2 changed files with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ id: fields_layout readonly property bool _small_width: UITheme.is_width_small(parent.width) readonly property int column_count: (_small_width ? 1 : 2) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ QLocale::setDefault(QLocale::German); -
define-private-public revised this gist
Oct 10, 2022 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ readonly property bool _small_width: UITheme.is_width_small(parent.width) readonly property int column_count: (_small_width ? 1 : 2) // ... columns: fields_layout.column_count -
define-private-public revised this gist
Oct 10, 2022 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ readonly property bool _small_width: UITheme.is_width_small(parent.width) readonly property int column_count: (_small_width ? 1 : 2) // ... columns: fields_layout.column_count -
define-private-public revised this gist
Oct 10, 2022 . 4 changed files with 25 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ // User facing strings QtObject { // Render View readonly property string app_window_title: qsTr('PSRayTracing (GUI Edition)') readonly property string scene_label: qsTr('Scene:') readonly property string stop: qsTr('Stop') readonly property string render: qsTr('Render') readonly property string total_render_time_fmt: qsTr('Total Render Time: %1') // ... This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ // Find this line const QString baseName = "myapp_" + QLocale(locale).name(); // Change it to this const QString baseName = "myapp_" + QLocale().name(); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ QLocale::setDefault(QLocale::German); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ QTranslator translator; const QStringList uiLanguages = QLocale::system().uiLanguages(); for (const QString &locale : uiLanguages) { const QString baseName = "myapp_" + QLocale(locale).name(); if (translator.load(":/i18n/" + baseName)) { app.installTranslator(&translator); break; } } -
define-private-public revised this gist
Oct 10, 2022 . 1 changed file with 14 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,19 +2,19 @@ <!DOCTYPE TS> <TS version="2.1" language="de_DE"> <context> <name>QObject</name> <message> <source>No</source> <comment>denial</comment> <translation type="obsolete">Nein</translation> </message> <message numerus="yes"> <location filename="main.cpp" line="36"/> <source>%Ln Apple(s)</source> <translation type="unfinished"> <numerusform>%Ln Apfel</numerusform> <numerusform>%Ln Äpfel</numerusform> </translation> </message> </context> </TS> -
define-private-public revised this gist
Oct 10, 2022 . 3 changed files with 43 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # `Linguist` is required find_package(Qt6 COMPONENTS Linguist REQUIRED) # ... # Have your app specified qt_add_executable(myapp ... # ... # Specify your translations qt_add_translations(myapp TS_FILES i18n/myapp_de_DE.ts i18n/myapp_ja_JP.ts ) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # Specify your translations qt_add_translations(myapp TS_FILES i18n/myapp_de_DE.ts i18n/myapp_ja_JP.ts ) add_dependencies(myapp release_translations) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="de_DE"> <context> <name>QObject</name> <message> <source>No</source> <comment>denial</comment> <translation type="obsolete">Nein</translation> </message> <message numerus="yes"> <location filename="main.cpp" line="36"/> <source>%Ln Apple(s)</source> <translation type="unfinished"> <numerusform>%Ln Apfel</numerusform> <numerusform>%Ln Äpfel</numerusform> </translation> </message> </context> </TS> -
define-private-public revised this gist
Oct 10, 2022 . 2 changed files with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ [Controls] Style=Basic [Basic] Font\PointSize=15 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ <RCC> <qresource prefix="/"> <file>qtquickcontrols2.conf</file> ... <!-- Japanese specific resources --> <qresource prefix="/" lang="ja"> <file alias="qtquickcontrols2.conf">i18n/qtquickcontrols2_ja_JP.conf</file> </qresource> </RCC> -
define-private-public created this gist
Oct 10, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ auto lbl = new QLabel("Hi Mom!"); QString filePath = "data.csv"; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ auto lbl = new QLabel(tr("Hi Mom!")); QString filePath = QStringLiteral("data.csv"); qDebug() << "Doing this with qDebug() is still okay though!"