Skip to content

Commit

Permalink
[Improvement] Start progress bar integration
Browse files Browse the repository at this point in the history
[Fix] Fix for windows
  • Loading branch information
alphaonex86 committed Jun 16, 2019
1 parent 5839703 commit 2cc1b72
Show file tree
Hide file tree
Showing 259 changed files with 261 additions and 159 deletions.
Empty file modified COPYING
100644 → 100755
Empty file.
Empty file modified CliParser.cpp
100644 → 100755
Empty file.
Empty file modified CliParser.h
100644 → 100755
Empty file.
Empty file modified CompilerInfo.h
100644 → 100755
Empty file.
Empty file modified CopyEngineManager.cpp
100644 → 100755
Empty file.
Empty file modified CopyEngineManager.h
100644 → 100755
Empty file.
Empty file modified CopyListener.cpp
100644 → 100755
Empty file.
Empty file modified CopyListener.h
100644 → 100755
Empty file.
Empty file modified Core.cpp
100644 → 100755
Empty file.
Empty file modified Core.h
100644 → 100755
Empty file.
Empty file modified DebugEngine.cpp
100644 → 100755
Empty file.
Empty file modified DebugEngine.h
100644 → 100755
Empty file.
Empty file modified DebugEngineMacro.h
100644 → 100755
Empty file.
Empty file modified DebugModel.cpp
100644 → 100755
Empty file.
Empty file modified Environment.h
100644 → 100755
Empty file.
Empty file modified EventDispatcher.cpp
100644 → 100755
Empty file.
Empty file modified EventDispatcher.h
100644 → 100755
Empty file.
Empty file modified ExtraSocket.cpp
100644 → 100755
Empty file.
Empty file modified ExtraSocket.h
100644 → 100755
Empty file.
Empty file modified FacilityEngine.cpp
100644 → 100755
Empty file.
Empty file modified FacilityEngine.h
100644 → 100755
Empty file.
Empty file modified HelpDialog.cpp
100644 → 100755
Empty file.
Empty file modified HelpDialog.h
100644 → 100755
Empty file.
Empty file modified HelpDialog.ui
100644 → 100755
Empty file.
Empty file modified InternetUpdater.cpp
100644 → 100755
Empty file.
Empty file modified InternetUpdater.h
100644 → 100755
Empty file.
Empty file modified LanguagesManager.cpp
100644 → 100755
Empty file.
Empty file modified LanguagesManager.h
100644 → 100755
Empty file.
Empty file modified LocalListener.cpp
100644 → 100755
Empty file.
Empty file modified LocalListener.h
100644 → 100755
Empty file.
Empty file modified LocalPluginOptions.cpp
100644 → 100755
Empty file.
Empty file modified LocalPluginOptions.h
100644 → 100755
Empty file.
Empty file modified LogThread.cpp
100644 → 100755
Empty file.
Empty file modified LogThread.h
100644 → 100755
Empty file.
Empty file modified OSSpecific.cpp
100644 → 100755
Empty file.
Empty file modified OSSpecific.h
100644 → 100755
Empty file.
Empty file modified OSSpecific.ui
100644 → 100755
Empty file.
Empty file modified OptionDialog.cpp
100644 → 100755
Empty file.
Empty file modified OptionDialog.h
100644 → 100755
Empty file.
Empty file modified OptionDialog.ui
100644 → 100755
Empty file.
Empty file modified OptionEngine.cpp
100644 → 100755
Empty file.
Empty file modified OptionEngine.h
100644 → 100755
Empty file.
Empty file modified PlatformMacro.h
100644 → 100755
Empty file.
Empty file modified PluginInformation.cpp
100644 → 100755
Empty file.
Empty file modified PluginInformation.h
100644 → 100755
Empty file.
Empty file modified PluginInformation.ui
100644 → 100755
Empty file.
Empty file modified PluginLoaderCore.cpp
100644 → 100755
Empty file.
Empty file modified PluginLoaderCore.h
100644 → 100755
Empty file.
Empty file modified PluginsManager.cpp
100644 → 100755
Empty file.
Empty file modified PluginsManager.h
100644 → 100755
Empty file.
Empty file modified ProductKey.cpp
100644 → 100755
Empty file.
Empty file modified ProductKey.h
100644 → 100755
Empty file.
Empty file modified ProductKey.ui
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified README.sources
100644 → 100755
Empty file.
Empty file modified ResourcesManager.cpp
100644 → 100755
Empty file.
Empty file modified ResourcesManager.h
100644 → 100755
Empty file.
Empty file modified SessionLoader.cpp
100644 → 100755
Empty file.
Empty file modified SessionLoader.h
100644 → 100755
Empty file.
Empty file modified StructEnumDefinition.h
100644 → 100755
Empty file.
Empty file modified StructEnumDefinition_UltracopierSpecific.h
100644 → 100755
Empty file.
Empty file modified SystrayIcon.cpp
100644 → 100755
Empty file.
Empty file modified SystrayIcon.h
100644 → 100755
Empty file.
Empty file modified ThemesManager.cpp
100644 → 100755
Empty file.
Empty file modified ThemesManager.h
100644 → 100755
Empty file.
Empty file modified Variable.h
100644 → 100755
Empty file.
Empty file modified cpp11addition.cpp
100644 → 100755
Empty file.
Empty file modified cpp11addition.h
100644 → 100755
Empty file.
Empty file modified cpp11additionstringtointcpp.cpp
100644 → 100755
Empty file.
Empty file modified main.cpp
100644 → 100755
Empty file.
Empty file modified other-pro/static.pro
100644 → 100755
Empty file.
Empty file modified other-pro/supercopier-core.pro
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions other-pro/ultracopier-core.pro
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,7 @@ INCLUDEPATH += \
$$PWD/../lib/qt-tar-xz/

