From ec4e65ae73fbcfe6662482deed122f1387ebb99c Mon Sep 17 00:00:00 2001
From: DSCaskey <31944718+DSCaskey@users.noreply.github.com>
Date: Thu, 23 Nov 2023 00:41:58 -0500
Subject: [PATCH] enhance groups dock
---
share/translations/seamly2d_cs_CZ.ts | 40 +++-
share/translations/seamly2d_de_DE.ts | 32 ++-
share/translations/seamly2d_el_GR.ts | 36 ++-
share/translations/seamly2d_en_CA.ts | 36 ++-
share/translations/seamly2d_en_GB.ts | 36 ++-
share/translations/seamly2d_en_IN.ts | 36 ++-
share/translations/seamly2d_en_US.ts | 36 ++-
share/translations/seamly2d_es_ES.ts | 50 +++-
share/translations/seamly2d_fi_FI.ts | 40 +++-
share/translations/seamly2d_fr_FR.ts | 36 ++-
share/translations/seamly2d_he_IL.ts | 36 ++-
share/translations/seamly2d_id_ID.ts | 40 +++-
share/translations/seamly2d_it_IT.ts | 36 ++-
share/translations/seamly2d_nl_NL.ts | 36 ++-
share/translations/seamly2d_pt_BR.ts | 36 ++-
share/translations/seamly2d_ro_RO.ts | 36 ++-
share/translations/seamly2d_ru_RU.ts | 36 ++-
share/translations/seamly2d_uk_UA.ts | 36 ++-
share/translations/seamly2d_zh_CN.ts | 36 ++-
src/app/seamly2d/dialogs/groups_widget.cpp | 266 ++++++++++++---------
src/app/seamly2d/dialogs/groups_widget.h | 4 +
src/app/seamly2d/dialogs/groups_widget.ui | 12 +-
22 files changed, 743 insertions(+), 245 deletions(-)
diff --git a/share/translations/seamly2d_cs_CZ.ts b/share/translations/seamly2d_cs_CZ.ts
index bd04f4e00028..814c1e775e73 100644
--- a/share/translations/seamly2d_cs_CZ.ts
+++ b/share/translations/seamly2d_cs_CZ.ts
@@ -543,7 +543,7 @@ p, li { white-space: pre-wrap; }
-
+ Středový bod:
@@ -1084,7 +1084,7 @@ p, li { white-space: pre-wrap; }
-
+ Středový bod:
@@ -3941,7 +3941,7 @@ Do you want to download it?
-
Edit Group
-
- Rename
-
-
Delete
Smazat
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Název
+
+ Edit
+ Upravit
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_de_DE.ts b/share/translations/seamly2d_de_DE.ts
index 69a2eb406847..734afa205bef 100644
--- a/share/translations/seamly2d_de_DE.ts
+++ b/share/translations/seamly2d_de_DE.ts
@@ -4022,10 +4022,6 @@ Possibly the file is already being downloaded.
Edit Group
Gruppe bearbeiten
-
- Rename
- Umbenennen
-
Delete
Löschen
@@ -4218,6 +4214,34 @@ Possibly the file is already being downloaded.
Name
Bezeichnung
+
+ Edit
+ Bearbeiten
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+ Gesperrt
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+ Farbe
+
HistoryDialog
diff --git a/share/translations/seamly2d_el_GR.ts b/share/translations/seamly2d_el_GR.ts
index ff331dedbf63..7d9f0a6c641a 100644
--- a/share/translations/seamly2d_el_GR.ts
+++ b/share/translations/seamly2d_el_GR.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Μετονομασία
-
Delete
Διαγραφή
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Όνομα
+
+ Edit
+ Επεξεργασία
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_en_CA.ts b/share/translations/seamly2d_en_CA.ts
index a0e978e52af1..fac939cf0fa5 100644
--- a/share/translations/seamly2d_en_CA.ts
+++ b/share/translations/seamly2d_en_CA.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Rename
-
Delete
Delete
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Name
+
+ Edit
+ Edit
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_en_GB.ts b/share/translations/seamly2d_en_GB.ts
index c8174fa2e023..8db2b8582b3a 100644
--- a/share/translations/seamly2d_en_GB.ts
+++ b/share/translations/seamly2d_en_GB.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Rename
-
Delete
Delete
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Name
+
+ Edit
+ Edit
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_en_IN.ts b/share/translations/seamly2d_en_IN.ts
index 541e7b028d9c..5513c23b77f0 100644
--- a/share/translations/seamly2d_en_IN.ts
+++ b/share/translations/seamly2d_en_IN.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Rename
-
Delete
Delete
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Name
+
+ Edit
+ Edit
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_en_US.ts b/share/translations/seamly2d_en_US.ts
index b134e2597fcc..7ca5e0e113d3 100644
--- a/share/translations/seamly2d_en_US.ts
+++ b/share/translations/seamly2d_en_US.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Rename
-
Delete
Delete
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Name
+
+ Edit
+ Edit
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_es_ES.ts b/share/translations/seamly2d_es_ES.ts
index 32cf1918f474..9ae2e268cfe7 100644
--- a/share/translations/seamly2d_es_ES.ts
+++ b/share/translations/seamly2d_es_ES.ts
@@ -4057,10 +4057,6 @@ Possibly the file is already being downloaded.
Edit Group
Editar Grupo
-
- Rename
- Renombrar
-
Delete
Eliminar
@@ -4253,6 +4249,34 @@ Possibly the file is already being downloaded.
Name
Nombre
+
+ Edit
+ Editar
+
+
+ Visible
+ Visible
+
+
+ Group is visible
+ El grupo es visible
+
+
+ Locked
+ Bloqueado
+
+
+ Group is locked
+ El grupo está bloqueado
+
+
+ Group has objects
+ El grupo tiene objetos
+
+
+ Color
+ Color
+
HistoryDialog
@@ -8249,18 +8273,18 @@ Do you want to save your changes?
Reset current pen to defaults
- Restablecer el lápiz actual a los valores predeterminados
+ Restablecer el lápiz actual a los valores predeterminados
Save current pen preset
- Guardar el preajuste actual del lápiz
+ Guardar el preajuste actual del lápiz
PieceFillComboBox
No Fill
- Sin relleno
+ Sin relleno
Solid
@@ -10353,7 +10377,7 @@ actualización:
Toggle Lock
- Alternar Cerrar
+ Interruptor de bloqueo
Ctrl+L
@@ -10377,7 +10401,7 @@ actualización:
Raise To Top
- Traer al Frente
+ Traer al Frente
Ctrl+Home
@@ -10385,7 +10409,7 @@ actualización:
Lower To Bottom
- Bajar al Fondo
+ Bajar al Fondo
Ctrl+End
@@ -11366,15 +11390,15 @@ Do you want to save your changes?
VAbstractMainWindow
Confirm format rewriting
- Confirmar la reescritura del formato
+ Confirmar la reescritura del formato
This file is using previous format version v%1. The current is v%2. Saving the file with this app version will update the format version for this file. This may prevent you from be able to open the file with older app versions. Do you really want to continue?
- Este archivo utiliza la versión v%1 del formato anterior. La actual es v%2. Si guarda el archivo con esta versión de la aplicación, se actualizará la versión de formato de este archivo. Esto puede impedir que pueda abrir el archivo con versiones anteriores de la aplicación. ¿Realmente desea continuar?
+ Este archivo utiliza la versión v%1 del formato anterior. La actual es v%2. Si guarda el archivo con esta versión de la aplicación, se actualizará la versión de formato de este archivo. Esto puede impedir que pueda abrir el archivo con versiones anteriores de la aplicación. ¿Realmente desea continuar?
Comma-Separated Values
- Valores separados por comas
+ Valores separados por comas
Export to CSV
diff --git a/share/translations/seamly2d_fi_FI.ts b/share/translations/seamly2d_fi_FI.ts
index 5990e1d6e141..0bbecfe9bba0 100644
--- a/share/translations/seamly2d_fi_FI.ts
+++ b/share/translations/seamly2d_fi_FI.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
-
-
Delete
Poista
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Nimi
+
+ Edit
+ Muokkaa
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4507,7 +4531,7 @@ Possibly the file is already being downloaded.
Center point:
-
+ Keskipiste:
Tangent point:
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
@@ -12666,7 +12690,7 @@ Do you want to save your changes?
Center point:
-
+ Keskipiste:
Radius:
diff --git a/share/translations/seamly2d_fr_FR.ts b/share/translations/seamly2d_fr_FR.ts
index 7f6b0f5bf9d7..f90a6242ff9c 100644
--- a/share/translations/seamly2d_fr_FR.ts
+++ b/share/translations/seamly2d_fr_FR.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Renommer
-
Delete
Supprimer
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Nom
+
+ Edit
+
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_he_IL.ts b/share/translations/seamly2d_he_IL.ts
index c26600507558..b380479fd0d2 100644
--- a/share/translations/seamly2d_he_IL.ts
+++ b/share/translations/seamly2d_he_IL.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
-
-
Delete
למחוק
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
+
+ Edit
+
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_id_ID.ts b/share/translations/seamly2d_id_ID.ts
index c11eaac8ca42..d99cb9e5d16c 100644
--- a/share/translations/seamly2d_id_ID.ts
+++ b/share/translations/seamly2d_id_ID.ts
@@ -543,7 +543,7 @@ p, li { white-space: pre-wrap; }
Center point:
-
+ Titik tengah:
Color:
@@ -1084,7 +1084,7 @@ p, li { white-space: pre-wrap; }
Center point:
-
+ Titik tengah:
Select center point of the arc
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
-
-
Delete
hapus
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Nama
+
+ Edit
+
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_it_IT.ts b/share/translations/seamly2d_it_IT.ts
index a05bed8d0828..a75f8fa111cf 100644
--- a/share/translations/seamly2d_it_IT.ts
+++ b/share/translations/seamly2d_it_IT.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
-
-
Delete
Elimina
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Nome
+
+ Edit
+ Modifica
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_nl_NL.ts b/share/translations/seamly2d_nl_NL.ts
index d4435b539c02..78ab379796bf 100644
--- a/share/translations/seamly2d_nl_NL.ts
+++ b/share/translations/seamly2d_nl_NL.ts
@@ -4018,10 +4018,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Hernoem
-
Delete
@@ -4204,16 +4200,44 @@ Possibly the file is already being downloaded.
Group color
-
+ Groep kleur
Group name
-
+ Naam groep
Name
Naam
+
+ Edit
+ Bewerk
+
+
+ Visible
+ Zichtbaar
+
+
+ Group is visible
+ De groep is zichtbaar
+
+
+ Locked
+ Vergrendeld
+
+
+ Group is locked
+ De groep is vergrendeld
+
+
+ Group has objects
+ Groep heeft objecten
+
+
+ Color
+ Kleur
+
HistoryDialog
diff --git a/share/translations/seamly2d_pt_BR.ts b/share/translations/seamly2d_pt_BR.ts
index 40af6b5a9a9e..20a95e60c4a3 100644
--- a/share/translations/seamly2d_pt_BR.ts
+++ b/share/translations/seamly2d_pt_BR.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Renomear
-
Delete
Excluir
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Nome
+
+ Edit
+ Editar
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_ro_RO.ts b/share/translations/seamly2d_ro_RO.ts
index 0aa6942dd0cb..6bf3c5397f35 100644
--- a/share/translations/seamly2d_ro_RO.ts
+++ b/share/translations/seamly2d_ro_RO.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
-
-
Delete
Șterge
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Nume
+
+ Edit
+
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_ru_RU.ts b/share/translations/seamly2d_ru_RU.ts
index aced5680b770..282a06a10038 100644
--- a/share/translations/seamly2d_ru_RU.ts
+++ b/share/translations/seamly2d_ru_RU.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Переименовать
-
Delete
Удалить
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
Имя
+
+ Edit
+ Редактировать
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_uk_UA.ts b/share/translations/seamly2d_uk_UA.ts
index b06a4aaa78e2..4864c90fedc3 100644
--- a/share/translations/seamly2d_uk_UA.ts
+++ b/share/translations/seamly2d_uk_UA.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
- Перейменувати
-
Delete
Видалити
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
імя
+
+ Edit
+ Редагувати
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4833,7 +4857,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/share/translations/seamly2d_zh_CN.ts b/share/translations/seamly2d_zh_CN.ts
index 6a6d8eae8c81..bb1a62e28e39 100644
--- a/share/translations/seamly2d_zh_CN.ts
+++ b/share/translations/seamly2d_zh_CN.ts
@@ -3941,7 +3941,7 @@ Do you want to download it?
- Unable to get exclusive access to file
+ Unable to get exclusive access to file
%1
Possibly the file is already being downloaded.
@@ -4013,10 +4013,6 @@ Possibly the file is already being downloaded.
Edit Group
-
- Rename
-
-
Delete
删除
@@ -4209,6 +4205,34 @@ Possibly the file is already being downloaded.
Name
+
+ Edit
+
+
+
+ Visible
+
+
+
+ Group is visible
+
+
+
+ Locked
+
+
+
+ Group is locked
+
+
+
+ Group has objects
+
+
+
+ Color
+
+
HistoryDialog
@@ -4830,7 +4854,7 @@ Possibly the file is already being downloaded.
- Margins go beyond printing.
+ Margins go beyond printing.
Apply settings anyway?
diff --git a/src/app/seamly2d/dialogs/groups_widget.cpp b/src/app/seamly2d/dialogs/groups_widget.cpp
index 9b38228b5e29..78df6b00e4b8 100644
--- a/src/app/seamly2d/dialogs/groups_widget.cpp
+++ b/src/app/seamly2d/dialogs/groups_widget.cpp
@@ -127,11 +127,10 @@ GroupsWidget::GroupsWidget(VContainer *data, VAbstractPattern *doc, QWidget *par
connect(ui->deleteGroup_ToolButton, &QToolButton::clicked, this, &GroupsWidget::deleteGroupFromList);
connect(ui->editGroup_ToolButton, &QToolButton::clicked, this, &GroupsWidget::editGroup);
- connect(ui->groups_TableWidget, &QTableWidget::cellClicked, this, &GroupsWidget::groupVisibilityChanged);
- connect(ui->groups_TableWidget, &QTableWidget::cellClicked, this, &GroupsWidget::groupLockChanged);
- connect(ui->groups_TableWidget, &QTableWidget::cellChanged, this, &GroupsWidget::renameGroup);
- connect(ui->groups_TableWidget, &QTableWidget::cellClicked, this, &GroupsWidget::fillGroupItemList);
- connect(ui->groups_TableWidget, &QTableWidget::currentCellChanged, this, &GroupsWidget::fillGroupItemList);
+ connect(ui->groups_TableWidget, &QTableWidget::cellChanged, this, &GroupsWidget::renameGroup);
+ connect(ui->groups_TableWidget, &QTableWidget::cellClicked, this, &GroupsWidget::cellClicked);
+ connect(ui->groups_TableWidget, &QTableWidget::cellDoubleClicked, this, &GroupsWidget::cellDoubleClicked);
+ connect(ui->groups_TableWidget, &QTableWidget::currentCellChanged, this, &GroupsWidget::fillGroupItemList);
ui->groups_TableWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->groups_TableWidget, &QTableWidget::customContextMenuRequested, this, &GroupsWidget::groupContextMenu);
@@ -150,6 +149,22 @@ GroupsWidget::~GroupsWidget()
delete ui;
}
+//---------------------------------------------------------------------------------------------------------------------
+/**
+ * @brief changeEvent Handle language change event to retranslate the widget's ui.
+ * @param event QEvent sent to widget.
+ */
+ void GroupsWidget::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ {
+ ui->retranslateUi(this);
+ updateGroups();
+ }
+
+ // remember to call base class implementation
+ QWidget::changeEvent(event);
+}
//---------------------------------------------------------------------------------------------------------------------
void GroupsWidget::groupVisibilityChanged(int row, int column)
{
@@ -163,15 +178,16 @@ void GroupsWidget::groupVisibilityChanged(int row, int column)
const bool visible = !m_doc->getGroupVisibility(groupId);
setGroupVisibility(item, groupId, visible);
}
+ else
+ {
+ QApplication::beep();
+ }
}
//---------------------------------------------------------------------------------------------------------------------
void GroupsWidget::groupLockChanged(int row, int column)
{
- if (column != 1)
- {
- return;
- }
+ if (column != 1) return;
QTableWidgetItem *item = ui->groups_TableWidget->item(row, column);
if (!item) return;
@@ -181,17 +197,21 @@ void GroupsWidget::groupLockChanged(int row, int column)
if (locked)
{
item->setIcon(QIcon("://icon/32x32/lock_on.png"));
+ item = ui->groups_TableWidget->item(row, 4);
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable);
}
else
{
item->setIcon(QIcon("://icon/32x32/lock_off.png"));
+ item = ui->groups_TableWidget->item(row, 4);
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
}
}
//---------------------------------------------------------------------------------------------------------------------
void GroupsWidget::renameGroup(int row, int column)
{
- if (column != 2)
+ if (column != 4)
{
return;
}
@@ -228,27 +248,33 @@ void GroupsWidget::showGroups(QMap groups)
void GroupsWidget::showAllGroups()
{
- qCDebug(WidgetGroups, "Show All Groups");
- quint32 groupId;
- bool locked;
- for (int i = 0; i < ui->groups_TableWidget->rowCount(); ++i)
- {
- QTableWidgetItem *item = ui->groups_TableWidget->item(i, 0);
- if (!item)
- {
- return;
- }
- groupId = item->data(Qt::UserRole).toUInt();
- locked = m_doc->getGroupLock(groupId);
- if (item && locked == false)
- {
- setGroupVisibility(item, groupId, true);
- }
- }
+ ui->groups_TableWidget->setSortingEnabled(false);
+ ui->groups_TableWidget->blockSignals(true);
+ qCDebug(WidgetGroups, "Show All Groups");
+ quint32 groupId;
+ bool locked;
+ for (int i = 0; i < ui->groups_TableWidget->rowCount(); ++i)
+ {
+ QTableWidgetItem *item = ui->groups_TableWidget->item(i, 0);
+ if (!item)
+ {
+ return;
+ }
+ groupId = item->data(Qt::UserRole).toUInt();
+ locked = m_doc->getGroupLock(groupId);
+ if (item && locked == false)
+ {
+ setGroupVisibility(item, groupId, true);
+ }
+ }
+ ui->groups_TableWidget->blockSignals(false);
+ ui->groups_TableWidget->setSortingEnabled(true);
}
void GroupsWidget::hideAllGroups()
{
+ ui->groups_TableWidget->setSortingEnabled(false);
+ ui->groups_TableWidget->blockSignals(true);
qCDebug(WidgetGroups, "Hide All Groups");
quint32 groupId;
bool locked;
@@ -266,6 +292,8 @@ void GroupsWidget::hideAllGroups()
setGroupVisibility(item, groupId, false);
}
}
+ ui->groups_TableWidget->blockSignals(false);
+ ui->groups_TableWidget->setSortingEnabled(true);
}
void GroupsWidget::lockAllGroups()
@@ -281,6 +309,8 @@ void GroupsWidget::lockAllGroups()
const quint32 groupId = item->data(Qt::UserRole).toUInt();
m_doc->setGroupLock(groupId, true);
item->setIcon(QIcon("://icon/32x32/lock_on.png"));
+ item = ui->groups_TableWidget->item(row, 4);
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable);
}
}
@@ -297,6 +327,8 @@ void GroupsWidget::unlockAllGroups()
const quint32 groupId = item->data(Qt::UserRole).toUInt();
m_doc->setGroupLock(groupId, false);
item->setIcon(QIcon("://icon/32x32/lock_off.png"));
+ item = ui->groups_TableWidget->item(row, 4);
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
}
}
@@ -334,9 +366,9 @@ void GroupsWidget::addGroupToList()
case QMessageBox::Retry:
break; // Repeat Add Group Dialog
case QMessageBox::Cancel:
- return; // Exit Add Group Dialog
+ return; // Exit Add Group Dialog
default:
- break; // should never be reached
+ break; // should never be reached
}
}
@@ -428,11 +460,12 @@ void GroupsWidget::editGroup()
switch (boxResult)
{
case QMessageBox::Retry:
- break; // Repeat Add Group Dialog
+ break; // Repeat Edit Group Dialog
case QMessageBox::Cancel:
- return; // Exit Add Group Dialog
+ ui->groups_TableWidget->blockSignals(false);
+ return; // Exit Edit Group Dialog
default:
- break; // should never be reached
+ break; // should never be reached
}
}
@@ -440,18 +473,19 @@ void GroupsWidget::editGroup()
const QString groupLineType = dialog->getLineType();
const QString groupLineWeight = dialog->getLineWeight();
+ // Add color item
QTableWidgetItem *item = ui->groups_TableWidget->item(row, 3);
item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
item->setSizeHint(QSize(20, 20));
QPixmap pixmap(20, 20);
pixmap.fill(QColor(groupColor));
item->setIcon(QIcon(pixmap));
- item->setFlags(item->flags() &= ~(Qt::ItemIsEditable)); // set the item non-editable (view only), and non-selectable
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable); // set the item non-editable (view only), and non-selectable
item->setToolTip(tr("Group color"));
- ui->groups_TableWidget->setItem(row, 3, item);
-
+ // Add group name item
item = ui->groups_TableWidget->item(row, 4);
item->setText(groupName);
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
m_doc->setGroupName(groupId, groupName);
m_doc->setGroupColor(groupId, groupColor);
@@ -460,14 +494,18 @@ void GroupsWidget::editGroup()
updateGroups();
}
+ else
+ {
+ QApplication::beep();
+ }
ui->groups_TableWidget->blockSignals(false);
}
//---------------------------------------------------------------------------------------------------------------------
void GroupsWidget::groupContextMenu(const QPoint &pos)
{
- ui->groups_TableWidget->setSortingEnabled(false);
- ui->groups_TableWidget->blockSignals(true);
+ //ui->groups_TableWidget->setSortingEnabled(false);
+ //ui->groups_TableWidget->blockSignals(true);
QTableWidgetItem *item = ui->groups_TableWidget->itemAt(pos);
if (!item)
@@ -486,78 +524,16 @@ void GroupsWidget::groupContextMenu(const QPoint &pos)
}
QScopedPointer menu(new QMenu());
- QAction *actionRename = menu->addAction(QIcon("://icon/32x32/rename_32"), tr("Rename"));
+ QAction *actionEdit = menu->addAction(QIcon("://icon/32x32/edit.png"), tr("Edit"));
QAction *actionDelete = menu->addAction(QIcon::fromTheme("edit-delete"), tr("Delete"));
QAction *selectedAction = menu->exec(ui->groups_TableWidget->viewport()->mapToGlobal(pos));
if(selectedAction == nullptr)
{
return;
}
- else if (selectedAction == actionRename)
+ else if (selectedAction == actionEdit)
{
- QString oldGroupName = m_doc->getGroupName(groupId);
- QScopedPointer dialog(new EditGroupDialog(new VContainer(qApp->TrVars(),
- qApp->patternUnitP()), NULL_ID, this));
- dialog->setName(m_doc->getGroupName(groupId));
- dialog->setColor(m_doc->getGroupColor(groupId));
- dialog->setLineType(m_doc->getGroupLineType(groupId));
- dialog->setLineWeight(m_doc->getGroupLineWeight(groupId));
- dialog->setWindowTitle(tr("Edit Group"));
-
- QString groupName;
- while (1)
- {
- const bool result = dialog->exec();
- groupName = dialog->getName();
- if (result == false || groupName.isEmpty())
- {
- return;
- }
- bool exists = m_doc->groupNameExists(groupName);
- if (exists == false || groupName == oldGroupName)
- {
- break;
- }
-
- QMessageBox messageBox;
- messageBox.setWindowTitle(tr("Name Exists"));
- messageBox.setIcon(QMessageBox::Warning);
- messageBox.setStandardButtons(QMessageBox::Retry | QMessageBox::Cancel);
- messageBox.setDefaultButton(QMessageBox::Retry);
- messageBox.setText(tr("The action can't be completed because the group name already exists."));
- int boxResult = messageBox.exec();
-
- switch (boxResult)
- {
- case QMessageBox::Retry:
- break; // Repeat Add Group Dialog
- case QMessageBox::Cancel:
- return; // Exit Add Group Dialog
- default:
- break; // should never be reached
- }
- }
-
- const QString groupColor = dialog->getColor();
- const QString groupLineType = dialog->getLineType();
- const QString groupLineWeight = dialog->getLineWeight();
-
- item = ui->groups_TableWidget->item(row, 3);
- item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
- item->setSizeHint(QSize(20, 20));
- QPixmap pixmap(20, 20);
- pixmap.fill(QColor(groupColor));
- item->setIcon(QIcon(pixmap));
- item->setFlags(item->flags() &= ~(Qt::ItemIsEditable)); // set the item non-editable (view only), and non-selectable
- item->setToolTip(tr("Group color"));
- ui->groups_TableWidget->setItem(row, 3, item);
-
- item = ui->groups_TableWidget->item(row, 4);
- item->setText(groupName);
- m_doc->setGroupName(groupId, groupName);
- m_doc->setGroupColor(groupId, groupColor);
- m_doc->setGroupLineType(groupId, groupLineType);
- m_doc->setGroupLineWeight(groupId, groupLineWeight);
+ editGroup();
}
else if (selectedAction == actionDelete)
{
@@ -566,8 +542,8 @@ void GroupsWidget::groupContextMenu(const QPoint &pos)
qApp->getUndoStack()->push(command);
}
- ui->groups_TableWidget->setSortingEnabled(true);
- ui->groups_TableWidget->blockSignals(false);
+ //ui->groups_TableWidget->setSortingEnabled(true);
+ //ui->groups_TableWidget->blockSignals(false);
}
@@ -607,7 +583,7 @@ void GroupsWidget::fillTable(const QMap &groups)
setGroupVisibility(item, i.key(), data.visible);
item->setData(Qt::UserRole, i.key());
- item->setFlags(item->flags() &= ~(Qt::ItemIsEditable)); // set the item non-editable (view only), and non-selectable
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable); // set the item non-editable (view only), and non-selectable
item->setToolTip(tr("Show which groups in the list are visible"));
ui->groups_TableWidget->setItem(currentRow, 0, item);
@@ -617,7 +593,7 @@ void GroupsWidget::fillTable(const QMap &groups)
item->setSizeHint(QSize(20, 20));
item->setIcon(data.locked ? QIcon("://icon/32x32/lock_on.png") : QIcon("://icon/32x32/lock_off.png"));
item->setData(Qt::UserRole, i.key());
- item->setFlags(item->flags() &= ~(Qt::ItemIsEditable)); // set the item non-editable (view only), and non-selectable
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable); // set the item non-editable (view only), and non-selectable
item->setToolTip(tr("Show which groups in the list are locked"));
ui->groups_TableWidget->setItem(currentRow, 1, item);
@@ -626,7 +602,7 @@ void GroupsWidget::fillTable(const QMap &groups)
item->setTextAlignment(Qt::AlignHCenter);
item->setIcon(!m_doc->isGroupEmpty(i.key()) ? QIcon("://icon/32x32/history.png") : QIcon());
item->setData(Qt::UserRole, i.key());
- item->setFlags(item->flags() &= ~(Qt::ItemIsEditable)); // set the item non-editable (view only), and non-selectable
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable); // set the item non-editable (view only), and non-selectable
item->setToolTip(tr("Show which groups contain objects"));
ui->groups_TableWidget->setItem(currentRow, 2, item);
@@ -638,7 +614,7 @@ void GroupsWidget::fillTable(const QMap &groups)
pixmap.fill(QColor(data.color));
item->setIcon(QIcon(pixmap));
item->setData(Qt::UserRole, data.color);
- item->setFlags(item->flags() &= ~(Qt::ItemIsEditable)); // set the item non-editable (view only), and non-selectable
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable); // set the item non-editable (view only), and non-selectable
item->setToolTip(tr("Group color"));
ui->groups_TableWidget->setItem(currentRow, 3, item);
@@ -647,15 +623,23 @@ void GroupsWidget::fillTable(const QMap &groups)
nameItem->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
nameItem->setToolTip(tr("Group name"));
ui->groups_TableWidget->setItem(currentRow, 4, nameItem);
-
+ if (data.locked)
+ {
+ nameItem->setFlags(nameItem->flags() & ~Qt::ItemIsEditable);
+ }
++i;
}
- ui->groups_TableWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(makeHeaderName(QString("Visible"))));
- ui->groups_TableWidget->setHorizontalHeaderItem(1, new QTableWidgetItem(makeHeaderName(QString("Locked"))));
- ui->groups_TableWidget->setHorizontalHeaderItem(2, new QTableWidgetItem(makeHeaderName(QString("Objects"))));
- ui->groups_TableWidget->setHorizontalHeaderItem(3, new QTableWidgetItem(makeHeaderName(QString("Color"))));
+ ui->groups_TableWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(makeHeaderName(tr("Visible"))));
+ ui->groups_TableWidget->horizontalHeaderItem(0)->setToolTip(tr("Group is visible"));
+ ui->groups_TableWidget->setHorizontalHeaderItem(1, new QTableWidgetItem(makeHeaderName(tr("Locked"))));
+ ui->groups_TableWidget->horizontalHeaderItem(1)->setToolTip(tr("Group is locked"));
+ ui->groups_TableWidget->setHorizontalHeaderItem(2, new QTableWidgetItem(makeHeaderName(tr("Objects"))));
+ ui->groups_TableWidget->horizontalHeaderItem(2)->setToolTip(tr("Group has objects"));
+ ui->groups_TableWidget->setHorizontalHeaderItem(3, new QTableWidgetItem(makeHeaderName(tr("Color"))));
+ ui->groups_TableWidget->horizontalHeaderItem(3)->setToolTip(tr("Group color"));
ui->groups_TableWidget->setHorizontalHeaderItem(4, new QTableWidgetItem(tr("Name")));
+ ui->groups_TableWidget->horizontalHeaderItem(4)->setToolTip(tr("Group name"));
ui->groups_TableWidget->horizontalHeaderItem(4)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
ui->groups_TableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
ui->groups_TableWidget->resizeColumnsToContents();
@@ -1097,7 +1081,8 @@ QString GroupsWidget::getObjName(quint32 toolId)
catch (const VExceptionBadId &error)
{
qCDebug(WidgetGroups, "Error! Couldn't get object name by id = %s. %s %s", qUtf8Printable(QString().setNum(toolId)),
- qUtf8Printable(error.ErrorMessage()), qUtf8Printable(error.DetailedInformation()));
+ qUtf8Printable(error.ErrorMessage()),
+ qUtf8Printable(error.DetailedInformation()));
return QString("Unknown Object");// Return Unknown string
}
}
@@ -1215,7 +1200,60 @@ QString GroupsWidget::getObjName(quint32 toolId)
}
}
}
+//---------------------------------------------------------------------------------------------------------------------
+/**
+ * @brief cellClicked Handle clicking of table cell.
+ * @param row row of selected table widget item.
+ * @param column column of selected table widget item.
+ */
+void GroupsWidget::cellClicked(int row, int column)
+{
+ if (column == 0)
+ {
+ groupVisibilityChanged(row, 0);
+ }
+ else if (column == 1)
+ {
+ groupLockChanged(row, 1);
+ }
+ else if ((column == 2) || (column == 3) || (column == 4))
+ {
+ QTableWidgetItem *item = ui->groups_TableWidget->item(row, 0);
+ const quint32 groupId = item->data(Qt::UserRole).toUInt();
+ const bool locked = m_doc->getGroupLock(groupId);
+ if (locked == true)
+ {
+ QApplication::beep();
+ }
+ }
+
+ fillGroupItemList();
+}
+//---------------------------------------------------------------------------------------------------------------------
+/**
+ * @brief cellDoubleClicked Handle double clicking of table cell.
+ * @param row row of selected table widget item.
+ * @param column column of selected table widget item.
+ */
+void GroupsWidget::cellDoubleClicked(int row, int column)
+{
+ QTableWidgetItem *item = ui->groups_TableWidget->item(row, 1);
+ const quint32 groupId = item->data(Qt::UserRole).toUInt();
+ const bool locked = m_doc->getGroupLock(groupId);
+ if (locked == false)
+ {
+ if (column == 3)
+ {
+ editGroup();
+ }
+ }
+ else
+ {
+ QApplication::beep();
+ }
+ return;
+}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief Handle double clicking of list item.
diff --git a/src/app/seamly2d/dialogs/groups_widget.h b/src/app/seamly2d/dialogs/groups_widget.h
index 9a5a34a3601c..42b04367abc3 100644
--- a/src/app/seamly2d/dialogs/groups_widget.h
+++ b/src/app/seamly2d/dialogs/groups_widget.h
@@ -98,6 +98,8 @@ private slots:
void renameGroup(int row, int column);
void groupContextMenu(const QPoint &pos);
void draftBlockHasGroups(bool value);
+ protected:
+ virtual void changeEvent(QEvent* event) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(GroupsWidget)
@@ -111,6 +113,8 @@ private slots:
void fillGroupItemList();
void addGroupItem(const quint32 &toolId, const quint32 &objId, const Tool &tooltype);
void groupItemContextMenu(const QPoint &pos);
+ void cellClicked(int row, int column);
+ void cellDoubleClicked(int row, int column);
void itemDoubleClicked(QListWidgetItem *item);
void zoomToObject(QSharedPointer point);
void setGroupVisibility(QTableWidgetItem *item, const quint32 &groupId, const bool &visible);
diff --git a/src/app/seamly2d/dialogs/groups_widget.ui b/src/app/seamly2d/dialogs/groups_widget.ui
index 7952ef6a67dc..942fe11bec71 100644
--- a/src/app/seamly2d/dialogs/groups_widget.ui
+++ b/src/app/seamly2d/dialogs/groups_widget.ui
@@ -95,9 +95,6 @@
Lock all groups
-
- ...
-
:/icon/32x32/lock_on.png:/icon/32x32/lock_on.png
@@ -121,9 +118,6 @@
Unlock all groups
-
- ...
-
:/icon/32x32/lock_off.png:/icon/32x32/lock_off.png
@@ -202,6 +196,9 @@
Qt::Vertical
+
+
+ false
@@ -322,6 +319,9 @@
16
+
+ 30
+
true