From d9f995b3a287bab73c108a4efbd4bb5a0a569241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Cuj=C3=A9?= Date: Wed, 6 Mar 2019 19:54:17 +0100 Subject: [PATCH] Add separate button to select archive library. Fixes #239 --- leocad.qrc | 1 + qt/lc_qpreferencesdialog.cpp | 10 +- qt/lc_qpreferencesdialog.h | 1 + qt/lc_qpreferencesdialog.ui | 14 +- resources/archive.png | Bin 0 -> 966 bytes resources/leocad_de.ts | 297 +++++++++++++++++----------------- resources/leocad_fr.ts | 301 ++++++++++++++++++----------------- resources/leocad_pt.ts | 297 +++++++++++++++++----------------- 8 files changed, 484 insertions(+), 437 deletions(-) create mode 100644 resources/archive.png diff --git a/leocad.qrc b/leocad.qrc index 90d8c250..32a81f8e 100644 --- a/leocad.qrc +++ b/leocad.qrc @@ -89,6 +89,7 @@ resources/time_add_keys.png resources/parts_search.png resources/parts_cancel.png + resources/archive.png resources/library.zip resources/ldconfig.ldr resources/minifig.ini diff --git a/qt/lc_qpreferencesdialog.cpp b/qt/lc_qpreferencesdialog.cpp index 1e2173f6..9d8a2445 100644 --- a/qt/lc_qpreferencesdialog.cpp +++ b/qt/lc_qpreferencesdialog.cpp @@ -188,7 +188,15 @@ void lcQPreferencesDialog::accept() void lcQPreferencesDialog::on_partsLibraryBrowse_clicked() { - QString result = QFileDialog::getExistingDirectory(this, tr("Open Parts Library Folder"), ui->partsLibrary->text()); + QString result = QFileDialog::getExistingDirectory(this, tr("Select Parts Library Folder..."), ui->partsLibrary->text()); + + if (!result.isEmpty()) + ui->partsLibrary->setText(QDir::toNativeSeparators(result)); +} + +void lcQPreferencesDialog::on_partsArchiveBrowse_clicked() +{ + QString result = QFileDialog::getOpenFileName(this, tr("Select Parts Library Archive..."), ui->partsLibrary->text(), tr("Supported Archives (*.zip *.bin);;All Files (*.*)")); if (!result.isEmpty()) ui->partsLibrary->setText(QDir::toNativeSeparators(result)); diff --git a/qt/lc_qpreferencesdialog.h b/qt/lc_qpreferencesdialog.h index 0073950d..e4c848af 100644 --- a/qt/lc_qpreferencesdialog.h +++ b/qt/lc_qpreferencesdialog.h @@ -27,6 +27,7 @@ public: public slots: void accept(); void on_partsLibraryBrowse_clicked(); + void on_partsArchiveBrowse_clicked(); void on_povrayExecutableBrowse_clicked(); void on_lgeoPathBrowse_clicked(); void ColorButtonClicked(); diff --git a/qt/lc_qpreferencesdialog.ui b/qt/lc_qpreferencesdialog.ui index fa9588a9..9e0ded10 100644 --- a/qt/lc_qpreferencesdialog.ui +++ b/qt/lc_qpreferencesdialog.ui @@ -67,8 +67,17 @@ - - ... + + + :/resources/file_open.png:/resources/file_open.png + + + + + + + + :/resources/archive.png:/resources/archive.png @@ -982,6 +991,7 @@ authorName partsLibrary partsLibraryBrowse + partsArchiveBrowse povrayExecutable povrayExecutableBrowse lgeoPath diff --git a/resources/archive.png b/resources/archive.png new file mode 100644 index 0000000000000000000000000000000000000000..9934c351913d5b8ecdb8aa329133e32966a5f87a GIT binary patch literal 966 zcmV;%13CPOP)1uSGyC79o8Tt23l>ZXS*b?dHi5_r7Hs^fkOXT*p(2SE%!S?x_QK0575qo2 zwX_#1h>BiV%!Nb+NeQ&E+CpvGx@EI&YRx8XvzwVY=Xf#Q$!`9d1Ya09Ki|AB?|07m zKB2V+KnOu)oXr=!!7?b@HmA>?otB57yHZ>)%DwAVx?E&D#r!Oo?F15i} zu@wzyBS<*9fiH)C)K5L~uo%zf(?WO>reRPQiA>kWA{T&pfwq*7Kq*kltP#*kBh~-oK*|70>R7FS)+o6? zf!Z^W;7Wv6ED~66imDw*DM2e-smT>47dTkQEn4URDN(M(o^vVNcFira1q4@1dOi8- z{KU4|mP)ZLl>)qCw?9*)94|+z9557%#GY6U`4^)xqWNLkQulGQG@sT=v70Iu`97B> zlT<-p;HQ!C-MNN7?M`1pXzwSXT%b~)G*sG(p)noJ$ZyLRyH}onR-C(d8Nb+7@ZslQ zY5T_HEdd9C^2qfq0U;1p7&DsSXzfGGPhO?7 ztwqe1lay_TU@(MbS(uhZI2^_>yxJ%P*j2CorG3xw%daCicG>4?tgowWnc(%%O-;3( zY$4h^yZG*#uPe3%Kp~%}sVTwTp&dR?Heb-$d|`2lZin{HF8X?V^h{}vEy>LQ^gOwn zH{X4abXSJoM^E~(^^s7mgVo~k?p^$R>I}`vBmjR;Ot@RNw(`$pfsU>REr47uN9O)} oFji!`4fb~L6nndOij~&>1F2BWICf@c - - - + + + LeoCAD LeoCAD @@ -2088,7 +2088,7 @@ - + Nothing to export. Nichts zu exportieren. @@ -2108,8 +2108,8 @@ - - + + Could not open file '%1' for writing. Konnte Datei » %1 « nicht zum Schreiben öffnen. @@ -2166,12 +2166,12 @@ Konnte keine LGEO Dateien im Verzeichnis » %1 « finden. - + Export Wavefront Nach Wavefront exportieren - + Wavefront Files (*.obj);;All Files (*.*) Wavefront Dateien (*.obj);;Alle Dateien (*.*) @@ -4650,9 +4650,8 @@ GL_EXT_texture_filter_anisotropic extension: %5 Voreinstellung für Autor: - - - + + ... ... @@ -4662,361 +4661,361 @@ GL_EXT_texture_filter_anisotropic extension: %5 Eigene Teilebibliothek: - + Mouse Maus - + Mouse Shortcuts Maus-Kurzbefehle - + Action Aktion - + Shortcut 1 Tastenkürzel 1 - + Shortcut 2 Tastenkürzel 2 - + Button: Maustaste: - + None Keine - + Left Links - + Middle Mitte - + Right Rechts - + Modifiers: Sondertaste: - + Control Strg - + Alt Alt - + Shift Shift - + Mouse sensitivity: Mausempfindlichkeit: - + Check for updates: Auf Aktualisierungen prüfen: - + PO&V-Ray Executable: PO&V-Ray Executable: - + &LGEO Path: &LGEO Pfad: - + Never Nie - + Once a day Einmal am Tag - + Once a week Einmal pro Woche - + Fixed direction keys Feste Richtungstasten - + Rendering Rendern - + Edge lines Randlinien - + Axis icon Achsenbeschriftung - + width Breite - + Anti-aliasing Anti-aliasing - + 2x 2x - + 4x 4x - + 8x 8x - + Shading Mode: Schattenmodus: - + Wireframe Drahtmodell - + Flat Shading Einfache Schatten - + Default Lights Voreingestellte Beleuchtung - + Base Grid Grundraster - + Draw studs Noppen darstellen - + studs Noppen - + Draw lines every Linien zeichnen alle - + View Sphere Ansichtskugel - + Disabled Deaktiviert - + Small Klein - + Medium Mittel - + Large Groß - + Highlight Color: Hervorhebungsfarbe: - + Size: Größe: - + Color: Farbe: - + Text Color: Textfarbe: - + Location: Position: - + Top Left Oben links - + Top Right Oben rechts - + Bottom Left Unten links - + Bottom Right Oben rechts - - + + Categories Kategorie - + Parts Library Categories Kategorie der Teilebibliothek - + Name Name - + Number Nummer - - + + Import... Importieren… - - + + Export... Exportieren… - - - + + + Reset... Zurücksetzen… - + Category Kategorie - + New... Neu… - + Edit... Bearbeiten… - + Delete... Löschen… - + Keyboard Tastatur - + Keyboard Shortcuts Tastenkürzel - + Command Befehl - - - + + + Shortcut Kürzel - + Key se&quence: Tasten&folge: - - + + Assign Zuweisen - - + + Remove Entfernen @@ -5027,151 +5026,161 @@ GL_EXT_texture_filter_anisotropic extension: %5 - Open Parts Library Folder - Ordern der Teilebibliothek öffnen + Select Parts Library Folder... + Ordner der Teilebibliothek auswählen... - + + Select Parts Library Archive... + Archiv der Teilebibliothek auswählen... + + + + Supported Archives (*.zip *.bin);;All Files (*.*) + Unterstütze Bibliotheken (*.zip *.bin);;Alle Dateien (*.*) + + + Executable Files (*.exe);;All Files (*.*) Asuführbare Dateien (*.exe);;Alle Dateien (*.*) - + All Files (*.*) Alle Dateien (*.*) - + Open POV-Ray Executable Asuführbares POV-Ray öffnen - + Open LGEO Folder LGEO Ordner öffnen - + Select Grid Stud Color Farbe der Noppen im Gitter wählen - + Select Grid Line Color Farbe der Gitterlinien wählen - + Select View Sphere Color Wähle Ansichtskugelfarbe - + Select View Sphere Text Color Wähle Ansichtskugel Textfarbe - + Select View Sphere Highlight Color Wähle Ansichtskugel Hervorhebungsfarbe - + Unassigned Unbestimmt - + Are you sure you want to delete the category '%1'? Sind sie sicher dass sie die Kategorie » %1 « löschen möchten? - + Import Categories Kategorien importieren - - - - + + + + Text Files (*.txt);;All Files (*.*) Textdateien (*.txt);;Alle Dateien (*.*) - + Error loading categories file. Fehler beim Laden der Kategoriedatei. - + Export Categories Kategorien exportieren - + Error saving categories file. Fehler beim Speichern der Kategoriendatei. - + Are you sure you want to load the default categories? Sind sie sicher dass sie die voreingestellten Kategorien laden möchten? - + Import shortcuts Tastenkürzel laden - + Error loading keyboard shortcuts file. Fehler beim Laden der Tastaturkürzel-Datei. - + Export shortcuts Tastaturkürzel exportieren - + Error saving keyboard shortcuts file. Fehler beim Speichern der Tastaturkürzel-Datei. - + Are you sure you want to load the default keyboard shortcuts? Sind sie sicher dass sie die voreingestellten Tastaturkürzel laden möchten? - + Left Button Linke Maustaste - + Middle Button Mittlere Maustaste - + Right Button Rechte Maustaste - - + + Override Shortcut Tastaturkürzel ändern - - + + This shortcut is already assigned to '%1', do you want to replace it? Dieses Tastaturkürzel ist bereits » %1 « zugewiesen, möchten sie es ersetzen? - + Are you sure you want to load the default mouse shortcuts? Sind sie sicher dass sie die voreingestellten Mauskürzel laden möchten? @@ -5304,34 +5313,34 @@ GL_EXT_texture_filter_anisotropic extension: %5 - + Position Position - - - + + + X X - - - + + + Y Y - - - + + + Z Z @@ -5371,43 +5380,43 @@ GL_EXT_texture_filter_anisotropic extension: %5 Teil - + Target Ziel - - + + Up Hoch - + Orthographic Orhografisch - + FOV FOV - + Near Nah - + Far Fern - + Name Name - + Multiple Objects Selected Mehrere Objekre ausgewählt diff --git a/resources/leocad_fr.ts b/resources/leocad_fr.ts index 55c77435..39dc9c50 100644 --- a/resources/leocad_fr.ts +++ b/resources/leocad_fr.ts @@ -2003,7 +2003,7 @@ Delete - + Effacer @@ -2076,9 +2076,9 @@ - - - + + + LeoCAD LeoCAD @@ -2088,7 +2088,7 @@ - + Nothing to export. Rien à exporter. @@ -2108,8 +2108,8 @@ - - + + Could not open file '%1' for writing. N’a pas pu ouvrir le fichier « %1 » en écriture. @@ -2166,12 +2166,12 @@ N’a pas pu trouver les fichiers LGEO dans le dossier « %1 ». - + Export Wavefront Exporter vers Wavefront - + Wavefront Files (*.obj);;All Files (*.*) Fichiers Wavefront (*.obj);;Tous les fichiers (*.*) @@ -3177,7 +3177,7 @@ Right - + Droit @@ -4645,9 +4645,8 @@ GL_EXT_texture_filter_anisotropic extension: %5 Auteur par défaut : - - - + + ... ... @@ -4657,361 +4656,361 @@ GL_EXT_texture_filter_anisotropic extension: %5 Bibliothèque de pièces personnalisées : - + Mouse Souris - + Mouse Shortcuts Raccourcis souris - + Action Action - + Shortcut 1 - + Shortcut 2 - + Button: Bouton : - + None Aucun - + Left Gauche - + Middle Central - + Right Droit - + Modifiers: Modificateurs : - + Control Contrôle - + Alt Alt - + Shift Maj - + Mouse sensitivity: Sensibilité de la souris : - + Check for updates: Vérifier les mises à jour : - + PO&V-Ray Executable: - + &LGEO Path: - + Never Jamais - + Once a day Tous les jours - + Once a week Toutes les semaines - + Fixed direction keys Touches de directions fixes - + Rendering Rendu - + Edge lines Bordures - + Axis icon Icônes d’axes - + width largeur - + Anti-aliasing Anti-aliasing - + 2x 2x - + 4x 4x - + 8x 8x - + Shading Mode: - + Wireframe - + Flat Shading - + Default Lights - + Base Grid Grille de base - + Draw studs Dessiner les tenons - + studs tenons - + Draw lines every Dessine des lignes tous les - + View Sphere - + Disabled - + Small - + Medium - + Large - + Highlight Color: - + Size: - + Color: Couleur : - + Text Color: - + Location: - + Top Left - + Top Right - + Bottom Left - + Bottom Right - - + + Categories Catégories - + Parts Library Categories Catégories de la bibliothèque de pièces - + Name Nom - + Number Nombre - - + + Import... Importer… - - + + Export... Exporter… - - - + + + Reset... Réinitialiser… - + Category Catégorie - + New... Nouveau… - + Edit... Éditer… - + Delete... Supprimer… - + Keyboard Clavier - + Keyboard Shortcuts Raccourcis clavier - + Command Commande - - - + + + Shortcut Raccourcis - + Key se&quence: - - + + Assign Attribuer - - + + Remove Supprimer @@ -5022,151 +5021,161 @@ GL_EXT_texture_filter_anisotropic extension: %5 - Open Parts Library Folder - Ouvrir le dossier de la bibliothèque de pièces + Select Parts Library Folder... + - + + Select Parts Library Archive... + + + + + Supported Archives (*.zip *.bin);;All Files (*.*) + + + + Executable Files (*.exe);;All Files (*.*) Fichiers exécutables (*.exe);;Tous les fichiers (*.*) - + All Files (*.*) Tous les fichiers (*.*) - + Open POV-Ray Executable Lancer l’exécutable POV-Ray - + Open LGEO Folder Ouvrir le dossier LGEO - + Select Grid Stud Color Choisir le couleur des tenons de la grille - + Select Grid Line Color Choisir la couleur des lignes de la grille - + Select View Sphere Color - + Select View Sphere Text Color - + Select View Sphere Highlight Color - + Unassigned Non-attribué - + Are you sure you want to delete the category '%1'? Êtes-vous sûr de vouloir supprimer la catégorie « %1 » ? - + Import Categories Importer les catégories - - - - + + + + Text Files (*.txt);;All Files (*.*) Fichiers texte (*.txt);;Tous les fichiers (*.*) - + Error loading categories file. Erreur au chargement du fichier des catégories. - + Export Categories Exporter les catégories - + Error saving categories file. Erreur à l’enregistrement du fichier des catégories. - + Are you sure you want to load the default categories? Êtes-vous sûr de vouloir charger les catégories par défaut ? - + Import shortcuts Importer les raccourcis - + Error loading keyboard shortcuts file. Erreur au chargement du fichier des raccourcis clavier. - + Export shortcuts Exporter les raccourcis - + Error saving keyboard shortcuts file. Erreur à l’enregistrement du fichier des raccourcis clavier. - + Are you sure you want to load the default keyboard shortcuts? Êtes-vous sûr de vouloir charger les raccourcis clavier par défaut ? - + Left Button Bouton gauche - + Middle Button Bouton central - + Right Button Bouton droit - - + + Override Shortcut Écraser le raccourcis - - + + This shortcut is already assigned to '%1', do you want to replace it? Ce raccourcis est déjà attribué à « %1 », voulez-vous le remplacer ? - + Are you sure you want to load the default mouse shortcuts? Êtes-vous sûr de vouloir charger les raccourcis souris par défaut ? @@ -5299,34 +5308,34 @@ GL_EXT_texture_filter_anisotropic extension: %5 - + Position Position - - - + + + X X - - - + + + Y Y - - - + + + Z Z @@ -5366,43 +5375,43 @@ GL_EXT_texture_filter_anisotropic extension: %5 Pièce - + Target Cible - - + + Up Haut - + Orthographic Orthographique - + FOV FOV - + Near Proche - + Far Loin - + Name Nom - + Multiple Objects Selected Plusieurs objets sélectionnés diff --git a/resources/leocad_pt.ts b/resources/leocad_pt.ts index d0256d02..67cbe8e3 100644 --- a/resources/leocad_pt.ts +++ b/resources/leocad_pt.ts @@ -2076,9 +2076,9 @@ - - - + + + LeoCAD LeoCAD @@ -2088,7 +2088,7 @@ - + Nothing to export. Nada a exportar. @@ -2108,8 +2108,8 @@ - - + + Could not open file '%1' for writing. Erro ao abrir o ficheiro '%1' para escrever. @@ -2166,12 +2166,12 @@ Não achei ficheiros LGEO na pasta '%1'. - + Export Wavefront Exportar Wavefront - + Wavefront Files (*.obj);;All Files (*.*) Ficheiros Wavefront (*.obj);;Todos os Ficheiros (*.*) @@ -4645,9 +4645,8 @@ GL_EXT_texture_filter_anisotropic extension: %5 Nome do autor por omissão: - - - + + ... ... @@ -4657,361 +4656,361 @@ GL_EXT_texture_filter_anisotropic extension: %5 Biblioteca de peças personalizada: - + Mouse sensitivity: Sensibilidade do rato : - + Check for updates: Procurar actualizações: - + PO&V-Ray Executable: - + &LGEO Path: - + Never Nunca - + Once a day Uma vez por dia - + Once a week Uma vez por semana - + Fixed direction keys Teclas de direcção fixas - + Rendering Restituir - + Edge lines Contornos - + Axis icon Eixos - + width largura - + Anti-aliasing Suavização - + 2x 2x - + 4x 4x - + 8x 8x - + Shading Mode: - + Wireframe - + Flat Shading - + Default Lights - + Base Grid Grelha de Base - + Draw studs Desenhar pregos - + studs pregos - + Draw lines every Desenhar linhas cada - + View Sphere - + Disabled - + Small - + Medium - + Large - + Highlight Color: - + Size: - + Color: Cor: - + Text Color: - + Location: - + Top Left - + Top Right - + Bottom Left - + Bottom Right - - + + Categories Categorias - + Parts Library Categories Categorias de Peças na Biblioteca - + Name Nome - + Number Número - - + + Import... Importar.... - - + + Export... Exportar... - - - + + + Reset... Reiniciar... - + Category Categoria - + New... Novo... - + Edit... Editar... - + Delete... Apagar... - + Keyboard Teclado - + Keyboard Shortcuts Atalhos de Teclado - + Command Commando - - - + + + Shortcut Atalho - + Key se&quence: - + Mouse - + Mouse Shortcuts - + Action - + Shortcut 1 - + Shortcut 2 - + Button: - + None Nenhum - + Left Left - + Middle - + Right Right - + Modifiers: - + Control - + Alt - + Shift - - + + Assign Definir - - + + Remove Remover @@ -5022,151 +5021,161 @@ GL_EXT_texture_filter_anisotropic extension: %5 - Open Parts Library Folder - Escolher a Pasta da Biblioteca de Peças + Select Parts Library Folder... + - + + Select Parts Library Archive... + + + + + Supported Archives (*.zip *.bin);;All Files (*.*) + + + + Executable Files (*.exe);;All Files (*.*) Ficheiros Executaveis(*.exe);;Todos os Ficheiros (*.*) - + All Files (*.*) Todos os Ficheiros (*.*) - + Open POV-Ray Executable Escolher o programa POV-Ray - + Open LGEO Folder Escolher a Pasta LGEO - + Select Grid Stud Color Cor dos Pregos na Grelha - + Select Grid Line Color Cor das Linhas na Grelha - + Select View Sphere Color - + Select View Sphere Text Color - + Select View Sphere Highlight Color - + Unassigned Por Definir - + Are you sure you want to delete the category '%1'? Confirmar querer apagar a categoria '%1'? - + Import Categories Importar Categorias - - - - + + + + Text Files (*.txt);;All Files (*.*) Ficheiros Texto (*.txt);;Todos os Ficheiros (*.*) - + Error loading categories file. Erro ao carregar o ficheiro de categorias. - + Export Categories Exportar Categorias - + Error saving categories file. Erro ao gravar o ficheiro de categorias. - + Are you sure you want to load the default categories? Confirmar querer carregar as categorias por omissão? - + Import shortcuts Importar Atalhos de Teclado - + Error loading keyboard shortcuts file. Erro ao carregar o ficheiro de atalhos de teclado. - + Export shortcuts Exportar Atalhos de Teclado - + Error saving keyboard shortcuts file. Erro ao gravar o ficheiro de atalhos de teclado. - + Are you sure you want to load the default keyboard shortcuts? Confirmar querer carregar os atalhos de teclado por omissão? - + Left Button - + Middle Button - + Right Button - - + + Override Shortcut - - + + This shortcut is already assigned to '%1', do you want to replace it? - + Are you sure you want to load the default mouse shortcuts? @@ -5299,34 +5308,34 @@ GL_EXT_texture_filter_anisotropic extension: %5 - + Position Posição - - - + + + X X - - - + + + Y Y - - - + + + Z Z @@ -5366,43 +5375,43 @@ GL_EXT_texture_filter_anisotropic extension: %5 Peça - + Target Objectivo - - + + Up Subir - + Orthographic Ortográfico - + FOV FOV - + Near Perto - + Far Longe - + Name Nome - + Multiple Objects Selected