OTHER_FILES += $$PWD/../resources/resources-windows.rc

win32: {
QT += winextras
}
Empty file modified other-pro/ultracopier-little.pro
100644 → 100755
Empty file.
Empty file modified other-pro/ultracopier-static.pro
100644 → 100755
Empty file.
5 changes: 2 additions & 3 deletions plugins/CopyEngine/Ultracopier-Spec/FileExistsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,19 @@ void FileExistsDialog::on_SuggestNewName_clicked()
if(num==1)
{
if(firstRenamingRule.empty())
newFileName=tr("%name% - copy%suffix%");
newFileName=tr("%name% - copy");
else
newFileName=QString::fromStdString(firstRenamingRule);
}
else
{
if(otherRenamingRule.empty())
newFileName=tr("%name% - copy (%number%)%suffix%");
newFileName=tr("%name% - copy (%number%)");
else
newFileName=QString::fromStdString(otherRenamingRule);
newFileName.replace(QStringLiteral("%number%"),QString::number(num));
}
newFileName.replace(QStringLiteral("%name%"),fileName);
newFileName.replace(QStringLiteral("%suffix%"),suffix);
destination=absolutePath+CURRENTSEPARATOR+newFileName;
destinationInfo=destination.toStdString();
num++;
Expand Down
9 changes: 9 additions & 0 deletions plugins/CopyEngine/Ultracopier-Spec/TransferThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ TransferThread::TransferThread() :
PSecurityD=NULL;
dacl=NULL;
#endif
#ifdef Q_OS_Win32
stopItWin=0;
#endif
//if not QThread
run();
}

