From b3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Fri, 24 Nov 2017 23:24:09 +0000 Subject: New upstream version 1.2.3.6 --- .../Themes/Clean/Languages/ar/translation.ts | 4 +- .../Themes/Clean/Languages/de/translation.ts | 16 +- .../Themes/Clean/Languages/el/translation.ts | 4 +- .../Themes/Clean/Languages/en/translation.ts | 55 + .../Themes/Clean/Languages/es/translation.ts | 10 +- .../Themes/Clean/Languages/fr/translation.ts | 10 +- .../Themes/Clean/Languages/hi/translation.ts | 4 +- .../Themes/Clean/Languages/hu/translation.ts | 55 + .../Themes/Clean/Languages/id/translation.ts | 4 +- .../Themes/Clean/Languages/it/translation.ts | 20 +- .../Themes/Clean/Languages/ja/translation.ts | 4 +- .../Themes/Clean/Languages/ko/translation.ts | 10 +- .../Themes/Clean/Languages/nl/translation.ts | 4 +- .../Themes/Clean/Languages/no/translation.ts | 4 +- .../Themes/Clean/Languages/pl/translation.ts | 4 +- .../Themes/Clean/Languages/ru/translation.ts | 10 +- .../Themes/Clean/Languages/th/translation.ts | 4 +- .../Themes/Clean/Languages/tr/translation.ts | 4 +- .../Themes/Clean/Languages/zh/translation.ts | 4 +- plugins-alternative/Themes/Clean/documentation.dox | 6 +- plugins-alternative/Themes/Clean/factory.cpp | 89 +- plugins-alternative/Themes/Clean/factory.h | 42 +- plugins-alternative/Themes/Clean/informations.xml | 3 +- plugins-alternative/Themes/Clean/interface.cpp | 557 ++++---- plugins-alternative/Themes/Clean/interface.h | 242 ++-- plugins-alternative/Themes/Clean/interface.pro | 31 +- plugins-alternative/Themes/Clean/interface.ui | 14 +- plugins-alternative/Themes/Clean/plugin.json | 1 + plugins-alternative/Themes/Clean/resources.qrc | 2 +- .../resources/SystemTrayIcon/informations.png | Bin 734 -> 841 bytes .../SystemTrayIcon/systray_Caught_Unix.png | Bin 798 -> 1093 bytes .../SystemTrayIcon/systray_Caught_Windows.png | Bin 563 -> 623 bytes .../SystemTrayIcon/systray_Semiuncaught_Unix.png | Bin 1007 -> 1296 bytes .../systray_Semiuncaught_Windows.png | Bin 664 -> 841 bytes .../SystemTrayIcon/systray_Uncaught_Unix.png | Bin 789 -> 754 bytes .../SystemTrayIcon/systray_Uncaught_Windows.png | Bin 551 -> 485 bytes .../Themes/Clean/resources_unix.qrc | 4 +- .../Themes/Clean/resources_windows.qrc | 2 +- .../Themes/Supercopier/DebugEngineMacro.h | 28 + .../Themes/Supercopier/Environment.h | 10 + .../Themes/Supercopier/Languages/ar/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/de/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/el/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/en/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/es/translation.ts | 340 +++++ .../Themes/Supercopier/Languages/fr/translation.ts | 344 +++++ .../Themes/Supercopier/Languages/hi/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/hu/translation.ts | 328 +++++ .../Themes/Supercopier/Languages/id/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/it/translation.ts | 336 +++++ .../Themes/Supercopier/Languages/ja/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/ko/translation.ts | 336 +++++ .../Themes/Supercopier/Languages/nl/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/no/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/pl/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/pt/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/ru/translation.ts | 336 +++++ .../Themes/Supercopier/Languages/th/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/tr/translation.ts | 324 +++++ .../Themes/Supercopier/Languages/zh/translation.ts | 324 +++++ .../Themes/Supercopier/StructEnumDefinition.h | 1 + .../Themes/Supercopier/TransferModel.cpp | 569 +++++++++ .../Themes/Supercopier/TransferModel.h | 96 ++ plugins-alternative/Themes/Supercopier/Variable.h | 15 + .../Themes/Supercopier/documentation.dox | 33 + plugins-alternative/Themes/Supercopier/factory.cpp | 441 +++++++ plugins-alternative/Themes/Supercopier/factory.h | 83 ++ .../Themes/Supercopier/informations.xml | 26 + .../Themes/Supercopier/interface.cpp | 1332 ++++++++++++++++++++ plugins-alternative/Themes/Supercopier/interface.h | 221 ++++ .../Themes/Supercopier/interface.pro | 59 + .../Themes/Supercopier/interface.ui | 845 +++++++++++++ .../Themes/Supercopier/interfaceResources.qrc | 24 + .../Themes/Supercopier/interfaceResources_unix.qrc | 9 + .../Supercopier/interfaceResources_windows.qrc | 9 + plugins-alternative/Themes/Supercopier/plugin.json | 1 + .../Supercopier/resources/SystemTrayIcon/add.png | Bin 0 -> 246 bytes .../Supercopier/resources/SystemTrayIcon/exit.png | Bin 0 -> 545 bytes .../resources/SystemTrayIcon/informations.png | Bin 0 -> 281 bytes .../resources/SystemTrayIcon/options.png | Bin 0 -> 275 bytes .../systray_Bottom_Progress_Unix.png | Bin 0 -> 95 bytes .../systray_Bottom_Progress_Windows.png | Bin 0 -> 93 bytes .../SystemTrayIcon/systray_Caught_Unix.png | Bin 0 -> 147 bytes .../SystemTrayIcon/systray_Caught_Windows.png | Bin 0 -> 148 bytes .../SystemTrayIcon/systray_Semiuncaught_Unix.png | Bin 0 -> 147 bytes .../systray_Semiuncaught_Windows.png | Bin 0 -> 148 bytes .../SystemTrayIcon/systray_Top_Progress_Unix.png | Bin 0 -> 95 bytes .../systray_Top_Progress_Windows.png | Bin 0 -> 93 bytes .../SystemTrayIcon/systray_Uncaught_Unix.png | Bin 0 -> 141 bytes .../SystemTrayIcon/systray_Uncaught_Windows.png | Bin 0 -> 139 bytes .../Themes/Supercopier/resources/add.png | Bin 0 -> 240 bytes .../Themes/Supercopier/resources/cancel.png | Bin 0 -> 284 bytes .../Supercopier/resources/export-transfer-list.png | Bin 0 -> 264 bytes .../Supercopier/resources/import-transfer-list.png | Bin 0 -> 316 bytes .../Themes/Supercopier/resources/main.png | Bin 0 -> 148 bytes .../Themes/Supercopier/resources/moveDown.png | Bin 0 -> 191 bytes .../Themes/Supercopier/resources/moveUp.png | Bin 0 -> 190 bytes .../Themes/Supercopier/resources/player_end.png | Bin 0 -> 226 bytes .../Themes/Supercopier/resources/player_pause.png | Bin 0 -> 207 bytes .../Themes/Supercopier/resources/player_play.png | Bin 0 -> 208 bytes .../Supercopier/resources/progressbarleft.png | Bin 0 -> 133 bytes .../Supercopier/resources/progressbarright.png | Bin 0 -> 132 bytes .../Themes/Supercopier/resources/putOnBottom.png | Bin 0 -> 206 bytes .../Themes/Supercopier/resources/putOnTop.png | Bin 0 -> 208 bytes .../Themes/Supercopier/resources/remove.png | Bin 0 -> 254 bytes .../Themes/Supercopier/resources/search.png | Bin 0 -> 237 bytes .../Themes/Supercopier/themesOptions.ui | 384 ++++++ .../Themes/Teracopy/DebugEngineMacro.h | 7 +- plugins-alternative/Themes/Teracopy/Environment.h | 3 +- .../Themes/Teracopy/Languages/ar/translation.ts | 8 +- .../Themes/Teracopy/Languages/de/translation.ts | 26 +- .../Themes/Teracopy/Languages/el/translation.ts | 8 +- .../Themes/Teracopy/Languages/en/translation.ts | 89 ++ .../Themes/Teracopy/Languages/es/translation.ts | 14 +- .../Themes/Teracopy/Languages/fr/translation.ts | 9 +- .../Themes/Teracopy/Languages/hi/translation.ts | 8 +- .../Themes/Teracopy/Languages/hu/translation.ts | 93 ++ .../Themes/Teracopy/Languages/id/translation.ts | 8 +- .../Themes/Teracopy/Languages/it/translation.ts | 26 +- .../Themes/Teracopy/Languages/ja/translation.ts | 8 +- .../Themes/Teracopy/Languages/ko/translation.ts | 6 +- .../Themes/Teracopy/Languages/nl/translation.ts | 8 +- .../Themes/Teracopy/Languages/no/translation.ts | 8 +- .../Themes/Teracopy/Languages/pl/translation.ts | 8 +- .../Themes/Teracopy/Languages/ru/translation.ts | 14 +- .../Themes/Teracopy/Languages/th/translation.ts | 8 +- .../Themes/Teracopy/Languages/tr/translation.ts | 8 +- .../Themes/Teracopy/Languages/zh/translation.ts | 8 +- .../Themes/Teracopy/TransferModel.cpp | 841 ++++++------ .../Themes/Teracopy/TransferModel.h | 120 +- plugins-alternative/Themes/Teracopy/Variable.h | 3 +- .../Themes/Teracopy/documentation.dox | 6 +- plugins-alternative/Themes/Teracopy/factory.cpp | 107 +- plugins-alternative/Themes/Teracopy/factory.h | 38 +- .../Themes/Teracopy/informations.xml | 3 +- plugins-alternative/Themes/Teracopy/interface.cpp | 695 +++++----- plugins-alternative/Themes/Teracopy/interface.h | 289 ++--- plugins-alternative/Themes/Teracopy/interface.pro | 31 +- plugins-alternative/Themes/Teracopy/interface.ui | 14 +- plugins-alternative/Themes/Teracopy/plugin.json | 1 + plugins-alternative/Themes/Teracopy/resources.qrc | 2 +- .../Teracopy/resources/SystemTrayIcon/add.png | Bin 564 -> 552 bytes .../Teracopy/resources/SystemTrayIcon/exit.png | Bin 775 -> 874 bytes .../resources/SystemTrayIcon/informations.png | Bin 734 -> 841 bytes .../Teracopy/resources/SystemTrayIcon/options.png | Bin 660 -> 624 bytes .../SystemTrayIcon/systray_Caught_Unix.png | Bin 798 -> 1093 bytes .../SystemTrayIcon/systray_Caught_Windows.png | Bin 563 -> 623 bytes .../SystemTrayIcon/systray_Semiuncaught_Unix.png | Bin 1007 -> 1296 bytes .../systray_Semiuncaught_Windows.png | Bin 664 -> 841 bytes .../SystemTrayIcon/systray_Uncaught_Unix.png | Bin 789 -> 754 bytes .../SystemTrayIcon/systray_Uncaught_Windows.png | Bin 551 -> 485 bytes .../Themes/Teracopy/resources/checkbox.png | Bin 654 -> 619 bytes .../Themes/Teracopy/resources/main.png | Bin 563 -> 623 bytes .../Themes/Teracopy/resources/player_pause.png | Bin 484 -> 640 bytes .../Themes/Teracopy/resources/player_play.png | Bin 501 -> 673 bytes .../Themes/Teracopy/resources_unix.qrc | 4 +- .../Themes/Teracopy/resources_windows.qrc | 2 +- .../Themes/Windows/DebugEngineMacro.h | 28 + plugins-alternative/Themes/Windows/Environment.h | 10 + .../Themes/Windows/Languages/ar/translation.ts | 121 ++ .../Themes/Windows/Languages/de/translation.ts | 124 ++ .../Themes/Windows/Languages/el/translation.ts | 121 ++ .../Themes/Windows/Languages/en/translation.ts | 124 ++ .../Themes/Windows/Languages/es/translation.ts | 124 ++ .../Themes/Windows/Languages/fr/translation.ts | 124 ++ .../Themes/Windows/Languages/hi/translation.ts | 121 ++ .../Themes/Windows/Languages/hu/translation.ts | 121 ++ .../Themes/Windows/Languages/id/translation.ts | 121 ++ .../Themes/Windows/Languages/it/translation.ts | 125 ++ .../Themes/Windows/Languages/ja/translation.ts | 121 ++ .../Themes/Windows/Languages/ko/translation.ts | 121 ++ .../Themes/Windows/Languages/nl/translation.ts | 121 ++ .../Themes/Windows/Languages/no/translation.ts | 121 ++ .../Themes/Windows/Languages/pl/translation.ts | 121 ++ .../Themes/Windows/Languages/ru/translation.ts | 127 ++ .../Themes/Windows/Languages/th/translation.ts | 121 ++ .../Themes/Windows/Languages/tr/translation.ts | 121 ++ .../Themes/Windows/Languages/zh/translation.ts | 121 ++ .../Themes/Windows/StructEnumDefinition.h | 1 + .../Themes/Windows/TransferModel.cpp | 286 +++++ plugins-alternative/Themes/Windows/TransferModel.h | 90 ++ plugins-alternative/Themes/Windows/Variable.h | 15 + .../Themes/Windows/documentation.dox | 29 + plugins-alternative/Themes/Windows/factory.cpp | 74 ++ plugins-alternative/Themes/Windows/factory.h | 45 + .../Themes/Windows/informations.xml | 26 + plugins-alternative/Themes/Windows/interface.cpp | 414 ++++++ plugins-alternative/Themes/Windows/interface.h | 165 +++ plugins-alternative/Themes/Windows/interface.pro | 48 + plugins-alternative/Themes/Windows/interface.ui | 415 ++++++ plugins-alternative/Themes/Windows/plugin.json | 1 + plugins-alternative/Themes/Windows/resources.qrc | 10 + .../resources/SystemTrayIcon/informations.png | Bin 0 -> 841 bytes .../SystemTrayIcon/systray_Caught_Unix.png | Bin 0 -> 1093 bytes .../SystemTrayIcon/systray_Caught_Windows.png | Bin 0 -> 623 bytes .../SystemTrayIcon/systray_Semiuncaught_Unix.png | Bin 0 -> 1296 bytes .../systray_Semiuncaught_Windows.png | Bin 0 -> 841 bytes .../SystemTrayIcon/systray_Uncaught_Unix.png | Bin 0 -> 754 bytes .../SystemTrayIcon/systray_Uncaught_Windows.png | Bin 0 -> 485 bytes .../Themes/Windows/resources/arrow-down.png | Bin 0 -> 598 bytes .../Themes/Windows/resources/arrow-up.png | Bin 0 -> 602 bytes .../Themes/Windows/resources/empty.png | Bin 0 -> 95 bytes .../Themes/Windows/resources/icon-top.png | Bin 0 -> 2437 bytes .../Themes/Windows/resources/icon-top.xcf | Bin 0 -> 4398 bytes .../Themes/Windows/resources/icon.png | Bin 0 -> 379 bytes .../Themes/Windows/resources_unix.qrc | 7 + .../Themes/Windows/resources_windows.qrc | 7 + 207 files changed, 16833 insertions(+), 1655 deletions(-) create mode 100644 plugins-alternative/Themes/Clean/Languages/en/translation.ts create mode 100644 plugins-alternative/Themes/Clean/Languages/hu/translation.ts mode change 100755 => 100644 plugins-alternative/Themes/Clean/documentation.dox create mode 100644 plugins-alternative/Themes/Clean/plugin.json create mode 100644 plugins-alternative/Themes/Supercopier/DebugEngineMacro.h create mode 100644 plugins-alternative/Themes/Supercopier/Environment.h create mode 100644 plugins-alternative/Themes/Supercopier/Languages/ar/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/de/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/el/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/en/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/es/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/fr/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/hi/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/hu/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/id/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/it/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/ja/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/ko/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/nl/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/no/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/pl/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/pt/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/ru/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/th/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/tr/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/Languages/zh/translation.ts create mode 100644 plugins-alternative/Themes/Supercopier/StructEnumDefinition.h create mode 100644 plugins-alternative/Themes/Supercopier/TransferModel.cpp create mode 100644 plugins-alternative/Themes/Supercopier/TransferModel.h create mode 100644 plugins-alternative/Themes/Supercopier/Variable.h create mode 100644 plugins-alternative/Themes/Supercopier/documentation.dox create mode 100644 plugins-alternative/Themes/Supercopier/factory.cpp create mode 100644 plugins-alternative/Themes/Supercopier/factory.h create mode 100644 plugins-alternative/Themes/Supercopier/informations.xml create mode 100644 plugins-alternative/Themes/Supercopier/interface.cpp create mode 100644 plugins-alternative/Themes/Supercopier/interface.h create mode 100644 plugins-alternative/Themes/Supercopier/interface.pro create mode 100644 plugins-alternative/Themes/Supercopier/interface.ui create mode 100644 plugins-alternative/Themes/Supercopier/interfaceResources.qrc create mode 100644 plugins-alternative/Themes/Supercopier/interfaceResources_unix.qrc create mode 100644 plugins-alternative/Themes/Supercopier/interfaceResources_windows.qrc create mode 100644 plugins-alternative/Themes/Supercopier/plugin.json create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/add.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/exit.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/informations.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/options.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Unix.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Windows.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Unix.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Windows.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Unix.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Windows.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Unix.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Windows.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/add.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/cancel.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/export-transfer-list.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/import-transfer-list.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/main.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/moveDown.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/moveUp.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/player_end.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/player_pause.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/player_play.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/progressbarleft.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/progressbarright.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/putOnBottom.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/putOnTop.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/remove.png create mode 100644 plugins-alternative/Themes/Supercopier/resources/search.png create mode 100644 plugins-alternative/Themes/Supercopier/themesOptions.ui create mode 100644 plugins-alternative/Themes/Teracopy/Languages/en/translation.ts create mode 100644 plugins-alternative/Themes/Teracopy/Languages/hu/translation.ts mode change 100755 => 100644 plugins-alternative/Themes/Teracopy/documentation.dox create mode 100644 plugins-alternative/Themes/Teracopy/plugin.json create mode 100644 plugins-alternative/Themes/Windows/DebugEngineMacro.h create mode 100644 plugins-alternative/Themes/Windows/Environment.h create mode 100644 plugins-alternative/Themes/Windows/Languages/ar/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/de/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/el/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/en/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/es/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/fr/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/hi/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/hu/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/id/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/it/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/ja/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/ko/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/nl/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/no/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/pl/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/ru/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/th/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/tr/translation.ts create mode 100644 plugins-alternative/Themes/Windows/Languages/zh/translation.ts create mode 100644 plugins-alternative/Themes/Windows/StructEnumDefinition.h create mode 100644 plugins-alternative/Themes/Windows/TransferModel.cpp create mode 100644 plugins-alternative/Themes/Windows/TransferModel.h create mode 100644 plugins-alternative/Themes/Windows/Variable.h create mode 100644 plugins-alternative/Themes/Windows/documentation.dox create mode 100644 plugins-alternative/Themes/Windows/factory.cpp create mode 100644 plugins-alternative/Themes/Windows/factory.h create mode 100644 plugins-alternative/Themes/Windows/informations.xml create mode 100644 plugins-alternative/Themes/Windows/interface.cpp create mode 100644 plugins-alternative/Themes/Windows/interface.h create mode 100644 plugins-alternative/Themes/Windows/interface.pro create mode 100644 plugins-alternative/Themes/Windows/interface.ui create mode 100644 plugins-alternative/Themes/Windows/plugin.json create mode 100644 plugins-alternative/Themes/Windows/resources.qrc create mode 100644 plugins-alternative/Themes/Windows/resources/SystemTrayIcon/informations.png create mode 100644 plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Unix.png create mode 100644 plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Windows.png create mode 100644 plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png create mode 100644 plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png create mode 100644 plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Unix.png create mode 100644 plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Windows.png create mode 100644 plugins-alternative/Themes/Windows/resources/arrow-down.png create mode 100644 plugins-alternative/Themes/Windows/resources/arrow-up.png create mode 100644 plugins-alternative/Themes/Windows/resources/empty.png create mode 100644 plugins-alternative/Themes/Windows/resources/icon-top.png create mode 100644 plugins-alternative/Themes/Windows/resources/icon-top.xcf create mode 100644 plugins-alternative/Themes/Windows/resources/icon.png create mode 100644 plugins-alternative/Themes/Windows/resources_unix.qrc create mode 100644 plugins-alternative/Themes/Windows/resources_windows.qrc (limited to 'plugins-alternative/Themes') diff --git a/plugins-alternative/Themes/Clean/Languages/ar/translation.ts b/plugins-alternative/Themes/Clean/Languages/ar/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/ar/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/ar/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/de/translation.ts b/plugins-alternative/Themes/Clean/Languages/de/translation.ts index 7ea1972..0a833ee 100644 --- a/plugins-alternative/Themes/Clean/Languages/de/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/de/translation.ts @@ -4,9 +4,9 @@ InterfacePlugin - + %1/%2 files, %3/%4 - %1/%2 dateien, %3/%4 + %1/%2 Dateien, %3/%4 @@ -18,8 +18,8 @@ - In wait - auf der Lauer + Waiting + Warten @@ -34,22 +34,22 @@ Move file(s) - Bewegen Sie Datei (en) + Datei (en) verschieben Move folder - bewegen Sie Ordner + Ordner verschieben Copy file(s) - Kopieren Sie die Datei (en) + Datei (en) kopieren Copy folder - kopieren Sie das Verzeichnis + Ordner kopieren diff --git a/plugins-alternative/Themes/Clean/Languages/el/translation.ts b/plugins-alternative/Themes/Clean/Languages/el/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/el/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/el/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/en/translation.ts b/plugins-alternative/Themes/Clean/Languages/en/translation.ts new file mode 100644 index 0000000..d13892c --- /dev/null +++ b/plugins-alternative/Themes/Clean/Languages/en/translation.ts @@ -0,0 +1,55 @@ + + + + + InterfacePlugin + + + %1/%2 files, %3/%4 + + + + + interface + + + Action: + + + + + Waiting + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Clean/Languages/es/translation.ts b/plugins-alternative/Themes/Clean/Languages/es/translation.ts index 70b8246..8c54e8a 100644 --- a/plugins-alternative/Themes/Clean/Languages/es/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/es/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 %1/%2 archivos, %3/%4 @@ -17,9 +17,13 @@ Acción: - In wait - En espera + En espera + + + + Waiting + diff --git a/plugins-alternative/Themes/Clean/Languages/fr/translation.ts b/plugins-alternative/Themes/Clean/Languages/fr/translation.ts index 51fd57f..bdc0621 100644 --- a/plugins-alternative/Themes/Clean/Languages/fr/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/fr/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 %1/%2 fichiers, %3/%4 @@ -17,9 +17,8 @@ Action: - In wait - En attente + En attente @@ -46,6 +45,11 @@ Add folder Ajouter un dossier + + + Waiting + + Add file diff --git a/plugins-alternative/Themes/Clean/Languages/hi/translation.ts b/plugins-alternative/Themes/Clean/Languages/hi/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/hi/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/hi/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/hu/translation.ts b/plugins-alternative/Themes/Clean/Languages/hu/translation.ts new file mode 100644 index 0000000..e5a3bcc --- /dev/null +++ b/plugins-alternative/Themes/Clean/Languages/hu/translation.ts @@ -0,0 +1,55 @@ + + + + + InterfacePlugin + + + %1/%2 files, %3/%4 + %1/%2 fájl, %3/%4 + + + + interface + + + Action: + Művelet: + + + + Waiting + Várakozás + + + + Add file + Fájl hozzáadása + + + + Add folder + Mappa hozzáadása + + + + Move file(s) + Fájl(ok) mozgatása + + + + Move folder + Mappa mozgatása + + + + Copy file(s) + Fájl(ok) másolása + + + + Copy folder + Mappa másolása + + + diff --git a/plugins-alternative/Themes/Clean/Languages/id/translation.ts b/plugins-alternative/Themes/Clean/Languages/id/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/id/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/id/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/it/translation.ts b/plugins-alternative/Themes/Clean/Languages/it/translation.ts index b44bd5f..b94ac7b 100644 --- a/plugins-alternative/Themes/Clean/Languages/it/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/it/translation.ts @@ -4,9 +4,9 @@ InterfacePlugin - + %1/%2 files, %3/%4 - + %1/%2 file, %3/%4 @@ -17,9 +17,13 @@ Azione: - In wait - In attesa + In attesa + + + + Waiting + @@ -34,22 +38,22 @@ Move file(s) - Spostare file(s) + Sposta file Move folder - Spostare la cartella + Sposta la cartella Copy file(s) - Copiare il file (s) + Copia file Copy folder - Copia la cartella + Copia cartella diff --git a/plugins-alternative/Themes/Clean/Languages/ja/translation.ts b/plugins-alternative/Themes/Clean/Languages/ja/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/ja/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/ja/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/ko/translation.ts b/plugins-alternative/Themes/Clean/Languages/ko/translation.ts index 41627de..95d2138 100644 --- a/plugins-alternative/Themes/Clean/Languages/ko/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/ko/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 %1/%2 파일, %3/%4 @@ -17,9 +17,13 @@ 실행: - In wait - 대기중 + 대기중 + + + + Waiting + diff --git a/plugins-alternative/Themes/Clean/Languages/nl/translation.ts b/plugins-alternative/Themes/Clean/Languages/nl/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/nl/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/nl/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/no/translation.ts b/plugins-alternative/Themes/Clean/Languages/no/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/no/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/no/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/pl/translation.ts b/plugins-alternative/Themes/Clean/Languages/pl/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/pl/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/pl/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/ru/translation.ts b/plugins-alternative/Themes/Clean/Languages/ru/translation.ts index 5f83874..36798e7 100644 --- a/plugins-alternative/Themes/Clean/Languages/ru/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/ru/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 %1/%2 файлы, %3/%4 @@ -17,9 +17,13 @@ Действие: - In wait - В ожидании + В ожидании + + + + Waiting + diff --git a/plugins-alternative/Themes/Clean/Languages/th/translation.ts b/plugins-alternative/Themes/Clean/Languages/th/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/th/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/th/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/tr/translation.ts b/plugins-alternative/Themes/Clean/Languages/tr/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/tr/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/tr/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/Languages/zh/translation.ts b/plugins-alternative/Themes/Clean/Languages/zh/translation.ts index 81df74e..54104e3 100644 --- a/plugins-alternative/Themes/Clean/Languages/zh/translation.ts +++ b/plugins-alternative/Themes/Clean/Languages/zh/translation.ts @@ -4,7 +4,7 @@ InterfacePlugin - + %1/%2 files, %3/%4 @@ -18,7 +18,7 @@ - In wait + Waiting diff --git a/plugins-alternative/Themes/Clean/documentation.dox b/plugins-alternative/Themes/Clean/documentation.dox old mode 100755 new mode 100644 index 56e5331..3f7bc88 --- a/plugins-alternative/Themes/Clean/documentation.dox +++ b/plugins-alternative/Themes/Clean/documentation.dox @@ -11,12 +11,12 @@ \section mainpage_overview Overview It's interface to have minimal interface for Ultracopier.\n - More informations on the wiki of ultracopier. Is part of Ultracopier 0.3 project as alternative plugin. + More informations on the wiki of ultracopier. Is part of Ultracopier project as alternative plugin. \section mainpage_platforms Platforms - This plugin might be usable in all environments where you find Qt 4.\n - To be compatible with the official Ultracopier plugins, you need compil it with Gcc, Qt4.8, and same env as Ultracopier have been compiled, see the documentation. + Ultracopier might be usable in all environments where you find Qt 5.\n + Ultracopier requires Qt 5.0 or newer. Tested on Qt 5.0. \section mainpage_downloads Downloads diff --git a/plugins-alternative/Themes/Clean/factory.cpp b/plugins-alternative/Themes/Clean/factory.cpp index 2b8d109..6acbe3a 100644 --- a/plugins-alternative/Themes/Clean/factory.cpp +++ b/plugins-alternative/Themes/Clean/factory.cpp @@ -1,70 +1,65 @@ /** \file factory.cpp \brief Define the factory core \author alpha_one_x86 -\version 0.3 -\date 2010 */ - -#include +*/ #include "factory.h" -PluginInterface_Themes * Factory::getInstance() +PluginInterface_Themes * ThemesFactory::getInstance() { - PluginInterface_Themes * newInterface=new InterfacePlugin(facilityEngine); - connect(this,SIGNAL(reloadLanguage()),newInterface,SLOT(newLanguageLoaded())); - return newInterface; + InterfacePlugin * newInterface=new InterfacePlugin(facilityEngine); + connect(this,&ThemesFactory::reloadLanguage,newInterface,&InterfacePlugin::newLanguageLoaded); + return newInterface; } -void Factory::setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityEngine,bool portableVersion) +void ThemesFactory::setResources(OptionInterface * options, const QString &writePath, const QString &pluginPath, FacilityInterface * facilityInterface, const bool &portableVersion) { - Q_UNUSED(options) - Q_UNUSED(writePath) - Q_UNUSED(pluginPath) - this->facilityEngine=facilityEngine; - Q_UNUSED(portableVersion) + Q_UNUSED(options) + Q_UNUSED(writePath) + Q_UNUSED(pluginPath) + this->facilityEngine=facilityInterface; + Q_UNUSED(portableVersion) } -QWidget * Factory::options() +QWidget * ThemesFactory::options() { - return NULL; + return NULL; } -QIcon Factory::getIcon(const QString &fileName) +QIcon ThemesFactory::getIcon(const QString &fileName) const { - if(fileName=="SystemTrayIcon/exit.png") - { - QIcon tempIcon=QIcon::fromTheme("application-exit"); - if(!tempIcon.isNull()) - return tempIcon; - } - if(fileName=="SystemTrayIcon/add.png") - { - QIcon tempIcon=QIcon::fromTheme("list-add"); - if(!tempIcon.isNull()) - return tempIcon; - } - if(fileName=="SystemTrayIcon/informations.png") - { - QIcon tempIcon=QIcon::fromTheme("help-about"); - if(!tempIcon.isNull()) - return tempIcon; - } - if(fileName=="SystemTrayIcon/options.png") - { - QIcon tempIcon=QIcon::fromTheme("applications-system"); - if(!tempIcon.isNull()) - return tempIcon; - } - return QIcon(":/resources/"+fileName); + if(fileName=="SystemTrayIcon/exit.png") + { + QIcon tempIcon=QIcon::fromTheme("application-exit"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/add.png") + { + QIcon tempIcon=QIcon::fromTheme("list-add"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/informations.png") + { + QIcon tempIcon=QIcon::fromTheme("help-about"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/options.png") + { + QIcon tempIcon=QIcon::fromTheme("applications-system"); + if(!tempIcon.isNull()) + return tempIcon; + } + return QIcon(":/Themes/Clean/resources/"+fileName); } -void Factory::resetOptions() +void ThemesFactory::resetOptions() { } -void Factory::newLanguageLoaded() +void ThemesFactory::newLanguageLoaded() { - emit reloadLanguage(); + emit reloadLanguage(); } - -Q_EXPORT_PLUGIN2(interface, Factory); diff --git a/plugins-alternative/Themes/Clean/factory.h b/plugins-alternative/Themes/Clean/factory.h index 2a9c0ef..f9b1ee2 100644 --- a/plugins-alternative/Themes/Clean/factory.h +++ b/plugins-alternative/Themes/Clean/factory.h @@ -1,8 +1,7 @@ /** \file factory.h \brief Define the factory, to create instance of the interface \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef FACTORY_H #define FACTORY_H @@ -14,26 +13,27 @@ #include "../../../interface/PluginInterface_Themes.h" /// \brief Define the factory, to create instance of the interface -class Factory : public PluginInterface_ThemesFactory +class ThemesFactory : public PluginInterface_ThemesFactory { - Q_OBJECT - Q_INTERFACES(PluginInterface_ThemesFactory) - public: - /// \brief to return the instance of the copy engine - PluginInterface_Themes * getInstance(); - /// \brief set the resources, to store options, to have facilityInterface - void setResources(OptionInterface * optionsEngine,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityEngine,bool portableVersion); - /// \brief to get the default options widget - QWidget * options(); - /// \brief to get a resource icon - QIcon getIcon(const QString &fileName); - signals: - void reloadLanguage(); - public slots: - void resetOptions(); - void newLanguageLoaded(); - private: - FacilityInterface * facilityEngine; + Q_OBJECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.ThemesFactory/1.0.1.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_ThemesFactory) + public: + /// \brief to return the instance of the copy engine + PluginInterface_Themes * getInstance(); + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion); + /// \brief to get the default options widget + QWidget * options(); + /// \brief to get a resource icon + QIcon getIcon(const QString &fileName) const; + signals: + void reloadLanguage(); + public slots: + void resetOptions(); + void newLanguageLoaded(); + private: + FacilityInterface * facilityEngine; }; #endif // FACTORY_H diff --git a/plugins-alternative/Themes/Clean/informations.xml b/plugins-alternative/Themes/Clean/informations.xml index 8e076a4..3b49a98 100644 --- a/plugins-alternative/Themes/Clean/informations.xml +++ b/plugins-alternative/Themes/Clean/informations.xml @@ -17,11 +17,10 @@ - 0.3.1.0 + 1.2.3.6 Clean =ultracopier-0.3.1.0 ]]> \ No newline at end of file diff --git a/plugins-alternative/Themes/Clean/interface.cpp b/plugins-alternative/Themes/Clean/interface.cpp index 6d6c4b1..3f2cd2a 100644 --- a/plugins-alternative/Themes/Clean/interface.cpp +++ b/plugins-alternative/Themes/Clean/interface.cpp @@ -1,99 +1,96 @@ /** \file interface.cpp \brief Define the interface core \author alpha_one_x86 -\version 0.3 -\date 2010 */ - -#include +*/ #include "interface.h" #include "ui_interface.h" InterfacePlugin::InterfacePlugin(FacilityInterface * facilityEngine) : - ui(new Ui::interface()) -{ - ui->setupUi(this); - currentFile = 0; - totalFile = 0; - currentSize = 0; - totalSize = 0; - modeIsForced = false; - haveStarted = false; - this->facilityEngine = facilityEngine; - this->show(); - menu=new QMenu(this); - ui->toolButton->setMenu(menu); - updateModeAndType(); - - connect(ui->actionAddFile,SIGNAL(triggered()),this,SLOT(forcedModeAddFile())); - connect(ui->actionAddFileToCopy,SIGNAL(triggered()),this,SLOT(forcedModeAddFileToCopy())); - connect(ui->actionAddFileToMove,SIGNAL(triggered()),this,SLOT(forcedModeAddFileToMove())); - connect(ui->actionAddFolderToCopy,SIGNAL(triggered()),this,SLOT(forcedModeAddFolderToCopy())); - connect(ui->actionAddFolderToMove,SIGNAL(triggered()),this,SLOT(forcedModeAddFolderToMove())); - connect(ui->actionAddFolder,SIGNAL(triggered()),this,SLOT(forcedModeAddFolder())); + ui(new Ui::interface()) +{ + ui->setupUi(this); + currentFile = 0; + totalFile = 0; + currentSize = 0; + totalSize = 0; + modeIsForced = false; + haveStarted = false; + this->facilityEngine = facilityEngine; + menu=new QMenu(this); + ui->toolButton->setMenu(menu); + updateModeAndType(); + + connect(ui->actionAddFile,&QAction::triggered,this,&InterfacePlugin::forcedModeAddFile); + connect(ui->actionAddFileToCopy,&QAction::triggered,this,&InterfacePlugin::forcedModeAddFileToCopy); + connect(ui->actionAddFileToMove,&QAction::triggered,this,&InterfacePlugin::forcedModeAddFileToMove); + connect(ui->actionAddFolderToCopy,&QAction::triggered,this,&InterfacePlugin::forcedModeAddFolderToCopy); + connect(ui->actionAddFolderToMove,&QAction::triggered,this,&InterfacePlugin::forcedModeAddFolderToMove); + connect(ui->actionAddFolder,&QAction::triggered,this,&InterfacePlugin::forcedModeAddFolder); + show(); } InterfacePlugin::~InterfacePlugin() { - delete menu; + delete menu; } void InterfacePlugin::forcedModeAddFile() { - emit userAddFile(mode); + emit userAddFile(mode); } void InterfacePlugin::forcedModeAddFolder() { - emit userAddFolder(mode); + emit userAddFolder(mode); } void InterfacePlugin::forcedModeAddFileToCopy() { - emit userAddFile(Copy); + emit userAddFile(Ultracopier::Copy); } void InterfacePlugin::forcedModeAddFolderToCopy() { - emit userAddFolder(Copy); + emit userAddFolder(Ultracopier::Copy); } void InterfacePlugin::forcedModeAddFileToMove() { - emit userAddFile(Move); + emit userAddFile(Ultracopier::Move); } void InterfacePlugin::forcedModeAddFolderToMove() { - emit userAddFolder(Move); + emit userAddFolder(Ultracopier::Move); } void InterfacePlugin::updateModeAndType() { - menu->clear(); - if(modeIsForced) - { - menu->addAction(ui->actionAddFile); - if(type==FileAndFolder) - menu->addAction(ui->actionAddFolder); - } - else - { - menu->addAction(ui->actionAddFileToCopy); - menu->addAction(ui->actionAddFileToMove); - if(type==FileAndFolder) - { - menu->addAction(ui->actionAddFolderToCopy); - menu->addAction(ui->actionAddFolderToMove); - } - } + menu->clear(); + if(modeIsForced) + { + menu->addAction(ui->actionAddFile); + if(type==Ultracopier::FileAndFolder) + menu->addAction(ui->actionAddFolder); + } + else + { + menu->addAction(ui->actionAddFileToCopy); + menu->addAction(ui->actionAddFileToMove); + if(type==Ultracopier::FileAndFolder) + { + menu->addAction(ui->actionAddFolderToCopy); + menu->addAction(ui->actionAddFolderToMove); + } + } } void InterfacePlugin::closeEvent(QCloseEvent *event) { - event->ignore(); - this->hide(); - emit cancel(); + event->ignore(); + this->hide(); + emit cancel(); } void InterfacePlugin::detectedSpeed(const quint64 &speed) @@ -106,162 +103,170 @@ QWidget * InterfacePlugin::getOptionsEngineWidget() return NULL; } -void InterfacePlugin::getOptionsEngineEnabled(bool isEnabled) +void InterfacePlugin::getOptionsEngineEnabled(const bool &isEnabled) { Q_UNUSED(isEnabled) } -void InterfacePlugin::setCopyType(CopyType type) +void InterfacePlugin::setCopyType(const Ultracopier::CopyType &type) { - this->type=type; - updateModeAndType(); + this->type=type; + updateModeAndType(); } -void InterfacePlugin::forceCopyMode(CopyMode mode) +void InterfacePlugin::forceCopyMode(const Ultracopier::CopyMode &mode) { - modeIsForced=true; - this->mode=mode; - updateModeAndType(); + modeIsForced=true; + this->mode=mode; + updateModeAndType(); } void InterfacePlugin::updateTitle() { - QString actionString; - switch(action) - { - case Listing: - actionString=facilityEngine->translateText("Listing"); - break; - case Copying: - actionString=facilityEngine->translateText("Copying"); - break; - case CopyingAndListing: - actionString=facilityEngine->translateText("Listing and copying"); - break; - case Idle: - actionString="Ultracopier"; - break; - } - this->setWindowTitle(actionString+" - "+tr("%1/%2 files, %3/%4").arg(currentFile).arg(totalFile).arg(currentSize).arg(totalSize)); -} - -void InterfacePlugin::actionInProgess(EngineActionInProgress action) -{ - this->action=action; - switch(action) - { - case Copying: - case CopyingAndListing: - ui->progressBar->setMaximum(65535); - ui->progressBar->setMinimum(0); - break; - case Listing: - ui->progressBar->setMaximum(0); - ui->progressBar->setMinimum(0); - break; - case Idle: - if(haveStarted) - emit cancel(); - break; - default: - break; - } - switch(action) - { - case Copying: - case CopyingAndListing: - haveStarted=true; - break; - default: - break; - } -} - -void InterfacePlugin::newTransferStart(const ItemOfCopyList &item) -{ - ui->text->setText(item.sourceFullPath); + QString actionString; + switch(action) + { + case Ultracopier::Listing: + actionString=facilityEngine->translateText("Listing"); + break; + case Ultracopier::Copying: + actionString=facilityEngine->translateText("Copying"); + break; + case Ultracopier::CopyingAndListing: + actionString=facilityEngine->translateText("Listing and copying"); + break; + case Ultracopier::Idle: + actionString="Ultracopier"; + break; + } + this->setWindowTitle(actionString+" - "+tr("%1/%2 files, %3/%4").arg(currentFile).arg(totalFile).arg(currentSize).arg(totalSize)); +} + +void InterfacePlugin::actionInProgess(const Ultracopier::EngineActionInProgress &action) +{ + this->action=action; + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + ui->progressBar->setMaximum(65535); + ui->progressBar->setMinimum(0); + break; + case Ultracopier::Listing: + ui->progressBar->setMaximum(0); + ui->progressBar->setMinimum(0); + break; + case Ultracopier::Idle: + if(haveStarted) + emit cancel(); + break; + default: + break; + } + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + haveStarted=true; + break; + default: + break; + } +} + +void InterfacePlugin::newTransferStart(const Ultracopier::ItemOfCopyList &item) +{ + ui->text->setText(item.sourceFullPath); } void InterfacePlugin::newTransferStop(const quint64 &id) { - Q_UNUSED(id) + Q_UNUSED(id) } void InterfacePlugin::newFolderListing(const QString &path) { - if(action==Listing) - ui->text->setText(path); + if(action==Ultracopier::Listing) + ui->text->setText(path); } void InterfacePlugin::remainingTime(const int &remainingSeconds) { - Q_UNUSED(remainingSeconds) + Q_UNUSED(remainingSeconds) } void InterfacePlugin::newCollisionAction(const QString &action) { - Q_UNUSED(action) + Q_UNUSED(action) } void InterfacePlugin::newErrorAction(const QString &action) { - Q_UNUSED(action) + Q_UNUSED(action) } void InterfacePlugin::errorDetected() { } -void InterfacePlugin::setTransferListOperation(TransferListOperation transferListOperation) +/// \brief new error +void InterfacePlugin::errorToRetry(const QString &source,const QString &destination,const QString &error) +{ + Q_UNUSED(source); + Q_UNUSED(destination); + Q_UNUSED(error); +} + +void InterfacePlugin::setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation) { - Q_UNUSED(transferListOperation) + Q_UNUSED(transferListOperation) } //speed limitation bool InterfacePlugin::setSpeedLimitation(const qint64 &speedLimitation) { - Q_UNUSED(speedLimitation) + Q_UNUSED(speedLimitation) return false; } //get information about the copy void InterfacePlugin::setGeneralProgression(const quint64 ¤t,const quint64 &total) { - ui->progressBar->setValue(((double)current/total)*65535); + ui->progressBar->setValue(((double)current/total)*65535); } void InterfacePlugin::setCollisionAction(const QList > &list) { - Q_UNUSED(list) + Q_UNUSED(list) } void InterfacePlugin::setErrorAction(const QList > &list) { - Q_UNUSED(list) + Q_UNUSED(list) } //edit the transfer list -void InterfacePlugin::getActionOnList(const QList &returnActions) +void InterfacePlugin::getActionOnList(const QList &returnActions) { - Q_UNUSED(returnActions) + Q_UNUSED(returnActions) } void InterfacePlugin::haveExternalOrder() { - ui->toolButton->hide(); + ui->toolButton->hide(); } -void InterfacePlugin::isInPause(bool isInPause) +void InterfacePlugin::isInPause(const bool &isInPause) { - //resume in auto the pause - if(isInPause) - emit resume(); + //resume in auto the pause + if(isInPause) + emit resume(); } void InterfacePlugin::newLanguageLoaded() { - ui->retranslateUi(this); - updateTitle(); + ui->retranslateUi(this); + updateTitle(); } /* @@ -269,147 +274,153 @@ void InterfacePlugin::newLanguageLoaded() Return[1]: totalSize Return[2]: currentFile */ -void InterfacePlugin::synchronizeItems(const QList& returnActions) -{ - loop_size=returnActions.size(); - index_for_loop=0; - while(index_for_loop &progressionList) -{ - loop_size=InternalRunningOperation.size(); - sub_loop_size=progressionList.size(); - index_for_loop=0; - while(index_for_loop& returnActions) +{ + loop_size=returnActions.size(); + index_for_loop=0; + while(index_for_loop &progressionList) +{ + loop_size=InternalRunningOperation.size(); + sub_loop_size=progressionList.size(); + index_for_loop=0; + while(index_for_loop0; - if(returnItem.haveItem) - { - const ItemOfCopyListWithMoreInformations &itemTransfer=InternalRunningOperation.first(); - 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=0; - else - { - if(itemTransfer.generalData.size>0) - returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; - else - returnItem.progressBar_file=0; - } - break; - case Transfer: - if(itemTransfer.generalData.size>0) - returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; - else - returnItem.progressBar_file=0; - break; - case PostOperation: - returnItem.progressBar_file=65535; - break; - default: - returnItem.progressBar_file=0; - } - } - return returnItem; + currentTransfertItem returnItem; + returnItem.haveItem=InternalRunningOperation.size()>0; + if(returnItem.haveItem) + { + const ItemOfCopyListWithMoreInformations &itemTransfer=InternalRunningOperation.first(); + 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 Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_file=0; + else + { + if(itemTransfer.generalData.size>0) + returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; + else + returnItem.progressBar_file=0; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; + else + returnItem.progressBar_file=0; + break; + case Ultracopier::PostOperation: + returnItem.progressBar_file=65535; + break; + default: + returnItem.progressBar_file=0; + } + } + return returnItem; } diff --git a/plugins-alternative/Themes/Clean/interface.h b/plugins-alternative/Themes/Clean/interface.h index b7ab57f..e5b5c36 100644 --- a/plugins-alternative/Themes/Clean/interface.h +++ b/plugins-alternative/Themes/Clean/interface.h @@ -1,8 +1,7 @@ /** \file interface.h \brief Define the interface \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef INTERFACE_TEST_H #define INTERFACE_TEST_H @@ -15,145 +14,128 @@ #include "../../../interface/PluginInterface_Themes.h" namespace Ui { - class interface; + class interface; } /// \brief Define the interface class InterfacePlugin : public PluginInterface_Themes { - Q_OBJECT + Q_OBJECT public slots: - //send information about the copy - /// \brief to set the action in progress - void actionInProgess(EngineActionInProgress); - /// \brief new transfer have started - void newTransferStart(const ItemOfCopyList &item); - /** \brief one transfer have been stopped - * is stopped, example: because error have occurred, and try later, don't remove the item! */ - void newTransferStop(const quint64 &id); - /// \brief the new folder is listing - void newFolderListing(const QString &path); - /** \brief show the detected speed - * in byte per seconds */ - void detectedSpeed(const quint64 &speed); - /** \brief show the remaining time - * time in seconds */ - void remainingTime(const int &remainingSeconds); - /// \brief set the current collision action - void newCollisionAction(const QString &action); - /// \brief set the current error action - void newErrorAction(const QString &action); - /// \brief set one error is detected - void errorDetected(); - //speed limitation - /** \brief the max speed used - * in byte per seconds, -1 if not able, 0 if disabled */ - bool setSpeedLimitation(const qint64 &speedLimitation); - //set the translate - void newLanguageLoaded(); - void synchronizeItems(const QList& returnActions); + //send information about the copy + /// \brief to set the action in progress + void actionInProgess(const Ultracopier::EngineActionInProgress&); + /// \brief new transfer have started + void newTransferStart(const Ultracopier::ItemOfCopyList &item); + /** \brief one transfer have been stopped + * is stopped, example: because error have occurred, and try later, don't remove the item! */ + void newTransferStop(const quint64 &id); + /// \brief the new folder is listing + void newFolderListing(const QString &path); + /** \brief show the detected speed + * in byte per seconds */ + void detectedSpeed(const quint64 &speed); + /** \brief show the remaining time + * time in seconds */ + void remainingTime(const int &remainingSeconds); + /// \brief set the current collision action + void newCollisionAction(const QString &action); + /// \brief set the current error action + void newErrorAction(const QString &action); + /// \brief set one error is detected + void errorDetected(); + /// \brief new error + void errorToRetry(const QString &source,const QString &destination,const QString &error); + //speed limitation + /** \brief the max speed used + * in byte per seconds, -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const qint64 &speedLimitation); + //set the translate + void newLanguageLoaded(); + void synchronizeItems(const QList& returnActions); + /** \brief support speed limitation */ + void setSupportSpeedLimitation(const bool &supportSpeedLimitationBool); public: - /// \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; - }; - /// \brief get the widget for the copy engine - QWidget * getOptionsEngineWidget(); - /// \brief to set if the copy engine is found - void getOptionsEngineEnabled(bool isEnabled); - /// \brief get action on the transfer list (add/move/remove) - void getActionOnList(const QList &returnActions); - //get information about the copy - /// \brief show the general progression - void setGeneralProgression(const quint64 ¤t,const quint64 &total); - /// \brief show the file progression - void setFileProgression(const QList &progressionList); - /// \brief set collision action - void setCollisionAction(const QList > &); - /// \brief set error action - void setErrorAction(const QList > &); - /// \brief set the copyType -> file or folder - void setCopyType(CopyType); - /// \brief set the copyMove -> copy or move, to force in copy or move, else support both - void forceCopyMode(CopyMode); - /// \brief set if transfer list is exportable/importable - void setTransferListOperation(TransferListOperation transferListOperation); - /** \brief set if the order is external (like file manager copy) - * to notify the interface, which can hide add folder/filer button */ - void haveExternalOrder(); - /// \brief set if is in pause - void isInPause(bool); + /// \brief the transfer item with progression + struct ItemOfCopyListWithMoreInformations + { + quint64 currentProgression; + Ultracopier::ItemOfCopyList generalData; + Ultracopier::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; + }; + /// \brief get the widget for the copy engine + QWidget * getOptionsEngineWidget(); + /// \brief to set if the copy engine is found + void getOptionsEngineEnabled(const bool &isEnabled); + /// \brief get action on the transfer list (add/move/remove) + void getActionOnList(const QList &returnActions); + //get information about the copy + /// \brief show the general progression + void setGeneralProgression(const quint64 ¤t,const quint64 &total); + /// \brief show the file progression + void setFileProgression(const QList &progressionList); + /// \brief set collision action + void setCollisionAction(const QList > &); + /// \brief set error action + void setErrorAction(const QList > &); + /// \brief set the copyType -> file or folder + void setCopyType(const Ultracopier::CopyType&); + /// \brief set the copyMove -> copy or move, to force in copy or move, else support both + void forceCopyMode(const Ultracopier::CopyMode &); + /// \brief set if transfer list is exportable/importable + void setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation); + /** \brief set if the order is external (like file manager copy) + * to notify the interface, which can hide add folder/filer button */ + void haveExternalOrder(); + /// \brief set if is in pause + void isInPause(const bool &); signals: - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief To debug source - void debugInformation(DebugLevel level,QString fonction,QString text,QString file,int ligne); - #endif - //set the transfer list - void removeItems(QList ids); - void moveItemsOnTop(QList ids); - void moveItemsUp(QList ids); - void moveItemsDown(QList ids); - void moveItemsOnBottom(QList ids); - void exportTransferList(); - void importTransferList(); - //user ask ask to add folder (add it with interface ask source/destination) - void userAddFolder(CopyMode); - void userAddFile(CopyMode); - void urlDropped(QList urls); - //action on the copy - void pause(); - void resume(); - void skip(quint64 id); - void cancel(); - //edit the action - void sendCollisionAction(QString action); - void sendErrorAction(QString action); - void newSpeedLimitation(qint64); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne); + #endif public: - //constructor and destructor - InterfacePlugin(FacilityInterface * facilityEngine); - ~InterfacePlugin(); + //constructor and destructor + InterfacePlugin(FacilityInterface * facilityEngine); + ~InterfacePlugin(); private: - Ui::interface *ui; - quint64 currentFile; - quint64 totalFile; - quint64 currentSize; - quint64 totalSize; - void updateTitle(); - QMenu *menu; - EngineActionInProgress action; - void closeEvent(QCloseEvent *event); - void updateModeAndType(); - bool modeIsForced; - CopyType type; - CopyMode mode; - bool haveStarted; - QList InternalRunningOperation; - int loop_size,index_for_loop; - int sub_loop_size,sub_index_for_loop; - currentTransfertItem getCurrentTransfertItem(); - FacilityInterface * facilityEngine; + Ui::interface *ui; + quint64 currentFile; + quint64 totalFile; + quint64 currentSize; + quint64 totalSize; + void updateTitle(); + QMenu *menu; + Ultracopier::EngineActionInProgress action; + void closeEvent(QCloseEvent *event); + void updateModeAndType(); + bool modeIsForced; + Ultracopier::CopyType type; + Ultracopier::CopyMode mode; + bool haveStarted; + QList InternalRunningOperation; + int loop_size,index_for_loop; + int sub_loop_size,sub_index_for_loop; + currentTransfertItem getCurrentTransfertItem(); + FacilityInterface * facilityEngine; private slots: - void forcedModeAddFile(); - void forcedModeAddFolder(); - void forcedModeAddFileToCopy(); - void forcedModeAddFolderToCopy(); - void forcedModeAddFileToMove(); - void forcedModeAddFolderToMove(); + void forcedModeAddFile(); + void forcedModeAddFolder(); + void forcedModeAddFileToCopy(); + void forcedModeAddFolderToCopy(); + void forcedModeAddFileToMove(); + void forcedModeAddFolderToMove(); }; #endif // INTERFACE_TEST_H diff --git a/plugins-alternative/Themes/Clean/interface.pro b/plugins-alternative/Themes/Clean/interface.pro index 20fd1dd..eb124c9 100644 --- a/plugins-alternative/Themes/Clean/interface.pro +++ b/plugins-alternative/Themes/Clean/interface.pro @@ -1,31 +1,36 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets TEMPLATE = lib CONFIG += plugin HEADERS = interface.h \ - interface/PluginInterface_Themes.h \ - StructEnumDefinition.h \ + StructEnumDefinition.h \ factory.h \ ../../../interface/PluginInterface_Themes.h SOURCES = interface.cpp \ factory.cpp TARGET = $$qtLibraryTarget(interface) -TRANSLATIONS += Languages/fr/translation.ts \ - Languages/ar/translation.ts \ - Languages/zh/translation.ts \ - Languages/es/translation.ts \ +TRANSLATIONS += Languages/ar/translation.ts \ Languages/de/translation.ts \ Languages/el/translation.ts \ + Languages/en/translation.ts \ + Languages/es/translation.ts \ + Languages/fr/translation.ts \ + Languages/hi/translation.ts \ + Languages/hu/translation.ts \ + Languages/id/translation.ts \ Languages/it/translation.ts \ Languages/ja/translation.ts \ - Languages/id/translation.ts \ + Languages/ko/translation.ts \ + Languages/nl/translation.ts \ + Languages/no/translation.ts \ Languages/pl/translation.ts \ Languages/ru/translation.ts \ - Languages/tr/translation.ts \ Languages/th/translation.ts \ - Languages/hi/translation.ts \ - Languages/nl/translation.ts \ - Languages/no/translation.ts \ - Languages/pt/translation.ts \ - Languages/ko/translation.ts + Languages/tr/translation.ts \ + Languages/zh/translation.ts FORMS += \ interface.ui diff --git a/plugins-alternative/Themes/Clean/interface.ui b/plugins-alternative/Themes/Clean/interface.ui index 1ac0e4a..f178af7 100644 --- a/plugins-alternative/Themes/Clean/interface.ui +++ b/plugins-alternative/Themes/Clean/interface.ui @@ -41,7 +41,7 @@ - In wait + Waiting @@ -72,7 +72,7 @@ - :/resources/add.png:/resources/add.png + :/Themes/Clean/resources/add.png:/Themes/Clean/resources/add.png Add file @@ -81,7 +81,7 @@ - :/resources/add.png:/resources/add.png + :/Themes/Clean/resources/add.png:/Themes/Clean/resources/add.png Add folder @@ -90,7 +90,7 @@ - :/resources/add.png:/resources/add.png + :/Themes/Clean/resources/add.png:/Themes/Clean/resources/add.png Move file(s) @@ -99,7 +99,7 @@ - :/resources/add.png:/resources/add.png + :/Themes/Clean/resources/add.png:/Themes/Clean/resources/add.png Move folder @@ -108,7 +108,7 @@ - :/resources/add.png:/resources/add.png + :/Themes/Clean/resources/add.png:/Themes/Clean/resources/add.png Copy file(s) @@ -117,7 +117,7 @@ - :/resources/add.png:/resources/add.png + :/Themes/Clean/resources/add.png:/Themes/Clean/resources/add.png Copy folder diff --git a/plugins-alternative/Themes/Clean/plugin.json b/plugins-alternative/Themes/Clean/plugin.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/plugins-alternative/Themes/Clean/plugin.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins-alternative/Themes/Clean/resources.qrc b/plugins-alternative/Themes/Clean/resources.qrc index 67c550f..40533c4 100644 --- a/plugins-alternative/Themes/Clean/resources.qrc +++ b/plugins-alternative/Themes/Clean/resources.qrc @@ -1,5 +1,5 @@ - + resources/SystemTrayIcon/informations.png diff --git a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/informations.png b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/informations.png index e1eb797..5b7b255 100644 Binary files a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/informations.png and b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/informations.png differ diff --git a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Unix.png b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Unix.png index a81e70d..6f5d1cf 100644 Binary files a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Unix.png and b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Unix.png differ diff --git a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Windows.png b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Windows.png index 8072aea..5464856 100644 Binary files a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Windows.png and b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Caught_Windows.png differ diff --git a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png index f40ea82..3961215 100644 Binary files a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png and b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png index 8d673e4..45d6315 100644 Binary files a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png and b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Unix.png b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Unix.png index 9ce4779..ac4299a 100644 Binary files a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Unix.png and b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Windows.png b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Windows.png index d0fca1b..6e6bae7 100644 Binary files a/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Windows.png and b/plugins-alternative/Themes/Clean/resources/SystemTrayIcon/systray_Uncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Clean/resources_unix.qrc b/plugins-alternative/Themes/Clean/resources_unix.qrc index ae3894b..847cc1c 100644 --- a/plugins-alternative/Themes/Clean/resources_unix.qrc +++ b/plugins-alternative/Themes/Clean/resources_unix.qrc @@ -1,6 +1,6 @@ - - resources/SystemTrayIcon/systray_Caught_Unix.png + + resources/SystemTrayIcon/systray_Caught_Unix.png resources/SystemTrayIcon/systray_Semiuncaught_Unix.png resources/SystemTrayIcon/systray_Uncaught_Unix.png diff --git a/plugins-alternative/Themes/Clean/resources_windows.qrc b/plugins-alternative/Themes/Clean/resources_windows.qrc index 99829b3..7d8bbe1 100644 --- a/plugins-alternative/Themes/Clean/resources_windows.qrc +++ b/plugins-alternative/Themes/Clean/resources_windows.qrc @@ -1,5 +1,5 @@ - + resources/SystemTrayIcon/systray_Caught_Windows.png resources/SystemTrayIcon/systray_Semiuncaught_Windows.png resources/SystemTrayIcon/systray_Uncaught_Windows.png diff --git a/plugins-alternative/Themes/Supercopier/DebugEngineMacro.h b/plugins-alternative/Themes/Supercopier/DebugEngineMacro.h new file mode 100644 index 0000000..4582010 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/DebugEngineMacro.h @@ -0,0 +1,28 @@ +/** \file DebugEngineMacro.h +\brief Define the macro for the debug +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGENGINEMACRO_H +#define DEBUGENGINEMACRO_H + +#ifdef WIN32 +# define __func__ __FUNCTION__ +#endif + +/// \brief Macro for the debug log +#ifdef ULTRACOPIER_PLUGIN_DEBUG + #if defined (__FILE__) && defined (__LINE__) + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) + #else + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) + #endif +#else // ULTRACOPIER_DEBUG + #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() +#endif // ULTRACOPIER_DEBUG + +#endif // DEBUGENGINEMACRO_H + + + + diff --git a/plugins-alternative/Themes/Supercopier/Environment.h b/plugins-alternative/Themes/Supercopier/Environment.h new file mode 100644 index 0000000..265a5a6 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Environment.h @@ -0,0 +1,10 @@ +/** \file Environment.h +\brief Define the environment variable and global function +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "Variable.h" +/// \brief The global include +#include "StructEnumDefinition.h" +#include "DebugEngineMacro.h" + diff --git a/plugins-alternative/Themes/Supercopier/Languages/ar/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/ar/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/ar/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/de/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/de/translation.ts new file mode 100644 index 0000000..c1177e9 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/de/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + Kaufen Sie die Ultimate-Version um die Entwicklung zu unterstützen + + + + File %1/%2, size: %3/%4 + Datei %1/%2, Größe:%3/%4 + + + + Copy list + Zu kopierende Dateien + + + + Move list + Zu verschiebende Dateien + + + + Don't close if errors are found + Bei Fehler nicht + + + + Never close + Nie + + + + Always close + Immer + + + + File Name, 0KB + Dateiname, 0KB + + + + + + Select a color + Farbe auswählen + + + + + + %1 %2% of %3 + %1 %2 von %3 + + + + ThemesFactory + + + Don't close if errors are found + Nicht schließen, wenn Fehler aufgetreten sind + + + + Never close + Niemals schließen + + + + Always close + Immer schließen + + + + + + Select a color + Wählen Sie eine Farbe + + + + interfaceCopy + + + From: + Von: + + + + To: + Nach: + + + + Close at the end of the transfers + Am Ende des Transfers schließen + + + + &More + &Mehr + + + + &Pause + &Pause + + + + &Skip + Über&springen + + + + &Cancel + Abbrechen (&C) + + + + Transfer list + Dateiliste + + + + Delete the selected items + Ausgewählte Einträge löschen + + + + Export the transfer list + Dateiliste exportieren + + + + Import the transfer list + Dateiliste importieren + + + + Previous + Vorherige + + + + Next + Nächste + + + + Interface + Darstellungsoptionen + + + + Move the selected items to the top + Ausgewählte Einträge an den Listenanfang verschieben + + + + Limit copy speed to: + Begrenze Kopiergeschwindigkeit auf: + + + + Move up the selected items + Ausgewählte Einträge einen Platz nach oben verschieben + + + + Move down the selected items + Ausgewählte Einträge einen Platz nach unten verschieben + + + + Move the selected items to the bottom + Ausgewählte Einträge an das Listenende verschieben + + + + Add file/folder + Datei/Ordner hinzufügen + + + + Search + In Dateiliste suchen + + + + + Error + Fehlerprotokoll + + + + Export the errors into transfer list + Fehler in Transferliste exportieren + + + + Source + Quelle + + + + Destination + Ziel + + + + Add file + Datei hinzufügen + + + + Add folder + Ordner hinzufügen + + + + Move file(s) + Datei(en) verschieben + + + + Move folder + Ordner verschieben + + + + Copy file(s) + Datei(en) kopieren + + + + Copy folder + Verzeichnis kopieren + + + + themesOptions + + + Show dual progression + Zweifachen Fortschritt anzeigen + + + + Show speed as main information + Geschwindigkeitsbegrenzungs Schieberegler anzeigen + + + + Use + Benutzung + + + + Start with the "more button" pushed + Standardmäßig "Mehr" Informationen anzeigen + + + + Minimize on close to systray + Beim Schließen ins Systray minimieren + + + + At the end of the copy + Fenster am Ende des Vorgangs schließen + + + + + Limit copy speed to + Begrenze Übertragungsgeschwindigkeit auf + + + + Click to edit the color + Zum Bearbeiten der Farbe klicken + + + + KB/s + KB/s + + + + Informations + Informationen + + + + Display + Anzeige + + + + Speed with progress bar + Geschwindigkeit als Fortschrittsbalken anzeigen + + + + Progression color + Farbe des Fortschrittsbalken + + + + Show progression in the title + Fortschritt im Fenstertitel zeigen + + + + Always on top + Fenster immer im Vordergrund + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/el/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/el/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/el/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/en/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/en/translation.ts new file mode 100644 index 0000000..9275b19 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/en/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + Interface + + + + + Move the selected items to the top + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/es/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/es/translation.ts new file mode 100644 index 0000000..c407b34 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/es/translation.ts @@ -0,0 +1,340 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + Comprar la versión Ultimate para financiar el desarrollo + + + + File %1/%2, size: %3/%4 + El archivo %1/%2, el tamaño: %3/%4 + + + + Copy list + Lista de copia + + + + Move list + Lista de movimiento + + + + Don't close if errors are found + No cierre si se encuentran errores + + + + Never close + Nunca cierre + + + + Always close + Siempre cerrar + + + + File Name, 0KB + Nombre de archivo, 0KB + + + + + + Select a color + Seleccione un color + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + No cierre si se encuentran errores + + + + Never close + Nunca cierre + + + + Always close + Siempre cerrar + + + + + + Select a color + Seleccione un color + + + + interfaceCopy + + + From: + De: + + + + To: + Para: + + + + Close at the end of the transfers + Cerca al final de las transferencias + + + + &More + &Más + + + + &Pause + &Pausa + + + + &Skip + &Omitir + + + + &Cancel + &Cancelar + + + Limit copy speed at: + Limitar la velocidad de copia en: + + + Close on transfer completion + Cerca de finalización de transferencia + + + + Limit copy speed to: + Limitar la velocidad de copia en: + + + + Transfer list + Lista de transferencia + + + + Move the selected items to the top + Mueve los elementos seleccionados a la parte superior + + + + Move up the selected items + Mueva los elementos seleccionados + + + + Move down the selected items + Bajar los elementos seleccionados + + + + Move the selected items to the bottom + Mueve los elementos seleccionados a la parte inferior + + + + Add file/folder + Agregar archivo/carpeta + + + + Delete the selected items + Eliminar los elementos seleccionados + + + + Search + Buscar + + + + Export the transfer list + Exportar la lista de transferencias + + + + Import the transfer list + Importe la lista de transferencias + + + + Previous + Anterior + + + + Next + Próximo + + + + + Error + Error + + + + Export the errors into transfer list + Exportar los errores en la lista de transferencias + + + + Source + Fuente + + + + Destination + Destino + + + + Interface + Interfaz + + + + 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 + + + + themesOptions + + + Show dual progression + Mostrar progresión dual + + + + Show speed as main information + Mostrar la velocidad como principales informaciones + + + + Use + Uso + + + + Start with the "more button" pushed + Comience con el "botón más" empujada + + + + Minimize on close to systray + Minimizar en cerca de la bandeja del sistema + + + + At the end of the copy + Al final de la copia + + + + + Limit copy speed to + Limitar la velocidad de copia de + + + + Click to edit the color + Haga clic para editar el color + + + At the end of the copy: + Al final de la copia: + + + Limit copy speed at: + Limitar la velocidad de copia en: + + + + KB/s + KB/s + + + + Informations + Informations + + + + Display + Visualización + + + + Speed with progress bar + Velocidad con barra de progreso + + + + Progression color + Progresión de color + + + + Show progression in the title + Mostrar progresión en el título + + + + Always on top + Siempre visible + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/fr/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/fr/translation.ts new file mode 100644 index 0000000..49112ee --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/fr/translation.ts @@ -0,0 +1,344 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + Achetez la version Ultimate pour financer le développement + + + + File %1/%2, size: %3/%4 + Fichier %1/%2, taille: %3/%4 + + + + Copy list + Liste de copies + + + + Move list + Liste de déplacements + + + + Don't close if errors are found + Garder ouvert s'il y a des erreurs + + + + Never close + Ne jamais fermer + + + + Always close + Toujours fermer + + + + File Name, 0KB + Nom de fichier, 0Ko + + + + + + Select a color + Selectionner une coleur + + + + + + %1 %2% of %3 + %1 de %2% de %3 + + + + ThemesFactory + + + Don't close if errors are found + Garder ouvert s'il y a des erreurs + + + + Never close + Ne jamais fermer + + + + Always close + Toujours fermer + + + + + + Select a color + Selectionner une coleur + + + + interfaceCopy + + + From: + Depuis: + + + + To: + Vers: + + + + Close at the end of the transfers + Fermer à la fin des transferts + + + + &More + Pl&us + + + + &Pause + &Pause + + + + &Skip + &Passer + + + + &Cancel + &Annuler + + + Limit copy speed at: + Limiter la vitesse de copie à: + + + Close on transfer completion + Fermer à la fin des transferts + + + + Limit copy speed to: + Limiter la vitesse de copie à: + + + + Transfer list + Liste de transferts + + + + Move the selected items to the top + Déplacer l'item selectionné au debut + + + + Move up the selected items + Déplacer l'item selectionné vers le haut + + + + Move down the selected items + Déplacer l'item selectionné vers le bas + + + + Move the selected items to the bottom + Déplacer l'item selectionné à la fin + + + + Add file/folder + Ajouter fichier/dossier + + + + Delete the selected items + Supprimer les items sélectionnés + + + + Search + Rechercher + + + + Export the transfer list + Exporter la liste de transfert + + + + Import the transfer list + Importer la liste de transfert + + + + Previous + Précédent + + + + Next + Suivant + + + + + Error + Erreur + + + + Export the errors into transfer list + Exporter les erreurs dans une liste de transfert + + + + Source + Source + + + + Destination + Destination + + + + Interface + Interface + + + + Add file + Ajouter un fichier + + + + Add folder + Ajouter un répertoire + + + + Move file(s) + Déplacer le(s) fichier(s) + + + + Move folder + Déplacer un répertoire + + + + Copy file(s) + Copier le(s) fichier(s) + + + + Copy folder + Copier un répertoire + + + + themesOptions + + + Show dual progression + Afficher une double progression + + + + Show speed as main information + Afficher la vitesse comme information principale + + + + Use + Utilisation + + + + Start with the "more button" pushed + Déplier automatiquement les détails + + + + Minimize on close to systray + Minimiser à la fermeture dans le systray + + + + At the end of the copy + À la fin de la copie + + + + + Limit copy speed to + Limiter la vitesse de copie à + + + + Click to edit the color + Cliquer pour édité la couleur + + + At the end of the copy: + À la fin de la copie: + + + Limit copy speed at: + Limiter la vitesse de copie à: + + + Limit copy speed to: + Limiter la vitesse de copie à: + + + + KB/s + Ko/s + + + + Informations + Informations + + + + Display + Affichage + + + + Speed with progress bar + Vitesse avec barre de progression + + + + Progression color + Couleur de progression + + + + Show progression in the title + Afficher la progression dans le titre + + + + Always on top + Toujours au 1er plan + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/hi/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/hi/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/hi/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/hu/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/hu/translation.ts new file mode 100644 index 0000000..bc36d92 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/hu/translation.ts @@ -0,0 +1,328 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + Vásárold meg az Ultimate verziót a fejlesztés támogatásához + + + + File %1/%2, size: %3/%4 + Fájl %1/%2, méret: %3/%4 + + + + Copy list + Lista másolása + + + + Move list + Lista mozgatása + + + + Don't close if errors are found + Ne zárja be, ha hiba történik + + + + Never close + Sose zárja be + + + + Always close + Mindig zárja be + + + + File Name, 0KB + Fájlnév, 0KB + + + + + + Select a color + Válassz egy színt + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + Ne zárja be, ha hiba történik + + + + Never close + Sose zárja be + + + + Always close + Mindig zárja be + + + + + + Select a color + Válassz egy színt + + + + interfaceCopy + + + From: + Forrás: + + + + To: + Cél: + + + + Close at the end of the transfers + + + + + &More + &Több + + + + &Pause + &Szünet + + + + &Skip + &Kihagy + + + + &Cancel + &Mégse + + + + Transfer list + Átviteli lista + + + + Previous + Előző + + + + Next + Következő + + + + Interface + Kezelőfelület + + + + Move the selected items to the top + Kijelölések elemek mozgatása legfelülre + + + Close on transfer completion + Átvitel végeztével zárja be + + + + Limit copy speed to: + Másolási sebesség korlátozása: + + + + Move up the selected items + Kijelölt elemek mozgatása fel + + + + Move down the selected items + Kijelölt elemek mozgatása le + + + + Move the selected items to the bottom + Kijelölések elemek mozgatása legalulra + + + + Add file/folder + Fájl/mappa hozzáadása + + + + Delete the selected items + Kijelölt elemek törlése + + + + Search + Keresés + + + + Export the transfer list + Átviteli lista exportálása + + + + Import the transfer list + Átviteli lista importálása + + + + + Error + Hiba + + + + Export the errors into transfer list + Hibák exportálása az átviteli listába + + + + Source + Forrás + + + + Destination + Cél + + + + Add file + Fájl hozzáadása + + + + Add folder + Mappa hozzáadása + + + + Move file(s) + Fájl(ok) mozgatása + + + + Move folder + Mappa mozgatása + + + + Copy file(s) + Fájl(ok) másolása + + + + Copy folder + Mappa másolása + + + + themesOptions + + + Show dual progression + Páros folyamat mutatása + + + + Show speed as main information + Sebesség mutatása, mint fő információ + + + + Use + Használ + + + + Start with the "more button" pushed + Indítás a "több gomb" lenyomásával + + + + Minimize on close to systray + Bezáráskor minimalizálás a tálcára + + + + At the end of the copy + A másolás befejezésekor + + + + + Limit copy speed to + Másolási sebesség korlátozása + + + + Click to edit the color + Kattints a szín szerkesztéséhez + + + + KB/s + KB/s + + + + Informations + Információk + + + + Display + Megjelenítés + + + + Speed with progress bar + Sebesség folyamatsávval + + + + Progression color + Folyamat színe + + + + Show progression in the title + Folyamat mutatása a címsorban + + + + Always on top + Mindig legfelül + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/id/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/id/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/id/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/it/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/it/translation.ts new file mode 100644 index 0000000..255c3b1 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/it/translation.ts @@ -0,0 +1,336 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + File %1/%2, dimensione: %3/%4 + + + + Copy list + Lista della copia + + + + Move list + Lista dello spostamento + + + + Don't close if errors are found + Non chiudere se vengono rilevati errori + + + + Never close + Non chiudere mai + + + + Always close + Chiudere sempre + + + + File Name, 0KB + Nome del file, 0KB + + + + + + Select a color + Scegliere un colore + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + Non chiudere se vengono rilevati errori + + + + Never close + Non chiudere mai + + + + Always close + Chiudere sempre + + + + + + Select a color + Scegliere un colore + + + + interfaceCopy + + + From: + Da: + + + + To: + a: + + + + Close at the end of the transfers + Chiudi alla fine dei trasferimenti + + + + &More + Altr&o + + + + &Pause + &Pausa + + + + &Skip + &Salta + + + + &Cancel + &Annulla + + + Limit copy speed at: + Ridurre la velocità di copia a: + + + + Limit copy speed to: + + + + + Transfer list + Lista dei trasferimenti + + + + Move the selected items to the top + Sposta in cima gli elementi selezionati + + + + Move up the selected items + Sposta sopra gli elementi selezionati + + + + Move down the selected items + Sposta sotto gli elementi selezionati + + + + Move the selected items to the bottom + Sposta in coda gli elementi selezionati + + + + Add file/folder + Aggiungi file/cartelle + + + + Delete the selected items + Elimina gli elementi selezionati + + + + Search + Cerca + + + + Export the transfer list + Esporta la lista dei trasferimenti + + + + Import the transfer list + Importa la lista dei trasferimenti + + + + Previous + Precedente + + + + Next + Successivo + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + Interfaccia + + + + Add file + Aggiungi file + + + + Add folder + Aggiungi cartella + + + + Move file(s) + Sposta file + + + + Move folder + Sposta la cartella + + + + Copy file(s) + Copia file + + + + Copy folder + Copia la cartella + + + + themesOptions + + + Show dual progression + Mostrare la doppia progressione + + + + Show speed as main information + Mostrare la velocità come principale informazione + + + + Use + + + + + Start with the "more button" pushed + Iniziare col pulsante "Altro" attivo + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + Click to edit the color + + + + At the end of the copy: + Alla fine della copia: + + + Limit copy speed at: + Ridurre la velocità di copia a: + + + + KB/s + KB/s + + + + Informations + + + + + Display + + + + + Speed with progress bar + Velocità nella barra di progresso + + + + Progression color + Colore della progressione + + + + Show progression in the title + Mostrare la percentuale di progresso sul titolo + + + + Always on top + Sempre in primo piano + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/ja/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/ja/translation.ts new file mode 100644 index 0000000..6ba3c00 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/ja/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + Interface + + + + + Move the selected items to the top + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/ko/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/ko/translation.ts new file mode 100644 index 0000000..4354bd2 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/ko/translation.ts @@ -0,0 +1,336 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + 파일 %1/%2, 크기: %3/%4 + + + + Copy list + 복사 목록 + + + + Move list + + + + + Don't close if errors are found + 오류 발견시 종료 안함 + + + + Never close + 절대 종료 안함 + + + + Always close + 항상 종료 + + + + File Name, 0KB + 파일명, 0KB + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + 오류 발견시 종료 안함 + + + + Never close + 절대 종료 안함 + + + + Always close + 항상 종료 + + + + + + Select a color + + + + + interfaceCopy + + + From: + 원본: + + + + To: + 대상: + + + + Close at the end of the transfers + + + + + &More + &자세히 + + + + &Pause + &일시 정지 + + + + &Skip + &건너뛰기 + + + + &Cancel + &취소 + + + Limit copy speed at: + 복사 속도 제한: + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + 이전 + + + + Next + 다음 + + + + Interface + 인터페이스 + + + + Move the selected items to the top + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + 파일 추가 + + + + Add folder + 폴더 추가 + + + + Move file(s) + 파일 이동 + + + + Move folder + 폴더 이동 + + + + Copy file(s) + 파일 복사 + + + + Copy folder + 폴더 복사 + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + 메인 정보에 속도 표시 + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + Click to edit the color + + + + At the end of the copy: + 복사 종료시: + + + Limit copy speed at: + 복사 속도 제한: + + + + KB/s + KB/초 + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/nl/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/nl/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/nl/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/no/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/no/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/no/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/pl/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/pl/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/pl/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/pt/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/pt/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/pt/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/ru/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/ru/translation.ts new file mode 100644 index 0000000..a5a373b --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/ru/translation.ts @@ -0,0 +1,336 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + Файл %1/%2, размер: %3/%4 + + + + Copy list + Копировать список + + + + Move list + + + + + Don't close if errors are found + Не закрывать, если найдены ошибки + + + + Never close + Никогда не закрывать + + + + Always close + Всегда закрывайте + + + + File Name, 0KB + Имя файла, 0KB + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + Не закрывать, если найдены ошибки + + + + Never close + Никогда не закрывать + + + + Always close + Всегда закрывайте + + + + + + Select a color + + + + + interfaceCopy + + + From: + С: + + + + To: + к: + + + + Close at the end of the transfers + + + + + &More + больше + + + + &Pause + пауза + + + + &Skip + пропускать + + + + &Cancel + отменить + + + Limit copy speed at: + Предельная скорость копирования по адресу: + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + предыдущий + + + + Next + следующий + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + интерфейс + + + + Add file + Добавить файл + + + + Add folder + Добавить папку + + + + Move file(s) + Перемещение файла(ов) + + + + Move folder + Перемещение папки + + + + Copy file(s) + Копировать файл (ы) + + + + Copy folder + Копировать папку + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + Показать скорости в качестве основной информации + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + Click to edit the color + + + + At the end of the copy: + В конце копии: + + + Limit copy speed at: + Предельная скорость копирования по адресу: + + + + KB/s + Кб/с + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/th/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/th/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/th/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/tr/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/tr/translation.ts new file mode 100644 index 0000000..78e326c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/tr/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Limit copy speed to: + + + + + Transfer list + + + + + Move the selected items to the top + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Delete the selected items + + + + + Search + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Interface + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/Languages/zh/translation.ts b/plugins-alternative/Themes/Supercopier/Languages/zh/translation.ts new file mode 100644 index 0000000..6ba3c00 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Languages/zh/translation.ts @@ -0,0 +1,324 @@ + + + + + Themes + + + Buy the Ultimate version to fund development + + + + + File %1/%2, size: %3/%4 + + + + + Copy list + + + + + Move list + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + File Name, 0KB + + + + + + + Select a color + + + + + + + %1 %2% of %3 + + + + + ThemesFactory + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + Select a color + + + + + interfaceCopy + + + From: + + + + + To: + + + + + Close at the end of the transfers + + + + + &More + + + + + &Pause + + + + + &Skip + + + + + &Cancel + + + + + Transfer list + + + + + Delete the selected items + + + + + Export the transfer list + + + + + Import the transfer list + + + + + Previous + + + + + Next + + + + + Interface + + + + + Move the selected items to the top + + + + + Limit copy speed to: + + + + + Move up the selected items + + + + + Move down the selected items + + + + + Move the selected items to the bottom + + + + + Add file/folder + + + + + Search + + + + + + Error + + + + + Export the errors into transfer list + + + + + Source + + + + + Destination + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + + themesOptions + + + Show dual progression + + + + + Show speed as main information + + + + + Use + + + + + Start with the "more button" pushed + + + + + Minimize on close to systray + + + + + At the end of the copy + + + + + + Limit copy speed to + + + + + KB/s + + + + + Informations + + + + + Display + + + + + Speed with progress bar + + + + + Progression color + + + + + Click to edit the color + + + + + Show progression in the title + + + + + Always on top + + + + diff --git a/plugins-alternative/Themes/Supercopier/StructEnumDefinition.h b/plugins-alternative/Themes/Supercopier/StructEnumDefinition.h new file mode 100644 index 0000000..c1758f4 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/StructEnumDefinition.h @@ -0,0 +1 @@ +#include "../../../StructEnumDefinition.h" diff --git a/plugins-alternative/Themes/Supercopier/TransferModel.cpp b/plugins-alternative/Themes/Supercopier/TransferModel.cpp new file mode 100644 index 0000000..6ce9b92 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/TransferModel.cpp @@ -0,0 +1,569 @@ +#include "TransferModel.h" + +#define COLUMN_COUNT 3 + +QIcon *TransferModel::start=NULL; +QIcon *TransferModel::stop=NULL; + +TransferModel::TransferModel() +{ + /// \warning to prevent Must construct a QGuiApplication before QPixmap IN STATIC WINDOWS VERSION ONLY + if(TransferModel::start==NULL) + TransferModel::start=new QIcon(QStringLiteral(":/resources/player_play.png")); + if(TransferModel::stop==NULL) + TransferModel::stop=new QIcon(QStringLiteral(":/resources/player_pause.png")); + currentIndexSearch=0; + haveSearchItem=false; + facilityEngine=NULL; +} + +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.at(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(stopId.contains(item.id)) + return *stop; + else if(startId.contains(item.id)) + return *start; + 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() const +{ + if(transfertItemList.count()>0) + return transfertItemList.first().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(QStringLiteral("Source")); + case 1: + return facilityEngine->translateText(QStringLiteral("Size")); + case 2: + return facilityEngine->translateText(QStringLiteral("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; + quint64 totalFile=0,totalSize=0,currentFile=0; + totalFile=0; + totalSize=0; + currentFile=0; + + emit layoutAboutToBeChanged(); + const QModelIndexList oldIndexes = persistentIndexList(); + QModelIndexList newIndexes = oldIndexes; + QMap oldMapping; // model index row in model before update, item id + QMap newMapping; // item id, model index row in model after update + + for ( int i = 0; i < oldIndexes.count(); i++ ) { + const QModelIndex& index = oldIndexes.at(i); + oldMapping[ index.row() ] = index.data( Qt::UserRole ).value(); + } + + while(index_for_loopsizeToString(action.addAction.size); + newItem.destination=action.addAction.destinationFullPath; + transfertItemList<(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, position is wrong: %2").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.moveAt<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, position is wrong: %2").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.moveAt>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, position is wrong: %2").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.position==action.userAction.moveAt) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("id: %1, move at same position: %2").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + transfertItemList.move(action.userAction.position,action.userAction.moveAt); + //newIndexes.move(action.userAction.position,action.userAction.moveAt); + } + break; + case Ultracopier::RemoveItem: + { + if(currentIndexSearch>0 && action.userAction.position<=currentIndexSearch) + currentIndexSearch--; + if(action.userAction.position<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.position>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("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); + internalRunningOperation.remove(action.addAction.id); + //newIndexes.remove(action.userAction.moveAt); + } + break; + case Ultracopier::PreOperation: + { + ItemOfCopyListWithMoreInformations tempItem; + tempItem.currentReadProgression=0; + tempItem.currentWriteProgression=0; + tempItem.generalData=action.addAction; + tempItem.actionType=action.type; + internalRunningOperation[action.addAction.id]=tempItem; + } + break; + case Ultracopier::Transfer: + { + 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(Ultracopier::DebugLevel_Warning,QStringLiteral("unable to found entry for file %1: actionType: Transfer").arg(action.addAction.id)); + } + break; + case Ultracopier::PostOperation: + { + if(!stopId.contains(action.addAction.id)) + stopId << action.addAction.id; + startId.remove(action.addAction.id); + } + break; + case Ultracopier::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.currentReadProgression=0; + item.currentWriteProgression=0; + } + } + break; + default: + //unknow code, ignore it + break; + } + index_for_loop++; + } + + if(!oldIndexes.isEmpty()) + { + const QSet ids = oldMapping.values().toSet(); + + for ( int i = 0; i < transfertItemList.count(); i++ ) { + const TransferModel::TransfertItem& item = transfertItemList.at(i); + + if ( ids.contains( item.id ) ) { + newMapping[ item.id ] = i; + } + } + + for ( int i = 0; i < oldIndexes.count(); i++ ) { + const QModelIndex& index = oldIndexes.at(i); + const int newRow = newMapping.value( oldMapping.value(index.row()), -1 ); + newIndexes[ i ] = newRow == -1 ? QModelIndex() : QAbstractTableModel::index( newRow, index.column(), index.parent() ); + } + } + + changePersistentIndexList( oldIndexes, newIndexes ); + 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(Ultracopier::DebugLevel_Notice,QStringLiteral("progression remaning items")); + #endif +} + +TransferModel::currentTransfertItem TransferModel::getCurrentTransfertItem() const +{ + currentTransfertItem returnItem; + returnItem.progressBar_read=-1; + returnItem.progressBar_write=0; + returnItem.haveItem=startId.size()>0; + if(returnItem.haveItem) + { + if(!internalRunningOperation.contains(*startId.constBegin())) + { + returnItem.haveItem=false; + return returnItem; + } + const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation.value(*startId.constBegin()); + returnItem.from=itemTransfer.generalData.sourceFullPath; + returnItem.to=itemTransfer.generalData.destinationFullPath; + returnItem.current_file=itemTransfer.generalData.destinationFileName+QStringLiteral(", ")+facilityEngine->sizeToString(itemTransfer.generalData.size); + returnItem.id=itemTransfer.generalData.id; + switch(itemTransfer.actionType) + { + case Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_read=-1; + else + { + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + returnItem.progressBar_read=-1; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + { + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + } + break; + //should never pass here + case Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + break; + //should never pass here + case Ultracopier::PreOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + break; + default: + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + break; + } + } + else + { + returnItem.haveItem=stopId.size()>0; + if(returnItem.haveItem) + { + if(!internalRunningOperation.contains(*stopId.constBegin())) + { + returnItem.haveItem=false; + return returnItem; + } + const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation.value(*stopId.constBegin()); + returnItem.from=itemTransfer.generalData.sourceFullPath; + returnItem.to=itemTransfer.generalData.destinationFullPath; + returnItem.current_file=itemTransfer.generalData.destinationFileName+QStringLiteral(", ")+facilityEngine->sizeToString(itemTransfer.generalData.size); + returnItem.id=itemTransfer.generalData.id; + switch(itemTransfer.actionType) + { + case Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_read=-1; + else + { + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + returnItem.progressBar_read=-1; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + { + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + } + break; + case Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + break; + //should never pass here + case Ultracopier::PreOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + break; + default: + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + break; + } + } + } + if(returnItem.haveItem && returnItem.progressBar_read!=-1 && returnItem.progressBar_write>returnItem.progressBar_read) + { + int tempVar=returnItem.progressBar_write; + returnItem.progressBar_write=returnItem.progressBar_read; + returnItem.progressBar_read=tempVar; + } + return returnItem; +} diff --git a/plugins-alternative/Themes/Supercopier/TransferModel.h b/plugins-alternative/Themes/Supercopier/TransferModel.h new file mode 100644 index 0000000..dd8b45a --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/TransferModel.h @@ -0,0 +1,96 @@ +#ifndef TRANSFERMODEL_H +#define TRANSFERMODEL_H + +#include +#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 currentReadProgression,currentWriteProgression; + Ultracopier::ItemOfCopyList generalData; + Ultracopier::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_read,progressBar_write; + }; + + 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( + #ifndef ULTRACOPIER_PLUGIN_DEBUG + const + #endif + QList &progressionList); + + currentTransfertItem getCurrentTransfertItem() const; + + quint64 firstId() const; +protected: + QList transfertItemList;///< 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 +private: + int loop_size,index_for_loop; + int sub_loop_size,sub_index_for_loop; + int row,column; + FacilityInterface * facilityEngine; + QString search_text; + /// \brief index from start the search, decresed by remove before it + int currentIndexSearch; + bool haveSearchItem; + quint64 searchId; + static QIcon *start; + static QIcon *stop; +signals: + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,QString fonction,QString text,QString file,int ligne) const; + #endif +}; + +#endif // TRANSFERMODEL_H diff --git a/plugins-alternative/Themes/Supercopier/Variable.h b/plugins-alternative/Themes/Supercopier/Variable.h new file mode 100644 index 0000000..963d0c8 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/Variable.h @@ -0,0 +1,15 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLE_H +#define VARIABLE_H + +//Un-comment this next line to put ultracopier plugin in debug mode +#define ULTRACOPIER_PLUGIN_DEBUG + +#endif // VARIABLE_H + + + diff --git a/plugins-alternative/Themes/Supercopier/documentation.dox b/plugins-alternative/Themes/Supercopier/documentation.dox new file mode 100644 index 0000000..9357109 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/documentation.dox @@ -0,0 +1,33 @@ +/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ + +/* + This file contains NO source code, just some documentation for doxygen to + parse. +*/ + +/*! + \mainpage Oxygen + + \section mainpage_overview Overview + + It's interface like Supercopier, see Tal Sella http://www.virtualplastic.net/scrow/ (icons) for the icons and icon license.\n + More informations on the wiki of ultracopier. + + \section mainpage_platforms Platforms + + Ultracopier might be usable in all environments where you find Qt 5.\n + Ultracopier requires Qt 5.0 or newer. Tested on Qt 5.0. + + \section mainpage_downloads Downloads + + You can found link on Ultracopier (Supercopier/Teracopy) project page, via git, snapshot sources, ... + + \section license GPL Version 3 + The code source is under GPL3. The image is extacted from Oxygen icon pack of KDE4.\n + See Tal Sella http://www.virtualplastic.net/scrow/ (icons) for the icons and icon license.\n + resources/export-transfer-list.png and resources/import-transfer-list.png done by png manipulation of KDE's oxygen icon pack (16x16/actions/format-indent-more.png + 16x16/actions/format-list-unordered.png), document-save.png -> all SystemTrayIcon/systray_* (color alteration).\n + From 16x16/actions/: list-add.png -> add.png and SystemTrayIcon/add.png, process-stop.png -> remove.png, document-save.png -> main.png and, arrow-down.png -> moveDown.png, arrow-up.png -> moveUp.png, system-shutdown.png -> cancel.png and SystemTrayIcon/exit.png, arrow-down-double.png -> putOnBottom.png, arrow-up-double.png -> putOnTop.png, media-skip-forward.png -> player_end.png, media-playback-pause.png -> player_pause.png, media-playback-start.png -> player_play.png, document-preview.png -> search.png, help-about.png -> SystemTrayIcon/informations.png \n + And 16x16/categories/applications-development.png -> SystemTrayIcon/options.png + +*/ + diff --git a/plugins-alternative/Themes/Supercopier/factory.cpp b/plugins-alternative/Themes/Supercopier/factory.cpp new file mode 100644 index 0000000..ce3fe15 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/factory.cpp @@ -0,0 +1,441 @@ +/** \file factory.cpp +\brief Define the factory core +\author alpha_one_x86 +*/ + +#include + +#include "factory.h" + +ThemesFactory::ThemesFactory() +{ + optionsEngine=NULL; + tempWidget=new QWidget(); + ui=new Ui::themesOptions(); + ui->setupUi(tempWidget); + ui->toolBox->setCurrentIndex(0); + currentSpeed = 0; + updateSpeed(); + ui->labelDualProgression->hide(); + ui->showDualProgression->hide(); + + qRegisterMetaType >("QList"); +} + +ThemesFactory::~ThemesFactory() +{ +} + +PluginInterface_Themes * ThemesFactory::getInstance() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start, currentSpeed: %1").arg(currentSpeed)); + + Themes * newInterface=new Themes( + ui->alwaysOnTop->isChecked(), + ui->showProgressionInTheTitle->isChecked(), + progressColorWrite,progressColorRead,progressColorRemaining, + ui->showDualProgression->isChecked(), + ui->comboBox_copyEnd->currentIndex(), + ui->speedWithProgressBar->isChecked(), + currentSpeed, + ui->checkBoxShowSpeed->isChecked(), + facilityEngine, + ui->checkBoxStartWithMoreButtonPushed->isChecked(), + ui->minimizeToSystray->isChecked() + ); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(newInterface,&Themes::debugInformation,this,&PluginInterface_ThemesFactory::debugInformation); + #endif + connect(this,&ThemesFactory::reloadLanguage,newInterface,&Themes::newLanguageLoaded); + return newInterface; +} + +void ThemesFactory::setResources(OptionInterface * optionsEngine,const QString & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + writePath + #endif + ,const QString & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + pluginPath + #endif + ,FacilityInterface * facilityEngine,const bool &) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath: "+pluginPath); + this->facilityEngine=facilityEngine; + if(optionsEngine!=NULL) + { + this->optionsEngine=optionsEngine; + //load the options + QList > KeysList; + KeysList.append(qMakePair(QStringLiteral("checkBoxShowSpeed"),QVariant(false))); + KeysList.append(qMakePair(QStringLiteral("moreButtonPushed"),QVariant(false))); + KeysList.append(qMakePair(QStringLiteral("speedWithProgressBar"),QVariant(false))); + KeysList.append(qMakePair(QStringLiteral("currentSpeed"),QVariant(0))); + KeysList.append(qMakePair(QStringLiteral("comboBox_copyEnd"),QVariant(0))); + KeysList.append(qMakePair(QStringLiteral("showDualProgression"),QVariant(false))); + KeysList.append(qMakePair(QStringLiteral("showProgressionInTheTitle"),QVariant(true))); + KeysList.append(qMakePair(QStringLiteral("progressColorWrite"),QVariant(QApplication::palette().color(QPalette::Highlight)))); + KeysList.append(qMakePair(QStringLiteral("progressColorRead"),QVariant(QApplication::palette().color(QPalette::AlternateBase)))); + KeysList.append(qMakePair(QStringLiteral("progressColorRemaining"),QVariant(QApplication::palette().color(QPalette::Base)))); + KeysList.append(qMakePair(QStringLiteral("alwaysOnTop"),QVariant(false))); + KeysList.append(qMakePair(QStringLiteral("minimizeToSystray"),QVariant(false))); + optionsEngine->addOptionGroup(KeysList); + connect(optionsEngine,&OptionInterface::resetOptions,this,&ThemesFactory::resetOptions); + updateSpeed(); + } + #ifndef __GNUC__ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"__GNUC__ is not set"); + #else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"__GNUC__ is set"); + #endif +} + +QWidget * ThemesFactory::options() +{ + if(optionsEngine!=NULL) + { + bool ok; + currentSpeed=optionsEngine->getOptionValue("currentSpeed").toUInt(&ok); + if(!ok) + currentSpeed=0; + ui->comboBox_copyEnd->setCurrentIndex(optionsEngine->getOptionValue(QStringLiteral("comboBox_copyEnd")).toUInt()); + ui->speedWithProgressBar->setChecked(optionsEngine->getOptionValue(QStringLiteral("speedWithProgressBar")).toBool()); + ui->checkBoxShowSpeed->setChecked(optionsEngine->getOptionValue(QStringLiteral("checkBoxShowSpeed")).toBool()); + ui->checkBoxStartWithMoreButtonPushed->setChecked(optionsEngine->getOptionValue(QStringLiteral("moreButtonPushed")).toBool()); + ui->showDualProgression->setChecked(optionsEngine->getOptionValue(QStringLiteral("showDualProgression")).toBool()); + ui->showProgressionInTheTitle->setChecked(optionsEngine->getOptionValue(QStringLiteral("showProgressionInTheTitle")).toBool()); + ui->alwaysOnTop->setChecked(optionsEngine->getOptionValue(QStringLiteral("alwaysOnTop")).toBool()); + ui->minimizeToSystray->setChecked(optionsEngine->getOptionValue(QStringLiteral("minimizeToSystray")).toBool()); + + progressColorWrite=optionsEngine->getOptionValue(QStringLiteral("progressColorWrite")).value(); + progressColorRead=optionsEngine->getOptionValue(QStringLiteral("progressColorRead")).value(); + progressColorRemaining=optionsEngine->getOptionValue(QStringLiteral("progressColorRemaining")).value(); + + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + ui->progressColorWrite->setIcon(pixmap); + pixmap.fill(progressColorRead); + ui->progressColorRead->setIcon(pixmap); + pixmap.fill(progressColorRemaining); + ui->progressColorRemaining->setIcon(pixmap); + updateSpeed(); + updateProgressionColorBar(); + + connect(ui->alwaysOnTop,&QCheckBox::stateChanged,this,&ThemesFactory::alwaysOnTop); + connect(ui->checkBoxShowSpeed,&QCheckBox::stateChanged,this,&ThemesFactory::checkBoxShowSpeed); + connect(ui->minimizeToSystray,&QCheckBox::stateChanged,this,&ThemesFactory::minimizeToSystray); + connect(ui->checkBox_limitSpeed,&QCheckBox::stateChanged,this,&ThemesFactory::uiUpdateSpeed); + connect(ui->SliderSpeed,&QAbstractSlider::valueChanged,this,&ThemesFactory::on_SliderSpeed_valueChanged); + connect(ui->limitSpeed,static_cast(&QSpinBox::valueChanged), this, &ThemesFactory::uiUpdateSpeed); + connect(ui->checkBoxShowSpeed,&QAbstractButton::toggled,this,&ThemesFactory::checkBoxShowSpeedHaveChanged); + connect(ui->checkBoxStartWithMoreButtonPushed,&QAbstractButton::toggled,this,&ThemesFactory::checkBoxStartWithMoreButtonPushedHaveChanged); + connect(ui->speedWithProgressBar,&QAbstractButton::toggled,this,&ThemesFactory::speedWithProgressBar); + connect(ui->comboBox_copyEnd, static_cast(&QComboBox::currentIndexChanged), this,&ThemesFactory::comboBox_copyEnd); + connect(ui->showDualProgression,&QCheckBox::stateChanged,this,&ThemesFactory::showDualProgression); + connect(ui->showDualProgression,&QCheckBox::stateChanged,this,&ThemesFactory::updateProgressionColorBar); + connect(ui->showProgressionInTheTitle,&QCheckBox::stateChanged,this,&ThemesFactory::setShowProgressionInTheTitle); + connect(ui->progressColorWrite,&QAbstractButton::clicked,this,&ThemesFactory::progressColorWrite_clicked); + connect(ui->progressColorRead, &QAbstractButton::clicked,this,&ThemesFactory::progressColorRead_clicked); + connect(ui->progressColorRemaining,&QAbstractButton::clicked,this,&ThemesFactory::progressColorRemaining_clicked); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"return the options"); + return tempWidget; +} + +QIcon ThemesFactory::getIcon(const QString &fileName) const +{ + return QIcon(QStringLiteral(":/Themes/Supercopier/resources/")+fileName); +} + +void ThemesFactory::resetOptions() +{ + ui->checkBoxShowSpeed->setChecked(true); + ui->checkBoxStartWithMoreButtonPushed->setChecked(false); +} + +void ThemesFactory::checkBoxShowSpeedHaveChanged(bool toggled) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("checkBoxShowSpeed"),toggled); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::checkBoxStartWithMoreButtonPushedHaveChanged(bool toggled) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("moreButtonPushed"),toggled); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::comboBox_copyEnd(int value) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("comboBox_copyEnd"),value); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::speedWithProgressBar(bool toggled) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("speedWithProgressBar"),toggled); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::newLanguageLoaded() +{ + ui->retranslateUi(tempWidget); + ui->comboBox_copyEnd->setItemText(0,tr("Don't close if errors are found")); + ui->comboBox_copyEnd->setItemText(1,tr("Never close")); + ui->comboBox_copyEnd->setItemText(2,tr("Always close")); + emit reloadLanguage(); +} + +void ThemesFactory::checkBoxShowSpeed(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + Q_UNUSED(checked); + updateSpeed(); +} + +void ThemesFactory::minimizeToSystray(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("minimizeToSystray"),checked); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::alwaysOnTop(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("alwaysOnTop"),checked); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::showDualProgression(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"the checkbox have changed"); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("showDualProgression"),checked); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::on_SliderSpeed_valueChanged(int value) +{ + if(optionsEngine==NULL) + return; + if(!ui->checkBoxShowSpeed->isChecked()) + return; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("value: %1").arg(value)); + switch(value) + { + case 0: + currentSpeed=0; + break; + case 1: + currentSpeed=1024; + break; + case 2: + currentSpeed=1024*4; + break; + case 3: + currentSpeed=1024*16; + break; + case 4: + currentSpeed=1024*64; + break; + case 5: + currentSpeed=1024*128; + break; + } + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("currentSpeed"),currentSpeed); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + updateSpeed(); +} + +void ThemesFactory::uiUpdateSpeed() +{ + if(optionsEngine==NULL) + return; + if(ui->checkBoxShowSpeed->isChecked()) + return; + if(!ui->checkBox_limitSpeed->isChecked()) + currentSpeed=0; + else + currentSpeed=ui->limitSpeed->value(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("emit newSpeedLimitation(%1)").arg(currentSpeed)); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("currentSpeed"),currentSpeed); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::updateSpeed() +{ + if(optionsEngine==NULL) + return; + ui->label_Slider_speed->setVisible(ui->checkBoxShowSpeed->isChecked()); + ui->SliderSpeed->setVisible(ui->checkBoxShowSpeed->isChecked()); + ui->label_SpeedMaxValue->setVisible(ui->checkBoxShowSpeed->isChecked()); + ui->limitSpeed->setVisible(!ui->checkBoxShowSpeed->isChecked()); + ui->checkBox_limitSpeed->setVisible(!ui->checkBoxShowSpeed->isChecked()); + + if(ui->checkBoxShowSpeed->isChecked()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("checked, currentSpeed: %1").arg(currentSpeed)); + ui->limitSpeed->setEnabled(false); + if(currentSpeed==0) + { + ui->SliderSpeed->setValue(0); + ui->label_SpeedMaxValue->setText(facilityEngine->translateText("Unlimited")); + } + else if(currentSpeed<=1024) + { + if(currentSpeed!=1024) + { + currentSpeed=1024; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("currentSpeed"),currentSpeed); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(1); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*1)); + } + else if(currentSpeed<=1024*4) + { + if(currentSpeed!=1024*4) + { + currentSpeed=1024*4; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("currentSpeed"),currentSpeed); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(2); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*4)); + } + else if(currentSpeed<=1024*16) + { + if(currentSpeed!=1024*16) + { + currentSpeed=1024*16; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("currentSpeed"),currentSpeed); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(3); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*16)); + } + else if(currentSpeed<=1024*64) + { + if(currentSpeed!=1024*64) + { + currentSpeed=1024*64; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("currentSpeed"),currentSpeed); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(4); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*64)); + } + else + { + if(currentSpeed!=1024*128) + { + currentSpeed=1024*128; + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("currentSpeed"),currentSpeed); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); + } + ui->SliderSpeed->setValue(5); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*128)); + } + } + else + { + ui->checkBox_limitSpeed->setChecked(currentSpeed>0); + if(currentSpeed>0) + ui->limitSpeed->setValue(currentSpeed); + ui->checkBox_limitSpeed->setEnabled(currentSpeed!=-1); + ui->limitSpeed->setEnabled(ui->checkBox_limitSpeed->isChecked()); + } +} + +void ThemesFactory::progressColorWrite_clicked() +{ + QColor color=QColorDialog::getColor(progressColorWrite,NULL,tr("Select a color")); + if(!color.isValid()) + return; + progressColorWrite=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + ui->progressColorWrite->setIcon(pixmap); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("progressColorWrite"),progressColorWrite); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::progressColorRead_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRead,NULL,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRead=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRead); + ui->progressColorRead->setIcon(pixmap); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("progressColorRead"),progressColorRead); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::progressColorRemaining_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRemaining,NULL,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRemaining=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRemaining); + ui->progressColorRemaining->setIcon(pixmap); + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("progressColorRemaining"),progressColorRemaining); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} + +void ThemesFactory::updateProgressionColorBar() +{ + ui->labelProgressionColor->setVisible(ui->showDualProgression->isChecked()); + ui->frameProgressionColor->setVisible(ui->showDualProgression->isChecked()); +} + +void ThemesFactory::setShowProgressionInTheTitle() +{ + if(optionsEngine!=NULL) + optionsEngine->setOptionValue(QStringLiteral("showProgressionInTheTitle"),ui->showProgressionInTheTitle->isChecked()); + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented"); +} diff --git a/plugins-alternative/Themes/Supercopier/factory.h b/plugins-alternative/Themes/Supercopier/factory.h new file mode 100644 index 0000000..11607d2 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/factory.h @@ -0,0 +1,83 @@ +/** \file factory.h +\brief Define the factory, to create instance of the interface +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef FACTORY_H +#define FACTORY_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_Themes.h" +#include "ui_themesOptions.h" +#include "interface.h" +#include "Environment.h" + +namespace Ui { + class themesOptions; +} + +/// \brief Define the factory, to create instance of the interface +class ThemesFactory : public PluginInterface_ThemesFactory +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.ThemesFactory/1.0.1.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_ThemesFactory) +public: + ThemesFactory(); + ~ThemesFactory(); + /// \brief to return the instance of the copy engine + PluginInterface_Themes * getInstance(); + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * optionsEngine,const QString & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + writePath + #endif + ,const QString & + #ifdef ULTRACOPIER_PLUGIN_DEBUG + pluginPath + #endif + ,FacilityInterface * facilityEngine,const bool &portableVersion); + /// \brief to get the default options widget + QWidget * options(); + /// \brief to get a resource icon + QIcon getIcon(const QString &fileName) const; +private slots: + void checkBoxShowSpeedHaveChanged(bool toggled); + void checkBoxStartWithMoreButtonPushedHaveChanged(bool toggled); + void comboBox_copyEnd(int value); + void speedWithProgressBar(bool toggled); + void checkBoxShowSpeed(bool checked); + void minimizeToSystray(bool checked); + void alwaysOnTop(bool checked); + void showDualProgression(bool checked); + void on_SliderSpeed_valueChanged(int value); + void uiUpdateSpeed(); + void updateSpeed(); + void progressColorWrite_clicked(); + void progressColorRead_clicked(); + void progressColorRemaining_clicked(); + void updateProgressionColorBar(); + void setShowProgressionInTheTitle(); +public slots: + void resetOptions(); + void newLanguageLoaded(); +private: + OptionInterface * optionsEngine; + Ui::themesOptions *ui; + QWidget *tempWidget; + FacilityInterface * facilityEngine; + qint32 currentSpeed;///< in KB/s, assume as 0KB/s as default like every where + QColor progressColorWrite,progressColorRead,progressColorRemaining; +signals: + void reloadLanguage() const; +}; + +#endif // FACTORY_H diff --git a/plugins-alternative/Themes/Supercopier/informations.xml b/plugins-alternative/Themes/Supercopier/informations.xml new file mode 100644 index 0000000..25a77f9 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/informations.xml @@ -0,0 +1,26 @@ + + + <![CDATA[Supercopier style for Ultracopier]]> + <![CDATA[Style Supercopier pour Ultracopier]]> + + Themes + + + + + + + 1287496800 + + windows-x86 + + + + + 1.2.3.6 + + Supercopier + + + \ No newline at end of file diff --git a/plugins-alternative/Themes/Supercopier/interface.cpp b/plugins-alternative/Themes/Supercopier/interface.cpp new file mode 100644 index 0000000..7af05e8 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/interface.cpp @@ -0,0 +1,1332 @@ +/** \file interface.cpp +\brief Define the interface core +\author alpha_one_x86 +*/ + +#include +#include +#include +#include +#include +#include +#include +#ifdef Q_OS_WIN + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include +#endif + +#include "interface.h" +#include "ui_interface.h" +#include "factory.h" + +// The cmath header from MSVC does not contain round() +#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) +inline double round(double d) { + return floor( d + 0.5 ); +} +#endif + +QIcon Themes::player_pause=QIcon(QStringLiteral(":/Themes/Supercopier/resources/player_pause.png")); +QIcon Themes::player_play=QIcon(QStringLiteral(":/Themes/Supercopier/resources/player_play.png")); + +Themes::Themes(const bool &alwaysOnTop, + const bool &showProgressionInTheTitle, + const QColor &progressColorWrite, + const QColor &progressColorRead, + const QColor &progressColorRemaining, + const bool &showDualProgression, + const quint8 &comboBox_copyEnd, + const bool &speedWithProgressBar, + const qint32 ¤tSpeed, + const bool &checkBoxShowSpeed, + FacilityInterface * facilityEngine, + const bool &moreButtonPushed, + const bool &minimizeToSystray) : + ui(new Ui::interfaceCopy()), + uiOptions(new Ui::themesOptions()) +{ + this->facilityEngine=facilityEngine; + ui->setupUi(this); + uiOptions->setupUi(ui->optionsTab); + + currentFile = 0; + totalFile = 0; + currentSize = 0; + totalSize = 0; + getOldProgression = 200; + haveError = false; + stat = status_never_started; + modeIsForced = false; + haveStarted = false; + storeIsInPause = false; + durationStarted = false; + + this->progressColorWrite = progressColorWrite; + this->progressColorRead = progressColorRead; + this->progressColorRemaining= progressColorRemaining; + this->currentSpeed = currentSpeed; + uiOptions->showProgressionInTheTitle->setChecked(showProgressionInTheTitle); + uiOptions->speedWithProgressBar->setChecked(speedWithProgressBar); + uiOptions->showDualProgression->setChecked(showDualProgression); + uiOptions->alwaysOnTop->setChecked(alwaysOnTop); + uiOptions->minimizeToSystray->setChecked(minimizeToSystray); + //uiOptions->setupUi(ui->tabWidget->widget(ui->tabWidget->count()-1)); + uiOptions->labelStartWithMoreButtonPushed->setVisible(false); + uiOptions->checkBoxStartWithMoreButtonPushed->setVisible(false); + uiOptions->label_Slider_speed->setVisible(false); + uiOptions->SliderSpeed->setVisible(false); + uiOptions->label_SpeedMaxValue->setVisible(false); + uiOptions->comboBox_copyEnd->setCurrentIndex(comboBox_copyEnd); + speedWithProgressBar_toggled(speedWithProgressBar); + showDualProgression_toggled(showDualProgression); + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + uiOptions->progressColorWrite->setIcon(pixmap); + pixmap.fill(progressColorRead); + uiOptions->progressColorRead->setIcon(pixmap); + pixmap.fill(progressColorRemaining); + uiOptions->progressColorRemaining->setIcon(pixmap); + + transferModel.setFacilityEngine(facilityEngine); + ui->TransferList->setModel(&transferModel); + ui->tabWidget->setCurrentIndex(0); + uiOptions->toolBox->setCurrentIndex(0); + uiOptions->checkBoxShowSpeed->setChecked(checkBoxShowSpeed); + menu=new QMenu(this); + ui->add->setMenu(menu); + + #ifdef Q_OS_WIN32 + pixmapTop=QPixmap(":/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Windows.png"); + pixmapBottom=QPixmap(":/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Windows.png"); + #else + pixmapTop=QPixmap(":/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Unix.png"); + pixmapBottom=QPixmap(":/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Unix.png"); + #endif + + //connect the options + checkBoxShowSpeed_toggled(uiOptions->checkBoxShowSpeed->isChecked()); + connect(uiOptions->checkBoxShowSpeed,&QCheckBox::stateChanged,this,&Themes::checkBoxShowSpeed_toggled); + connect(uiOptions->speedWithProgressBar,&QCheckBox::stateChanged,this,&Themes::speedWithProgressBar_toggled); + connect(uiOptions->showProgressionInTheTitle,&QCheckBox::stateChanged,this,&Themes::updateTitle); + connect(uiOptions->showDualProgression,&QCheckBox::stateChanged,this,&Themes::showDualProgression_toggled); + connect(uiOptions->progressColorWrite,&QAbstractButton::clicked,this,&Themes::progressColorWrite_clicked); + connect(uiOptions->progressColorRead, &QAbstractButton::clicked,this,&Themes::progressColorRead_clicked); + connect(uiOptions->progressColorRemaining,&QAbstractButton::clicked,this,&Themes::progressColorRemaining_clicked); + connect(uiOptions->alwaysOnTop,&QAbstractButton::clicked,this,&Themes::alwaysOnTop_clickedSlot); + + isInPause(false); + + connect(uiOptions->limitSpeed, static_cast(&QSpinBox::valueChanged), this, &Themes::uiUpdateSpeed); + connect(uiOptions->checkBox_limitSpeed,&QAbstractButton::toggled, this, &Themes::uiUpdateSpeed); + + connect(ui->actionAddFile,&QAction::triggered,this,&Themes::forcedModeAddFile); + connect(ui->actionAddFileToCopy,&QAction::triggered,this,&Themes::forcedModeAddFileToCopy); + connect(ui->actionAddFileToMove,&QAction::triggered,this,&Themes::forcedModeAddFileToMove); + connect(ui->actionAddFolderToCopy,&QAction::triggered,this,&Themes::forcedModeAddFolderToCopy); + connect(ui->actionAddFolderToMove,&QAction::triggered,this,&Themes::forcedModeAddFolderToMove); + connect(ui->actionAddFolder,&QAction::triggered,this,&Themes::forcedModeAddFolder); + connect(ui->exportErrorToTransferList,&QToolButton::triggered,this,&Themes::exportErrorIntoTransferList); + + //setup the search part + closeTheSearchBox(); + TimerForSearch = new QTimer(this); + TimerForSearch->setInterval(500); + TimerForSearch->setSingleShot(true); + searchShortcut = new QShortcut(QKeySequence(QKeySequence::Find),this); + searchShortcut2 = new QShortcut(QKeySequence(QKeySequence::FindNext),this); + searchShortcut3 = new QShortcut(QKeySequence(Qt::Key_Escape),this); + + //connect the search part + connect(TimerForSearch, &QTimer::timeout, this, &Themes::hilightTheSearchSlot); + connect(searchShortcut, &QShortcut::activated, this, &Themes::searchBoxShortcut); + connect(searchShortcut2, &QShortcut::activated, this, &Themes::on_pushButtonSearchNext_clicked); + connect(ui->pushButtonCloseSearch, &QPushButton::clicked, this, &Themes::closeTheSearchBox); + connect(searchShortcut3, &QShortcut::activated, this, &Themes::closeTheSearchBox); + + //reload directly untranslatable text + newLanguageLoaded(); + + //unpush the more button + ui->moreButton->setChecked(moreButtonPushed); + on_moreButton_toggled(moreButtonPushed); + + /// \note important for drag and drop, \see dropEvent() + setAcceptDrops(true); + + shutdown=facilityEngine->haveFunctionality(QStringLiteral("shutdown")); + ui->shutdown->setVisible(shutdown); + + selectionModel=ui->TransferList->selectionModel(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(&transferModel,&TransferModel::debugInformation,this,&Themes::debugInformation); + #endif + + updateSpeed(); + alwaysOnTop_clicked(false); + /*#ifdef Q_OS_WIN32 + uiOptions->labelAlwaysOnTop->hide(); + uiOptions->alwaysOnTop->hide(); + #endif*/ + #ifdef ULTRACOPIER_VERSION_ULTIMATE + ui->ad_ultimate->hide(); + #else + QString ultimateUrl=facilityEngine->ultimateUrl(); + if(ultimateUrl.isEmpty()) + ui->ad_ultimate->hide(); + else + ui->ad_ultimate->setText(QStringLiteral("%2").arg(ultimateUrl).arg(tr("Buy the Ultimate version to fund development"))); + #endif + + uiOptions->labelDualProgression->hide(); + uiOptions->showDualProgression->hide(); + ui->progressBar_all->setMaximumHeight(17); + ui->progressBar_file->setMaximumHeight(17); + ui->progressBarCurrentSpeed->setMaximumHeight(17); + ui->progressBar_all->setMinimumHeight(17); + ui->progressBar_file->setMinimumHeight(17); + ui->progressBarCurrentSpeed->setMinimumHeight(17); + ui->progressBar_all->setStyleSheet(QStringLiteral("QProgressBar{color:#fff;font-weight:bold;border:1px solid black;text-align:center;background-image:url(:/Themes/Supercopier/resources/progressbarright.png);}QProgressBar::chunk{background-image: url(:/Themes/Supercopier/resources/progressbarleft.png);}")); + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{color:#fff;font-weight:bold;border:1px solid black;text-align:center;background-image:url(:/Themes/Supercopier/resources/progressbarright.png);}QProgressBar::chunk{background-image: url(:/Themes/Supercopier/resources/progressbarleft.png);}")); + ui->progressBarCurrentSpeed->setStyleSheet(QStringLiteral("QProgressBar{color:#fff;font-weight:bold;border:1px solid black;text-align:center;background-image:url(:/Themes/Supercopier/resources/progressbarright.png);}QProgressBar::chunk{background-image: url(:/Themes/Supercopier/resources/progressbarleft.png);}")); + + show(); + + sysTrayIcon = new QSystemTrayIcon(this); + connect(sysTrayIcon,&QSystemTrayIcon::activated,this,&Themes::catchAction); +} + +Themes::~Themes() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + //disconnect(ui->actionAddFile); + //disconnect(ui->actionAddFolder); + delete selectionModel; + delete menu; + delete sysTrayIcon; +} + +QWidget * Themes::getOptionsEngineWidget() +{ + return &optionEngineWidget; +} + +void Themes::getOptionsEngineEnabled(const bool &isEnabled) +{ + if(isEnabled) + { + QScrollArea *scrollArea=new QScrollArea(ui->tabWidget); + scrollArea->setWidgetResizable(true); + scrollArea->setWidget(&optionEngineWidget); + ui->tabWidget->addTab(scrollArea,facilityEngine->translateText(QStringLiteral("Copy engine"))); + } +} + +void Themes::closeEvent(QCloseEvent *event) +{ + event->ignore(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + this->hide(); + if(uiOptions->minimizeToSystray->isChecked()) + { + updateSysTrayIcon(); + sysTrayIcon->show(); + } + else + emit cancel(); +} + +void Themes::updateSysTrayIcon() +{ + if(totalSize==0) + { + sysTrayIcon->setIcon(dynaIcon(0,QStringLiteral("-"))); + return; + } + quint64 currentNew=currentSize*100; + //update systray icon + quint16 getVarProgression=currentNew/totalSize; + if(getOldProgression!=getVarProgression) + { + getOldProgression=getVarProgression; + sysTrayIcon->setIcon(dynaIcon(getVarProgression)); + } +} + +void Themes::updateOverallInformation() +{ + if(uiOptions->showProgressionInTheTitle->isChecked()) + updateTitle(); + ui->overall->setText(tr("File %1/%2, size: %3/%4").arg(currentFile).arg(totalFile).arg(facilityEngine->sizeToString(currentSize)).arg(facilityEngine->sizeToString(totalSize))); +} + +void Themes::actionInProgess(const Ultracopier::EngineActionInProgress &action) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("start: ")+QString::number(action)); + this->action=action; + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + ui->progressBar_all->setMaximum(65535); + ui->progressBar_all->setMinimum(0); + break; + case Ultracopier::Listing: + ui->progressBar_all->setMaximum(0); + ui->progressBar_all->setMinimum(0); + break; + case Ultracopier::Idle: + ui->progressBar_all->setMaximum(65535); + ui->progressBar_all->setMinimum(0); + if(haveStarted && transferModel.rowCount()<=0) + { + if(shutdown && ui->shutdown->isChecked()) + { + facilityEngine->callFunctionality(QStringLiteral("shutdown")); + return; + } + switch(uiOptions->comboBox_copyEnd->currentIndex()) + { + case 2: + emit cancel(); + break; + case 0: + if(!haveError) + emit cancel(); + else + ui->tabWidget->setCurrentWidget(ui->tab_error); + break; + default: + break; + } + stat = status_stopped; + if(durationStarted) + { + Ultracopier::TimeDecomposition time=facilityEngine->secondsToTimeDecomposition(duration.elapsed()/1000); + ui->labelTimeRemaining->setText(QStringLiteral("")+facilityEngine->translateText(QStringLiteral("Completed in %1")).arg( + QString::number(time.hour)+QStringLiteral(":")+QString::number(time.minute).rightJustified(2,'0')+QStringLiteral(":")+QString::number(time.second).rightJustified(2,'0') + )+QStringLiteral("")); + } + } + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"Very wrong switch case!"); + break; + } + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + ui->pauseButton->setEnabled(true); + if(!durationStarted) + { + duration.start(); + durationStarted=true; + } + haveStarted=true; + ui->cancelButton->setText(facilityEngine->translateText(QStringLiteral("Quit"))); + updatePause(); + break; + case Ultracopier::Listing: + ui->pauseButton->setEnabled(false); + haveStarted=true;//to close if skip at root folder collision + break; + case Ultracopier::Idle: + ui->pauseButton->setEnabled(false); + break; + default: + break; + } +} + +void Themes::newFolderListing(const QString &path) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + QString newPath=path; + if(newPath.size()>(64+3)) + newPath=newPath.mid(0,32)+QStringLiteral("...")+newPath.mid(newPath.size()-32,32); + if(action==Ultracopier::Listing) + ui->from->setText(newPath); +} + +void Themes::detectedSpeed(const quint64 &speed)//in byte per seconds +{ + if(uiOptions->speedWithProgressBar->isChecked()) + { + quint64 tempSpeed=speed; + if(tempSpeed>999999999) + tempSpeed=999999999; + if(tempSpeed>(quint64)ui->progressBarCurrentSpeed->maximum()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set max speed to: %1").arg(tempSpeed)); + ui->progressBarCurrentSpeed->setMaximum(tempSpeed); + } + ui->progressBarCurrentSpeed->setValue(tempSpeed); + ui->progressBarCurrentSpeed->setFormat(facilityEngine->speedToString(speed)); + } + else + ui->currentSpeed->setText(facilityEngine->speedToString(speed)); +} + +void Themes::remainingTime(const int &remainingSeconds) +{ + QString labelTimeRemaining(QStringLiteral("")+facilityEngine->translateText(QStringLiteral("Time remaining:"))+QStringLiteral(" ")); + if(remainingSeconds==-1) + labelTimeRemaining+=QStringLiteral("∞"); + else + { + Ultracopier::TimeDecomposition time=facilityEngine->secondsToTimeDecomposition(remainingSeconds); + labelTimeRemaining+=QString::number(time.hour)+QStringLiteral(":")+QString::number(time.minute).rightJustified(2,'0')+QStringLiteral(":")+QString::number(time.second).rightJustified(2,'0'); + } + labelTimeRemaining+=QStringLiteral(""); + ui->labelTimeRemaining->setText(labelTimeRemaining); +} + +void Themes::errorDetected() +{ + haveError=true; +} + +/// \brief new error +void Themes::errorToRetry(const QString &source,const QString &destination,const QString &error) +{ + ui->errorList->addTopLevelItem(new QTreeWidgetItem(QStringList() << source << destination << error)); +} + +/** \brief support speed limitation */ +void Themes::setSupportSpeedLimitation(const bool &supportSpeedLimitationBool) +{ + if(!supportSpeedLimitationBool) + { + ui->label_Slider_speed->setVisible(false); + ui->SliderSpeed->setVisible(false); + ui->label_SpeedMaxValue->setVisible(false); + uiOptions->labelShowSpeedAsMain->setVisible(false); + uiOptions->checkBoxShowSpeed->setVisible(false); + } + else + emit newSpeedLimitation(currentSpeed); +} + +//get information about the copy +void Themes::setGeneralProgression(const quint64 ¤t,const quint64 &total) +{ + currentSize=current; + totalSize=total; + if(total>0) + { + int newIndicator=((double)current/total)*65535; + ui->progressBar_all->setValue(newIndicator); + } + else + ui->progressBar_all->setValue(0); + if(current>0) + stat = status_started; + updateOverallInformation(); + if(isHidden()) + updateSysTrayIcon(); +} + +void Themes::setFileProgression(const QList &progressionList) +{ + QList progressionListBis=progressionList; + transferModel.setFileProgression(progressionListBis); + updateCurrentFileInformation(); +} + +//edit the transfer list +/// \todo check and re-enable to selection +void Themes::getActionOnList(const QList &returnActions) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start, returnActions.size(): ")+QString::number(returnActions.size())); + QList returnValue=transferModel.synchronizeItems(returnActions); + totalFile+=returnValue.first(); + totalSize+=returnValue.at(1); + currentFile+=returnValue.last(); + if(transferModel.rowCount()==0) + { + ui->skipButton->setEnabled(false); + ui->progressBar_all->setValue(65535); + ui->progressBar_file->setValue(65535); + currentSize=totalSize; + if(isHidden()) + updateSysTrayIcon(); + } + else + ui->skipButton->setEnabled(true); + updateOverallInformation(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("transferModel.rowCount(): ")+QString::number(transferModel.rowCount())); +} + +void Themes::setCopyType(const Ultracopier::CopyType &type) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + this->type=type; + updateModeAndType(); +} + +void Themes::forceCopyMode(const Ultracopier::CopyMode &mode) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + modeIsForced=true; + this->mode=mode; + if(mode==Ultracopier::Copy) + ui->tabWidget->setTabText(0,tr("Copy list")); + else + ui->tabWidget->setTabText(0,tr("Move list")); + updateModeAndType(); + updateTitle(); +} + +void Themes::setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation) +{ + ui->exportTransferList->setVisible(transferListOperation & Ultracopier::TransferListOperation_Export); + ui->importTransferList->setVisible(transferListOperation & Ultracopier::TransferListOperation_Import); +} + +void Themes::haveExternalOrder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); +// ui->moreButton->toggle(); +} + +void Themes::isInPause(const bool &isInPause) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("isInPause: ")+QString::number(isInPause)); + //resume in auto the pause + storeIsInPause=isInPause; + updatePause(); +} + +void Themes::updatePause() +{ + if(storeIsInPause) + { + ui->pauseButton->setIcon(player_play); + if(stat == status_started) + ui->pauseButton->setText(facilityEngine->translateText(QStringLiteral("Resume"))); + else + ui->pauseButton->setText(facilityEngine->translateText(QStringLiteral("Start"))); + } + else + { + ui->pauseButton->setIcon(player_pause); + ui->pauseButton->setText(facilityEngine->translateText(QStringLiteral("Pause"))); + } +} + +void Themes::updateCurrentFileInformation() +{ + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) + { + QString newPath=transfertItem.from; + if(newPath.size()>(64+3)) + newPath=newPath.mid(0,32)+QStringLiteral("...")+newPath.mid(newPath.size()-32,32); + ui->from->setText(newPath); + newPath=transfertItem.to; + if(newPath.size()>(64+3)) + newPath=newPath.mid(0,32)+QStringLiteral("...")+newPath.mid(newPath.size()-32,32); + ui->to->setText(newPath); + ui->current_file->setText(transfertItem.current_file); + if(transfertItem.progressBar_read!=-1) + { + ui->progressBar_file->setRange(0,65535); + if(uiOptions->showDualProgression->isChecked()) + { + if(transfertItem.progressBar_read!=transfertItem.progressBar_write) + { + float permilleread=round((float)transfertItem.progressBar_read/65535*1000)/1000; + float permillewrite=permilleread-0.001; + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border: 1px solid grey;text-align: center;background-color: qlineargradient(spread:pad, x1:%1, y1:0, x2:%2, y2:0, stop:0 %3, stop:1 %4);}QProgressBar::chunk{background-color:%5;}") + .arg(permilleread) + .arg(permillewrite) + .arg(progressColorRemaining.name()) + .arg(progressColorRead.name()) + .arg(progressColorWrite.name()) + ); + } + else + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + ui->progressBar_file->setValue(transfertItem.progressBar_write); + } + else + ui->progressBar_file->setValue((transfertItem.progressBar_read+transfertItem.progressBar_write)/2); + } + else + ui->progressBar_file->setRange(0,0); + } + else + { + ui->from->setText(QStringLiteral("")); + ui->to->setText(QStringLiteral("")); + ui->current_file->setText(QStringLiteral("-")); + if(haveStarted && transferModel.rowCount()==0) + ui->progressBar_file->setValue(65535); + else if(!haveStarted) + ui->progressBar_file->setValue(0); + } +} + + +void Themes::on_putOnTop_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + selectedItems=selectionModel->selectedRows(); + QList ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsOnTop(ids); +} + +void Themes::on_pushUp_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + selectedItems=selectionModel->selectedRows(); + QList ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsUp(ids); +} + +void Themes::on_pushDown_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + selectedItems=selectionModel->selectedRows(); + QList ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsDown(ids); +} + +void Themes::on_putOnBottom_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + selectedItems=selectionModel->selectedRows(); + QList ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit moveItemsOnBottom(ids); +} + +void Themes::on_del_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + selectedItems=selectionModel->selectedRows(); + QList ids; + int index=0; + const int &loop_size=selectedItems.size(); + while(index0) + emit removeItems(ids); +} + +void Themes::on_cancelButton_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + this->hide(); + emit cancel(); +} + + +void Themes::speedWithProgressBar_toggled(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + ui->progressBarCurrentSpeed->setVisible(checked); + ui->currentSpeed->setVisible(!checked); +} + +void Themes::showDualProgression_toggled(bool checked) +{ + Q_UNUSED(checked); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + updateProgressionColorBar(); +} + +void Themes::checkBoxShowSpeed_toggled(bool checked) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + Q_UNUSED(checked); + updateSpeed(); +} + +void Themes::on_SliderSpeed_valueChanged(int value) +{ + if(!uiOptions->checkBoxShowSpeed->isChecked()) + return; + switch(value) + { + case 0: + currentSpeed=0; + break; + case 1: + currentSpeed=1024; + break; + case 2: + currentSpeed=1024*4; + break; + case 3: + currentSpeed=1024*16; + break; + case 4: + currentSpeed=1024*64; + break; + case 5: + currentSpeed=1024*128; + break; + } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("value: %1").arg(value)); + emit newSpeedLimitation(currentSpeed); + updateSpeed(); +} + +void Themes::uiUpdateSpeed() +{ + if(uiOptions->checkBoxShowSpeed->isChecked()) + return; + if(!uiOptions->checkBox_limitSpeed->isChecked()) + currentSpeed=0; + else + currentSpeed=uiOptions->limitSpeed->value(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("emit newSpeedLimitation(%1)").arg(currentSpeed)); + emit newSpeedLimitation(currentSpeed); +} + +void Themes::updateSpeed() +{ + ui->label_Slider_speed->setVisible(uiOptions->checkBoxShowSpeed->isChecked()); + ui->SliderSpeed->setVisible(uiOptions->checkBoxShowSpeed->isChecked()); + ui->label_SpeedMaxValue->setVisible(uiOptions->checkBoxShowSpeed->isChecked()); + uiOptions->limitSpeed->setVisible(!uiOptions->checkBoxShowSpeed->isChecked()); + uiOptions->checkBox_limitSpeed->setVisible(!uiOptions->checkBoxShowSpeed->isChecked()); + + if(uiOptions->checkBoxShowSpeed->isChecked()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("checked, currentSpeed: %1").arg(currentSpeed)); + uiOptions->limitSpeed->setEnabled(false); + if(currentSpeed==0) + { + ui->SliderSpeed->setValue(0); + ui->label_SpeedMaxValue->setText(facilityEngine->translateText(QStringLiteral("Unlimited"))); + } + else if(currentSpeed<=1024) + { + if(currentSpeed!=1024) + { + currentSpeed=1024; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(1); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*1)); + } + else if(currentSpeed<=1024*4) + { + if(currentSpeed!=1024*4) + { + currentSpeed=1024*4; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(2); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*4)); + } + else if(currentSpeed<=1024*16) + { + if(currentSpeed!=1024*16) + { + currentSpeed=1024*16; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(3); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*16)); + } + else if(currentSpeed<=1024*64) + { + if(currentSpeed!=1024*64) + { + currentSpeed=1024*64; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(4); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*64)); + } + else + { + if(currentSpeed!=1024*128) + { + currentSpeed=1024*128; + emit newSpeedLimitation(currentSpeed); + } + ui->SliderSpeed->setValue(5); + ui->label_SpeedMaxValue->setText(facilityEngine->speedToString((double)(1024*1024)*128)); + } + } + else + { + uiOptions->checkBox_limitSpeed->setChecked(currentSpeed>0); + if(currentSpeed>0) + uiOptions->limitSpeed->setValue(currentSpeed); + uiOptions->checkBox_limitSpeed->setEnabled(currentSpeed!=-1); + uiOptions->limitSpeed->setEnabled(uiOptions->checkBox_limitSpeed->isChecked()); + } +} + +void Themes::on_pauseButton_clicked() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + if(storeIsInPause) + emit resume(); + else + emit pause(); +} + +void Themes::on_skipButton_clicked() +{ + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("skip at running: %1").arg(transfertItem.id)); + emit skip(transfertItem.id); + } + else + { + if(transferModel.rowCount()>1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("skip at idle: %1").arg(transferModel.firstId())); + emit skip(transferModel.firstId()); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to skip the transfer, because no transfer running"); + } +} + +void Themes::updateModeAndType() +{ + menu->clear(); + if(modeIsForced) + { + menu->addAction(ui->actionAddFile); + if(type==Ultracopier::FileAndFolder) + menu->addAction(ui->actionAddFolder); + } + else + { + menu->addAction(ui->actionAddFileToCopy); + menu->addAction(ui->actionAddFileToMove); + if(type==Ultracopier::FileAndFolder) + { + menu->addAction(ui->actionAddFolderToCopy); + menu->addAction(ui->actionAddFolderToMove); + } + } +} + +void Themes::forcedModeAddFile() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + emit userAddFile(mode); +} + +void Themes::forcedModeAddFolder() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + emit userAddFolder(mode); +} + +void Themes::forcedModeAddFileToCopy() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + emit userAddFile(Ultracopier::Copy); +} + +void Themes::forcedModeAddFolderToCopy() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + emit userAddFolder(Ultracopier::Copy); +} + +void Themes::forcedModeAddFileToMove() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + emit userAddFile(Ultracopier::Move); +} + +void Themes::forcedModeAddFolderToMove() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + emit userAddFolder(Ultracopier::Move); +} + +void Themes::newLanguageLoaded() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + if(modeIsForced) + forceCopyMode(mode); + ui->retranslateUi(this); + uiOptions->retranslateUi(this); + uiOptions->comboBox_copyEnd->setItemText(0,tr("Don't close if errors are found")); + uiOptions->comboBox_copyEnd->setItemText(1,tr("Never close")); + uiOptions->comboBox_copyEnd->setItemText(2,tr("Always close")); + if(!haveStarted) + ui->current_file->setText(tr("File Name, 0KB")); + else + updateCurrentFileInformation(); + updateOverallInformation(); + updateSpeed(); + if(ui->tabWidget->count()>=4) + ui->tabWidget->setTabText(ui->tabWidget->count()-1,facilityEngine->translateText(QStringLiteral("Copy engine"))); + on_moreButton_toggled(ui->moreButton->isChecked()); +} + +void Themes::on_pushButtonCloseSearch_clicked() +{ + closeTheSearchBox(); +} + +//close the search box +void Themes::closeTheSearchBox() +{ + currentIndexSearch = -1; + ui->lineEditSearch->clear(); + ui->lineEditSearch->hide(); + ui->pushButtonSearchPrev->hide(); + ui->pushButtonSearchNext->hide(); + ui->pushButtonCloseSearch->hide(); + ui->searchButton->setChecked(false); + hilightTheSearch(); +} + +//search box shortcut +void Themes::searchBoxShortcut() +{ +/* if(ui->lineEditSearch->isHidden()) + {*/ + ui->lineEditSearch->show(); + ui->pushButtonSearchPrev->show(); + ui->pushButtonSearchNext->show(); + ui->pushButtonCloseSearch->show(); + ui->lineEditSearch->setFocus(Qt::ShortcutFocusReason); + ui->searchButton->setChecked(true); +/* } + else + closeTheSearchBox();*/ +} + +//hilight the search +void Themes::hilightTheSearch(bool searchNext) +{ + int result=transferModel.search(ui->lineEditSearch->text(),searchNext); + if(ui->lineEditSearch->text().isEmpty()) + ui->lineEditSearch->setStyleSheet(""); + else + { + if(result==-1) + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(255, 150, 150);")); + else + { + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(193,255,176);")); + ui->TransferList->scrollTo(transferModel.index(result,0)); + } + } +} + +void Themes::hilightTheSearchSlot() +{ + hilightTheSearch(); +} + +void Themes::on_pushButtonSearchPrev_clicked() +{ + int result=transferModel.searchPrev(ui->lineEditSearch->text()); + if(ui->lineEditSearch->text().isEmpty()) + ui->lineEditSearch->setStyleSheet(""); + else + { + if(result==-1) + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(255, 150, 150);")); + else + { + ui->lineEditSearch->setStyleSheet(QStringLiteral("background-color: rgb(193,255,176);")); + ui->TransferList->scrollTo(transferModel.index(result,0)); + } + } +} + +void Themes::on_pushButtonSearchNext_clicked() +{ + hilightTheSearch(true); +} + +void Themes::on_lineEditSearch_returnPressed() +{ + hilightTheSearch(); +} + +void Themes::on_lineEditSearch_textChanged(QString text) +{ + if(text=="") + { + TimerForSearch->stop(); + hilightTheSearch(); + } + else + TimerForSearch->start(); +} + +void Themes::on_moreButton_toggled(bool checked) +{ + if(checked) + this->setMaximumHeight(16777215); + else + this->setMaximumHeight(130); + // usefull under windows + this->updateGeometry(); + this->update(); + this->adjustSize(); +} + +/* drag event processing + +need setAcceptDrops(true); into the constructor +need implementation to accept the drop: +void dragEnterEvent(QDragEnterEvent* event); +void dragMoveEvent(QDragMoveEvent* event); +void dragLeaveEvent(QDragLeaveEvent* event); +*/ +void Themes::dropEvent(QDropEvent *event) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + const QMimeData* mimeData = event->mimeData(); + if(mimeData->hasUrls()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("hasUrls")); + emit urlDropped(mimeData->urls()); + event->acceptProposedAction(); + } +} + +void Themes::dragEnterEvent(QDragEnterEvent* event) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + // if some actions should not be usable, like move, this code must be adopted + const QMimeData* mimeData = event->mimeData(); + if(mimeData->hasUrls()) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("hasUrls")); + event->acceptProposedAction(); + } +} + +void Themes::dragMoveEvent(QDragMoveEvent* event) +{ + // if some actions should not be usable, like move, this code must be adopted + const QMimeData* mimeData = event->mimeData(); + if(mimeData->hasUrls()) + event->acceptProposedAction(); +} + +void Themes::dragLeaveEvent(QDragLeaveEvent* event) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + event->accept(); +} + +void Themes::on_searchButton_toggled(bool checked) +{ + if(checked) + searchBoxShortcut(); + else + closeTheSearchBox(); +} + +void Themes::on_exportTransferList_clicked() +{ + emit exportTransferList(); +} + +void Themes::on_importTransferList_clicked() +{ + emit importTransferList(); +} + +void Themes::progressColorWrite_clicked() +{ + QColor color=QColorDialog::getColor(progressColorWrite,this,tr("Select a color")); + if(!color.isValid()) + return; + progressColorWrite=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorWrite); + uiOptions->progressColorWrite->setIcon(pixmap); + updateProgressionColorBar(); +} + +void Themes::progressColorRead_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRead,this,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRead=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRead); + uiOptions->progressColorRead->setIcon(pixmap); + updateProgressionColorBar(); +} + +void Themes::progressColorRemaining_clicked() +{ + QColor color=QColorDialog::getColor(progressColorRemaining,this,tr("Select a color")); + if(!color.isValid()) + return; + progressColorRemaining=color; + QPixmap pixmap(75,20); + pixmap.fill(progressColorRemaining); + uiOptions->progressColorRemaining->setIcon(pixmap); + updateProgressionColorBar(); +} + +void Themes::alwaysOnTop_clicked(bool reshow) +{ + Qt::WindowFlags flags = windowFlags(); + #ifdef Q_OS_WIN32 + if(uiOptions->alwaysOnTop->isChecked()) + SetWindowPos((HWND)this->winId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + else + SetWindowPos((HWND)this->winId(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + #endif + #ifdef Q_OS_LINUX + if(uiOptions->alwaysOnTop->isChecked()) + flags=flags | Qt::X11BypassWindowManagerHint; + else + flags=flags & ~Qt::X11BypassWindowManagerHint; + #endif + if(uiOptions->alwaysOnTop->isChecked()) + flags=flags | Qt::WindowStaysOnTopHint; + else + flags=flags & ~Qt::WindowStaysOnTopHint; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"uiOptions->alwaysOnTop->isChecked(): "+QString::number(uiOptions->alwaysOnTop->isChecked())+", flags: "+QString::number(flags)); + setWindowFlags(flags); + if(reshow) + show(); +} + +void Themes::alwaysOnTop_clickedSlot() +{ + alwaysOnTop_clicked(true); +} + +void Themes::updateProgressionColorBar() +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + uiOptions->labelProgressionColor->setVisible(uiOptions->showDualProgression->isChecked()); + uiOptions->frameProgressionColor->setVisible(uiOptions->showDualProgression->isChecked()); + if(!uiOptions->showDualProgression->isChecked()) + { + /*ui->progressBar_all->setStyleSheet(""); + ui->progressBar_file->setStyleSheet(""); + ui->progressBarCurrentSpeed->setStyleSheet("");*/ + } + else + { + ui->progressBar_all->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + ui->progressBarCurrentSpeed->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + } + if(stat==status_never_started) + updateCurrentFileInformation(); +} + +void Themes::updateTitle() +{ + if(uiOptions->showProgressionInTheTitle->isChecked() && totalSize>0) + { + if(!modeIsForced) + this->setWindowTitle(tr("%1 %2% of %3").arg(facilityEngine->translateText("Transfer")).arg((currentSize*100)/totalSize).arg(facilityEngine->sizeToString(totalSize))+QStringLiteral(" - ")+facilityEngine->softwareName()); + else + { + if(mode==Ultracopier::Copy) + this->setWindowTitle(tr("%1 %2% of %3").arg(facilityEngine->translateText("Copy")).arg((currentSize*100)/totalSize).arg(facilityEngine->sizeToString(totalSize))+QStringLiteral(" - ")+facilityEngine->softwareName()); + else + this->setWindowTitle(tr("%1 %2% of %3").arg(facilityEngine->translateText("Move")).arg((currentSize*100)/totalSize).arg(facilityEngine->sizeToString(totalSize))+QStringLiteral(" - ")+facilityEngine->softwareName()); + } + } + else + { + if(!modeIsForced) + this->setWindowTitle(QStringLiteral("%1").arg(facilityEngine->translateText("Transfer"))+QStringLiteral(" - ")+facilityEngine->softwareName()); + else + { + if(mode==Ultracopier::Copy) + this->setWindowTitle(QStringLiteral("%1").arg(facilityEngine->translateText("Copy"))+QStringLiteral(" - ")+facilityEngine->softwareName()); + else + this->setWindowTitle(QStringLiteral("%1").arg(facilityEngine->translateText("Move"))+QStringLiteral(" - ")+facilityEngine->softwareName()); + } + } +} + +/** \brief Create progessive icon + +Do QIcon with top and bottom image mixed and percent writed on it. +The icon it be search in the style path. +Do by mongaulois, remake by alpha_one_x86. +\param percent indique how many percent need be showed, sould be between 0 and 100 +\param text The showed text if needed (optionnal) +\return QIcon of the final image +\note Can be used as it: dynaIcon(75,"...") +*/ +QIcon Themes::dynaIcon(int percent,QString text) const +{ + #ifdef ULTRACOPIER_PLUGIN_DEBUG + if(pixmapTop.isNull() || pixmapBottom.isNull()) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Error loading the icons"); + #endif + if(percent==-1) + percent=getOldProgression; + if(percent<0) + percent=0; + if(percent>100) + percent=100; + //pixmap avec un fond transparent + #ifdef Q_OS_WIN32 + quint8 imageSize=16; + #else + quint8 imageSize=22; + #endif + QPixmap resultImage(imageSize,imageSize); + resultImage.fill(Qt::transparent); + { + QPainter painter(&resultImage); + #ifndef Q_OS_WIN32 + QFont font(QStringLiteral("Courier New"),9); + font.setBold(true); + font.setKerning(true); + painter.setFont(font); + #endif + #ifdef Q_OS_WIN32 + QFont font(QStringLiteral("Courier New"),8); + font.setBold(true); + font.setKerning(true); + painter.setFont(font); + #endif + + //preprocessing the calcul + quint8 bottomPixel=(percent*imageSize)/100; + quint8 topPixel=imageSize-bottomPixel; + + //top image + if(topPixel>0) + { + QRect target(0, 0, imageSize, topPixel); + QRect source(0, 0, imageSize, topPixel); + painter.drawPixmap(target, pixmapTop, source); + } + + //bottom image + if(bottomPixel>0) + { + QRect target2(0, topPixel, imageSize, bottomPixel); + QRect source2(0, topPixel, imageSize, bottomPixel); + painter.drawPixmap(target2, pixmapBottom, source2); + } + + qint8 textxOffset=0; + qint8 textyOffset=0; + if(text.isEmpty()) + { + if(percent!=100) + text=QString::number(percent); + else + { + text=QStringLiteral(":)"); + #ifdef Q_OS_WIN32 + textyOffset-=2; + #else + textyOffset-=1; + #endif + } + } + if(text.size()==1) + { + textxOffset+=3; + #ifdef Q_OS_WIN32 + textxOffset-=1; + #endif + } + else + { + #ifdef Q_OS_WIN32 + textxOffset-=1; + #endif + } + #ifndef Q_OS_WIN32 + textxOffset+=2; + textyOffset+=3; + #endif + painter.setPen(QPen(Qt::black)); + painter.drawText(3+textxOffset,13+textyOffset,text); + painter.setPen(QPen(Qt::white)); + painter.drawText(2+textxOffset,12+textyOffset,text); + } + return QIcon(resultImage); +} + +/** \brief For catch an action on the systray icon +\param reason Why it activated +*/ +void Themes::catchAction(QSystemTrayIcon::ActivationReason reason) +{ + if(reason==QSystemTrayIcon::DoubleClick || reason==QSystemTrayIcon::Trigger) + { + sysTrayIcon->hide(); + this->show(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"Double Click detected"); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("reason: %1").arg(reason)); +} + +void Themes::on_exportErrorToTransferList_clicked() +{ + emit exportErrorIntoTransferList(); +} diff --git a/plugins-alternative/Themes/Supercopier/interface.h b/plugins-alternative/Themes/Supercopier/interface.h new file mode 100644 index 0000000..6929f07 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/interface.h @@ -0,0 +1,221 @@ +/** \file interface.h +\brief Define the interface +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef INTERFACE_H +#define INTERFACE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_Themes.h" + +#include "ui_interface.h" +#include "ui_themesOptions.h" +#include "Environment.h" +#include "TransferModel.h" + +// for windows progress bar +#ifndef __GNUC__ +#include +#endif + +namespace Ui { + class interfaceCopy; + class themesOptions; +} + +/// \brief Define the interface +class Themes : public PluginInterface_Themes +{ + Q_OBJECT +public: + Themes(const bool &alwaysOnTop, + const bool &showProgressionInTheTitle, + const QColor &progressColorWrite, + const QColor &progressColorRead, + const QColor &progressColorRemaining, + const bool &showDualProgression, + const quint8 &comboBox_copyEnd, + const bool &speedWithProgressBar, + const qint32 ¤tSpeed, + const bool &checkBoxShowSpeed, + FacilityInterface * facilityEngine, + const bool &moreButtonPushed, + const bool &minimizeToSystray); + ~Themes(); + //send information about the copy + /// \brief to set the action in progress + void actionInProgess(const Ultracopier::EngineActionInProgress &); + /// \brief the new folder is listing + void newFolderListing(const QString &path); + /** \brief show the detected speed + * in byte per seconds */ + void detectedSpeed(const quint64 &speed); + /** \brief show the remaining time + * time in seconds */ + void remainingTime(const int &remainingSeconds); + /// \brief set the current collision action + void newCollisionAction(const QString &action); + /// \brief set the current error action + void newErrorAction(const QString &action); + /// \brief set one error is detected + void errorDetected(); + /// \brief new error + void errorToRetry(const QString &source,const QString &destination,const QString &error); + /** \brief support speed limitation */ + void setSupportSpeedLimitation(const bool &supportSpeedLimitationBool); + //get information about the copy + /// \brief show the general progression + void setGeneralProgression(const quint64 ¤t,const quint64 &total); + /// \brief show the file progression + void setFileProgression(const QList &progressionList); + /// \brief set the copyType -> file or folder + void setCopyType(const Ultracopier::CopyType &); + /// \brief set the copyMove -> copy or move, to force in copy or move, else support both + void forceCopyMode(const Ultracopier::CopyMode &); + /// \brief set if transfer list is exportable/importable + void setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation); + //edit the transfer list + /// \brief get action on the transfer list (add/move/remove) + void getActionOnList(const QList &returnActions); + /** \brief set if the order is external (like file manager copy) + * to notify the interface, which can hide add folder/filer button */ + void haveExternalOrder(); + /// \brief set if is in pause + void isInPause(const bool &); + /// \brief get the widget for the copy engine + QWidget * getOptionsEngineWidget(); + /// \brief to set if the copy engine is found + void getOptionsEngineEnabled(const bool &isEnabled); + enum status{status_never_started,status_started,status_stopped}; + status stat; +public slots: + /// \brief set the translate + void newLanguageLoaded(); +private slots: + void on_putOnTop_clicked(); + void on_pushUp_clicked(); + void on_pushDown_clicked(); + void on_putOnBottom_clicked(); + void on_del_clicked(); + void on_cancelButton_clicked(); + void speedWithProgressBar_toggled(bool checked); + void showDualProgression_toggled(bool checked); + void checkBoxShowSpeed_toggled(bool checked); + void on_SliderSpeed_valueChanged(int value); + void on_pauseButton_clicked(); + void on_skipButton_clicked(); + void forcedModeAddFile(); + void forcedModeAddFolder(); + void forcedModeAddFileToCopy(); + void forcedModeAddFolderToCopy(); + void forcedModeAddFileToMove(); + void forcedModeAddFolderToMove(); + void uiUpdateSpeed(); + void on_pushButtonCloseSearch_clicked(); + //close the search box + void closeTheSearchBox(); + //search box shortcut + void searchBoxShortcut(); + //hilight the search + void hilightTheSearch(bool searchNext=false); + void hilightTheSearchSlot(); + //auto connect + void on_pushButtonSearchPrev_clicked(); + void on_pushButtonSearchNext_clicked(); + void on_lineEditSearch_returnPressed(); + void on_lineEditSearch_textChanged(QString text); + void on_moreButton_toggled(bool checked); + void on_searchButton_toggled(bool checked); + void on_exportTransferList_clicked(); + void on_importTransferList_clicked(); + void progressColorWrite_clicked(); + void progressColorRead_clicked(); + void progressColorRemaining_clicked(); + void alwaysOnTop_clicked(bool reshow); + void alwaysOnTop_clickedSlot(); + void updateProgressionColorBar(); + void updateTitle(); + void catchAction(QSystemTrayIcon::ActivationReason reason); + void on_exportErrorToTransferList_clicked(); + +private: + QTime duration; + bool durationStarted; + QPixmap pixmapTop,pixmapBottom; + QColor progressColorWrite,progressColorRead,progressColorRemaining; + Ui::interfaceCopy *ui; + Ui::themesOptions *uiOptions; + quint64 currentFile; + quint64 totalFile; + quint64 currentSize; + quint64 totalSize; + quint8 getOldProgression; + QSystemTrayIcon *sysTrayIcon; + void updateOverallInformation(); + void updateCurrentFileInformation(); + QMenu *menu; + Ultracopier::EngineActionInProgress action; + void closeEvent(QCloseEvent *event); + qint32 currentSpeed;///< in KB/s, assume as 0KB/s as default like every where + void updateSpeed(); + bool storeIsInPause; + bool modeIsForced; + Ultracopier::CopyType type; + Ultracopier::CopyMode mode; + void updateModeAndType(); + bool haveStarted; + bool haveError; + QWidget optionEngineWidget; + QShortcut *searchShortcut; + QShortcut *searchShortcut2; + QShortcut *searchShortcut3; + QTimer *TimerForSearch; + int currentIndexSearch; ///< Current index search in starting at the end + FacilityInterface * facilityEngine; + QItemSelectionModel *selectionModel; + QModelIndexList selectedItems; + /// \brief the custom transfer model + TransferModel transferModel; + + static QIcon player_play,player_pause; + + /** \brief drag event processing + + need setAcceptDrops(true); into the constructor + need implementation to accept the drop: + void dragEnterEvent(QDragEnterEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + */ + void dropEvent(QDropEvent *event); + /** \brief accept all event to allow the drag and drop + \see dropEvent() */ + void dragEnterEvent(QDragEnterEvent* event); + /** \brief accept all event to allow the drag and drop + \see dropEvent() */ + void dragMoveEvent(QDragMoveEvent* event); + /** \brief accept all event to allow the drag and drop + \see dropEvent() */ + void dragLeaveEvent(QDragLeaveEvent* event); + //have functionality + bool shutdown; + void updatePause(); + QIcon dynaIcon(int percent,QString text="") const; + void updateSysTrayIcon(); +signals: + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne) const; +}; + +#endif // INTERFACE_H diff --git a/plugins-alternative/Themes/Supercopier/interface.pro b/plugins-alternative/Themes/Supercopier/interface.pro new file mode 100644 index 0000000..809a84c --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/interface.pro @@ -0,0 +1,59 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets +TEMPLATE = lib +CONFIG += plugin +HEADERS = interface.h \ + StructEnumDefinition.h \ + factory.h \ + DebugEngineMacro.h \ + Environment.h \ + Variable.h \ + ../../../interface/PluginInterface_Themes.h \ + ../../../interface/FacilityInterface.h \ + ../../../interface/OptionInterface.h \ + TransferModel.h +SOURCES = interface.cpp \ + factory.cpp \ + TransferModel.cpp +TARGET = $$qtLibraryTarget(interface) +TRANSLATIONS += Languages/ar/translation.ts \ + Languages/de/translation.ts \ + Languages/el/translation.ts \ + Languages/en/translation.ts \ + Languages/es/translation.ts \ + Languages/fr/translation.ts \ + Languages/hi/translation.ts \ + Languages/hu/translation.ts \ + Languages/id/translation.ts \ + Languages/it/translation.ts \ + Languages/ja/translation.ts \ + Languages/ko/translation.ts \ + Languages/nl/translation.ts \ + Languages/no/translation.ts \ + Languages/pl/translation.ts \ + Languages/pt/translation.ts \ + Languages/ru/translation.ts \ + Languages/th/translation.ts \ + Languages/tr/translation.ts \ + Languages/zh/translation.ts + +win32 { + RESOURCES += +} +!win32 { + RESOURCES += +} + +!CONFIG(static) { +RESOURCES += \ + interfaceResources.qrc \ + interfaceResources_unix.qrc \ + interfaceResources_windows.qrc +} + +FORMS += \ + interface.ui \ + themesOptions.ui diff --git a/plugins-alternative/Themes/Supercopier/interface.ui b/plugins-alternative/Themes/Supercopier/interface.ui new file mode 100644 index 0000000..e5b84a5 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/interface.ui @@ -0,0 +1,845 @@ + + + interfaceCopy + + + + 0 + 0 + 508 + 448 + + + + Supercopier + + + + :/Themes/Supercopier/resources/main.png:/Themes/Supercopier/resources/main.png + + + + 2 + + + 1 + + + + + 2 + + + + + From: + + + + + + + + 0 + 0 + + + + + + + Qt::PlainText + + + + + + + true + + + + + + + + + 5 + + + + + To: + + + + + + + + 0 + 0 + + + + + + + Qt::PlainText + + + + + + + + + + + File 0/0, Total: 0KB + + + Qt::PlainText + + + + + + + Qt::RichText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 20 + 20 + + + + Close at the end of the transfers + + + + :/Themes/Supercopier/resources/SystemTrayIcon/exit.png:/Themes/Supercopier/resources/SystemTrayIcon/exit.png + + + true + + + true + + + + + + + + + + 16777215 + 16 + + + + 65535 + + + + + + + File Name, 0KB + + + Qt::PlainText + + + + + + + + 16777215 + 16 + + + + 65535 + + + + + + + 4 + + + + + + 0 + 0 + + + + + 60 + 0 + + + + 0KB/sec + + + + + + + + 16777215 + 16 + + + + 1 + + + 0 + + + 0KB/sec + + + + + + + &More + + + + :/Themes/Supercopier/resources/moveDown.png:/Themes/Supercopier/resources/moveDown.png + + + true + + + true + + + + + + + false + + + &Pause + + + + :/Themes/Supercopier/resources/player_pause.png:/Themes/Supercopier/resources/player_pause.png + + + + + + + false + + + &Skip + + + + :/Themes/Supercopier/resources/player_end.png:/Themes/Supercopier/resources/player_end.png + + + + + + + &Cancel + + + + :/Themes/Supercopier/resources/cancel.png:/Themes/Supercopier/resources/cancel.png + + + + + + + + + + + Limit copy speed to: + + + + + + + 5 + + + Qt::Horizontal + + + + + + + Unlimited + + + + + + + Qt::Horizontal + + + + 40 + 1 + + + + + + + + + + 0 + + + + Transfer list + + + + + + 1 + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move the selected items to the top + + + + :/Themes/Supercopier/resources/putOnTop.png:/Themes/Supercopier/resources/putOnTop.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move up the selected items + + + + :/Themes/Supercopier/resources/moveUp.png:/Themes/Supercopier/resources/moveUp.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move down the selected items + + + + :/Themes/Supercopier/resources/moveDown.png:/Themes/Supercopier/resources/moveDown.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Move the selected items to the bottom + + + + :/Themes/Supercopier/resources/putOnBottom.png:/Themes/Supercopier/resources/putOnBottom.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Add file/folder + + + + :/Themes/Supercopier/resources/add.png:/Themes/Supercopier/resources/add.png + + + QToolButton::InstantPopup + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Delete the selected items + + + + :/Themes/Supercopier/resources/remove.png:/Themes/Supercopier/resources/remove.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Search + + + + :/Themes/Supercopier/resources/search.png:/Themes/Supercopier/resources/search.png + + + true + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Export the transfer list + + + + :/Themes/Supercopier/resources/export-transfer-list.png:/Themes/Supercopier/resources/export-transfer-list.png + + + true + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Import the transfer list + + + + :/Themes/Supercopier/resources/import-transfer-list.png:/Themes/Supercopier/resources/import-transfer-list.png + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + 0 + + + + + QAbstractItemView::ExtendedSelection + + + false + + + true + + + + + + + 0 + + + + + + + + Previous + + + + + + + Next + + + + + + + + 25 + 25 + + + + + 25 + 25 + + + + + :/Themes/Supercopier/resources/remove.png:/Themes/Supercopier/resources/remove.png + + + true + + + + + + + + + + + + Error + + + + + + + + + 22 + 22 + + + + + 22 + 22 + + + + Export the errors into transfer list + + + + :/Themes/Supercopier/resources/export-transfer-list.png:/Themes/Supercopier/resources/export-transfer-list.png + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + QAbstractItemView::NoSelection + + + false + + + true + + + + Source + + + + + Destination + + + + + Error + + + + + + + + + Interface + + + + 0 + + + 0 + + + + + true + + + + + 0 + 0 + 492 + 243 + + + + + + + + + + + + + + :/Themes/Supercopier/resources/add.png:/Themes/Supercopier/resources/add.png + + + Add file + + + + + + :/Themes/Supercopier/resources/add.png:/Themes/Supercopier/resources/add.png + + + Add folder + + + + + + :/Themes/Supercopier/resources/add.png:/Themes/Supercopier/resources/add.png + + + Move file(s) + + + + + + :/Themes/Supercopier/resources/add.png:/Themes/Supercopier/resources/add.png + + + Move folder + + + + + + :/Themes/Supercopier/resources/add.png:/Themes/Supercopier/resources/add.png + + + Copy file(s) + + + + + + :/Themes/Supercopier/resources/add.png:/Themes/Supercopier/resources/add.png + + + Copy folder + + + + + + + + + moreButton + toggled(bool) + tabWidget + setVisible(bool) + + + 218 + 144 + + + 149 + 305 + + + + + diff --git a/plugins-alternative/Themes/Supercopier/interfaceResources.qrc b/plugins-alternative/Themes/Supercopier/interfaceResources.qrc new file mode 100644 index 0000000..d8990aa --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/interfaceResources.qrc @@ -0,0 +1,24 @@ + + + resources/add.png + resources/cancel.png + resources/main.png + resources/moveDown.png + resources/moveUp.png + resources/player_end.png + resources/player_pause.png + resources/player_play.png + resources/putOnBottom.png + resources/putOnTop.png + resources/remove.png + resources/search.png + resources/export-transfer-list.png + resources/import-transfer-list.png + resources/SystemTrayIcon/add.png + resources/SystemTrayIcon/exit.png + resources/SystemTrayIcon/informations.png + resources/SystemTrayIcon/options.png + resources/progressbarleft.png + resources/progressbarright.png + + diff --git a/plugins-alternative/Themes/Supercopier/interfaceResources_unix.qrc b/plugins-alternative/Themes/Supercopier/interfaceResources_unix.qrc new file mode 100644 index 0000000..52bc325 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/interfaceResources_unix.qrc @@ -0,0 +1,9 @@ + + + resources/SystemTrayIcon/systray_Caught_Unix.png + resources/SystemTrayIcon/systray_Semiuncaught_Unix.png + resources/SystemTrayIcon/systray_Uncaught_Unix.png + resources/SystemTrayIcon/systray_Top_Progress_Unix.png + resources/SystemTrayIcon/systray_Bottom_Progress_Unix.png + + diff --git a/plugins-alternative/Themes/Supercopier/interfaceResources_windows.qrc b/plugins-alternative/Themes/Supercopier/interfaceResources_windows.qrc new file mode 100644 index 0000000..aed7063 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/interfaceResources_windows.qrc @@ -0,0 +1,9 @@ + + + resources/SystemTrayIcon/systray_Caught_Windows.png + resources/SystemTrayIcon/systray_Semiuncaught_Windows.png + resources/SystemTrayIcon/systray_Uncaught_Windows.png + resources/SystemTrayIcon/systray_Top_Progress_Windows.png + resources/SystemTrayIcon/systray_Bottom_Progress_Windows.png + + diff --git a/plugins-alternative/Themes/Supercopier/plugin.json b/plugins-alternative/Themes/Supercopier/plugin.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/plugin.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/add.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/add.png new file mode 100644 index 0000000..d41fce6 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/add.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/exit.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/exit.png new file mode 100644 index 0000000..9599bba Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/exit.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/informations.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/informations.png new file mode 100644 index 0000000..86c9ba6 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/informations.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/options.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/options.png new file mode 100644 index 0000000..cf699d5 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/options.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Unix.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Unix.png new file mode 100644 index 0000000..543aaf1 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Unix.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Windows.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Windows.png new file mode 100644 index 0000000..ff110d9 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Bottom_Progress_Windows.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Unix.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Unix.png new file mode 100644 index 0000000..be2ba20 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Unix.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Windows.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Windows.png new file mode 100644 index 0000000..9c597af Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Caught_Windows.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png new file mode 100644 index 0000000..be2ba20 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png new file mode 100644 index 0000000..9c597af Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Unix.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Unix.png new file mode 100644 index 0000000..1d93cb1 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Unix.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Windows.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Windows.png new file mode 100644 index 0000000..2074ee8 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Top_Progress_Windows.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Unix.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Unix.png new file mode 100644 index 0000000..4da8cc0 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Windows.png b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Windows.png new file mode 100644 index 0000000..8bfbcf9 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/SystemTrayIcon/systray_Uncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/add.png b/plugins-alternative/Themes/Supercopier/resources/add.png new file mode 100644 index 0000000..af8a401 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/add.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/cancel.png b/plugins-alternative/Themes/Supercopier/resources/cancel.png new file mode 100644 index 0000000..1e7579c Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/cancel.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/export-transfer-list.png b/plugins-alternative/Themes/Supercopier/resources/export-transfer-list.png new file mode 100644 index 0000000..2bcc455 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/export-transfer-list.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/import-transfer-list.png b/plugins-alternative/Themes/Supercopier/resources/import-transfer-list.png new file mode 100644 index 0000000..d208342 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/import-transfer-list.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/main.png b/plugins-alternative/Themes/Supercopier/resources/main.png new file mode 100644 index 0000000..9bec399 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/main.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/moveDown.png b/plugins-alternative/Themes/Supercopier/resources/moveDown.png new file mode 100644 index 0000000..7f4ff27 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/moveDown.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/moveUp.png b/plugins-alternative/Themes/Supercopier/resources/moveUp.png new file mode 100644 index 0000000..9397b76 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/moveUp.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/player_end.png b/plugins-alternative/Themes/Supercopier/resources/player_end.png new file mode 100644 index 0000000..9730302 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/player_end.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/player_pause.png b/plugins-alternative/Themes/Supercopier/resources/player_pause.png new file mode 100644 index 0000000..429ae43 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/player_pause.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/player_play.png b/plugins-alternative/Themes/Supercopier/resources/player_play.png new file mode 100644 index 0000000..a28ac73 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/player_play.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/progressbarleft.png b/plugins-alternative/Themes/Supercopier/resources/progressbarleft.png new file mode 100644 index 0000000..bbee9c8 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/progressbarleft.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/progressbarright.png b/plugins-alternative/Themes/Supercopier/resources/progressbarright.png new file mode 100644 index 0000000..93e5781 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/progressbarright.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/putOnBottom.png b/plugins-alternative/Themes/Supercopier/resources/putOnBottom.png new file mode 100644 index 0000000..9ac517c Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/putOnBottom.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/putOnTop.png b/plugins-alternative/Themes/Supercopier/resources/putOnTop.png new file mode 100644 index 0000000..5682829 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/putOnTop.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/remove.png b/plugins-alternative/Themes/Supercopier/resources/remove.png new file mode 100644 index 0000000..3a2a9f1 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/remove.png differ diff --git a/plugins-alternative/Themes/Supercopier/resources/search.png b/plugins-alternative/Themes/Supercopier/resources/search.png new file mode 100644 index 0000000..567f498 Binary files /dev/null and b/plugins-alternative/Themes/Supercopier/resources/search.png differ diff --git a/plugins-alternative/Themes/Supercopier/themesOptions.ui b/plugins-alternative/Themes/Supercopier/themesOptions.ui new file mode 100644 index 0000000..46c7f97 --- /dev/null +++ b/plugins-alternative/Themes/Supercopier/themesOptions.ui @@ -0,0 +1,384 @@ + + + themesOptions + + + + 0 + 0 + 540 + 325 + + + + + 0 + + + 0 + + + + + 0 + + + + + 0 + 0 + 530 + 237 + + + + Use + + + + + + Start with the "more button" pushed + + + + + + + + + + Always on top + + + + + + + + + + Minimize on close to systray + + + + + + + + + + At the end of the copy + + + + + + + + Don't close if errors are found + + + + + Never close + + + + + Always close + + + + + + + + Limit copy speed to + + + + + + + 5 + + + Qt::Horizontal + + + + + + + Unlimited + + + + + + + Limit copy speed to + + + + + + + false + + + KB/s + + + 1 + + + 999999 + + + + + + + Qt::Vertical + + + + 20 + 71 + + + + + + + + + + 0 + 0 + 241 + 33 + + + + Informations + + + + + + Show speed as main information + + + + + + + + + + Qt::Vertical + + + + 20 + 201 + + + + + + + + + + 0 + 0 + 441 + 107 + + + + Display + + + + + + Speed with progress bar + + + + + + + + + + Show progression in the title + + + + + + + + + + Show dual progression + + + + + + + + + + Progression color + + + + + + + + 225 + 20 + + + + + 225 + 20 + + + + Click to edit the color + + + + 0 + + + 0 + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + 75 + 20 + + + + + 75 + 20 + + + + + 75 + 20 + + + + true + + + + + + + + + + Qt::Vertical + + + + 20 + 127 + + + + + + + + + + + + + + checkBox_limitSpeed + clicked(bool) + limitSpeed + setEnabled(bool) + + + 109 + 144 + + + 199 + 144 + + + + + diff --git a/plugins-alternative/Themes/Teracopy/DebugEngineMacro.h b/plugins-alternative/Themes/Teracopy/DebugEngineMacro.h index a3dd648..4582010 100644 --- a/plugins-alternative/Themes/Teracopy/DebugEngineMacro.h +++ b/plugins-alternative/Themes/Teracopy/DebugEngineMacro.h @@ -1,12 +1,15 @@ /** \file DebugEngineMacro.h \brief Define the macro for the debug \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef DEBUGENGINEMACRO_H #define DEBUGENGINEMACRO_H +#ifdef WIN32 +# define __func__ __FUNCTION__ +#endif + /// \brief Macro for the debug log #ifdef ULTRACOPIER_PLUGIN_DEBUG #if defined (__FILE__) && defined (__LINE__) diff --git a/plugins-alternative/Themes/Teracopy/Environment.h b/plugins-alternative/Themes/Teracopy/Environment.h index 94fd104..265a5a6 100644 --- a/plugins-alternative/Themes/Teracopy/Environment.h +++ b/plugins-alternative/Themes/Teracopy/Environment.h @@ -1,8 +1,7 @@ /** \file Environment.h \brief Define the environment variable and global function \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #include "Variable.h" /// \brief The global include diff --git a/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/ar/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts index 237dc4f..a2da10c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/de/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 Total: %1 von %2 - + %1 of %2 %1 von %2 - + %1% done %1% erledigt @@ -24,27 +24,27 @@ &More - Mehr + &Mehr ... - + ... &Pause - + &Pause &Skip - überspringen + überspringen (&S) &Cancel - Stornieren + Abbrechen (&C) @@ -72,22 +72,22 @@ p, li { white-space: pre-wrap; } Move file(s) - Bewegen Sie Datei (en) + Datei (en) verschieben Move folder - bewegen Sie Ordner + Ordner verschieben Copy file(s) - Kopieren Sie die Datei (en) + Datei (en) kopieren Copy folder - kopieren Sie das Verzeichnis + Verzeichnis kopieren diff --git a/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/el/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/en/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/en/translation.ts new file mode 100644 index 0000000..d9fb1d6 --- /dev/null +++ b/plugins-alternative/Themes/Teracopy/Languages/en/translation.ts @@ -0,0 +1,89 @@ + + + + + Themes + + + Total: %1 of %2 + + + + + %1 of %2 + + + + + %1% done + + + + + 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> + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts index fe526da..5081c0f 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/es/translation.ts @@ -2,21 +2,21 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - Total: %1 de %2 + Total: %1 de %2 - + %1 of %2 - %1 de %2 + %1 de %2 - + %1% done - %1% hecho + %1% hecho diff --git a/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts index 42ac61d..fd6eaa1 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/fr/translation.ts @@ -2,20 +2,21 @@ - InterfacePlugin + Themes - + Total: %1 of %2 Total: %1 sur %2 - + %1 of %2 %1 sur %2 - + %1% done + Exemple: 90% fait %1% fait diff --git a/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/hi/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/hu/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/hu/translation.ts new file mode 100644 index 0000000..3d940b4 --- /dev/null +++ b/plugins-alternative/Themes/Teracopy/Languages/hu/translation.ts @@ -0,0 +1,93 @@ + + + + + Themes + + + Total: %1 of %2 + Összesen: %1 / %2 + + + + %1 of %2 + %1 / %2 + + + + %1% done + %1% kész + + + + interfaceCopy + + + &More + &Több + + + + ... + ... + + + + &Pause + &Szünet + + + + &Skip + &Kihagy + + + + &Cancel + &Mégse + + + + <!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;">Támogasd az Ultracopier-t</span></a></p></body></html> + + + + Add file + Fájl hozzáadása + + + + Add folder + Mappa hozzáadása + + + + Move file(s) + Fájl(ok) mozgatása + + + + Move folder + Mappa mozgatása + + + + Copy file(s) + Fájl(ok) másolása + + + + Copy folder + Mappa másolása + + + diff --git a/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/id/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts index 746b8a6..31d775e 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/it/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 Totale: %1 di %2 - + %1 of %2 %1 di %2 - + %1% done %1% fatto @@ -24,27 +24,27 @@ &More - Di più + Alt&o ... - + ... &Pause - Pausa + &Pausa &Skip - Saltare + &Salta &Cancel - Annullare + &Annulla @@ -57,7 +57,7 @@ p, li { white-space: pre-wrap; } <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> +<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;">Supporto Ultracopier</span></a></p></body></html> @@ -72,17 +72,17 @@ p, li { white-space: pre-wrap; } Move file(s) - Spostare file(s) + Sposta file Move folder - Spostare la cartella + Sposta la cartella Copy file(s) - Copiare il file(s) + Copia file diff --git a/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/ja/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts index 6c66c5a..06946e9 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/ko/translation.ts @@ -2,9 +2,9 @@ - InterfacePlugin + Themes - + Total: %1 of %2 전체: %3 / %2 {1 ?} @@ -14,7 +14,7 @@ %1 / %2 - + %1% done %1% 완료 diff --git a/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/nl/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/no/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/pl/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts index 1219c56..db1059e 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/ru/translation.ts @@ -2,21 +2,21 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - Всего: %1 из %2 + Всего: %1 из %2 - + %1 of %2 - %1 из %2 + %1 из %2 - + %1% done - %1% сделанный + %1% сделанный diff --git a/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/th/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/tr/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts b/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts index 33cd084..b76694c 100644 --- a/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts +++ b/plugins-alternative/Themes/Teracopy/Languages/zh/translation.ts @@ -2,19 +2,19 @@ - InterfacePlugin + Themes - + Total: %1 of %2 - + %1 of %2 - + %1% done diff --git a/plugins-alternative/Themes/Teracopy/TransferModel.cpp b/plugins-alternative/Themes/Teracopy/TransferModel.cpp index 569d31c..24812a0 100644 --- a/plugins-alternative/Themes/Teracopy/TransferModel.cpp +++ b/plugins-alternative/Themes/Teracopy/TransferModel.cpp @@ -6,145 +6,146 @@ TransferModel::TransferModel() { - iconStart=QIcon(":/resources/player_play.png"); - iconPause=QIcon(":/resources/player_pause.png"); - iconStop=QIcon(":/resources/checkbox.png"); - currentIndexSearch=0; - haveSearchItem=false; + iconStart=QIcon(":/Themes/Teracopy/resources/player_play.png"); + iconPause=QIcon(":/Themes/Teracopy/resources/player_pause.png"); + iconStop=QIcon(":/Themes/Teracopy/resources/checkbox.png"); + currentIndexSearch=0; + haveSearchItem=false; + facilityEngine=NULL; } int TransferModel::columnCount( const QModelIndex& parent ) const { - return parent == QModelIndex() ? COLUMN_COUNT : 0; + 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(); + 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(); + 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; + return parent == QModelIndex() ? transfertItemList.count() : 0; } quint64 TransferModel::firstId() { - if(transfertItemList.count()>0) - return transfertItemList[0].id; - else - return 0; + 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"); - } - } + 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 ); + 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; + 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; + 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; } /* @@ -152,290 +153,376 @@ bool TransferModel::setData( const QModelIndex& index, const QVariant& value, in Return[1]: totalSize Return[2]: currentFile */ -QList TransferModel::synchronizeItems(const QList& returnActions) +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; + 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; + transfertItemList<(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.moveAt<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.moveAt>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("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 Ultracopier::RemoveItem: + { + if(currentIndexSearch>0 && action.userAction.position<=currentIndexSearch) + currentIndexSearch--; + if(action.userAction.position<0) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("id: %1, position is wrong: %3").arg(action.addAction.id).arg(action.userAction.position)); + break; + } + if(action.userAction.position>(transfertItemList.size()-1)) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("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); + internalRunningOperation.remove(action.addAction.id); + } + break; + case Ultracopier::PreOperation: + { + ItemOfCopyListWithMoreInformations tempItem; + tempItem.currentReadProgression=0; + tempItem.currentWriteProgression=0; + tempItem.generalData=action.addAction; + tempItem.actionType=action.type; + internalRunningOperation[action.addAction.id]=tempItem; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set for file %1: actionType: PreOperation").arg(action.addAction.id)); + } + break; + case Ultracopier::Transfer: + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("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(Ultracopier::DebugLevel_Warning,QStringLiteral("unable to found entry for file %1: actionType: Transfer").arg(action.addAction.id)); + } + break; + case Ultracopier::PostOperation: + { + if(!stopId.contains(action.addAction.id)) + stopId << action.addAction.id; + startId.remove(action.addAction.id); + } + break; + case Ultracopier::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.currentReadProgression=0; + item.currentWriteProgression=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; + 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; + 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) +void TransferModel::setFileProgression(QList &progressionList) { - loop_size=progressionList.size(); - index_for_loop=0; - while(index_for_loop0) - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"progression remaning items"); - #endif + loop_size=progressionList.size(); + index_for_loop=0; + while(index_for_loop0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::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; + currentTransfertItem returnItem; + returnItem.progressBar_read=-1; + returnItem.progressBar_write=0; + 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); + returnItem.id=itemTransfer.generalData.id; + switch(itemTransfer.actionType) + { + case Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_read=-1; + else + { + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + returnItem.progressBar_read=-1; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + { + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + } + break; + //should never pass here + case Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + break; + //should never pass here + case Ultracopier::PreOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + break; + default: + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + break; + } + } + else + { + returnItem.haveItem=stopId.size()>0; + if(returnItem.haveItem) + { + if(!internalRunningOperation.contains(*stopId.constBegin())) + { + returnItem.haveItem=false; + return returnItem; + } + const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation[*stopId.constBegin()]; + returnItem.from=itemTransfer.generalData.sourceFullPath; + returnItem.to=itemTransfer.generalData.destinationFullPath; + returnItem.current_file=itemTransfer.generalData.destinationFileName+", "+facilityEngine->sizeToString(itemTransfer.generalData.size); + returnItem.id=itemTransfer.generalData.id; + switch(itemTransfer.actionType) + { + case Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_read=-1; + else + { + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + returnItem.progressBar_read=-1; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + { + returnItem.progressBar_read=((double)itemTransfer.currentReadProgression/itemTransfer.generalData.size)*65535; + returnItem.progressBar_write=((double)itemTransfer.currentWriteProgression/itemTransfer.generalData.size)*65535; + } + else + { + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + } + break; + case Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + break; + //should never pass here + case Ultracopier::PreOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_read=0; + returnItem.progressBar_write=0; + break; + default: + returnItem.progressBar_read=65535; + returnItem.progressBar_write=65535; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + break; + } + } + } + if(returnItem.haveItem && returnItem.progressBar_read!=-1 && returnItem.progressBar_write>returnItem.progressBar_read) + { + int tempVar=returnItem.progressBar_write; + returnItem.progressBar_write=returnItem.progressBar_read; + returnItem.progressBar_read=tempVar; + } + return returnItem; } diff --git a/plugins-alternative/Themes/Teracopy/TransferModel.h b/plugins-alternative/Themes/Teracopy/TransferModel.h index 486532e..977c986 100644 --- a/plugins-alternative/Themes/Teracopy/TransferModel.h +++ b/plugins-alternative/Themes/Teracopy/TransferModel.h @@ -17,76 +17,76 @@ /// \brief model to store the transfer list class TransferModel : public QAbstractTableModel { - Q_OBJECT + 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; - }; + /// \brief the transfer item displayed + struct transfertItem + { + quint64 id; + QString source; + QString size; + QString destination; + }; + /// \brief the transfer item with progression + struct ItemOfCopyListWithMoreInformations + { + quint64 currentReadProgression,currentWriteProgression; + Ultracopier::ItemOfCopyList generalData; + Ultracopier::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_read,progressBar_write; + }; - TransferModel(); + 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); + 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); - int search(const QString &text,bool searchNext); - int searchPrev(const QString &text); + QList synchronizeItems(const QList& returnActions); + void setFacilityEngine(FacilityInterface * facilityEngine); - void setFileProgression(QList &progressionList); + int search(const QString &text,bool searchNext); + int searchPrev(const QString &text); - currentTransfertItem getCurrentTransfertItem(); + void setFileProgression(QList &progressionList); - quint64 firstId(); + 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; + 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; + 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 + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne); + #endif }; #endif // TRANSFERMODEL_H diff --git a/plugins-alternative/Themes/Teracopy/Variable.h b/plugins-alternative/Themes/Teracopy/Variable.h index 8179c93..963d0c8 100644 --- a/plugins-alternative/Themes/Teracopy/Variable.h +++ b/plugins-alternative/Themes/Teracopy/Variable.h @@ -1,8 +1,7 @@ /** \file Variable.h \brief Define the environment variable \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef VARIABLE_H #define VARIABLE_H diff --git a/plugins-alternative/Themes/Teracopy/documentation.dox b/plugins-alternative/Themes/Teracopy/documentation.dox old mode 100755 new mode 100644 index a61692b..c1720d2 --- a/plugins-alternative/Themes/Teracopy/documentation.dox +++ b/plugins-alternative/Themes/Teracopy/documentation.dox @@ -11,12 +11,12 @@ \section mainpage_overview Overview It's Teracopy interface, to come from Teracopy to Ultracopier.\n - More informations on the wiki of ultracopier. Is part of Ultracopier 0.3 project as alternative plugin. + More informations on the wiki of ultracopier. Is part of Ultracopier project as alternative plugin. \section mainpage_platforms Platforms - This plugin might be usable in all environments where you find Qt 4.\n - To be compatible with the official Ultracopier plugins, you need compil it with Gcc, Qt4.8, and same env as Ultracopier have been compiled, see the documentation. + Ultracopier might be usable in all environments where you find Qt 5.\n + Ultracopier requires Qt 5.0 or newer. Tested on Qt 5.0. \section mainpage_downloads Downloads diff --git a/plugins-alternative/Themes/Teracopy/factory.cpp b/plugins-alternative/Themes/Teracopy/factory.cpp index 89c3787..2b176bf 100644 --- a/plugins-alternative/Themes/Teracopy/factory.cpp +++ b/plugins-alternative/Themes/Teracopy/factory.cpp @@ -1,83 +1,70 @@ /** \file factory.cpp \brief Define the factory core \author alpha_one_x86 -\version 0.3 -\date 2010 */ - -#include +*/ #include "factory.h" -PluginInterface_Themes * Factory::getInstance() +PluginInterface_Themes * ThemesFactory::getInstance() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - PluginInterface_Themes * newInterface=new InterfacePlugin(facilityEngine); - connect(newInterface,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),this,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int))); - connect(this,SIGNAL(reloadLanguage()),newInterface,SLOT(newLanguageLoaded())); - return newInterface; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + Themes * newInterface=new Themes(facilityEngine); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(newInterface,&Themes::debugInformation,this,&PluginInterface_ThemesFactory::debugInformation); + #endif + connect(this,&ThemesFactory::reloadLanguage,newInterface,&Themes::newLanguageLoaded); + return newInterface; } -void Factory::setResources(OptionInterface *,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityEngine,bool portableVersion) +void ThemesFactory::setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion) { - this->facilityEngine=facilityEngine; - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath: "+pluginPath); - Q_UNUSED(portableVersion); + Q_UNUSED(writePath); + Q_UNUSED(pluginPath); + this->facilityEngine=facilityInterface; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath: "+pluginPath); + Q_UNUSED(portableVersion); + Q_UNUSED(options); } -QWidget * Factory::options() +QWidget * ThemesFactory::options() { - return NULL; + return NULL; } -void Factory::resetOptions() +void ThemesFactory::resetOptions() { } -QIcon Factory::getIcon(const QString &fileName) +QIcon ThemesFactory::getIcon(const QString &fileName) const { - if(fileName=="SystemTrayIcon/exit.png") - { - QIcon tempIcon=QIcon::fromTheme("application-exit"); - if(!tempIcon.isNull()) - { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName)); - return tempIcon; - } - } - if(fileName=="SystemTrayIcon/add.png") - { - QIcon tempIcon=QIcon::fromTheme("list-add"); - if(!tempIcon.isNull()) - { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName)); - return tempIcon; - } - } - if(fileName=="SystemTrayIcon/informations.png") - { - QIcon tempIcon=QIcon::fromTheme("help-about"); - if(!tempIcon.isNull()) - { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName)); - return tempIcon; - } - } - if(fileName=="SystemTrayIcon/options.png") - { - QIcon tempIcon=QIcon::fromTheme("applications-system"); - if(!tempIcon.isNull()) - { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName)); - return tempIcon; - } - } - return QIcon(":/resources/"+fileName); + if(fileName=="SystemTrayIcon/exit.png") + { + QIcon tempIcon=QIcon::fromTheme("application-exit"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/add.png") + { + QIcon tempIcon=QIcon::fromTheme("list-add"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/informations.png") + { + QIcon tempIcon=QIcon::fromTheme("help-about"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/options.png") + { + QIcon tempIcon=QIcon::fromTheme("applications-system"); + if(!tempIcon.isNull()) + return tempIcon; + } + return QIcon(":/Themes/Teracopy/resources/"+fileName); } -void Factory::newLanguageLoaded() +void ThemesFactory::newLanguageLoaded() { - emit reloadLanguage(); + emit reloadLanguage(); } - -Q_EXPORT_PLUGIN2(interface, Factory); - diff --git a/plugins-alternative/Themes/Teracopy/factory.h b/plugins-alternative/Themes/Teracopy/factory.h index babac47..0b3bb3f 100644 --- a/plugins-alternative/Themes/Teracopy/factory.h +++ b/plugins-alternative/Themes/Teracopy/factory.h @@ -1,8 +1,7 @@ /** \file factory.h \brief Define the factory \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef FACTORY_H #define FACTORY_H @@ -17,30 +16,27 @@ #include "Environment.h" /// \brief Define the factory, to create instance of the interface -class Factory : public PluginInterface_ThemesFactory +class ThemesFactory : public PluginInterface_ThemesFactory { - Q_OBJECT - Q_INTERFACES(PluginInterface_ThemesFactory) + Q_OBJECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.ThemesFactory/1.0.1.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_ThemesFactory) public: - /// \brief to return the instance of the copy engine - PluginInterface_Themes * getInstance(); - /// \brief set the resources, to store options, to have facilityInterface - void setResources(OptionInterface * optionsEngine,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityEngine,bool portableVersion); - /// \brief to get the default options widget - QWidget * options(); - /// \brief to get a resource icon - QIcon getIcon(const QString &fileName); + /// \brief to return the instance of the copy engine + PluginInterface_Themes * getInstance(); + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion); + /// \brief to get the default options widget + QWidget * options(); + /// \brief to get a resource icon + QIcon getIcon(const QString &fileName) const; public slots: - void resetOptions(); - void newLanguageLoaded(); + void resetOptions(); + void newLanguageLoaded(); signals: - void reloadLanguage(); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief To debug source - void debugInformation(DebugLevel level,QString fonction,QString text,QString file,int ligne); - #endif + void reloadLanguage(); private: - FacilityInterface * facilityEngine; + FacilityInterface * facilityEngine; }; #endif // FACTORY_H diff --git a/plugins-alternative/Themes/Teracopy/informations.xml b/plugins-alternative/Themes/Teracopy/informations.xml index 5fd194d..534db9a 100644 --- a/plugins-alternative/Themes/Teracopy/informations.xml +++ b/plugins-alternative/Themes/Teracopy/informations.xml @@ -17,11 +17,10 @@ - 0.3.1.0 + 1.2.3.6 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 a7014dd..64220d0 100644 --- a/plugins-alternative/Themes/Teracopy/interface.cpp +++ b/plugins-alternative/Themes/Teracopy/interface.cpp @@ -1,376 +1,431 @@ /** \file interface.cpp \brief Define the interface core \author alpha_one_x86 -\version 0.3 -\date 2010 */ +*/ -#include #include +#include #include "interface.h" #include "ui_interface.h" -InterfacePlugin::InterfacePlugin(FacilityInterface * facilityEngine) : - ui(new Ui::interfaceCopy()) +// The cmath header from MSVC does not contain round() +#if (defined(_WIN64) || defined(_WIN32)) && defined(_MSC_VER) +inline double round(double d) { + return floor( d + 0.5 ); +} +#endif + +Themes::Themes(FacilityInterface * facilityEngine) : + ui(new Ui::interfaceCopy()) { - this->facilityEngine=facilityEngine; - ui->setupUi(this); - ui->TransferList->setModel(&transferModel); - transferModel.setFacilityEngine(facilityEngine); + this->facilityEngine=facilityEngine; + ui->setupUi(this); + transferModel.setFacilityEngine(facilityEngine); + ui->TransferList->setModel(&transferModel); + + currentFile = 0; + totalFile = 0; + currentSize = 0; + totalSize = 0; + storeIsInPause = false; + modeIsForced = false; + haveStarted = false; + speedString = facilityEngine->speedToString(0); + ui->toolButtonMenu->setMenu(&menu); - currentFile = 0; - totalFile = 0; - currentSize = 0; - totalSize = 0; - this->show(); - storeIsInPause = false; - isInPause(false); - modeIsForced = false; - haveStarted = false; - speedString = facilityEngine->speedToString(0); - ui->toolButtonMenu->setMenu(&menu); - - connect(ui->actionAddFile,SIGNAL(triggered()),this,SLOT(forcedModeAddFile())); - connect(ui->actionAddFileToCopy,SIGNAL(triggered()),this,SLOT(forcedModeAddFileToCopy())); - connect(ui->actionAddFileToMove,SIGNAL(triggered()),this,SLOT(forcedModeAddFileToMove())); - connect(ui->actionAddFolderToCopy,SIGNAL(triggered()),this,SLOT(forcedModeAddFolderToCopy())); - connect(ui->actionAddFolderToMove,SIGNAL(triggered()),this,SLOT(forcedModeAddFolderToMove())); - connect(ui->actionAddFolder,SIGNAL(triggered()),this,SLOT(forcedModeAddFolder())); + connect(ui->actionAddFile,&QAction::triggered,this,&Themes::forcedModeAddFile); + connect(ui->actionAddFileToCopy,&QAction::triggered,this,&Themes::forcedModeAddFileToCopy); + connect(ui->actionAddFileToMove,&QAction::triggered,this,&Themes::forcedModeAddFileToMove); + connect(ui->actionAddFolderToCopy,&QAction::triggered,this,&Themes::forcedModeAddFolderToCopy); + connect(ui->actionAddFolderToMove,&QAction::triggered,this,&Themes::forcedModeAddFolderToMove); + connect(ui->actionAddFolder,&QAction::triggered,this,&Themes::forcedModeAddFolder); - #ifdef ULTRACOPIER_PLUGIN_DEBUG - connect(&transferModel,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),this,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int))); - #endif + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(&transferModel,&TransferModel::debugInformation,this,&Themes::debugInformation); + #endif + + progressColorWrite=QApplication::palette().color(QPalette::Highlight); + progressColorRead=QApplication::palette().color(QPalette::AlternateBase); + progressColorRemaining=QApplication::palette().color(QPalette::Base); + + ui->progressBar_all->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + show(); + isInPause(false); } -InterfacePlugin::~InterfacePlugin() +Themes::~Themes() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); } -QWidget * InterfacePlugin::getOptionsEngineWidget() +QWidget * Themes::getOptionsEngineWidget() { - return &optionEngineWidget; + return &optionEngineWidget; } -void InterfacePlugin::getOptionsEngineEnabled(bool isEnabled) +void Themes::getOptionsEngineEnabled(const bool &isEnabled) { - Q_UNUSED(isEnabled); + Q_UNUSED(isEnabled); } /// \brief set if transfer list is exportable/importable -void InterfacePlugin::setTransferListOperation(TransferListOperation transferListOperation) +void Themes::setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation) +{ + Q_UNUSED(transferListOperation); +} + +void Themes::closeEvent(QCloseEvent *event) +{ + event->ignore(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + this->hide(); + emit cancel(); +} + +void Themes::updateOverallInformation() { - Q_UNUSED(transferListOperation); + 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)); } -void InterfacePlugin::closeEvent(QCloseEvent *event) +void Themes::actionInProgess(const Ultracopier::EngineActionInProgress &action) { - event->ignore(); - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - this->hide(); - emit cancel(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,"start: "+QString::number(action)); + this->action=action; + ui->pauseButton->setEnabled(action!=Ultracopier::Idle); + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + ui->progressBar_all->setMaximum(65535); + ui->progressBar_all->setMinimum(0); + break; + case Ultracopier::Listing: + ui->progressBar_all->setMaximum(0); + ui->progressBar_all->setMinimum(0); + break; + case Ultracopier::Idle: + if(haveStarted) + emit cancel(); + break; + default: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"Very wrong switch case!"); + break; + } + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + haveStarted=true; + ui->cancelButton->setText(facilityEngine->translateText("Quit")); + if(storeIsInPause) + ui->pauseButton->setText(facilityEngine->translateText("Start")); + else + ui->pauseButton->setText(facilityEngine->translateText("Pause")); + break; + case Ultracopier::Idle: + ui->cancelButton->setText(facilityEngine->translateText("Quit")); + break; + default: + break; + } } -void InterfacePlugin::updateOverallInformation() +void Themes::newFolderListing(const QString &path) { - 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)); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(action==Ultracopier::Listing) + ui->from->setText(path); } -void InterfacePlugin::actionInProgess(EngineActionInProgress action) +void Themes::detectedSpeed(const quint64 &speed)//in byte per seconds { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Information,"start: "+QString::number(action)); - this->action=action; - ui->pauseButton->setEnabled(action!=Idle); - switch(action) - { - case Copying: - case CopyingAndListing: - ui->progressBar_all->setMaximum(65535); - ui->progressBar_all->setMinimum(0); - break; - case Listing: - ui->progressBar_all->setMaximum(0); - ui->progressBar_all->setMinimum(0); - break; - case Idle: - if(haveStarted) - emit cancel(); - break; - default: - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"Very wrong switch case!"); - break; - } - switch(action) - { - case Copying: - case CopyingAndListing: - haveStarted=true; - break; - case Idle: - ui->cancelButton->setText(facilityEngine->translateText("Quit")); - break; - default: - break; - } + speedString=facilityEngine->speedToString(speed); } -void InterfacePlugin::newFolderListing(const QString &path) +/** \brief support speed limitation */ +void Themes::setSupportSpeedLimitation(const bool &supportSpeedLimitationBool) { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - if(action==Listing) - ui->from->setText(path); + Q_UNUSED(supportSpeedLimitationBool); } -void InterfacePlugin::detectedSpeed(const quint64 &speed)//in byte per seconds +void Themes::remainingTime(const int &remainingSeconds) { - speedString=facilityEngine->speedToString(speed); + if(remainingSeconds==-1) + ui->labelTimeRemaining->setText("∞"); + else + { + Ultracopier::TimeDecomposition time=facilityEngine->secondsToTimeDecomposition(remainingSeconds); + ui->labelTimeRemaining->setText(QString::number(time.hour)+":"+QString::number(time.minute)+":"+QString::number(time.second)); + } } -void InterfacePlugin::remainingTime(const int &remainingSeconds) +void Themes::newCollisionAction(const QString &action) { - if(remainingSeconds==-1) - ui->labelTimeRemaining->setText("∞"); - else - { - TimeDecomposition time=facilityEngine->secondsToTimeDecomposition(remainingSeconds); - ui->labelTimeRemaining->setText(QString::number(time.hour)+":"+QString::number(time.minute)+":"+QString::number(time.second)); - } + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + Q_UNUSED(action); } -void InterfacePlugin::newCollisionAction(const QString &action) +void Themes::newErrorAction(const QString &action) { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - Q_UNUSED(action); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + Q_UNUSED(action); } -void InterfacePlugin::newErrorAction(const QString &action) +void Themes::errorDetected() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - Q_UNUSED(action); } -void InterfacePlugin::errorDetected() +/// \brief new error +void Themes::errorToRetry(const QString &source,const QString &destination,const QString &error) { + Q_UNUSED(source); + Q_UNUSED(destination); + Q_UNUSED(error); } //speed limitation -bool InterfacePlugin::setSpeedLimitation(const qint64 &speedLimitation) +bool Themes::setSpeedLimitation(const qint64 &speedLimitation) { - if(speedLimitation>0) - emit newSpeedLimitation(0); - return true; + if(speedLimitation>0) + emit newSpeedLimitation(0); + return true; } //get information about the copy -void InterfacePlugin::setGeneralProgression(const quint64 ¤t,const quint64 &total) +void Themes::setGeneralProgression(const quint64 ¤t,const quint64 &total) { - currentSize=current; - totalSize=total; - if(total>0) - { - int newIndicator=((double)current/total)*65535; - ui->progressBar_all->setValue(newIndicator); - } - else - ui->progressBar_all->setValue(0); + currentSize=current; + totalSize=total; + if(total>0) + { + int newIndicator=((double)current/total)*65535; + ui->progressBar_all->setValue(newIndicator); + } + else + ui->progressBar_all->setValue(0); } -void InterfacePlugin::setCollisionAction(const QList > &list) +void Themes::setCollisionAction(const QList > &list) { - Q_UNUSED(list); + Q_UNUSED(list); } -void InterfacePlugin::setErrorAction(const QList > &list) +void Themes::setErrorAction(const QList > &list) { - Q_UNUSED(list); + Q_UNUSED(list); } -void InterfacePlugin::setCopyType(CopyType type) +void Themes::setCopyType(const Ultracopier::CopyType &type) { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - this->type=type; - updateModeAndType(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + this->type=type; + updateModeAndType(); } -void InterfacePlugin::forceCopyMode(CopyMode mode) +void Themes::forceCopyMode(const Ultracopier::CopyMode &mode) { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - modeIsForced=true; - this->mode=mode; - if(mode==Copy) - this->setWindowTitle("Ultracopier - "+facilityEngine->translateText("Copy")); - else - this->setWindowTitle("Ultracopier - "+facilityEngine->translateText("Move")); - updateModeAndType(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + modeIsForced=true; + this->mode=mode; + if(mode==Ultracopier::Copy) + this->setWindowTitle("Ultracopier - "+facilityEngine->translateText("Copy")); + else + this->setWindowTitle("Ultracopier - "+facilityEngine->translateText("Move")); + updateModeAndType(); } -void InterfacePlugin::updateTitle() +void Themes::updateTitle() { - QString startString; - if(action==Copying || action==CopyingAndListing) - startString=tr("%1% done").arg(((double)currentSize/totalSize)*100); - else - startString="Ultracopier"; - startString+=" - "; - if(mode==Copy) - this->setWindowTitle(startString+facilityEngine->translateText("Copy")+" ("+speedString+")"); - else - this->setWindowTitle(startString+facilityEngine->translateText("Move")+" ("+speedString+")"); + QString startString; + if(action==Ultracopier::Copying || action==Ultracopier::CopyingAndListing) + startString=tr("%1% done").arg(((double)currentSize/totalSize)*100); + else + startString="Ultracopier"; + startString+=" - "; + if(mode==Ultracopier::Copy) + this->setWindowTitle(startString+facilityEngine->translateText("Copy")+" ("+speedString+")"); + else + this->setWindowTitle(startString+facilityEngine->translateText("Move")+" ("+speedString+")"); } -void InterfacePlugin::haveExternalOrder() +void Themes::haveExternalOrder() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); // ui->moreButton->toggle(); } -void InterfacePlugin::isInPause(bool isInPause) -{ - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"isInPause: "+QString::number(isInPause)); - //resume in auto the pause - storeIsInPause=isInPause; - if(isInPause) - ui->pauseButton->setText(facilityEngine->translateText("Resume")); - else - ui->pauseButton->setText(facilityEngine->translateText("Pause")); -} - -void InterfacePlugin::updateCurrentFileInformation() -{ - TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); - if(transfertItem.haveItem) - { - 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->setRange(0,0); - } - else - { - 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); - } +void Themes::isInPause(const bool &isInPause) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"isInPause: "+QString::number(isInPause)); + //resume in auto the pause + storeIsInPause=isInPause; + if(isInPause) + ui->pauseButton->setText(facilityEngine->translateText("Resume")); + else + ui->pauseButton->setText(facilityEngine->translateText("Pause")); +} + +void Themes::updateCurrentFileInformation() +{ + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) + { + 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_read!=-1) + { + ui->progressBar_file->setRange(0,65535); + if(transfertItem.progressBar_read!=transfertItem.progressBar_write) + { + float permilleread=round((float)transfertItem.progressBar_read/65535*1000)/1000; + float permillewrite=permilleread-0.001; + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border: 1px solid grey;text-align: center;background-color: qlineargradient(spread:pad, x1:%1, y1:0, x2:%2, y2:0, stop:0 %3, stop:1 %4);}QProgressBar::chunk{background-color:%5;}") + .arg(permilleread) + .arg(permillewrite) + .arg(progressColorRemaining.name()) + .arg(progressColorRead.name()) + .arg(progressColorWrite.name()) + ); + } + else + ui->progressBar_file->setStyleSheet(QStringLiteral("QProgressBar{border:1px solid grey;text-align:center;background-color:%1;}QProgressBar::chunk{background-color:%2;}") + .arg(progressColorRemaining.name()) + .arg(progressColorWrite.name()) + ); + ui->progressBar_file->setValue(transfertItem.progressBar_write); + } + else + ui->progressBar_file->setRange(0,0); + } + else + { + 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); + } } -void InterfacePlugin::on_cancelButton_clicked() +void Themes::on_cancelButton_clicked() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - this->hide(); - emit cancel(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + this->hide(); + emit cancel(); } -void InterfacePlugin::on_pauseButton_clicked() +void Themes::on_pauseButton_clicked() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - if(storeIsInPause) - emit resume(); - else - emit pause(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(storeIsInPause) + emit resume(); + else + emit pause(); } -void InterfacePlugin::on_skipButton_clicked() +void Themes::on_skipButton_clicked() { - 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 - { - 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"); - } + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(transfertItem.haveItem) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("skip at running: %1").arg(transfertItem.id)); + emit skip(transfertItem.id); + } + else + { + if(transferModel.rowCount()>1) + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("skip at idle: %1").arg(transferModel.firstId())); + emit skip(transferModel.firstId()); + } + else + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"unable to skip the transfer, because no transfer running"); + } } -void InterfacePlugin::updateModeAndType() +void Themes::updateModeAndType() { - menu.clear(); - if(modeIsForced) - { - menu.addAction(ui->actionAddFile); - if(type==FileAndFolder) - menu.addAction(ui->actionAddFolder); - } - else - { - menu.addAction(ui->actionAddFileToCopy); - menu.addAction(ui->actionAddFileToMove); - if(type==FileAndFolder) - { - menu.addAction(ui->actionAddFolderToCopy); - menu.addAction(ui->actionAddFolderToMove); - } - } + menu.clear(); + if(modeIsForced) + { + menu.addAction(ui->actionAddFile); + if(type==Ultracopier::FileAndFolder) + menu.addAction(ui->actionAddFolder); + } + else + { + menu.addAction(ui->actionAddFileToCopy); + menu.addAction(ui->actionAddFileToMove); + if(type==Ultracopier::FileAndFolder) + { + menu.addAction(ui->actionAddFolderToCopy); + menu.addAction(ui->actionAddFolderToMove); + } + } } -void InterfacePlugin::forcedModeAddFile() +void Themes::forcedModeAddFile() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - emit userAddFile(mode); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFile(mode); } -void InterfacePlugin::forcedModeAddFolder() +void Themes::forcedModeAddFolder() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - emit userAddFolder(mode); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFolder(mode); } -void InterfacePlugin::forcedModeAddFileToCopy() +void Themes::forcedModeAddFileToCopy() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - emit userAddFile(Copy); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFile(Ultracopier::Copy); } -void InterfacePlugin::forcedModeAddFolderToCopy() +void Themes::forcedModeAddFolderToCopy() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - emit userAddFolder(Copy); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFolder(Ultracopier::Copy); } -void InterfacePlugin::forcedModeAddFileToMove() +void Themes::forcedModeAddFileToMove() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - emit userAddFile(Move); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFile(Ultracopier::Move); } -void InterfacePlugin::forcedModeAddFolderToMove() +void Themes::forcedModeAddFolderToMove() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - emit userAddFolder(Move); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + emit userAddFolder(Ultracopier::Move); } //set the translate -void InterfacePlugin::newLanguageLoaded() +void Themes::newLanguageLoaded() { - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start"); - if(modeIsForced) - forceCopyMode(mode); - ui->retranslateUi(this); - if(haveStarted) - updateCurrentFileInformation(); - updateOverallInformation(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); + if(modeIsForced) + forceCopyMode(mode); + ui->retranslateUi(this); + if(haveStarted) + updateCurrentFileInformation(); + updateOverallInformation(); } /* @@ -378,68 +433,68 @@ void InterfacePlugin::newLanguageLoaded() Return[1]: totalSize Return[2]: currentFile */ -void InterfacePlugin::getActionOnList(const QList& returnActions) -{ - ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start, returnActions.size(): "+QString::number(returnActions.size())); - QList returnValue=transferModel.synchronizeItems(returnActions); - totalFile+=returnValue[0]; - totalSize+=returnValue[1]; - currentFile+=returnValue[2]; - if(transferModel.rowCount()==0) - { - ui->skipButton->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) -{ - QList progressionListBis=progressionList; - transferModel.setFileProgression(progressionListBis); - updateCurrentFileInformation(); -} - -InterfacePlugin::currentTransfertItem InterfacePlugin::getCurrentTransfertItem() -{ - currentTransfertItem returnItem; - returnItem.haveItem=InternalRunningOperation.size()>0; - if(returnItem.haveItem) - { - const ItemOfCopyListWithMoreInformations &itemTransfer=InternalRunningOperation.first(); - 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=0; - else - { - if(itemTransfer.generalData.size>0) - returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; - else - returnItem.progressBar_file=0; - } - break; - case Transfer: - if(itemTransfer.generalData.size>0) - returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; - else - returnItem.progressBar_file=0; - break; - case PostOperation: - returnItem.progressBar_file=65535; - break; - default: - returnItem.progressBar_file=0; - } - } - return returnItem; +void Themes::getActionOnList(const QList& returnActions) +{ + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, returnActions.size(): "+QString::number(returnActions.size())); + QList returnValue=transferModel.synchronizeItems(returnActions); + totalFile+=returnValue[0]; + totalSize+=returnValue[1]; + currentFile+=returnValue[2]; + if(transferModel.rowCount()==0) + { + ui->skipButton->setEnabled(false); + ui->progressBar_all->setValue(65535); + ui->progressBar_file->setValue(65535); + currentSize=totalSize; + } + else + ui->skipButton->setEnabled(true); + updateOverallInformation(); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"transferModel.rowCount(): "+QString::number(transferModel.rowCount())); +} + +void Themes::setFileProgression(const QList &progressionList) +{ + QList progressionListBis=progressionList; + transferModel.setFileProgression(progressionListBis); + updateCurrentFileInformation(); +} + +Themes::currentTransfertItem Themes::getCurrentTransfertItem() +{ + currentTransfertItem returnItem; + returnItem.haveItem=InternalRunningOperation.size()>0; + if(returnItem.haveItem) + { + const ItemOfCopyListWithMoreInformations &itemTransfer=InternalRunningOperation.first(); + 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 Ultracopier::CustomOperation: + if(!itemTransfer.custom_with_progression) + returnItem.progressBar_file=0; + else + { + if(itemTransfer.generalData.size>0) + returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; + else + returnItem.progressBar_file=0; + } + break; + case Ultracopier::Transfer: + if(itemTransfer.generalData.size>0) + returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535; + else + returnItem.progressBar_file=0; + break; + case Ultracopier::PostOperation: + returnItem.progressBar_file=65535; + break; + default: + returnItem.progressBar_file=0; + } + } + return returnItem; } diff --git a/plugins-alternative/Themes/Teracopy/interface.h b/plugins-alternative/Themes/Teracopy/interface.h index 899a03b..b2f6a70 100644 --- a/plugins-alternative/Themes/Teracopy/interface.h +++ b/plugins-alternative/Themes/Teracopy/interface.h @@ -1,16 +1,16 @@ /** \file interface.h \brief Define the interface test \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ -#ifndef INTERFACE_TEST_H -#define INTERFACE_TEST_H +#ifndef INTERFACE_H +#define INTERFACE_H #include #include #include #include +#include #include "../../../interface/PluginInterface_Themes.h" @@ -19,151 +19,158 @@ #include "TransferModel.h" namespace Ui { - class interfaceCopy; + class interfaceCopy; } /// \brief Define the interface -class InterfacePlugin : public PluginInterface_Themes +class Themes : public PluginInterface_Themes { - Q_OBJECT + Q_OBJECT private: - struct ItemOfCopyListWithMoreInformations - { - quint64 currentProgression; - ItemOfCopyList generalData; - ActionTypeCopyList actionType; - bool custom_with_progression; - }; - struct currentTransfertItem - { - quint64 id; - bool haveItem; - QString from; - QString to; - QString current_file; - int progressBar_file; - }; - Ui::interfaceCopy *ui; - quint64 currentFile; - quint64 totalFile; - quint64 currentSize; - quint64 totalSize; - void updateOverallInformation(); - void updateCurrentFileInformation(); - EngineActionInProgress action; - void closeEvent(QCloseEvent *event); - QList currentProgressList; - QString speedString; - bool storeIsInPause; - bool modeIsForced; - CopyType type; - CopyMode mode; - void updateModeAndType(); - bool haveStarted; - QWidget optionEngineWidget; - void updateTitle(); - QMenu menu; - FacilityInterface * facilityEngine; - int loop_size,loop_sub_size,indexAction,index; - int index_for_loop,sub_loop_size,sub_index_for_loop; - currentTransfertItem getCurrentTransfertItem(); - QList startId,stopId;///< To show what is started, what is stopped - QList InternalRunningOperation;///< to have progression and stat - /// \brief the custom transfer model - TransferModel transferModel; + struct ItemOfCopyListWithMoreInformations + { + quint64 currentProgression; + Ultracopier::ItemOfCopyList generalData; + Ultracopier::ActionTypeCopyList actionType; + bool custom_with_progression; + }; + struct currentTransfertItem + { + quint64 id; + bool haveItem; + QString from; + QString to; + QString current_file; + int progressBar_file; + }; + Ui::interfaceCopy *ui; + quint64 currentFile; + quint64 totalFile; + quint64 currentSize; + quint64 totalSize; + void updateOverallInformation(); + void updateCurrentFileInformation(); + Ultracopier::EngineActionInProgress action; + void closeEvent(QCloseEvent *event); + QList currentProgressList; + QString speedString; + bool storeIsInPause; + bool modeIsForced; + Ultracopier::CopyType type; + Ultracopier::CopyMode mode; + void updateModeAndType(); + bool haveStarted; + QWidget optionEngineWidget; + void updateTitle(); + QMenu menu; + FacilityInterface * facilityEngine; + int loop_size,loop_sub_size,indexAction,index; + int index_for_loop,sub_loop_size,sub_index_for_loop; + currentTransfertItem getCurrentTransfertItem(); + QList startId,stopId;///< To show what is started, what is stopped + QList InternalRunningOperation;///< to have progression and stat + /// \brief the custom transfer model + TransferModel transferModel; + QColor progressColorWrite; + QColor progressColorRead; + QColor progressColorRemaining; public: - //send information about the copy - /// \brief to set the action in progress - void actionInProgess(EngineActionInProgress); - /// \brief new transfer have started - void newTransferStart(const ItemOfCopyList &item); - /** \brief one transfer have been stopped - * is stopped, example: because error have occurred, and try later, don't remove the item! */ - void newTransferStop(const quint64 &id); - /// \brief the new folder is listing - void newFolderListing(const QString &path); - /** \brief show the detected speed - * in byte per seconds */ - void detectedSpeed(const quint64 &speed); - /** \brief show the remaining time - * time in seconds */ - void remainingTime(const int &remainingSeconds); - /// \brief set the current collision action - void newCollisionAction(const QString &action); - /// \brief set the current error action - void newErrorAction(const QString &action); - /// \brief set one error is detected - void errorDetected(); - //speed limitation - /** \brief the max speed used - * in byte per seconds, -1 if not able, 0 if disabled */ - bool setSpeedLimitation(const qint64 &speedLimitation); - InterfacePlugin(FacilityInterface * facilityEngine); - ~InterfacePlugin(); - //get information about the copy - /// \brief show the general progression - void setGeneralProgression(const quint64 ¤t,const quint64 &total); - /// \brief show the file progression - void setFileProgression(const QList &progressionList); - /// \brief set collision action - void setCollisionAction(const QList > &); - /// \brief set error action - void setErrorAction(const QList > &); - /// \brief set the copyType -> file or folder - void setCopyType(CopyType); - /// \brief set the copyMove -> copy or move, to force in copy or move, else support both - void forceCopyMode(CopyMode); - /// \brief set if transfer list is exportable/importable - void setTransferListOperation(TransferListOperation transferListOperation); - /** \brief set if the order is external (like file manager copy) - * to notify the interface, which can hide add folder/filer button */ - void haveExternalOrder(); - /// \brief set if is in pause - void isInPause(bool); - /// \brief get the widget for the copy engine - QWidget * getOptionsEngineWidget(); - /// \brief to set if the copy engine is found - void getOptionsEngineEnabled(bool isEnabled); + //send information about the copy + /// \brief to set the action in progress + void actionInProgess(const Ultracopier::EngineActionInProgress &); + /// \brief new transfer have started + void newTransferStart(const Ultracopier::ItemOfCopyList &item); + /** \brief one transfer have been stopped + * is stopped, example: because error have occurred, and try later, don't remove the item! */ + void newTransferStop(const quint64 &id); + /// \brief the new folder is listing + void newFolderListing(const QString &path); + /** \brief show the detected speed + * in byte per seconds */ + void detectedSpeed(const quint64 &speed); + /** \brief support speed limitation */ + void setSupportSpeedLimitation(const bool &supportSpeedLimitationBool); + /** \brief show the remaining time + * time in seconds */ + void remainingTime(const int &remainingSeconds); + /// \brief set the current collision action + void newCollisionAction(const QString &action); + /// \brief set the current error action + void newErrorAction(const QString &action); + /// \brief set one error is detected + void errorDetected(); + /// \brief new error + void errorToRetry(const QString &source,const QString &destination,const QString &error); + //speed limitation + /** \brief the max speed used + * in byte per seconds, -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const qint64 &speedLimitation); + Themes(FacilityInterface * facilityEngine); + ~Themes(); + //get information about the copy + /// \brief show the general progression + void setGeneralProgression(const quint64 ¤t,const quint64 &total); + /// \brief show the file progression + void setFileProgression(const QList &progressionList); + /// \brief set collision action + void setCollisionAction(const QList > &); + /// \brief set error action + void setErrorAction(const QList > &); + /// \brief set the copyType -> file or folder + void setCopyType(const Ultracopier::CopyType &); + /// \brief set the copyMove -> copy or move, to force in copy or move, else support both + void forceCopyMode(const Ultracopier::CopyMode &); + /// \brief set if transfer list is exportable/importable + void setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation); + /** \brief set if the order is external (like file manager copy) + * to notify the interface, which can hide add folder/filer button */ + void haveExternalOrder(); + /// \brief set if is in pause + void isInPause(const bool &); + /// \brief get the widget for the copy engine + QWidget * getOptionsEngineWidget(); + /// \brief to set if the copy engine is found + void getOptionsEngineEnabled(const bool &isEnabled); private slots: - void on_cancelButton_clicked(); - void on_pauseButton_clicked(); - void on_skipButton_clicked(); - void forcedModeAddFile(); - void forcedModeAddFolder(); - void forcedModeAddFileToCopy(); - void forcedModeAddFolderToCopy(); - void forcedModeAddFileToMove(); - void forcedModeAddFolderToMove(); + void on_cancelButton_clicked(); + void on_pauseButton_clicked(); + void on_skipButton_clicked(); + void forcedModeAddFile(); + void forcedModeAddFolder(); + void forcedModeAddFileToCopy(); + void forcedModeAddFolderToCopy(); + void forcedModeAddFileToMove(); + void forcedModeAddFolderToMove(); signals: - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief To debug source - void debugInformation(DebugLevel level,QString fonction,QString text,QString file,int ligne); - #endif - //set the transfer list - void removeItems(QList ids); - void moveItemsOnTop(QList ids); - void moveItemsUp(QList ids); - void moveItemsDown(QList ids); - void moveItemsOnBottom(QList ids); - void exportTransferList(); - void importTransferList(); - //user ask ask to add folder (add it with interface ask source/destination) - void userAddFolder(CopyMode); - void userAddFile(CopyMode); - void urlDropped(QList urls); - //action on the copy - void pause(); - void resume(); - void skip(quint64 id); - void cancel(); - //edit the action - void sendCollisionAction(QString action); - void sendErrorAction(QString action); - void newSpeedLimitation(qint64); + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne); + #endif + //set the transfer list + /*void removeItems(QList ids); + void moveItemsOnTop(QList ids); + void moveItemsUp(QList ids); + void moveItemsDown(QList ids); + void moveItemsOnBottom(QList ids); + void exportTransferList(); + void importTransferList(); + //user ask ask to add folder (add it with interface ask source/destination) + void userAddFolder(Ultracopier::CopyMode); + void userAddFile(Ultracopier::CopyMode); + void urlDropped(QList urls); + //action on the copy + void pause(); + void resume(); + void skip(quint64 id); + void cancel(); + //edit the action + void sendCollisionAction(QString action); + void sendErrorAction(QString action); + void newSpeedLimitation(qint64);*/ public slots: - //set the translate - void newLanguageLoaded(); - void getActionOnList(const QList& returnActions); + //set the translate + void newLanguageLoaded(); + void getActionOnList(const QList& returnActions); }; -#endif // INTERFACE_TEST_H +#endif // INTERFACE_H diff --git a/plugins-alternative/Themes/Teracopy/interface.pro b/plugins-alternative/Themes/Teracopy/interface.pro index 4cecacb..5049e19 100644 --- a/plugins-alternative/Themes/Teracopy/interface.pro +++ b/plugins-alternative/Themes/Teracopy/interface.pro @@ -1,8 +1,12 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets TEMPLATE = lib CONFIG += plugin HEADERS = interface.h \ - interface/PluginInterface_Themes.h \ - StructEnumDefinition.h \ + StructEnumDefinition.h \ factory.h \ DebugEngineMacro.h \ Environment.h \ @@ -13,24 +17,25 @@ SOURCES = interface.cpp \ factory.cpp \ TransferModel.cpp TARGET = $$qtLibraryTarget(interface) -TRANSLATIONS += Languages/fr/translation.ts \ - Languages/ar/translation.ts \ - Languages/zh/translation.ts \ - Languages/es/translation.ts \ +TRANSLATIONS += Languages/ar/translation.ts \ Languages/de/translation.ts \ Languages/el/translation.ts \ + Languages/en/translation.ts \ + Languages/es/translation.ts \ + Languages/fr/translation.ts \ + Languages/hi/translation.ts \ + Languages/hu/translation.ts \ + Languages/id/translation.ts \ Languages/it/translation.ts \ Languages/ja/translation.ts \ - Languages/id/translation.ts \ + Languages/ko/translation.ts \ + Languages/nl/translation.ts \ + Languages/no/translation.ts \ Languages/pl/translation.ts \ Languages/ru/translation.ts \ - Languages/tr/translation.ts \ Languages/th/translation.ts \ - Languages/hi/translation.ts \ - Languages/nl/translation.ts \ - Languages/no/translation.ts \ - Languages/pt/translation.ts \ - Languages/ko/translation.ts + Languages/tr/translation.ts \ + Languages/zh/translation.ts RESOURCES += resources.qrc diff --git a/plugins-alternative/Themes/Teracopy/interface.ui b/plugins-alternative/Themes/Teracopy/interface.ui index 1bccf44..a5274b3 100644 --- a/plugins-alternative/Themes/Teracopy/interface.ui +++ b/plugins-alternative/Themes/Teracopy/interface.ui @@ -27,7 +27,7 @@ - :/resources/main.png:/resources/main.png + :/Themes/Teracopy/resources/main.png:/Themes/Teracopy/resources/main.png @@ -302,7 +302,7 @@ p, li { white-space: pre-wrap; } - :/resources/add.png:/resources/add.png + :/Themes/Teracopy/resources/add.png:/Themes/Teracopy/resources/add.png Add file @@ -311,7 +311,7 @@ p, li { white-space: pre-wrap; } - :/resources/add.png:/resources/add.png + :/Themes/Teracopy/resources/add.png:/Themes/Teracopy/resources/add.png Add folder @@ -320,7 +320,7 @@ p, li { white-space: pre-wrap; } - :/resources/add.png:/resources/add.png + :/Themes/Teracopy/resources/add.png:/Themes/Teracopy/resources/add.png Move file(s) @@ -329,7 +329,7 @@ p, li { white-space: pre-wrap; } - :/resources/add.png:/resources/add.png + :/Themes/Teracopy/resources/add.png:/Themes/Teracopy/resources/add.png Move folder @@ -338,7 +338,7 @@ p, li { white-space: pre-wrap; } - :/resources/add.png:/resources/add.png + :/Themes/Teracopy/resources/add.png:/Themes/Teracopy/resources/add.png Copy file(s) @@ -347,7 +347,7 @@ p, li { white-space: pre-wrap; } - :/resources/add.png:/resources/add.png + :/Themes/Teracopy/resources/add.png:/Themes/Teracopy/resources/add.png Copy folder diff --git a/plugins-alternative/Themes/Teracopy/plugin.json b/plugins-alternative/Themes/Teracopy/plugin.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/plugins-alternative/Themes/Teracopy/plugin.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins-alternative/Themes/Teracopy/resources.qrc b/plugins-alternative/Themes/Teracopy/resources.qrc index 7f9a82c..39105a8 100644 --- a/plugins-alternative/Themes/Teracopy/resources.qrc +++ b/plugins-alternative/Themes/Teracopy/resources.qrc @@ -1,5 +1,5 @@ - + resources/SystemTrayIcon/add.png resources/SystemTrayIcon/exit.png resources/SystemTrayIcon/informations.png diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/add.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/add.png index 1e03be9..7932127 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/add.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/add.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/exit.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/exit.png index 201353e..ae3c4e8 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/exit.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/exit.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/informations.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/informations.png index e1eb797..5b7b255 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/informations.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/informations.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/options.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/options.png index d35365c..23ec531 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/options.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/options.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Unix.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Unix.png index a81e70d..6f5d1cf 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Unix.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Unix.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Windows.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Windows.png index 8072aea..5464856 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Windows.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Caught_Windows.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png index f40ea82..3961215 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png index 8d673e4..45d6315 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Unix.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Unix.png index 9ce4779..ac4299a 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Unix.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Windows.png b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Windows.png index d0fca1b..6e6bae7 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Windows.png and b/plugins-alternative/Themes/Teracopy/resources/SystemTrayIcon/systray_Uncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/checkbox.png b/plugins-alternative/Themes/Teracopy/resources/checkbox.png index 1c311e2..f7f4388 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/checkbox.png and b/plugins-alternative/Themes/Teracopy/resources/checkbox.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/main.png b/plugins-alternative/Themes/Teracopy/resources/main.png index 8072aea..5464856 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/main.png and b/plugins-alternative/Themes/Teracopy/resources/main.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/player_pause.png b/plugins-alternative/Themes/Teracopy/resources/player_pause.png index a9b3113..68ee21f 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/player_pause.png and b/plugins-alternative/Themes/Teracopy/resources/player_pause.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources/player_play.png b/plugins-alternative/Themes/Teracopy/resources/player_play.png index 80ff3a1..a1c5b83 100644 Binary files a/plugins-alternative/Themes/Teracopy/resources/player_play.png and b/plugins-alternative/Themes/Teracopy/resources/player_play.png differ diff --git a/plugins-alternative/Themes/Teracopy/resources_unix.qrc b/plugins-alternative/Themes/Teracopy/resources_unix.qrc index ae3894b..46e3020 100644 --- a/plugins-alternative/Themes/Teracopy/resources_unix.qrc +++ b/plugins-alternative/Themes/Teracopy/resources_unix.qrc @@ -1,6 +1,6 @@ - - resources/SystemTrayIcon/systray_Caught_Unix.png + + resources/SystemTrayIcon/systray_Caught_Unix.png resources/SystemTrayIcon/systray_Semiuncaught_Unix.png resources/SystemTrayIcon/systray_Uncaught_Unix.png diff --git a/plugins-alternative/Themes/Teracopy/resources_windows.qrc b/plugins-alternative/Themes/Teracopy/resources_windows.qrc index 99829b3..165123a 100644 --- a/plugins-alternative/Themes/Teracopy/resources_windows.qrc +++ b/plugins-alternative/Themes/Teracopy/resources_windows.qrc @@ -1,5 +1,5 @@ - + resources/SystemTrayIcon/systray_Caught_Windows.png resources/SystemTrayIcon/systray_Semiuncaught_Windows.png resources/SystemTrayIcon/systray_Uncaught_Windows.png diff --git a/plugins-alternative/Themes/Windows/DebugEngineMacro.h b/plugins-alternative/Themes/Windows/DebugEngineMacro.h new file mode 100644 index 0000000..4582010 --- /dev/null +++ b/plugins-alternative/Themes/Windows/DebugEngineMacro.h @@ -0,0 +1,28 @@ +/** \file DebugEngineMacro.h +\brief Define the macro for the debug +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef DEBUGENGINEMACRO_H +#define DEBUGENGINEMACRO_H + +#ifdef WIN32 +# define __func__ __FUNCTION__ +#endif + +/// \brief Macro for the debug log +#ifdef ULTRACOPIER_PLUGIN_DEBUG + #if defined (__FILE__) && defined (__LINE__) + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) + #else + #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) + #endif +#else // ULTRACOPIER_DEBUG + #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() +#endif // ULTRACOPIER_DEBUG + +#endif // DEBUGENGINEMACRO_H + + + + diff --git a/plugins-alternative/Themes/Windows/Environment.h b/plugins-alternative/Themes/Windows/Environment.h new file mode 100644 index 0000000..265a5a6 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Environment.h @@ -0,0 +1,10 @@ +/** \file Environment.h +\brief Define the environment variable and global function +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include "Variable.h" +/// \brief The global include +#include "StructEnumDefinition.h" +#include "DebugEngineMacro.h" + diff --git a/plugins-alternative/Themes/Windows/Languages/ar/translation.ts b/plugins-alternative/Themes/Windows/Languages/ar/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/ar/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/de/translation.ts b/plugins-alternative/Themes/Windows/Languages/de/translation.ts new file mode 100644 index 0000000..7657f03 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/de/translation.ts @@ -0,0 +1,124 @@ + + + + + Themes + + + + Unknown remaining time + Verbleibende Zeit unbekannt + + + + + Transferring %n item(s) (%2) + + Übertrage %n Element (%2) + Übertrage %n Elemente (%2) + + + + + + Copying %n item(s) (%2) + + Kopiere %n Element (%2) + Kopiere %n Elemente (%2) + + + + + + Moving %n item(s) (%2) + + Verschiebe %n Element (%2) + Verschiebe %n Elemente (%2) + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + von <b>%1</b> (%2) bis <b>%3</b> (%4)<br />%5 + + + + In waiting + Warten... + + + + interface + + + Name: + Name: + + + + From: + Von: + + + + To: + Nach: + + + + Time remaining: + verbleibende Zeit: + + + + Items remaining: + verbleibende Elemente: + + + + Speed: + Geschwindigkeit: + + + + More information + Mehr Informationen + + + + Cancel + Abbrechen + + + + Add file + Datei hinzufügen + + + + Add folder + Ordner hinzufügen + + + + Move file(s) + Datei (en) verschieben + + + + Move folder + Ordner verschieben + + + + Copy file(s) + Datei (en) kopieren + + + + Copy folder + Ordner kopieren + + + diff --git a/plugins-alternative/Themes/Windows/Languages/el/translation.ts b/plugins-alternative/Themes/Windows/Languages/el/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/el/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/en/translation.ts b/plugins-alternative/Themes/Windows/Languages/en/translation.ts new file mode 100644 index 0000000..27cfd09 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/en/translation.ts @@ -0,0 +1,124 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + Transferring %n item (%2) + Transferring %n items (%2) + + + + + + Copying %n item(s) (%2) + + Copying %n item (%2) + Copying %n items (%2) + + + + + + Moving %n item(s) (%2) + + Moving %n item (%2) + Moving %n items (%2) + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/es/translation.ts b/plugins-alternative/Themes/Windows/Languages/es/translation.ts new file mode 100644 index 0000000..cc4de8a --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/es/translation.ts @@ -0,0 +1,124 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + + Copying %n item(s) (%2) + + + + + + + + + Moving %n item(s) (%2) + + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + desde <b>%1</b> (%2) hasta <b>%3</b> (%4)<br />%5 + + + + In waiting + En espera + + + + interface + + + Name: + Nombre: + + + + From: + Desde: + + + + To: + Hasta: + + + + Time remaining: + Tiempo restante: + + + + Items remaining: + Items restantes: + + + + Speed: + Velocidad: + + + + More information + Más información + + + + Cancel + Cancelar + + + + 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/Windows/Languages/fr/translation.ts b/plugins-alternative/Themes/Windows/Languages/fr/translation.ts new file mode 100644 index 0000000..7f99e83 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/fr/translation.ts @@ -0,0 +1,124 @@ + + + + + Themes + + + + Unknown remaining time + Temps restant inconnu + + + + + Transferring %n item(s) (%2) + + Transfert de %n élément (%2) + Transfert de %n éléments (%2) + + + + + + Copying %n item(s) (%2) + + Copie de %n élément (%2) + Copie de %n éléments (%2) + + + + + + Moving %n item(s) (%2) + + Déplacement de %n élément (%2) + Déplacement de %n éléments (%2) + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + depuis <b>%1</b> (%2) vers <b>%3</b> (%4)<br />%5 + + + + In waiting + En attente + + + + interface + + + Move file(s) + Déplacer des fichiers + + + + Move folder + Déplacer un dossier + + + + Copy file(s) + Copier des fichiers + + + + Copy folder + Copier un dossier + + + + Add folder + Ajouter un dossier + + + + Name: + Nom: + + + + From: + Depuis: + + + + To: + Vers: + + + + Time remaining: + Temps restant: + + + + Items remaining: + Éléments restants: + + + + Speed: + Vitesse: + + + + More information + Plus d'information + + + + Cancel + Annuler + + + + Add file + Ajout de fichier + + + diff --git a/plugins-alternative/Themes/Windows/Languages/hi/translation.ts b/plugins-alternative/Themes/Windows/Languages/hi/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/hi/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/hu/translation.ts b/plugins-alternative/Themes/Windows/Languages/hu/translation.ts new file mode 100644 index 0000000..ef4bf6d --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/hu/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + Ismeretlen hátralévő idő + + + + + Transferring %n item(s) (%2) + + %n elem áthelyezése(%2) + + + + + + Copying %n item(s) (%2) + + %n elem átmásolása(%2) + + + + + + Moving %n item(s) (%2) + + %n elem mozgatása(%2) + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + <b>%1</b> (%2) helyről-> <b>%3</b> (%4) helyre<br />%5 + + + + In waiting + Várakozik + + + + interface + + + Name: + Név: + + + + From: + Forrás: + + + + To: + Cél: + + + + Time remaining: + Hátralévő idő: + + + + Items remaining: + Hátralévő elemek: + + + + Speed: + Sebesség: + + + + More information + Több információ + + + + Cancel + Mégse + + + + Add file + Fájl hozzáadása + + + + Add folder + Mappa hozzáadása + + + + Move file(s) + Fájl(ok) mozgatása + + + + Move folder + Mappa mozgatása + + + + Copy file(s) + Fájl(ok) másolása + + + + Copy folder + Mappa másolása + + + diff --git a/plugins-alternative/Themes/Windows/Languages/id/translation.ts b/plugins-alternative/Themes/Windows/Languages/id/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/id/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/it/translation.ts b/plugins-alternative/Themes/Windows/Languages/it/translation.ts new file mode 100644 index 0000000..c3d5a73 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/it/translation.ts @@ -0,0 +1,125 @@ + + + + + Themes + + + + Unknown remaining time + Tempo rediduo indeterminato + + + + + Transferring %n item(s) (%2) + + Trasferimento di %n elemento (%2) + Trasferimento di %n elementi (%2) + + + + + + Copying %n item(s) (%2) + + Copia di %n elemento (%2) + Copia di %n elementi (%2) + + + + + + Moving %n item(s) (%2) + + Spostamento di %n elemento (%2) + Spostamento di %n elementi (%2) + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + Per esempio: da <b>Cartella di origine</b> (e: precedente origine) to <b>Cartella di destinazione</b> (d: destinazione desktop)<br />Circa 5 ore rimanenti + da <b>%1</b> (%2) a <b>%3</b> (%4)<br />%5 + + + + In waiting + In attesa + + + + interface + + + Name: + Nome: + + + + From: + Da: + + + + To: + A: + + + + Time remaining: + Tempo residuo: + + + + Items remaining: + Elementi rimanenti: + + + + Speed: + Velocità: + + + + More information + Maggiori informazioni + + + + Cancel + Annulla + + + + Add file + Aggiungi file + + + + Add folder + Aggiungi cartella + + + + Move file(s) + Sposta file + + + + Move folder + Sposta la cartella + + + + Copy file(s) + Copia file + + + + Copy folder + Copia la cartella + + + diff --git a/plugins-alternative/Themes/Windows/Languages/ja/translation.ts b/plugins-alternative/Themes/Windows/Languages/ja/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/ja/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/ko/translation.ts b/plugins-alternative/Themes/Windows/Languages/ko/translation.ts new file mode 100644 index 0000000..4d682a3 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/ko/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + 파일 추가 + + + + Add folder + 폴더 추가 + + + + Move file(s) + 파일 이동 + + + + Move folder + 폴더 이동 + + + + Copy file(s) + 파일 복사 + + + + Copy folder + 폴더 복사 + + + diff --git a/plugins-alternative/Themes/Windows/Languages/nl/translation.ts b/plugins-alternative/Themes/Windows/Languages/nl/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/nl/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/no/translation.ts b/plugins-alternative/Themes/Windows/Languages/no/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/no/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/pl/translation.ts b/plugins-alternative/Themes/Windows/Languages/pl/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/pl/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/ru/translation.ts b/plugins-alternative/Themes/Windows/Languages/ru/translation.ts new file mode 100644 index 0000000..02e9260 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/ru/translation.ts @@ -0,0 +1,127 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + + + Copying %n item(s) (%2) + + + + + + + + + + Moving %n item(s) (%2) + + + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + Добавить файл + + + + Add folder + Добавить папку + + + + Move file(s) + Перемещение файла (ов) + + + + Move folder + Перемещение папки + + + + Copy file(s) + Копировать файл (ы) + + + + Copy folder + Копировать папку + + + diff --git a/plugins-alternative/Themes/Windows/Languages/th/translation.ts b/plugins-alternative/Themes/Windows/Languages/th/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/th/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/tr/translation.ts b/plugins-alternative/Themes/Windows/Languages/tr/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/tr/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/Languages/zh/translation.ts b/plugins-alternative/Themes/Windows/Languages/zh/translation.ts new file mode 100644 index 0000000..fe6d20c --- /dev/null +++ b/plugins-alternative/Themes/Windows/Languages/zh/translation.ts @@ -0,0 +1,121 @@ + + + + + Themes + + + + Unknown remaining time + + + + + + Transferring %n item(s) (%2) + + + + + + + + Copying %n item(s) (%2) + + + + + + + + Moving %n item(s) (%2) + + + + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br />%5 + Sample: from <b>sources</b> (e:oldersource) to <b>destination</b> (d:desktopdestination)<br />About 5 Hours remaining + + + + + In waiting + + + + + interface + + + Name: + + + + + From: + + + + + To: + + + + + Time remaining: + + + + + Items remaining: + + + + + Speed: + + + + + More information + + + + + Cancel + + + + + Add file + + + + + Add folder + + + + + Move file(s) + + + + + Move folder + + + + + Copy file(s) + + + + + Copy folder + + + + diff --git a/plugins-alternative/Themes/Windows/StructEnumDefinition.h b/plugins-alternative/Themes/Windows/StructEnumDefinition.h new file mode 100644 index 0000000..c1758f4 --- /dev/null +++ b/plugins-alternative/Themes/Windows/StructEnumDefinition.h @@ -0,0 +1 @@ +#include "../../../StructEnumDefinition.h" diff --git a/plugins-alternative/Themes/Windows/TransferModel.cpp b/plugins-alternative/Themes/Windows/TransferModel.cpp new file mode 100644 index 0000000..7743266 --- /dev/null +++ b/plugins-alternative/Themes/Windows/TransferModel.cpp @@ -0,0 +1,286 @@ +#include "TransferModel.h" + +#define COLUMN_COUNT 3 + +// Model + +TransferModel::TransferModel() +{ + iconStart=QIcon(":/Themes/Windows/resources/player_play.png"); + iconPause=QIcon(":/Themes/Windows/resources/player_pause.png"); + iconStop=QIcon(":/Themes/Windows/resources/checkbox.png"); + currentIndexSearch=0; + currentFile = 0; + totalFile = 0; + currentSize = 0; + totalSize = 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 +{ + Q_UNUSED(role); + Q_UNUSED(index); + return QVariant(); +} + +int TransferModel::rowCount( const QModelIndex& parent ) const +{ + Q_UNUSED(parent); + 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 ) +{ + Q_UNUSED(index); + Q_UNUSED(value); + Q_UNUSED(role); + return true; +} + +/* + Return[0]: totalFile + Return[1]: totalSize + Return[2]: currentFile + */ +QList TransferModel::synchronizeItems(const QList& returnActions) +{ + loop_size=returnActions.size(); + index_for_loop=0; + emit layoutAboutToBeChanged(); + while(index_for_looptotalFile++; + this->totalSize+=action.addAction.size; + } + break; + case Ultracopier::RemoveItem: + internalRunningOperation.remove(action.addAction.id); + startId.remove(action.addAction.id); + stopId.remove(action.addAction.id); + this->currentFile++; + break; + case Ultracopier::PreOperation: + { + ItemOfCopyListWithMoreInformations tempItem; + tempItem.currentProgression=0; + tempItem.generalData=action.addAction; + tempItem.generalData.destinationFullPath.remove(tempItem.generalData.destinationFullPath.size()-tempItem.generalData.destinationFileName.size(),tempItem.generalData.destinationFileName.size()); + tempItem.generalData.sourceFullPath.remove(tempItem.generalData.sourceFullPath.size()-tempItem.generalData.sourceFileName.size(),tempItem.generalData.sourceFileName.size()); + tempItem.actionType=action.type; + internalRunningOperation[action.addAction.id]=tempItem; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set for file %1: actionType: PreOperation").arg(action.addAction.id)); + } + break; + case Ultracopier::Transfer: + { + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("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(Ultracopier::DebugLevel_Warning,QStringLiteral("unable to found entry for file %1: actionType: Transfer").arg(action.addAction.id)); + } + break; + case Ultracopier::PostOperation: + { + if(!stopId.contains(action.addAction.id)) + stopId << action.addAction.id; + startId.remove(action.addAction.id); + } + break; + case Ultracopier::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; +} + +void TransferModel::setFileProgression(QList &progressionList) +{ + loop_size=progressionList.size(); + index_for_loop=0; + while(index_for_loop0) + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::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; + returnItem.size=facilityEngine->sizeToString(itemTransfer.generalData.size); + switch(itemTransfer.actionType) + { + case Ultracopier::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 Ultracopier::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 Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("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 Ultracopier::PreOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("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(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + break; + } + } + else + { + if(!internalRunningOperation.contains(*stopId.constBegin())) + { + returnItem.haveItem=false; + return returnItem; + } + else + returnItem.haveItem=true; + const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation[*stopId.constBegin()]; + returnItem.from=itemTransfer.generalData.sourceFullPath; + returnItem.to=itemTransfer.generalData.destinationFullPath; + returnItem.current_file=itemTransfer.generalData.destinationFileName; + returnItem.size=facilityEngine->sizeToString(itemTransfer.generalData.size); + switch(itemTransfer.actionType) + { + case Ultracopier::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 Ultracopier::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 Ultracopier::PostOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("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 Ultracopier::PreOperation: + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + returnItem.progressBar_file=0; + break; + default: + returnItem.progressBar_file=65535; + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QStringLiteral("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType)); + break; + } + } + return returnItem; +} diff --git a/plugins-alternative/Themes/Windows/TransferModel.h b/plugins-alternative/Themes/Windows/TransferModel.h new file mode 100644 index 0000000..c2d89aa --- /dev/null +++ b/plugins-alternative/Themes/Windows/TransferModel.h @@ -0,0 +1,90 @@ +#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; + Ultracopier::ItemOfCopyList generalData; + Ultracopier::ActionTypeCopyList actionType; + bool custom_with_progression; + }; + /// \brief returned first transfer item + struct currentTransfertItem + { + quint64 id; + bool haveItem; + QString from; + QString to; + QString current_file; + QString size; + 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); + + void setFileProgression(QList &progressionList); + + currentTransfertItem getCurrentTransfertItem(); + + quint64 currentFile; + quint64 totalFile; + quint64 currentSize; + quint64 totalSize; +protected: + 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; + 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(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne); + #endif +}; + +#endif // TRANSFERMODEL_H diff --git a/plugins-alternative/Themes/Windows/Variable.h b/plugins-alternative/Themes/Windows/Variable.h new file mode 100644 index 0000000..963d0c8 --- /dev/null +++ b/plugins-alternative/Themes/Windows/Variable.h @@ -0,0 +1,15 @@ +/** \file Variable.h +\brief Define the environment variable +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef VARIABLE_H +#define VARIABLE_H + +//Un-comment this next line to put ultracopier plugin in debug mode +#define ULTRACOPIER_PLUGIN_DEBUG + +#endif // VARIABLE_H + + + diff --git a/plugins-alternative/Themes/Windows/documentation.dox b/plugins-alternative/Themes/Windows/documentation.dox new file mode 100644 index 0000000..df43161 --- /dev/null +++ b/plugins-alternative/Themes/Windows/documentation.dox @@ -0,0 +1,29 @@ +/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ + +/* + This file contains NO source code, just some documentation for doxygen to + parse. +*/ + +/*! + \mainpage Windows + + \section mainpage_overview Overview + + It's interface to have interface like windows for Ultracopier.\n + More informations on the wiki of ultracopier. Is part of Ultracopier project as alternative plugin. + + \section mainpage_platforms Platforms + + Ultracopier might be usable in all environments where you find Qt 5.\n + Ultracopier requires Qt 5.0 or newer. Tested on Qt 5.0. + + \section mainpage_downloads Downloads + + You can found link on Ultracopier (Supercopier/Teracopy) project page, via git, snapshot sources, ... + + \section license GPL Version 3 + The code source is under GPL3. + +*/ + diff --git a/plugins-alternative/Themes/Windows/factory.cpp b/plugins-alternative/Themes/Windows/factory.cpp new file mode 100644 index 0000000..dbce51a --- /dev/null +++ b/plugins-alternative/Themes/Windows/factory.cpp @@ -0,0 +1,74 @@ +/** \file factory.cpp +\brief Define the factory core +\author alpha_one_x86 +*/ + +#include "factory.h" + +QRegularExpression ThemesFactory::slashEnd; +QRegularExpression ThemesFactory::isolateName; + +ThemesFactory::ThemesFactory() +{ + slashEnd=QRegularExpression("/$"); + isolateName=QRegularExpression("^.*/([^/]+)$"); +} + +PluginInterface_Themes * ThemesFactory::getInstance() +{ + Themes * newInterface=new Themes(facilityEngine); + connect(this,&ThemesFactory::reloadLanguage,newInterface,&Themes::newLanguageLoaded); + return newInterface; +} + +void ThemesFactory::setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityEngine,const bool &portableVersion) +{ + Q_UNUSED(options) + Q_UNUSED(writePath) + Q_UNUSED(pluginPath) + this->facilityEngine=facilityEngine; + Q_UNUSED(portableVersion) +} + +QWidget * ThemesFactory::options() +{ + return NULL; +} + +QIcon ThemesFactory::getIcon(const QString &fileName) const +{ + if(fileName=="SystemTrayIcon/exit.png") + { + QIcon tempIcon=QIcon::fromTheme("application-exit"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/add.png") + { + QIcon tempIcon=QIcon::fromTheme("list-add"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/informations.png") + { + QIcon tempIcon=QIcon::fromTheme("help-about"); + if(!tempIcon.isNull()) + return tempIcon; + } + if(fileName=="SystemTrayIcon/options.png") + { + QIcon tempIcon=QIcon::fromTheme("applications-system"); + if(!tempIcon.isNull()) + return tempIcon; + } + return QIcon(":/Themes/Windows/resources/"+fileName); +} + +void ThemesFactory::resetOptions() +{ +} + +void ThemesFactory::newLanguageLoaded() +{ + emit reloadLanguage(); +} diff --git a/plugins-alternative/Themes/Windows/factory.h b/plugins-alternative/Themes/Windows/factory.h new file mode 100644 index 0000000..32ea9f1 --- /dev/null +++ b/plugins-alternative/Themes/Windows/factory.h @@ -0,0 +1,45 @@ +/** \file factory.h +\brief Define the factory, to create instance of the interface +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef FACTORY_H +#define FACTORY_H + +#include +#include +#include +#include + +#include "interface.h" +#include "../../../interface/PluginInterface_Themes.h" + +/// \brief Define the factory, to create instance of the interface +class ThemesFactory : public PluginInterface_ThemesFactory +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.ThemesFactory/1.0.1.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_ThemesFactory) + public: + ThemesFactory(); + /// \brief to return the instance of the copy engine + PluginInterface_Themes * getInstance(); + /// \brief set the resources, to store options, to have facilityInterface + void setResources(OptionInterface * optionsEngine,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityEngine,const bool &portableVersion); + /// \brief to get the default options widget + QWidget * options(); + /// \brief to get a resource icon + QIcon getIcon(const QString &fileName) const; + //regex + static QRegularExpression slashEnd; + static QRegularExpression isolateName; + signals: + void reloadLanguage(); + public slots: + void resetOptions(); + void newLanguageLoaded(); + private: + FacilityInterface * facilityEngine; +}; + +#endif // FACTORY_H diff --git a/plugins-alternative/Themes/Windows/informations.xml b/plugins-alternative/Themes/Windows/informations.xml new file mode 100644 index 0000000..b0d6f22 --- /dev/null +++ b/plugins-alternative/Themes/Windows/informations.xml @@ -0,0 +1,26 @@ + + + <![CDATA[Windows dialog for Ultracopier]]> + <![CDATA[Dialogue de Windows pour Ultracopier]]> + + Themes + + + + + + + 1287496800 + + windows-x86 + + + + + 1.2.3.6 + + Windows + + + \ No newline at end of file diff --git a/plugins-alternative/Themes/Windows/interface.cpp b/plugins-alternative/Themes/Windows/interface.cpp new file mode 100644 index 0000000..e358f9c --- /dev/null +++ b/plugins-alternative/Themes/Windows/interface.cpp @@ -0,0 +1,414 @@ +/** \file interface.cpp +\brief Define the interface core +\author alpha_one_x86 +*/ + +#include "interface.h" +#include "factory.h" +#include "ui_interface.h" + +Themes::Themes(FacilityInterface * facilityEngine) : + ui(new Ui::interface()) +{ + ui->setupUi(this); + remainingSeconds= 0; + speed = 0; + progression_current=0; + progression_total=0; + modeIsForced = false; + haveStarted = false; + this->facilityEngine = facilityEngine; + transferModel.setFacilityEngine(facilityEngine); + menu=new QMenu(this); + ui->toolButton->setMenu(menu); + updateModeAndType(); + + connect(ui->actionAddFile,&QAction::triggered,this,&Themes::forcedModeAddFile); + connect(ui->actionAddFileToCopy,&QAction::triggered,this,&Themes::forcedModeAddFileToCopy); + connect(ui->actionAddFileToMove,&QAction::triggered,this,&Themes::forcedModeAddFileToMove); + connect(ui->actionAddFolderToCopy,&QAction::triggered,this,&Themes::forcedModeAddFolderToCopy); + connect(ui->actionAddFolderToMove,&QAction::triggered,this,&Themes::forcedModeAddFolderToMove); + connect(ui->actionAddFolder,&QAction::triggered,this,&Themes::forcedModeAddFolder); + + updateDetails(); + + #ifdef ULTRACOPIER_PLUGIN_DEBUG + connect(&transferModel,&TransferModel::debugInformation,this,&Themes::debugInformation); + #endif + #ifndef Q_OS_WIN32 + ui->widget_bottom->setStyleSheet("background-color: rgb(237, 237, 237);"); + #endif + show(); +} + +Themes::~Themes() +{ + delete menu; +} + +void Themes::forcedModeAddFile() +{ + emit userAddFile(mode); +} + +void Themes::forcedModeAddFolder() +{ + emit userAddFolder(mode); +} + +void Themes::forcedModeAddFileToCopy() +{ + emit userAddFile(Ultracopier::Copy); +} + +void Themes::forcedModeAddFolderToCopy() +{ + emit userAddFolder(Ultracopier::Copy); +} + +void Themes::forcedModeAddFileToMove() +{ + emit userAddFile(Ultracopier::Move); +} + +void Themes::forcedModeAddFolderToMove() +{ + emit userAddFolder(Ultracopier::Move); +} + +void Themes::updateModeAndType() +{ + menu->clear(); + if(modeIsForced) + { + menu->addAction(ui->actionAddFile); + if(type==Ultracopier::FileAndFolder) + menu->addAction(ui->actionAddFolder); + } + else + { + menu->addAction(ui->actionAddFileToCopy); + menu->addAction(ui->actionAddFileToMove); + if(type==Ultracopier::FileAndFolder) + { + menu->addAction(ui->actionAddFolderToCopy); + menu->addAction(ui->actionAddFolderToMove); + } + } +} + +void Themes::closeEvent(QCloseEvent *event) +{ + event->ignore(); + this->hide(); + emit cancel(); +} + +void Themes::detectedSpeed(const quint64 &speed) +{ + this->speed=speed; + if(ui->more->isChecked()) + ui->label_speed->setText(facilityEngine->speedToString(speed)); +} + +void Themes::setSupportSpeedLimitation(const bool &supportSpeedLimitationBool) +{ + Q_UNUSED(supportSpeedLimitationBool); +} + +QWidget * Themes::getOptionsEngineWidget() +{ + return NULL; +} + +void Themes::getOptionsEngineEnabled(const bool &isEnabled) +{ + Q_UNUSED(isEnabled) +} + +void Themes::setCopyType(const Ultracopier::CopyType &type) +{ + this->type=type; + updateModeAndType(); +} + +void Themes::forceCopyMode(const Ultracopier::CopyMode &mode) +{ + modeIsForced=true; + this->mode=mode; + updateModeAndType(); + updateInformations(); +} + +void Themes::updateTitle() +{ + remainingTime(remainingSeconds); +} + +void Themes::actionInProgess(const Ultracopier::EngineActionInProgress &action) +{ + this->action=action; + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + ui->progressBar->setMaximum(65535); + ui->progressBar->setMinimum(0); + break; + case Ultracopier::Listing: + ui->progressBar->setMaximum(0); + ui->progressBar->setMinimum(0); + break; + case Ultracopier::Idle: + if(haveStarted) + emit cancel(); + break; + default: + break; + } + switch(action) + { + case Ultracopier::Copying: + case Ultracopier::CopyingAndListing: + haveStarted=true; + break; + default: + break; + } +} + +void Themes::newTransferStart(const Ultracopier::ItemOfCopyList &item) +{ + ui->text->setText(item.sourceFullPath); +} + +void Themes::newTransferStop(const quint64 &id) +{ + Q_UNUSED(id) +} + +void Themes::newFolderListing(const QString &path) +{ + if(action==Ultracopier::Listing) + ui->text->setText(path); +} + +void Themes::remainingTime(const int &remainingSeconds) +{ + this->remainingSeconds=remainingSeconds; + + QString remainingTime; + if(remainingSeconds>=0) + remainingTime=facilityEngine->simplifiedRemainingTime(remainingSeconds); + else + remainingTime=facilityEngine->translateText(tr("Unknown remaining time")); + + this->setWindowTitle(remainingTime); + + if(ui->more->isChecked()) + ui->label_remaining_time->setText(remainingTime); + else + updateInformations(); +} + +void Themes::newCollisionAction(const QString &action) +{ + Q_UNUSED(action) +} + +void Themes::newErrorAction(const QString &action) +{ + Q_UNUSED(action) +} + +void Themes::errorDetected() +{ +} + +/// \brief new error +void Themes::errorToRetry(const QString &source,const QString &destination,const QString &error) +{ + Q_UNUSED(source); + Q_UNUSED(destination); + Q_UNUSED(error); +} + +void Themes::setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation) +{ + Q_UNUSED(transferListOperation) +} + +//speed limitation +bool Themes::setSpeedLimitation(const qint64 &speedLimitation) +{ + Q_UNUSED(speedLimitation) + return false; +} + +//get information about the copy +void Themes::setGeneralProgression(const quint64 ¤t,const quint64 &total) +{ + progression_current=current; + progression_total=total; + ui->progressBar->setValue(((double)current/total)*65535); +} + +void Themes::setCollisionAction(const QList > &list) +{ + Q_UNUSED(list) +} + +void Themes::setErrorAction(const QList > &list) +{ + Q_UNUSED(list) +} + +//edit the transfer list +void Themes::getActionOnList(const QList &returnActions) +{ + transferModel.synchronizeItems(returnActions); + updateInformations(); +} + +void Themes::haveExternalOrder() +{ + ui->toolButton->hide(); +} + +void Themes::isInPause(const bool &isInPause) +{ + //resume in auto the pause + if(isInPause) + emit resume(); +} + +void Themes::newLanguageLoaded() +{ + ui->retranslateUi(this); + updateTitle(); + updateInformations(); +} + +void Themes::setFileProgression(const QList &progressionList) +{ + QList progressionListBis=progressionList; + transferModel.setFileProgression(progressionListBis); + updateInformations(); +} + +void Themes::on_more_toggled(bool checked) +{ + Q_UNUSED(checked); + updateDetails(); + updateInformations(); +} + +void Themes::updateDetails() +{ + ui->text->setHidden(ui->more->isChecked()); + ui->details->setHidden(!ui->more->isChecked()); + if(ui->more->isChecked()) + { + this->setMinimumHeight(242); + this->setMaximumHeight(242); + ui->more->setIcon(QIcon(":/Themes/Windows/resources/arrow-up.png")); + } + else + { + this->setMinimumHeight(168); + this->setMaximumHeight(168); + ui->more->setIcon(QIcon(":/Themes/Windows/resources/arrow-down.png")); + } + + // usefull under windows + this->updateGeometry(); + this->update(); + this->adjustSize(); + + updateInformations(); +} + +void Themes::updateInformations() +{ + TransferModel::currentTransfertItem transfertItem=transferModel.getCurrentTransfertItem(); + if(!modeIsForced) + { + if(transferModel.totalFile>1) + ui->label_main->setText(tr("Transferring %n item(s) (%2)","",transferModel.totalFile).arg(facilityEngine->sizeToString(progression_total))); + else + ui->label_main->setText(tr("Transferring %n item(s) (%2)","",transferModel.totalFile).arg(facilityEngine->sizeToString(progression_total))); + } + else + { + if(mode==Ultracopier::Copy) + { + if(transferModel.totalFile>1) + ui->label_main->setText(tr("Copying %n item(s) (%2)","",transferModel.totalFile).arg(facilityEngine->sizeToString(progression_total))); + else + ui->label_main->setText(tr("Copying %n item(s) (%2)","",transferModel.totalFile).arg(facilityEngine->sizeToString(progression_total))); + } + else + { + if(transferModel.totalFile>1) + ui->label_main->setText(tr("Moving %n item(s) (%2)","",transferModel.totalFile).arg(facilityEngine->sizeToString(progression_total))); + else + ui->label_main->setText(tr("Moving %n item(s) (%2)","",transferModel.totalFile).arg(facilityEngine->sizeToString(progression_total))); + } + } + + if(ui->more->isChecked()) + { + if(transfertItem.haveItem) + { + QString simplifiedFrom=transfertItem.from; + QString simplifiedTo=transfertItem.to; + simplifiedFrom.remove(ThemesFactory::slashEnd); + simplifiedTo.remove(ThemesFactory::slashEnd); + simplifiedFrom.replace('\\','/'); + simplifiedTo.replace('\\','/'); + simplifiedFrom.replace(ThemesFactory::isolateName, "\\1"); + simplifiedTo.replace(ThemesFactory::isolateName, "\\1"); + ui->label_file->setText(transfertItem.current_file); + ui->label_from->setText(QStringLiteral("%1 (%2)").arg(simplifiedFrom).arg(transfertItem.from)); + ui->label_to->setText(QStringLiteral("%1 (%2)").arg(simplifiedTo).arg(transfertItem.to)); + ui->label_items->setText(QStringLiteral("%1 (%2)").arg(transferModel.totalFile-transferModel.currentFile).arg(facilityEngine->sizeToString(progression_total-progression_current))); + } + else + { + ui->label_file->setText(""); + ui->label_from->setText(""); + ui->label_to->setText(""); + ui->label_items->setText(QStringLiteral("%1 (%2)").arg(transferModel.totalFile-transferModel.currentFile).arg(facilityEngine->sizeToString(progression_total-progression_current))); + } + } + else + { + if(transfertItem.haveItem) + { + QString remainingTime; + if(remainingSeconds>=0) + remainingTime=facilityEngine->simplifiedRemainingTime(remainingSeconds); + else + remainingTime=facilityEngine->translateText(tr("Unknown remaining time")); + QString simplifiedFrom=transfertItem.from; + QString simplifiedTo=transfertItem.to; + simplifiedFrom.remove(ThemesFactory::slashEnd); + simplifiedTo.remove(ThemesFactory::slashEnd); + simplifiedFrom.replace('\\','/'); + simplifiedTo.replace('\\','/'); + simplifiedFrom.replace(ThemesFactory::isolateName, "\\1"); + simplifiedTo.replace(ThemesFactory::isolateName, "\\1"); + ui->text->setText( + //: Sample: from sources (e:\folder\source) to destination (d:\desktop\destination)
About 5 Hours remaining + tr("from %1 (%2) to %3 (%4)
%5") + .arg(simplifiedFrom) + .arg(transfertItem.from) + .arg(simplifiedTo) + .arg(transfertItem.to) + .arg(remainingTime) + ); + } + else + ui->text->setText(tr("In waiting")); + } +} diff --git a/plugins-alternative/Themes/Windows/interface.h b/plugins-alternative/Themes/Windows/interface.h new file mode 100644 index 0000000..5de55e6 --- /dev/null +++ b/plugins-alternative/Themes/Windows/interface.h @@ -0,0 +1,165 @@ +/** \file interface.h +\brief Define the interface +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#ifndef INTERFACE_TEST_H +#define INTERFACE_TEST_H + +#include +#include +#include +#include + +#include "../../../interface/PluginInterface_Themes.h" +#include "TransferModel.h" + +namespace Ui { + class interface; +} + +/// \brief Define the interface +class Themes : public PluginInterface_Themes +{ + Q_OBJECT +public slots: + //send information about the copy + /// \brief to set the action in progress + void actionInProgess(const Ultracopier::EngineActionInProgress &); + /// \brief new transfer have started + void newTransferStart(const Ultracopier::ItemOfCopyList &item); + /** \brief one transfer have been stopped + * is stopped, example: because error have occurred, and try later, don't remove the item! */ + void newTransferStop(const quint64 &id); + /// \brief the new folder is listing + void newFolderListing(const QString &path); + /** \brief show the detected speed + * in byte per seconds */ + void detectedSpeed(const quint64 &speed); + /** \brief support speed limitation */ + void setSupportSpeedLimitation(const bool &supportSpeedLimitationBool); + /** \brief show the remaining time + * time in seconds */ + void remainingTime(const int &remainingSeconds); + /// \brief set the current collision action + void newCollisionAction(const QString &action); + /// \brief set the current error action + void newErrorAction(const QString &action); + /// \brief set one error is detected + void errorDetected(); + /// \brief new error + void errorToRetry(const QString &source,const QString &destination,const QString &error); + //speed limitation + /** \brief the max speed used + * in byte per seconds, -1 if not able, 0 if disabled */ + bool setSpeedLimitation(const qint64 &speedLimitation); + //set the translate + void newLanguageLoaded(); +public: + /// \brief the transfer item with progression + struct ItemOfCopyListWithMoreInformations + { + quint64 currentProgression; + Ultracopier::ItemOfCopyList generalData; + Ultracopier::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; + }; + /// \brief get the widget for the copy engine + QWidget * getOptionsEngineWidget(); + /// \brief to set if the copy engine is found + void getOptionsEngineEnabled(const bool &isEnabled); + /// \brief get action on the transfer list (add/move/remove) + void getActionOnList(const QList &returnActions); + //get information about the copy + /// \brief show the general progression + void setGeneralProgression(const quint64 ¤t,const quint64 &total); + /// \brief show the file progression + void setFileProgression(const QList &progressionList); + /// \brief set collision action + void setCollisionAction(const QList > &); + /// \brief set error action + void setErrorAction(const QList > &); + /// \brief set the copyType -> file or folder + void setCopyType(const Ultracopier::CopyType &); + /// \brief set the copyMove -> copy or move, to force in copy or move, else support both + void forceCopyMode(const Ultracopier::CopyMode &); + /// \brief set if transfer list is exportable/importable + void setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation); + /** \brief set if the order is external (like file manager copy) + * to notify the interface, which can hide add folder/filer button */ + void haveExternalOrder(); + /// \brief set if is in pause + void isInPause(const bool &); +signals: + #ifdef ULTRACOPIER_PLUGIN_DEBUG + /// \brief To debug source + void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne); + #endif +/* //set the transfer list + void removeItems(QList ids); + void moveItemsOnTop(QList ids); + void moveItemsUp(QList ids); + void moveItemsDown(QList ids); + void moveItemsOnBottom(QList ids); + void exportTransferList(); + void importTransferList(); + //user ask ask to add folder (add it with interface ask source/destination) + void userAddFolder(CopyMode); + void userAddFile(CopyMode); + void urlDropped(QList urls); + //action on the copy + void pause(); + void resume(); + void skip(quint64 id); + void cancel(); + //edit the action + void sendCollisionAction(QString action); + void sendErrorAction(QString action); + void newSpeedLimitation(qint64);*/ +public: + //constructor and destructor + Themes(FacilityInterface * facilityEngine); + ~Themes(); +private: + Ui::interface *ui; + TransferModel transferModel; + void updateTitle(); + QMenu *menu; + Ultracopier::EngineActionInProgress action; + void closeEvent(QCloseEvent *event); + void updateModeAndType(); + bool modeIsForced; + Ultracopier::CopyType type; + Ultracopier::CopyMode mode; + bool haveStarted; + QList InternalRunningOperation; + int loop_size,index_for_loop; + int sub_loop_size,sub_index_for_loop; + FacilityInterface * facilityEngine; + void updateDetails(); + void updateInformations(); + int remainingSeconds; + quint64 progression_current; + quint64 progression_total; + quint64 speed; +private slots: + void forcedModeAddFile(); + void forcedModeAddFolder(); + void forcedModeAddFileToCopy(); + void forcedModeAddFolderToCopy(); + void forcedModeAddFileToMove(); + void forcedModeAddFolderToMove(); + void on_more_toggled(bool checked); +}; + +#endif // INTERFACE_TEST_H diff --git a/plugins-alternative/Themes/Windows/interface.pro b/plugins-alternative/Themes/Windows/interface.pro new file mode 100644 index 0000000..9a82f6a --- /dev/null +++ b/plugins-alternative/Themes/Windows/interface.pro @@ -0,0 +1,48 @@ +CONFIG += c++11 +QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" +mac:QMAKE_CXXFLAGS+="-stdlib=libc++" + +QT += widgets +TEMPLATE = lib +CONFIG += plugin +HEADERS = interface.h \ + StructEnumDefinition.h \ + factory.h \ + ../../../interface/PluginInterface_Themes.h \ + TransferModel.h +SOURCES = interface.cpp \ + factory.cpp \ + TransferModel.cpp +TARGET = $$qtLibraryTarget(interface) +TRANSLATIONS += Languages/ar/translation.ts \ + Languages/de/translation.ts \ + Languages/el/translation.ts \ + Languages/en/translation.ts \ + Languages/es/translation.ts \ + Languages/fr/translation.ts \ + Languages/hi/translation.ts \ + Languages/hu/translation.ts \ + Languages/id/translation.ts \ + Languages/it/translation.ts \ + Languages/ja/translation.ts \ + Languages/ko/translation.ts \ + Languages/nl/translation.ts \ + Languages/no/translation.ts \ + Languages/pl/translation.ts \ + Languages/ru/translation.ts \ + Languages/th/translation.ts \ + Languages/tr/translation.ts \ + Languages/zh/translation.ts + +FORMS += \ + interface.ui + +RESOURCES += \ + resources.qrc + +win32 { + RESOURCES += resources_windows.qrc +} +!win32 { + RESOURCES += resources_unix.qrc +} diff --git a/plugins-alternative/Themes/Windows/interface.ui b/plugins-alternative/Themes/Windows/interface.ui new file mode 100644 index 0000000..f255562 --- /dev/null +++ b/plugins-alternative/Themes/Windows/interface.ui @@ -0,0 +1,415 @@ + + + interface + + + + 0 + 0 + 420 + 284 + + + + + 0 + 0 + + + + + 420 + 0 + + + + + 420 + 16777215 + + + + Ultracopier + + + + :/Themes/Windows/resources/icon.png:/Themes/Windows/resources/icon.png + + + + 0 + + + 0 + + + + + + 420 + 42 + + + + + 420 + 42 + + + + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(230, 240, 255, 255), stop:0.5 rgba(166, 199, 230, 255), stop:1 rgba(3, 40, 84, 255)); + + + + 20 + + + 0 + + + 20 + + + 0 + + + + + background-color: rgba(255, 0, 0, 0); +font: 12pt "Sans Serif"; + + + Copying 0 item (0KB) + + + + + + + + 51 + 40 + + + + + 51 + 40 + + + + background-color: rgba(255, 0, 0, 0); + + + :/Themes/Windows/resources/icon-top.png + + + + + + + + + + + 420 + 0 + + + + + 420 + 16777215 + + + + background-color: rgb(255, 255, 255); + + + + 14 + + + 20 + + + 14 + + + 20 + + + 14 + + + + + + 0 + 0 + + + + + 16777215 + 28 + + + + from <b>%1</b> (%2) to <b>%3</b> (%4)<br /> +%5 + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 2 + + + + + Name: + + + + + + + + + + From: + + + + + + + + + + To: + + + + + + + + + + Time remaining: + + + + + + + + + + Items remaining: + + + + + + + + + + Speed: + + + + + + + + + + + + + + 0 + 14 + + + + + 16777215 + 14 + + + + 65535 + + + false + + + + + + + + + + + 420 + 42 + + + + + 420 + 42 + + + + + 20 + + + 0 + + + 20 + + + 0 + + + + + More information + + + + :/Themes/Windows/resources/arrow-down.png:/Themes/Windows/resources/arrow-down.png + + + true + + + Qt::ToolButtonTextBesideIcon + + + + + + + Qt::Horizontal + + + + 123 + 20 + + + + + + + + ... + + + QToolButton::InstantPopup + + + + + + + Cancel + + + + + + + + + + + :/Themes/Windows/resources/add.png:/Themes/Windows/resources/add.png + + + Add file + + + + + + :/Themes/Windows/resources/add.png:/Themes/Windows/resources/add.png + + + Add folder + + + + + + :/Themes/Windows/resources/add.png:/Themes/Windows/resources/add.png + + + Move file(s) + + + + + + :/Themes/Windows/resources/add.png:/Themes/Windows/resources/add.png + + + Move folder + + + + + + :/Themes/Windows/resources/add.png:/Themes/Windows/resources/add.png + + + Copy file(s) + + + + + + :/Themes/Windows/resources/add.png:/Themes/Windows/resources/add.png + + + Copy folder + + + + + + + + + Cancel + clicked() + interface + close() + + + 388 + 349 + + + 523 + 498 + + + + + diff --git a/plugins-alternative/Themes/Windows/plugin.json b/plugins-alternative/Themes/Windows/plugin.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/plugins-alternative/Themes/Windows/plugin.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/plugins-alternative/Themes/Windows/resources.qrc b/plugins-alternative/Themes/Windows/resources.qrc new file mode 100644 index 0000000..f7ffc64 --- /dev/null +++ b/plugins-alternative/Themes/Windows/resources.qrc @@ -0,0 +1,10 @@ + + + resources/icon.png + resources/arrow-down.png + resources/arrow-up.png + resources/SystemTrayIcon/informations.png + resources/icon-top.png + resources/empty.png + + diff --git a/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/informations.png b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/informations.png new file mode 100644 index 0000000..5b7b255 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/informations.png differ diff --git a/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Unix.png b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Unix.png new file mode 100644 index 0000000..6f5d1cf Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Unix.png differ diff --git a/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Windows.png b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Windows.png new file mode 100644 index 0000000..5464856 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Caught_Windows.png differ diff --git a/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png new file mode 100644 index 0000000..3961215 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png new file mode 100644 index 0000000..45d6315 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Semiuncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Unix.png b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Unix.png new file mode 100644 index 0000000..ac4299a Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Unix.png differ diff --git a/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Windows.png b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Windows.png new file mode 100644 index 0000000..6e6bae7 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/SystemTrayIcon/systray_Uncaught_Windows.png differ diff --git a/plugins-alternative/Themes/Windows/resources/arrow-down.png b/plugins-alternative/Themes/Windows/resources/arrow-down.png new file mode 100644 index 0000000..39b5c37 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/arrow-down.png differ diff --git a/plugins-alternative/Themes/Windows/resources/arrow-up.png b/plugins-alternative/Themes/Windows/resources/arrow-up.png new file mode 100644 index 0000000..5c824fb Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/arrow-up.png differ diff --git a/plugins-alternative/Themes/Windows/resources/empty.png b/plugins-alternative/Themes/Windows/resources/empty.png new file mode 100644 index 0000000..846d96d Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/empty.png differ diff --git a/plugins-alternative/Themes/Windows/resources/icon-top.png b/plugins-alternative/Themes/Windows/resources/icon-top.png new file mode 100644 index 0000000..64b7992 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/icon-top.png differ diff --git a/plugins-alternative/Themes/Windows/resources/icon-top.xcf b/plugins-alternative/Themes/Windows/resources/icon-top.xcf new file mode 100644 index 0000000..9a775e2 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/icon-top.xcf differ diff --git a/plugins-alternative/Themes/Windows/resources/icon.png b/plugins-alternative/Themes/Windows/resources/icon.png new file mode 100644 index 0000000..eccfbc5 Binary files /dev/null and b/plugins-alternative/Themes/Windows/resources/icon.png differ diff --git a/plugins-alternative/Themes/Windows/resources_unix.qrc b/plugins-alternative/Themes/Windows/resources_unix.qrc new file mode 100644 index 0000000..3904f69 --- /dev/null +++ b/plugins-alternative/Themes/Windows/resources_unix.qrc @@ -0,0 +1,7 @@ + + + resources/SystemTrayIcon/systray_Caught_Unix.png + resources/SystemTrayIcon/systray_Semiuncaught_Unix.png + resources/SystemTrayIcon/systray_Uncaught_Unix.png + + diff --git a/plugins-alternative/Themes/Windows/resources_windows.qrc b/plugins-alternative/Themes/Windows/resources_windows.qrc new file mode 100644 index 0000000..28666fc --- /dev/null +++ b/plugins-alternative/Themes/Windows/resources_windows.qrc @@ -0,0 +1,7 @@ + + + resources/SystemTrayIcon/systray_Caught_Windows.png + resources/SystemTrayIcon/systray_Semiuncaught_Windows.png + resources/SystemTrayIcon/systray_Uncaught_Windows.png + + -- cgit v1.2.3