From d4dee4f6357e1b1919ae0a7e0c500e23a2be4b50 Mon Sep 17 00:00:00 2001 From: ChristianFeldmann Date: Sun, 6 Oct 2024 22:47:50 +0200 Subject: [PATCH] First set of changes --- .../common/{FileInfo.h => InfoItemAndData.h} | 24 ++++------- YUViewLib/src/decoder/decoderHM.h | 16 ++++---- YUViewLib/src/decoder/decoderVTM.h | 2 +- YUViewLib/src/decoder/decoderVVDec.h | 2 +- YUViewLib/src/filesource/FileSource.cpp | 41 +++++++++++-------- YUViewLib/src/filesource/FileSource.h | 22 +++++----- YUViewLib/src/video/FrameHandler.h | 8 ++-- 7 files changed, 55 insertions(+), 60 deletions(-) rename YUViewLib/src/common/{FileInfo.h => InfoItemAndData.h} (75%) diff --git a/YUViewLib/src/common/FileInfo.h b/YUViewLib/src/common/InfoItemAndData.h similarity index 75% rename from YUViewLib/src/common/FileInfo.h rename to YUViewLib/src/common/InfoItemAndData.h index 49a7e924b..5d52634c1 100644 --- a/YUViewLib/src/common/FileInfo.h +++ b/YUViewLib/src/common/InfoItemAndData.h @@ -37,26 +37,16 @@ #include /* - * An info item has a name, a text and an optional toolTip. These are used to show them in the - * fileInfoWidget. For example: ["File Name", "file.yuv"] or ["Number Frames", "123"] Another option - * is to show a button. If the user clicks on it, the callback function infoListButtonPressed() for - * the corresponding playlist item is called. + * An info item has a name, a text and an optional description. These are used to show them in the + * fileInfoWidget. For example: ["File Name", "file.yuv"] or ["Number Frames", "123"]. */ struct InfoItem { - InfoItem(const QString &name, - const QString &text, - const QString &toolTip = QString(), - bool button = false, - int buttonID = -1) - : name(name), text(text), button(button), buttonID(buttonID), toolTip(toolTip) - { - } - QString name{}; - QString text{}; - bool button{}; - int buttonID{}; - QString toolTip{}; + std::string name{}; + std::string text{}; + std::string description{}; + + InfoItem(std::string &&name, std::string &&text) : name(std::move(name)), text(std::move(text)) {} }; struct InfoData diff --git a/YUViewLib/src/decoder/decoderHM.h b/YUViewLib/src/decoder/decoderHM.h index fb465f36a..88022d7ac 100644 --- a/YUViewLib/src/decoder/decoderHM.h +++ b/YUViewLib/src/decoder/decoderHM.h @@ -34,7 +34,7 @@ #include -#include +#include #include #include #include