TransferThread::~TransferThread()
{
#ifdef Q_OS_WIN32
stopItWin=1;
#endif
stopIt=true;
//else cash without this disconnect
//disconnect(&readThread);
Expand Down Expand Up @@ -104,6 +110,9 @@ bool TransferThread::setFiles(const std::string& source, const int64_t &size, co
this->mode = mode;
this->size = size;
stopIt = false;
#ifdef Q_OS_WIN32
stopItWin=0;
#endif
fileExistsAction = FileExists_NotSet;
canStartTransfer = false;
sended_state_preOperationStopped= false;
Expand Down
3 changes: 3 additions & 0 deletions plugins/CopyEngine/Ultracopier-Spec/TransferThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ public slots:
bool keepDate;
bool mkFullPath;
volatile bool stopIt;
#ifdef Q_OS_WIN32
int stopItWin;
#endif
DriveManagement driveManagement;
volatile bool canStartTransfer;
bool retry;
Expand Down
21 changes: 18 additions & 3 deletions plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ TransferThreadAsync::TransferThreadAsync() :

TransferThreadAsync::~TransferThreadAsync()
{
#ifdef Q_OS_WIN32
stopItWin=1;
#endif
stopIt=true;
exit(0);
wait();
Expand Down Expand Up @@ -199,7 +202,7 @@ void TransferThreadAsync::postOperation()
}

#ifdef Q_OS_WIN32
DWORD TransferThreadAsync::LpprogressRoutine(
DWORD progressRoutine(
LARGE_INTEGER TotalFileSize,
LARGE_INTEGER TotalBytesTransferred,
LARGE_INTEGER StreamSize,
Expand All @@ -211,9 +214,15 @@ DWORD TransferThreadAsync::LpprogressRoutine(
LPVOID lpData
)
{
transferProgression=TotalBytesTransferred.QuadPart;
static_cast<TransferThreadAsync *>(lpData)->setProgression(TotalBytesTransferred.QuadPart);
return PROGRESS_CONTINUE;
}

void TransferThreadAsync::setProgression(const uint64_t &pos)
{
if(transfer_stat==TransferStat_Transfer)
transferProgression=pos;
}
#endif

void TransferThreadAsync::ifCanStartTransfer()
Expand All @@ -223,7 +232,7 @@ void TransferThreadAsync::ifCanStartTransfer()
transfer_stat=TransferStat_Transfer;
emit pushStat(transfer_stat,transferId);
#ifdef Q_OS_WIN32
if(CopyFileExA(source.c_str(),destination.c_str(),&TransferThreadAsync::LpprogressRoutine,NULL,stopIt,
if(CopyFileExA(source.c_str(),destination.c_str(),(LPPROGRESS_ROUTINE)progressRoutine,this,&stopItWin,
COPY_FILE_ALLOW_DECRYPTED_DESTINATION | 0x00000800/*COPY_FILE_COPY_SYMLINK*/ | 0x00001000/*COPY_FILE_NO_BUFFERING*/
)!=0)
#else
Expand Down Expand Up @@ -266,6 +275,9 @@ void TransferThreadAsync::ifCanStartTransfer()
//stop the current copy
void TransferThreadAsync::stop()
{
#ifdef Q_OS_WIN32
stopItWin=1;
#endif
stopIt=true;
if(transfer_stat==TransferStat_Idle)
{
Expand Down Expand Up @@ -324,6 +336,9 @@ void TransferThreadAsync::retryAfterError()
//skip the copy
void TransferThreadAsync::skip()
{
#ifdef Q_OS_WIN32
stopItWin=1;
#endif
stopIt=true;
exit();
wait();
Expand Down
14 changes: 3 additions & 11 deletions plugins/CopyEngine/Ultracopier-Spec/async/TransferThreadAsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public slots:
//fake copy for no win32
int copy(const char *from,const char *to);
#endif
#ifdef Q_OS_WIN32
void setProgression(const uint64_t &pos);
#endif
private:
//ready = open + ready to operation (no error to resolv)
bool transferIsReadyVariable;
Expand All @@ -101,17 +104,6 @@ public slots:
bool remainSourceOpen() const;
bool remainDestinationOpen() const;
void resetExtraVariable();
#ifdef Q_OS_WIN32
DWORD LpprogressRoutine( LARGE_INTEGER TotalFileSize,
LARGE_INTEGER TotalBytesTransferred,
LARGE_INTEGER StreamSize,
LARGE_INTEGER StreamBytesTransferred,
DWORD dwStreamNumber,
DWORD dwCallbackReason,
HANDLE hSourceFile,
HANDLE hDestinationFile,
LPVOID lpData);
#endif
void ifCanStartTransfer();
};

Expand Down
Empty file modified plugins/Themes/Oxygen/DebugEngineMacro.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Environment.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/ar/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/de/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/el/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/en/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/es/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/fr/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/hi/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/hu/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/id/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/it/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/ja/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/ko/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/nl/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/no/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/pl/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/pt/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/ru/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/th/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/tr/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Languages/zh/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/README.md
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/StructEnumDefinition.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/ThemesFactory.cpp
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/ThemesFactory.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/TransferModel.cpp
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/TransferModel.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/Variable.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/documentation.dox
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/informations.xml
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interface.cpp
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interface.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interface.pro
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interface.ui
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interfaceInclude.pri
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interfaceResources.qrc
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interfaceResources_unix.qrc
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/interfaceResources_windows.qrc
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/options.ui
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/plugin.json
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen/resources/SystemTrayIcon/add.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/SystemTrayIcon/exit.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/SystemTrayIcon/informations.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/SystemTrayIcon/options.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/add.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/cancel.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/export-transfer-list.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/import-transfer-list.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/main.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/moveDown.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/moveUp.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/player_end.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/player_pause.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/player_play.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/putOnBottom.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/putOnTop.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/remove.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/resources/search.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified plugins/Themes/Oxygen/themesOptions.ui
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/DebugEngineMacro.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Environment.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/ar/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/de/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/el/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/en/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/es/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/fr/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/hi/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/hu/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/id/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/it/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/ja/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/ko/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/nl/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/no/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/pl/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/pt/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/ru/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/th/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/tr/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Languages/zh/translation.ts
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/README.md
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/StructEnumDefinition.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/ThemesFactory.cpp
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/ThemesFactory.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/TransferModel.cpp
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/TransferModel.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/Variable.h
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions plugins/Themes/Oxygen2/chartarea.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void ChartArea::Widget::paintEvent(QPaintEvent*)
{
QPainter painter;
painter.begin(this);
painter.setBrush(QColor(160,160,160,30));
painter.drawRect(0,0,width()-1,height()-1);
painter.setRenderHint(QPainter::Antialiasing,true);
painter.setRenderHint(QPainter::SmoothPixmapTransform,true);
Expand Down
Empty file modified plugins/Themes/Oxygen2/chartarea.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/documentation.dox
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/fileTree.cpp
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/fileTree.h
100644 → 100755
Empty file.
Empty file modified plugins/Themes/Oxygen2/informations.xml
100644 → 100755
Empty file.
93 changes: 79 additions & 14 deletions plugins/Themes/Oxygen2/interface.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#include <cmath>
#include <chrono>
#include <ctime>

#ifdef Q_OS_WIN32
#include <windows.h>
#endif

#include "interface.h"
#include "ui_interface.h"
Expand All @@ -29,13 +31,6 @@ QIcon Themes::documentSave;
QIcon Themes::listAdd;
bool Themes::iconLoaded=false;

// 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(const bool &alwaysOnTop,
const bool &showProgressionInTheTitle,
const QColor &progressColorWrite,
Expand Down Expand Up @@ -70,7 +65,11 @@ Themes::Themes(const bool &alwaysOnTop,
mode(Ultracopier::CopyMode::Copy),
haveStarted(false),
haveError(false)
#ifdef Q_OS_WIN32
,winTaskbarProgress(this)
#endif
{
darkUi=true;
this->facilityEngine=facilityEngine;
File::facilityEngine=facilityEngine;
ui->setupUi(this);
Expand Down Expand Up @@ -371,6 +370,33 @@ Themes::Themes(const bool &alwaysOnTop,

sysTrayIcon = new QSystemTrayIcon(this);
connect(sysTrayIcon,&QSystemTrayIcon::activated,this,&Themes::catchAction);
#ifdef Q_OS_WIN32
winTaskbarProgress.show();
#endif

if(darkUi)
{
ui->frame->setStyleSheet("#frame{background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgb(70, 70, 70), stop:1 rgb(40, 40, 40));}");
ui->labelTimeRemaining->setStyleSheet("color:#fff;");
ui->labelSPStart->setStyleSheet("color:#aaa;");
ui->labelSPStop->setStyleSheet("color:#aaa;");
ui->from_label->setStyleSheet("color:#aaa;");
ui->current_file->setStyleSheet("color:#fff;");
ui->from->setStyleSheet("color:#fff;");

ui->ad_ultimate->setStyleSheet("color:#fff;background-color:rgb(50, 50, 50);");

QString labelTimeRemaining;
labelTimeRemaining+="<html><body style=\"white-space:nowrap;\"><small style=\"color:#aaa\">";
labelTimeRemaining+=QString::fromStdString(facilityEngine->translateText("Remaining:"));
labelTimeRemaining+="</small>";
labelTimeRemaining+=QStringLiteral(" <b>");
labelTimeRemaining+=QStringLiteral("&#8734;");
labelTimeRemaining+=QStringLiteral("</b></body></html>");
ui->labelTimeRemaining->setText(labelTimeRemaining);

ui->frameS->setStyleSheet("#frameS{border: 1px solid #b0c0f0;} QProgressBar{background-color: rgba(160,180,240,100);border: 0 solid grey; } QProgressBar::chunk {background-color: rgba(160,180,240,200);}");
}
}

Themes::~Themes()
Expand Down Expand Up @@ -453,12 +479,24 @@ void Themes::actionInProgess(const Ultracopier::EngineActionInProgress &action)
case Ultracopier::CopyingAndListing:
ui->progressBar_all->setMaximum(65535);
ui->progressBar_all->setMinimum(0);
#ifdef Q_OS_WIN32
winTaskbarProgress.setMaximum(65535);
winTaskbarProgress.setMinimum(0);
#endif
break;
case Ultracopier::Listing:
ui->progressBar_all->setMaximum(0);
ui->progressBar_all->setMinimum(0);
#ifdef Q_OS_WIN32
winTaskbarProgress.setMaximum(0);
winTaskbarProgress.setMinimum(0);
#endif
break;
case Ultracopier::Idle:
#ifdef Q_OS_WIN32
winTaskbarProgress.setMaximum(65535);
winTaskbarProgress.setMinimum(0);
#endif
ui->progressBar_all->setMaximum(65535);
ui->progressBar_all->setMinimum(0);
if(haveStarted && transferModel.rowCount()<=0)
Expand Down Expand Up @@ -561,19 +599,23 @@ void Themes::detectedSpeed(const uint64_t &speed)//in byte per seconds

void Themes::remainingTime(const int &remainingSeconds)
{
QString labelTimeRemaining(QStringLiteral(
"<html><body style=\"white-space:nowrap;\">")+
QString::fromStdString(facilityEngine->translateText("Time remaining:"))+
QStringLiteral(" ")
);
QString labelTimeRemaining;
if(darkUi)
labelTimeRemaining+="<html><body style=\"white-space:nowrap;\"><small style=\"color:#aaa\">";
else
labelTimeRemaining+="<html><body style=\"white-space:nowrap;\">";
labelTimeRemaining+=QString::fromStdString(facilityEngine->translateText("Remaining:"));
if(darkUi)
labelTimeRemaining+="</small>";
labelTimeRemaining+=QStringLiteral(" <b>");
if(remainingSeconds==-1)
labelTimeRemaining+=QStringLiteral("&#8734;");
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("</body></html>");
labelTimeRemaining+=QStringLiteral("</b></body></html>");
ui->labelTimeRemaining->setText(labelTimeRemaining);
}

Expand Down Expand Up @@ -616,9 +658,17 @@ void Themes::setGeneralProgression(const uint64_t &current,const uint64_t &total
{
int newIndicator=((double)current/total)*65535;
ui->progressBar_all->setValue(newIndicator);
#ifdef Q_OS_WIN32
winTaskbarProgress.setValue(newIndicator);
#endif
}
else
{
ui->progressBar_all->setValue(0);
#ifdef Q_OS_WIN32
winTaskbarProgress.setValue(0);
#endif
}
if(current>0)
stat = status_started;
updateOverallInformation();
Expand Down Expand Up @@ -649,6 +699,9 @@ void Themes::getActionOnList(const std::vector<Ultracopier::ReturnActionOnCopyLi
ui->skipButton->setEnabled(false);
ui->progressBar_all->setValue(65535);
ui->progressBar_file->setValue(65535);
#ifdef Q_OS_WIN32
winTaskbarProgress.setValue(65535);
#endif
currentSize=totalSize;
if(isHidden())
updateSysTrayIcon();
Expand Down Expand Up @@ -864,6 +917,7 @@ void Themes::on_cancelButton_clicked()

void Themes::speedWithProgressBar_toggled(bool checked)
{
(void)checked;
ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start");
/*ui->progressBarCurrentSpeed->setVisible(checked);
ui->currentSpeed->setVisible(!checked);*/
Expand Down Expand Up @@ -1549,6 +1603,17 @@ void Themes::resizeEvent(QResizeEvent*)
ui->horizontalLayout_3->setDirection(QBoxLayout::TopToBottom);
else
ui->horizontalLayout_3->setDirection(QBoxLayout::LeftToRight);
if(ui->frameS->width()>300)
{
int space=ui->frameS->width()/20;
ui->horizontalLayoutS->setContentsMargins(space,space/2,space,space/2);
ui->horizontalLayoutS->setSpacing(space);
}
else
{
ui->horizontalLayoutS->setMargin(6);
ui->horizontalLayoutS->setSpacing(6);
}
}

void Themes::doneTime(const std::vector<std::pair<uint64_t,uint32_t> > &timeList)
Expand Down
8 changes: 8 additions & 0 deletions plugins/Themes/Oxygen2/interface.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include <QTime>
#include <QSystemTrayIcon>
#include <QPixmap>
#ifdef Q_OS_WIN32
#include <QWinTaskbarProgress>
#endif

#include "../../../interface/PluginInterface_Themes.h"
#include "radialMap/widget.h"
Expand Down Expand Up @@ -194,6 +197,7 @@ private slots:
TransferModel transferModel;
RadialMap::Widget *radial;
ChartArea::Widget *chartarea;
bool darkUi;

static QIcon player_play,player_pause,tempExitIcon,editDelete,skinIcon,editFind,documentOpen,documentSave,listAdd;
static bool iconLoaded;
Expand Down Expand Up @@ -230,6 +234,10 @@ private slots:
void updateSysTrayIcon();
void resizeEvent(QResizeEvent*) override;
uint8_t fileCatNumber(uint64_t size);

#ifdef Q_OS_WIN32
QWinTaskbarProgress winTaskbarProgress;
#endif
signals:
/// \brief To debug source
void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const;
Expand Down
Empty file modified plugins/Themes/Oxygen2/interface.pro
100644 → 100755
Empty file.
Loading

0 comments on commit 2cc1b72

Please sign in to comment.