Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove another dependency behemoth: QT Gui #861

Merged
merged 15 commits into from
May 24, 2024
6 changes: 1 addition & 5 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ jobs:
linuxVersion: jammy
dockerName: Ubuntu 22.04 LTS (x86_64)
platform: linux
- dockerImage: x86_64
linuxVersion: mantic
dockerName: Ubuntu 23.10 (x86_64)
platform: linux
- dockerImage: x86_64
linuxVersion: noble
dockerName: Ubuntu 24.04 LTS (x86_64)
Expand Down Expand Up @@ -174,7 +170,7 @@ jobs:
# Install deps
- name: Install deps
shell: bash
run: brew install qt@${{ matrix.QT_VERSION }} xz ccache zstd webp jpeg-turbo || true
run: brew install -q qt@${{ matrix.QT_VERSION }} xz ccache zstd webp jpeg-turbo || true

# Set env
- name: Set QT5 env
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/upload-to-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ jobs:
arch: amd64
platform: linux
niceName: Ubuntu 22.04 LTS
- dockerImage: x86_64
linuxVersion: mantic
dockerName: Ubuntu 23.10 (x86_64)
arch: amd64
platform: linux
niceName: Ubuntu 23.10
- dockerImage: x86_64
linuxVersion: noble
dockerName: Ubuntu 24.04 LTS (x86_64)
Expand Down
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ else()
endif(CCACHE_FOUND)

# find QT libs
find_package(Qt6 COMPONENTS Core Gui Network Sql Widgets SerialPort QUIET)
find_package(Qt6 COMPONENTS Core Network Sql Widgets SerialPort QUIET)

if (Qt6Core_FOUND AND NOT (DO_NOT_USE_QT_VERSION_6_LIBS STREQUAL "ON"))
message( STATUS "Found Qt Version: ${Qt6Core_VERSION}" )
Expand All @@ -71,7 +71,7 @@ ELSE()
message( STATUS "QT version 6 not found. Searching for QT version 5 instead." )
endif()
SET(QT_MIN_VERSION "5.10.0")
find_package(Qt5 COMPONENTS Core Gui Network SerialPort Sql REQUIRED)
find_package(Qt5 COMPONENTS Core Network SerialPort Sql REQUIRED)
message( STATUS "Found Qt Version: ${Qt5Core_VERSION}" )
IF ( "${Qt5Core_VERSION}" VERSION_LESS "${QT_MIN_VERSION}" )
message( FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}" )
Expand Down Expand Up @@ -613,13 +613,6 @@ message( STATUS "TURBOJPEG_INCLUDE_DIRS=${TURBOJPEG_INCLUDE_DIRS}")

# Embedded QT plugins
if (USE_STATIC_QT_PLUGINS)
foreach(guiPlugin ${Qt${Qt_VERSION}Gui_PLUGINS} Qt${Qt_VERSION}::Gui)
get_target_property(file ${guiPlugin} LOCATION)
if (NOT IS_SYMLINK ${file})
message("Using static QT plugin: " ${file})
set(STATIC_QT_PLUGINS_LIBS ${STATIC_QT_PLUGINS_LIBS} ${file})
endif()
endforeach()
foreach(sqlPlugin ${Qt${Qt_VERSION}Sql_PLUGINS} Qt${Qt_VERSION}::Sql)
message( STATUS "TURBOJPEG_INCLUDE_DIRS=${sqlPlugin}")
get_target_property(file ${sqlPlugin} LOCATION)
Expand Down
2 changes: 1 addition & 1 deletion cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ cpack_add_component(HyperHDR
REQUIRED
)

