From 96ade47c182bf37a2efca2aa62922e54e5ff1660 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Wed, 6 Apr 2022 13:33:38 +0300 Subject: Move LZMA SDK to 3rdparty subdirectory Also add attribution document. Task-number: QTIFW-2336 Change-Id: I91546bc6c3ace244e4b546b945f40b7d204f7463 Reviewed-by: Katja Marttila Reviewed-by: Qt CI Bot --- .../7zip/win/CPP/7zip/UI/Console/PercentPrinter.h | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/libs/3rdparty/7zip/win/CPP/7zip/UI/Console/PercentPrinter.h (limited to 'src/libs/3rdparty/7zip/win/CPP/7zip/UI/Console/PercentPrinter.h') diff --git a/src/libs/3rdparty/7zip/win/CPP/7zip/UI/Console/PercentPrinter.h b/src/libs/3rdparty/7zip/win/CPP/7zip/UI/Console/PercentPrinter.h new file mode 100644 index 000000000..509bab5fc --- /dev/null +++ b/src/libs/3rdparty/7zip/win/CPP/7zip/UI/Console/PercentPrinter.h @@ -0,0 +1,30 @@ +// PercentPrinter.h + +#ifndef __PERCENT_PRINTER_H +#define __PERCENT_PRINTER_H + +#include "../../../Common/StdOutStream.h" + +class CPercentPrinter +{ + UInt64 m_MinStepSize; + UInt64 m_PrevValue; + UInt64 m_CurValue; + UInt64 m_Total; + unsigned m_NumExtraChars; +public: + CStdOutStream *OutStream; + + CPercentPrinter(UInt64 minStepSize = 1): m_MinStepSize(minStepSize), + m_PrevValue(0), m_CurValue(0), m_Total((UInt64)(Int64)-1), m_NumExtraChars(0) {} + void SetTotal(UInt64 total) { m_Total = total; m_PrevValue = 0; } + void SetRatio(UInt64 doneValue) { m_CurValue = doneValue; } + void PrintString(const char *s); + void PrintString(const wchar_t *s); + void PrintNewLine(); + void ClosePrint(); + void RePrintRatio(); + void PrintRatio(); +}; + +#endif -- cgit v1.2.3