From e297dbd8052ef4e66f069e2dd1865ae7fa8af28e Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 21 Mar 2013 11:01:59 +0100 Subject: Imported Upstream version 0.3.1.0 --- .../Themes/Teracopy/Languages/ar/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/ar/translation.ts | 52 +-- .../Themes/Teracopy/Languages/de/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/de/translation.ts | 88 ++-- .../Themes/Teracopy/Languages/el/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/el/translation.ts | 52 +-- .../Themes/Teracopy/Languages/es/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/es/translation.ts | 88 ++-- .../Themes/Teracopy/Languages/fr/translation.qm | Bin 3356 -> 0 bytes .../Themes/Teracopy/Languages/fr/translation.ts | 54 +-- .../Themes/Teracopy/Languages/hi/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/hi/translation.ts | 52 +-- .../Themes/Teracopy/Languages/id/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/id/translation.ts | 52 +-- .../Themes/Teracopy/Languages/it/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/it/translation.ts | 88 ++-- .../Themes/Teracopy/Languages/ja/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/ja/translation.ts | 52 +-- .../Themes/Teracopy/Languages/ko/translation.ts | 93 +++++ .../Themes/Teracopy/Languages/nl/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/nl/translation.ts | 52 +-- .../Themes/Teracopy/Languages/no/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/no/translation.ts | 52 +-- .../Themes/Teracopy/Languages/pl/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/pl/translation.ts | 52 +-- .../Themes/Teracopy/Languages/ru/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/ru/translation.ts | 88 ++-- .../Themes/Teracopy/Languages/th/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/th/translation.ts | 52 +-- .../Themes/Teracopy/Languages/tr/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/tr/translation.ts | 52 +-- .../Themes/Teracopy/Languages/zh/translation.qm | Bin 327 -> 0 bytes .../Themes/Teracopy/Languages/zh/translation.ts | 52 +-- .../Themes/Teracopy/TransferModel.cpp | 441 +++++++++++++++++++++ .../Themes/Teracopy/TransferModel.h | 92 +++++ .../Themes/Teracopy/informations.xml | 6 +- plugins-alternative/Themes/Teracopy/interface.cpp | 208 +++------- plugins-alternative/Themes/Teracopy/interface.h | 11 +- plugins-alternative/Themes/Teracopy/interface.pro | 15 +- plugins-alternative/Themes/Teracopy/interface.ui | 23 +- .../Themes/Teracopy/resources/player_pause.png | Bin 0 -> 484 bytes 41 files changed, 1041 insertions(+), 826 deletions(-) delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/ar/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/de/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/el/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/es/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/fr/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/hi/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/id/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/it/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/ja/translation.qm create mode 100644 plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/nl/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/no/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/pl/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/ru/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/th/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/tr/translation.qm delete mode 100644 plugins-alternative/Themes/Teracopy/Languages/zh/translation.qm create mode 100644 plugins-alternative/Themes/Teracopy/TransferModel.cpp create mode 100644 plugins-alternative/Themes/Teracopy/TransferModel.h create mode 100644 plugins-alternative/Themes/Teracopy/resources/player_pause.png (limited to 'plugins-alternative/Themes/Teracopy') diff --git a/plugins-alternative/Themes/Teracopy/Languages/ar/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/ar/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/ar/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/de/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/de/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/de/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts index e8d8cf2..237dc4f 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts @@ -1,109 +1,93 @@ - + InterfacePlugin - - Total: %3 of %4 - + + Total: %1 of %2 + Total: %1 von %2 - + %1 of %2 - + %1 von %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done - + %1% erledigt interfaceCopy - + &More - + Mehr - + ... - + - + &Pause - + - + &Skip - + überspringen - + &Cancel - + Stornieren - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Support Ultracopier</span></a></p></body></html> - - - - - Source - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">unterstützen Ultracopier</span></a></p></body></html> - + Add file - + Datei hinzufügen - + Add folder - + Ordner hinzufügen - + Move file(s) - + Bewegen Sie Datei (en) - + Move folder - + bewegen Sie Ordner - + Copy file(s) - + Kopieren Sie die Datei (en) - + Copy folder - + kopieren Sie das Verzeichnis diff --git a/plugins-alternative/Themes/Teracopy/Languages/el/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/el/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/el/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/es/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/es/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/es/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts index e8d8cf2..fe526da 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts @@ -1,109 +1,93 @@ - + InterfacePlugin - - Total: %3 of %4 - + + Total: %1 of %2 + Total: %1 de %2 - + %1 of %2 - + %1 de %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done - + %1% hecho interfaceCopy - + &More - + Más - + ... - + - + &Pause - + Pausa - + &Skip - + Omitir - + &Cancel - + Cancelar - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Support Ultracopier</span></a></p></body></html> - - - - - Source - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Apoyar Ultracopier</span></a></p></body></html> - + Add file - + Añadir archivo - + Add folder - + Añadir carpeta - + Move file(s) - + Mover archivo(s) - + Move folder - + Mueva la carpeta - + Copy file(s) - + Copia el archivo(s) - + Copy folder - + Copia la carpeta diff --git a/plugins-alternative/Themes/Teracopy/Languages/fr/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/fr/translation.qm deleted file mode 100644 index 27844c4..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/fr/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts index 49088e8..42ac61d 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 - Total: %3 sur %4 + + Total: %1 of %2 + Total: %1 sur %2 - + %1 of %2 %1 sur %2 - - Quit - Quitter - - - - Copy - Copie - - - - Move - Déplacement - - - + %1% done %1% fait @@ -37,32 +22,32 @@ interfaceCopy - + &More &Plus - + ... ... - + &Pause &Pause - + &Skip &Passer - + &Cancel &Anuler - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -75,37 +60,32 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Supporter Ultracopier</span></a></p></body></html> - - Source - Source - - - + Add file Ajouter un fichier - + Add folder Ajouter un dossier - + Move file(s) Déplacer des fichier(s) - + Move folder Déplacer un dossier - + Copy file(s) Copier des fichier(s) - + Copy folder Copier un dossier diff --git a/plugins-alternative/Themes/Teracopy/Languages/hi/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/hi/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/hi/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/id/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/id/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/id/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/it/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/it/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/it/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts index e8d8cf2..746b8a6 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts @@ -1,109 +1,93 @@ - + InterfacePlugin - - Total: %3 of %4 - + + Total: %1 of %2 + Totale: %1 di %2 - + %1 of %2 - + %1 di %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done - + %1% fatto interfaceCopy - + &More - + Di più - + ... - + - + &Pause - + Pausa - + &Skip - + Saltare - + &Cancel - + Annullare - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Support Ultracopier</span></a></p></body></html> - - - - - Source - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Sostenere Ultracopier</span></a></p></body></html> - + Add file - + Aggiungi file - + Add folder - + Aggiungi cartella - + Move file(s) - + Spostare file(s) - + Move folder - + Spostare la cartella - + Copy file(s) - + Copiare il file(s) - + Copy folder - + Copia la cartella diff --git a/plugins-alternative/Themes/Teracopy/Languages/ja/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/ja/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/ja/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts index cadbddc..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts new file mode 100644 index 0000000..6c66c5a --- /dev/null +++ b/plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts @@ -0,0 +1,93 @@ + + + + + InterfacePlugin + + + Total: %1 of %2 + 전체: %3 / %2 {1 ?} + + + + %1 of %2 + %1 / %2 + + + + %1% done + %1% 완료 + + + + interfaceCopy + + + &More + &자세히 + + + + ... + ... + + + + &Pause + &일시 중지 + + + + &Skip + &건너뛰기 + + + + &Cancel + &취소 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Support Ultracopier</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Ultracopier 지원</span></a></p></body></html> + + + + Add file + 파일 추가 + + + + Add folder + 폴더 추가 + + + + Move file(s) + 파일 이동 + + + + Move folder + 폴더 이동 + + + + Copy file(s) + 파일 복사 + + + + Copy folder + 폴더 복사 + + + diff --git a/plugins-alternative/Themes/Teracopy/Languages/nl/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/nl/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/nl/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/no/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/no/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/no/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/pl/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/pl/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/pl/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/ru/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/ru/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/ru/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts index e8d8cf2..1219c56 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts @@ -1,109 +1,93 @@ - + InterfacePlugin - - Total: %3 of %4 - + + Total: %1 of %2 + Всего: %1 из %2 - + %1 of %2 - + %1 из %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done - + %1% сделанный interfaceCopy - + &More - + больше - + ... - + - + &Pause - + пауза - + &Skip - + пропускать - + &Cancel - + отменить - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">Support Ultracopier</span></a></p></body></html> - - - - - Source - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://ultracopier.first-world.info/"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">поддержка Ultracopier</span></a></p></body></html> - + Add file - + Добавить файл - + Add folder - + Добавить папку - + Move file(s) - + Перемещение файла(ов) - + Move folder - + Перемещение папки - + Copy file(s) - + Копировать файл(ы) - + Copy folder - + Копировать папку diff --git a/plugins-alternative/Themes/Teracopy/Languages/th/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/th/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/th/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/tr/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/tr/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/tr/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts index e8d8cf2..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/Languages/zh/translation.qm b/plugins-alternative/Themes/Teracopy/Languages/zh/translation.qm deleted file mode 100644 index 3738845..0000000 Binary files a/plugins-alternative/Themes/Teracopy/Languages/zh/translation.qm and /dev/null differ diff --git a/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts index cadbddc..33cd084 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts @@ -4,32 +4,17 @@ InterfacePlugin - - Total: %3 of %4 + + Total: %1 of %2 - + %1 of %2 - - Quit - - - - - Copy - - - - - Move - - - - + %1% done @@ -37,32 +22,32 @@ interfaceCopy - + &More - + ... - + &Pause - + &Skip - + &Cancel - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -71,37 +56,32 @@ p, li { white-space: pre-wrap; } - - Source - - - - + Add file - + Add folder - + Move file(s) - + Move folder - + Copy file(s) - + Copy folder diff --git a/plugins-alternative/Themes/Teracopy/TransferModel.cpp b/plugins-alternative/Themes/Teracopy/TransferModel.cpp new file mode 100644 index 0000000..569d31c --- /dev/null +++ b/plugins-alternative/Themes/Teracopy/TransferModel.cpp @@ -0,0 +1,441 @@ +#include "TransferModel.h" + +#define COLUMN_COUNT 3 + +// Model + +TransferModel::TransferModel() +{ + iconStart=QIcon(":/resources/player_play.png"); + iconPause=QIcon(":/resources/player_pause.png"); + iconStop=QIcon(":/resources/checkbox.png"); + currentIndexSearch=0; + haveSearchItem=false; +} + +int TransferModel::columnCount( const QModelIndex& parent ) const +{ + return parent == QModelIndex() ? COLUMN_COUNT : 0; +} + +QVariant TransferModel::data( const QModelIndex& index, int role ) const +{ + int row,column; + row=index.row(); + column=index.column(); + if(index.parent()!=QModelIndex() || row < 0 || row >= transfertItemList.count() || column < 0 || column >= COLUMN_COUNT) + return QVariant(); + + const transfertItem& item = transfertItemList[row]; + if(role==Qt::UserRole) + return item.id; + else if(role==Qt::DisplayRole) + { + switch(column) + { + case 0: + return item.source; + break; + case 1: + return item.size; + break; + case 2: + return item.destination; + break; + default: + return QVariant(); + } + } + else if(role==Qt::DecorationRole) + { + switch(column) + { + case 0: + /*if(item.done) + return iconStop; + else */if(stopId.contains(item.id)) + return iconPause; + else if(startId.contains(item.id)) + return iconStart; + else + return QVariant(); + break; + default: + return QVariant(); + } + } + else if(role==Qt::BackgroundRole) + { + if(!search_text.isEmpty() && (item.source.indexOf(search_text,0,Qt::CaseInsensitive)!=-1 || item.destination.indexOf(search_text,0,Qt::CaseInsensitive)!=-1)) + { + if(haveSearchItem && searchId==item.id) + return QColor(255,150,150,100); + else + return QColor(255,255,0,100); + } + else + return QVariant(); + } + return QVariant(); +} + +int TransferModel::rowCount( const QModelIndex& parent ) const +{ + return parent == QModelIndex() ? transfertItemList.count() : 0; +} + +quint64 TransferModel::firstId() +{ + if(transfertItemList.count()>0) + return transfertItemList[0].id; + else + return 0; +} + +QVariant TransferModel::headerData( int section, Qt::Orientation orientation, int role ) const +{ + if ( role == Qt::DisplayRole && orientation == Qt::Horizontal && section >= 0 && section < COLUMN_COUNT ) { + switch ( section ) { + case 0: + return facilityEngine->translateText("Source"); + case 1: + return facilityEngine->translateText("Size"); + case 2: + return facilityEngine->translateText("Destination"); + } + } + + return QAbstractTableModel::headerData( section, orientation, role ); +} + +bool TransferModel::setData( const QModelIndex& index, const QVariant& value, int role ) +{ + row=index.row(); + column=index.column(); + if(index.parent()!=QModelIndex() || row < 0 || row >= transfertItemList.count() || column < 0 || column >= COLUMN_COUNT) + return false; + + transfertItem& item = transfertItemList[row]; + if(role==Qt::UserRole) + { + item.id=value.toULongLong(); + return true; + } + else if(role==Qt::DisplayRole) + { + switch(column) + { + case 0: + item.source=value.toString(); + emit dataChanged(index,index); + return true; + break; + case 1: + item.size=value.toString(); + emit dataChanged(index,index); + return true; + break; + case 2: + item.destination=value.toString(); + emit dataChanged(index,index); + return true; + break; + default: + return false; + } + } + return false; +} + +/* + Return[0]: totalFile + Return[1]: totalSize + Return[2]: currentFile + */ +QList TransferModel::synchronizeItems(const QList& returnActions) +{ + loop_size=returnActions.size(); + index_for_loop=0; + totalFile=0; + totalSize=0; + currentFile=0; + emit layoutAboutToBeChanged(); + while(index_for_loopsizeToString(action.addAction.size); + newItem.destination=action.addAction.destinationFullPath; +// newItem.done=false; + transfertItemList<(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.moveAt<0) + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.moveAt>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + transfertItemList.move(action.userAction.position,action.userAction.moveAt); + } + break; + case RemoveItem: + { + if(currentIndexSearch>0 && action.userAction.position<=currentIndexSearch) + currentIndexSearch--; + if(action.userAction.position<0) + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.position>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + transfertItemList.removeAt(action.userAction.position); + currentFile++; + startId.remove(action.addAction.id); + stopId.remove(action.addAction.id); + } + break; + case PreOperation: + { + ItemOfCopyListWithMoreInformations tempItem; + tempItem.currentProgression=0; + tempItem.generalData=action.addAction; + tempItem.actionType=action.type; + internalRunningOperation[action.addAction.id]=tempItem; + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("set for file %1: actionType: PreOperation").arg(action.addAction.id)); + } + break; + case Transfer: + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("found entry for file %1: actionType: Transfer").arg(action.addAction.id)); + if(!startId.contains(action.addAction.id)) + startId << action.addAction.id; + stopId.remove(action.addAction.id); + if(internalRunningOperation.contains(action.addAction.id)) + internalRunningOperation[action.addAction.id].actionType=action.type; + else + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("unable to found entry for file %1: actionType: Transfer").arg(action.addAction.id)); + } + break; + case PostOperation: + { + if(!stopId.contains(action.addAction.id)) + stopId << action.addAction.id; + startId.remove(action.addAction.id); + internalRunningOperation.remove(action.addAction.id); + } + break; + case CustomOperation: + { + bool custom_with_progression=(action.addAction.size==1); + //without progression + if(custom_with_progression) + { + if(startId.remove(action.addAction.id)) + if(!stopId.contains(action.addAction.id)) + stopId << action.addAction.id; + } + //with progression + else + { + stopId.remove(action.addAction.id); + if(!startId.contains(action.addAction.id)) + startId << action.addAction.id; + } + if(internalRunningOperation.contains(action.addAction.id)) + { + ItemOfCopyListWithMoreInformations &item=internalRunningOperation[action.addAction.id]; + item.actionType=action.type; + item.custom_with_progression=custom_with_progression; + item.currentProgression=0; + } + } + break; + default: + //unknow code, ignore it + break; + } + index_for_loop++; + } + emit layoutChanged(); + return QList() << totalFile << totalSize << currentFile; +} + +void TransferModel::setFacilityEngine(FacilityInterface * facilityEngine) +{ + this->facilityEngine=facilityEngine; +} + +int TransferModel::search(const QString &text,bool searchNext) +{ + emit layoutAboutToBeChanged(); + search_text=text; + emit layoutChanged(); + if(transfertItemList.size()==0) + return -1; + if(text.isEmpty()) + return -1; + if(searchNext) + { + currentIndexSearch++; + if(currentIndexSearch>=loop_size) + currentIndexSearch=0; + } + index_for_loop=0; + loop_size=transfertItemList.size(); + while(index_for_loop=loop_size) + currentIndexSearch=0; + index_for_loop++; + } + haveSearchItem=false; + return -1; +} + +int TransferModel::searchPrev(const QString &text) +{ + emit layoutAboutToBeChanged(); + search_text=text; + emit layoutChanged(); + if(transfertItemList.size()==0) + return -1; + if(text.isEmpty()) + return -1; + if(currentIndexSearch==0) + currentIndexSearch=loop_size-1; + else + currentIndexSearch--; + index_for_loop=0; + loop_size=transfertItemList.size(); + while(index_for_loop &progressionList) +{ + loop_size=progressionList.size(); + index_for_loop=0; + while(index_for_loop0) + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"progression remaning items"); + #endif +} + +TransferModel::currentTransfertItem TransferModel::getCurrentTransfertItem() +{ + currentTransfertItem returnItem; + returnItem.haveItem=startId.size()>0; + if(returnItem.haveItem) + { + if(!internalRunningOperation.contains(*startId.constBegin())) + { + returnItem.haveItem=false; + return returnItem; + } + const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation[*startId.constBegin()]; + returnItem.from=itemTransfer.generalData.sourceFullPath; + returnItem.to=itemTransfer.generalData.destinationFullPath; + returnItem.current_file=itemTransfer.generalData.destinationFileName+", "+facilityEngine->sizeToString(itemTransfer.generalData.size); + switch(itemTransfer.actionType) + { + case CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_file=-1; + else + { + if(itemTransfer.generalData.size>0) + returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; + else + returnItem.progressBar_file=-1; + } + break; + case Transfer: + if(itemTransfer.generalData.size>0) + returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; + else + returnItem.progressBar_file=0; + break; + //should never pass here + case PostOperation: + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_file=65535; + break; + //should never pass here + case PreOperation: + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_file=0; + break; + default: + returnItem.progressBar_file=0; + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,QString("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + break; + } + } +/* else + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("No have running item"));*/ + return returnItem; +} diff --git a/plugins-alternative/Themes/Teracopy/TransferModel.h b/plugins-alternative/Themes/Teracopy/TransferModel.h new file mode 100644 index 0000000..486532e --- /dev/null +++ b/plugins-alternative/Themes/Teracopy/TransferModel.h @@ -0,0 +1,92 @@ +#ifndef TRANSFERMODEL_H +#define TRANSFERMODEL_H + +#include +#include +#include +#include +#include +#include +#include + +#include "StructEnumDefinition.h" +#include "Environment.h" + +#include "../../../interface/FacilityInterface.h" + +/// \brief model to store the transfer list +class TransferModel : public QAbstractTableModel +{ + Q_OBJECT +public: + /// \brief the transfer item displayed + struct transfertItem + { + quint64 id; + QString source; + QString size; + QString destination; + }; + /// \brief the transfer item with progression + struct ItemOfCopyListWithMoreInformations + { + quint64 currentProgression; + ItemOfCopyList generalData; + ActionTypeCopyList actionType; + bool custom_with_progression; + }; + /// \brief returned first transfer item + struct currentTransfertItem + { + quint64 id; + bool haveItem; + QString from; + QString to; + QString current_file; + int progressBar_file; + }; + + TransferModel(); + + virtual int columnCount(const QModelIndex& parent = QModelIndex()) const; + virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; + virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; + virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + + QList synchronizeItems(const QList& returnActions); + void setFacilityEngine(FacilityInterface * facilityEngine); + + int search(const QString &text,bool searchNext); + int searchPrev(const QString &text); + + void setFileProgression(QList &progressionList); + + currentTransfertItem getCurrentTransfertItem(); + + quint64 firstId(); +protected: + QList transfertItemList;///< To have a transfer list for the user + QList transfertItemListDone;///< To have a transfer list for the user + QSet startId,stopId;///< To show what is started, what is stopped + QHash internalRunningOperation;///< to have progression and stat + QIcon iconStart,iconPause,iconStop; +private: + int loop_size,index_for_loop; + int sub_loop_size,sub_index_for_loop; + int row,column; + quint64 totalFile,totalSize,currentFile; + FacilityInterface * facilityEngine; + QString search_text; + /// \brief index from start the search, decresed by remove before it + int currentIndexSearch; + bool haveSearchItem; + quint64 searchId; +signals: + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(DebugLevel level,QString fonction,QString text,QString file,int ligne); + #endif +}; + +#endif // TRANSFERMODEL_H diff --git a/plugins-alternative/Themes/Teracopy/informations.xml b/plugins-alternative/Themes/Teracopy/informations.xml index 66e8ee1..5fd194d 100644 --- a/plugins-alternative/Themes/Teracopy/informations.xml +++ b/plugins-alternative/Themes/Teracopy/informations.xml @@ -12,16 +12,16 @@ 1287496800 - linux-x86_64-pc + windows-x86 - 0.3.0.5 + 0.3.1.0 Teracopy =ultracopier-0.3.1.0 ]]> \ No newline at end of file diff --git a/plugins-alternative/Themes/Teracopy/interface.cpp b/plugins-alternative/Themes/Teracopy/interface.cpp index be54075..a7014dd 100644 --- a/plugins-alternative/Themes/Teracopy/interface.cpp +++ b/plugins-alternative/Themes/Teracopy/interface.cpp @@ -15,6 +15,9 @@ InterfacePlugin::InterfacePlugin(FacilityInterface * facilityEngine) : { this->facilityEngine=facilityEngine; ui->setupUi(this); + ui->TransferList->setModel(&transferModel); + transferModel.setFacilityEngine(facilityEngine); + currentFile = 0; totalFile = 0; currentSize = 0; @@ -34,9 +37,9 @@ InterfacePlugin::InterfacePlugin(FacilityInterface * facilityEngine) : connect(ui->actionAddFolderToMove,SIGNAL(triggered()),this,SLOT(forcedModeAddFolderToMove())); connect(ui->actionAddFolder,SIGNAL(triggered()),this,SLOT(forcedModeAddFolder())); - iconStart=QIcon(":/resources/player_play.png"); - iconPause=QIcon(":/resources/player_pause.png"); - iconStop=QIcon(":/resources/checkbox.png"); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(&transferModel,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),this,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int))); + #endif } InterfacePlugin::~InterfacePlugin() @@ -70,7 +73,7 @@ void InterfacePlugin::closeEvent(QCloseEvent *event) void InterfacePlugin::updateOverallInformation() { - ui->overall->setText(tr("Total: %3 of %4").arg(facilityEngine->sizeToString(currentSize)).arg(facilityEngine->sizeToString(totalSize))); + ui->overall->setText(tr("Total: %1 of %2").arg(facilityEngine->sizeToString(currentSize)).arg(facilityEngine->sizeToString(totalSize))); ui->labelNumberFile->setText(tr("%1 of %2").arg(currentFile).arg(totalFile)); } @@ -105,7 +108,7 @@ void InterfacePlugin::actionInProgess(EngineActionInProgress action) haveStarted=true; break; case Idle: - ui->cancelButton->setText(tr("Quit")); + ui->cancelButton->setText(facilityEngine->translateText("Quit")); break; default: break; @@ -196,9 +199,9 @@ void InterfacePlugin::forceCopyMode(CopyMode mode) modeIsForced=true; this->mode=mode; if(mode==Copy) - this->setWindowTitle("Ultracopier - "+tr("Copy")); + this->setWindowTitle("Ultracopier - "+facilityEngine->translateText("Copy")); else - this->setWindowTitle("Ultracopier - "+tr("Move")); + this->setWindowTitle("Ultracopier - "+facilityEngine->translateText("Move")); updateModeAndType(); } @@ -235,18 +238,31 @@ void InterfacePlugin::isInPause(bool isInPause) void InterfacePlugin::updateCurrentFileInformation() { - if(currentProgressList.size()>0) + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) { - ui->from->setText(currentProgressList.first().generalData.sourceFullPath); - if(currentProgressList.first().generalData.size>0) - ui->progressBar_file->setValue(((double)currentProgressList.first().currentProgression/currentProgressList.first().generalData.size)*65535); + ui->from->setText(transfertItem.from); + //commented because not displayed on this interface + //ui->to->setText(transfertItem.to); + //ui->current_file->setText(transfertItem.current_file); + if(transfertItem.progressBar_file!=-1) + { + ui->progressBar_file->setRange(0,65535); + ui->progressBar_file->setValue(transfertItem.progressBar_file); + } else - ui->progressBar_file->setValue(0); + ui->progressBar_file->setRange(0,0); } else { - ui->from->setText("-"); - ui->progressBar_file->setValue(65535); + ui->from->setText(""); + //commented because not displayed on this interface + //ui->to->setText(""); + //ui->current_file->setText("-"); + if(haveStarted && transferModel.rowCount()==0) + ui->progressBar_file->setValue(65535); + else if(!haveStarted) + ui->progressBar_file->setValue(0); } } @@ -270,11 +286,22 @@ void InterfacePlugin::on_pauseButton_clicked() void InterfacePlugin::on_skipButton_clicked() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - if(currentProgressList.size()>0) - emit skip(currentProgressList.first().generalData.id); + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("skip at running: %1").arg(transfertItem.id)); + emit skip(transfertItem.id); + } else - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"unable to skip the transfer, because no transfer running"); + { + if(transferModel.rowCount()>1) + { + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("skip at idle: %1").arg(transferModel.firstId())); + emit skip(transferModel.firstId()); + } + else + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"unable to skip the transfer, because no transfer running"); + } } void InterfacePlugin::updateModeAndType() @@ -353,140 +380,29 @@ void InterfacePlugin::newLanguageLoaded() */ void InterfacePlugin::getActionOnList(const QList& returnActions) { - loop_size=returnActions.size(); - index_for_loop=0; - while(index_for_loop returnValue=transferModel.synchronizeItems(returnActions); + totalFile+=returnValue[0]; + totalSize+=returnValue[1]; + currentFile+=returnValue[2]; + if(transferModel.rowCount()==0) { - const returnActionOnCopyList& action=returnActions.at(index_for_loop); - switch(action.type) - { - case AddingItem: - { - InternalRunningOperationGraphic.insert(action.addAction.id,new QTreeWidgetItem(QStringList() << action.addAction.sourceFullPath << facilityEngine->sizeToString(action.addAction.size) << action.addAction.destinationFullPath)); - ui->CopyList->addTopLevelItem(InternalRunningOperationGraphic[action.addAction.id]); - totalFile++; - totalSize+=action.addAction.size; - } - break; - case MoveItem: - ui->CopyList->move(action.userAction.position,action.userAction.moveAt); - break; - case RemoveItem: - { - InternalRunningOperationGraphic[action.addAction.id]->setIcon(0,iconStop); - InternalRunningOperationGraphic.remove(action.addAction.id); - //delete ui->CopyList->topLevelItem(action.userAction.position); - currentFile++; - startId.removeOne(action.addAction.id); - stopId.removeOne(action.addAction.id); - } - break; - case PreOperation: - { - ItemOfCopyListWithMoreInformations tempItem; - tempItem.currentProgression=0; - tempItem.generalData=action.addAction; - InternalRunningOperation << tempItem; - } - break; - case Transfer: - { - if(!startId.contains(action.addAction.id)) - startId << action.addAction.id; - stopId.removeOne(action.addAction.id); - sub_index_for_loop=0; - sub_loop_size=InternalRunningOperation.size(); - while(sub_index_for_loopsetIcon(0,iconStart); - } - break; - case PostOperation: - { - if(!stopId.contains(action.addAction.id)) - stopId << action.addAction.id; - startId.removeOne(action.addAction.id); - sub_index_for_loop=0; - sub_loop_size=InternalRunningOperation.size(); - while(sub_index_for_loopsetIcon(0,iconPause); - } - break; - case CustomOperation: - { - bool custom_with_progression=(action.addAction.size==1); - //without progression - if(custom_with_progression) - { - if(startId.removeOne(action.addAction.id)) - if(!stopId.contains(action.addAction.id)) - stopId << action.addAction.id; - } - //with progression - else - { - stopId.removeOne(action.addAction.id); - if(!startId.contains(action.addAction.id)) - startId << action.addAction.id; - } - sub_index_for_loop=0; - sub_loop_size=InternalRunningOperation.size(); - while(sub_index_for_loopskipButton->setEnabled(false); + ui->progressBar_all->setValue(65535); + ui->progressBar_file->setValue(65535); + currentSize=totalSize; } + else + ui->skipButton->setEnabled(true); + updateOverallInformation(); + ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"transferModel.rowCount(): "+QString::number(transferModel.rowCount())); } void InterfacePlugin::setFileProgression(const QList &progressionList) { - loop_size=InternalRunningOperation.size(); - sub_loop_size=progressionList.size(); - index_for_loop=0; - while(index_for_loop progressionListBis=progressionList; + transferModel.setFileProgression(progressionListBis); + updateCurrentFileInformation(); } InterfacePlugin::currentTransfertItem InterfacePlugin::getCurrentTransfertItem() diff --git a/plugins-alternative/Themes/Teracopy/interface.h b/plugins-alternative/Themes/Teracopy/interface.h index 865456e..899a03b 100644 --- a/plugins-alternative/Themes/Teracopy/interface.h +++ b/plugins-alternative/Themes/Teracopy/interface.h @@ -16,6 +16,7 @@ #include "ui_interface.h" #include "Environment.h" +#include "TransferModel.h" namespace Ui { class interfaceCopy; @@ -42,11 +43,6 @@ private: QString current_file; int progressBar_file; }; - struct graphicItem - { - quint64 id; - QTreeWidgetItem * item; - }; Ui::interfaceCopy *ui; quint64 currentFile; quint64 totalFile; @@ -57,7 +53,6 @@ private: EngineActionInProgress action; void closeEvent(QCloseEvent *event); QList currentProgressList; - QList graphicItemList; QString speedString; bool storeIsInPause; bool modeIsForced; @@ -74,8 +69,8 @@ private: currentTransfertItem getCurrentTransfertItem(); QList startId,stopId;///< To show what is started, what is stopped QList InternalRunningOperation;///< to have progression and stat - QHash InternalRunningOperationGraphic; - QIcon iconStart,iconPause,iconStop; + /// \brief the custom transfer model + TransferModel transferModel; public: //send information about the copy /// \brief to set the action in progress diff --git a/plugins-alternative/Themes/Teracopy/interface.pro b/plugins-alternative/Themes/Teracopy/interface.pro index 012c8c1..4cecacb 100644 --- a/plugins-alternative/Themes/Teracopy/interface.pro +++ b/plugins-alternative/Themes/Teracopy/interface.pro @@ -7,18 +7,20 @@ HEADERS = interface.h \ DebugEngineMacro.h \ Environment.h \ Variable.h \ - ../../../interface/PluginInterface_Themes.h + ../../../interface/PluginInterface_Themes.h \ + TransferModel.h SOURCES = interface.cpp \ - factory.cpp + factory.cpp \ + TransferModel.cpp TARGET = $$qtLibraryTarget(interface) -TRANSLATIONS += Languages/fr/translation.ts \ +TRANSLATIONS += Languages/fr/translation.ts \ Languages/ar/translation.ts \ - Languages/ch/translation.ts \ + Languages/zh/translation.ts \ Languages/es/translation.ts \ Languages/de/translation.ts \ Languages/el/translation.ts \ Languages/it/translation.ts \ - Languages/jp/translation.ts \ + Languages/ja/translation.ts \ Languages/id/translation.ts \ Languages/pl/translation.ts \ Languages/ru/translation.ts \ @@ -27,7 +29,8 @@ TRANSLATIONS += Languages/fr/translation.ts \ Languages/hi/translation.ts \ Languages/nl/translation.ts \ Languages/no/translation.ts \ - Languages/pt/translation.ts + Languages/pt/translation.ts \ + Languages/ko/translation.ts RESOURCES += resources.qrc diff --git a/plugins-alternative/Themes/Teracopy/interface.ui b/plugins-alternative/Themes/Teracopy/interface.ui index d547c49..1bccf44 100644 --- a/plugins-alternative/Themes/Teracopy/interface.ui +++ b/plugins-alternative/Themes/Teracopy/interface.ui @@ -289,18 +289,13 @@ p, li { white-space: pre-wrap; } - + QAbstractItemView::NoSelection false - - - Source - - @@ -363,22 +358,6 @@ p, li { white-space: pre-wrap; } - - moreButton - toggled(bool) - CopyList - setVisible(bool) - - - 32 - 107 - - - 54 - 163 - - - moreButton toggled(bool) diff --git a/plugins-alternative/Themes/Teracopy/resources/player_pause.png b/plugins-alternative/Themes/Teracopy/resources/player_pause.png new file mode 100644 index 0000000..a9b3113 Binary files /dev/null and b/plugins-alternative/Themes/Teracopy/resources/player_pause.png differ -- cgit v1.2.3