if (NOT APPLE)
if (NOT APPLE AND DISABLED_REMOTE)
cpack_add_component(HyperHDR_remote
DISPLAY_NAME "HyperHdr Remote"
DESCRIPTION "HyperHdr remote cli tool"
Expand Down
1 change: 0 additions & 1 deletion include/base/SoundCapture.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <QMutex>
#include <QJsonObject>
#include <QJsonArray>
#include <QColor>

#include <utils/Logger.h>
#include <utils/settings.h>
Expand Down
20 changes: 10 additions & 10 deletions include/base/SoundCaptureResult.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#ifndef PCH_ENABLED
#include <QColor>
#include <utils/ColorRgb.h>
#endif

#define SOUNDCAP_N_WAVE 1024
Expand All @@ -10,9 +10,9 @@

struct MovingTarget
{
QColor _averageColor;
QColor _fastColor;
QColor _slowColor;
ColorRgb _averageColor;
ColorRgb _fastColor;
ColorRgb _slowColor;
int32_t _targetAverageR;
int32_t _targetAverageG;
int32_t _targetAverageB;
Expand Down Expand Up @@ -44,10 +44,10 @@ class SoundCaptureResult
uint8_t pureScaledResult[SOUNDCAP_RESULT_RES];
uint8_t deltas[SOUNDCAP_RESULT_RES];
uint8_t buffScaledResult[SOUNDCAP_RESULT_RES];
QColor color[SOUNDCAP_RESULT_RES];
ColorRgb color[SOUNDCAP_RESULT_RES];
int32_t averageDelta;

QColor _lastPrevColor;
ColorRgb _lastPrevColor;
int32_t _scaledAverage;
int32_t _oldScaledAverage;
int32_t _currentMax;
Expand All @@ -64,15 +64,15 @@ class SoundCaptureResult
uint32_t getResultIndex();
void ResetData();
void GetBufResult(uint8_t* dest, size_t size);
QColor getRangeColor(uint8_t index) const;
void RestoreFullLum(QColor& color, int scale = 32);
ColorRgb getRangeColor(uint8_t index) const;
void RestoreFullLum(ColorRgb& color, int scale = 32);
int32_t getValue(int isMulti);
int32_t getValue3Step(int isMulti);
bool GetStats(uint32_t& scaledAverage, uint32_t& currentMax, QColor& averageColor, QColor* fastColor = NULL, QColor* slowColor = NULL);
bool GetStats(uint32_t& scaledAverage, uint32_t& currentMax, ColorRgb& averageColor, ColorRgb* fastColor = NULL, ColorRgb* slowColor = NULL);

private:
bool hasMiddleAverage(int middle);
bool hasMiddleSlow(int middle);
bool hasMiddleFast(int middle);
void CalculateRgbDelta(QColor currentColor, QColor prevColor, QColor selcolor, int& ab_r, int& ab_g, int& ab_b);
void CalculateRgbDelta(ColorRgb currentColor, ColorRgb prevColor, ColorRgb selcolor, int& ab_r, int& ab_g, int& ab_b);
};
5 changes: 0 additions & 5 deletions include/commandline/Option.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#pragma once

#ifndef PCH_ENABLED
#include <QColor>
#include <QImage>
#include <QRegularExpression>

#include <cmath>
#endif

#include <QValidator>
#include <QCommandLineOption>
#include <QCommandLineParser>

Expand Down
7 changes: 0 additions & 7 deletions include/commandline/Parser.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#pragma once

#include "ColorOption.h"
#include "ColorsOption.h"
#include "DoubleOption.h"
#include "ImageOption.h"
#include "IntOption.h"
#include "Option.h"
#include "RegularExpressionOption.h"
#include "ValidatorOption.h"
#include "BooleanOption.h"

namespace commandline
Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseBlue.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseBlue : public AnimationBaseMusic
Animation4Music_PulseBlue();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseGreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseGreen : public AnimationBaseMusic
Animation4Music_PulseGreen();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseMulti.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseMulti : public AnimationBaseMusic
Animation4Music_PulseMulti();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseMultiFast.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseMultiFast : public AnimationBaseMusic
Animation4Music_PulseMultiFast();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseMultiSlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseMultiSlow : public AnimationBaseMusic
Animation4Music_PulseMultiSlow();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseRed.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseRed : public AnimationBaseMusic
Animation4Music_PulseRed();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseWhite.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseWhite : public AnimationBaseMusic
Animation4Music_PulseWhite();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_PulseYellow.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_PulseYellow : public AnimationBaseMusic
Animation4Music_PulseYellow();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroBlue.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroBlue : public AnimationBaseMusic
Animation4Music_QuatroBlue();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroGreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroGreen : public AnimationBaseMusic
Animation4Music_QuatroGreen();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroMulti.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroMulti : public AnimationBaseMusic
Animation4Music_QuatroMulti();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroMultiFast.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroMultiFast : public AnimationBaseMusic
Animation4Music_QuatroMultiFast();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroMultiSlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroMultiSlow : public AnimationBaseMusic
Animation4Music_QuatroMultiSlow();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroRed.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroRed : public AnimationBaseMusic
Animation4Music_QuatroRed();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroWhite.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroWhite : public AnimationBaseMusic
Animation4Music_QuatroWhite();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_QuatroYellow.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_QuatroYellow : public AnimationBaseMusic
Animation4Music_QuatroYellow();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_StereoBlue.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_StereoBlue : public AnimationBaseMusic
Animation4Music_StereoBlue();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
4 changes: 2 additions & 2 deletions include/effectengine/Animation4Music_StereoGreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Animation4Music_StereoGreen : public AnimationBaseMusic
Animation4Music_StereoGreen();

void Init(
QImage& hyperImage,
HyperImage& hyperImage,
int hyperLatchTime) override;

bool Play(QPainter* painter) override;
bool Play(HyperImage& painter) override;

static EffectDefinition getDefinition();

Expand Down
Loading