Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/src/closedialog.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// Copyright (C) 2020 - 2026 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -14,9 +14,11 @@
#if QT_VERSION_MAJOR > 5
#include <QRegularExpression>
#else
#include <QRegExp>

Check warning on line 17 in src/src/closedialog.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QRegExp> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#endif
#include <QDebug>

Check warning on line 19 in src/src/closedialog.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDebug> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "ddlog.h"
using namespace DDLog;

DWIDGET_USE_NAMESPACE

Expand All @@ -25,7 +27,7 @@
CloseDialog::CloseDialog(QWidget *parent, QString strText)
: DDialog(parent), m_leftNamebtn(tr("Cancel")), m_rightNamebtn(tr("Close"))
{
qDebug() << "Function started: CloseDialog constructor";
qCDebug(appLog) << "Function started: CloseDialog constructor";
this->setIcon(QIcon(":/images/icons/warning.svg"));
setFixedSize(380, 140);
m_widget = new DWidget(this);
Expand Down Expand Up @@ -64,5 +66,5 @@
setTabOrder(windowCloseBtn, cancelBtn);
setTabOrder(cancelBtn, closeBtn);

qDebug() << "Function completed: CloseDialog constructor";
qCDebug(appLog) << "Function completed: CloseDialog constructor";
}
20 changes: 11 additions & 9 deletions src/src/devnummonitor.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// Copyright (C) 2020 - 2026 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#include "devnummonitor.h"

#include <QDebug>

Check warning on line 8 in src/src/devnummonitor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDebug> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "ddlog.h"
using namespace DDLog;

extern "C"
{
Expand All @@ -15,7 +17,7 @@

DevNumMonitor::DevNumMonitor()
{
qDebug() << "Initializing DevNumMonitor";
qCDebug(appLog) << "Initializing DevNumMonitor";
m_noDevice = false;
m_pTimer = nullptr;
}
Expand All @@ -26,12 +28,12 @@
*/
void DevNumMonitor::startCheck()
{
qDebug() << "Starting device number monitoring";
qCDebug(appLog) << "Starting device number monitoring";
m_pTimer = new QTimer;
m_pTimer->setInterval(500);
connect(m_pTimer, &QTimer::timeout, this, &DevNumMonitor::timeOutSlot);
m_pTimer->start();
qDebug() << "Device monitoring timer started with 500ms interval";
qCDebug(appLog) << "Device monitoring timer started with 500ms interval";
}

//void DevNumMonitor::run()
Expand Down Expand Up @@ -59,15 +61,15 @@

if (deviceCount < 1) {
if (!m_noDevice) {
qWarning() << "No camera devices found";
qCWarning(appLog) << "No camera devices found";
emit noDeviceFound();
m_noDevice = true;
}
} else {
if (m_noDevice) {
v4l2_dev_sys_data_t *v4l2_devices = get_device_list()->list_devices;
if (v4l2_devices) {
qWarning() << "Device found:" << v4l2_devices[0].device << v4l2_devices[0].name;
qCWarning(appLog) << "Device found:" << v4l2_devices[0].device << v4l2_devices[0].name;
}
}
m_noDevice = false;
Expand All @@ -83,9 +85,9 @@

DevNumMonitor::~DevNumMonitor()
{
qDebug() << "Destroying DevNumMonitor";
qCDebug(appLog) << "Destroying DevNumMonitor";
if (nullptr != m_pTimer) {
qDebug() << "Stopping and cleaning up monitoring timer";
qCDebug(appLog) << "Stopping and cleaning up monitoring timer";
m_pTimer->stop();
m_pTimer->deleteLater();
m_pTimer = nullptr;
Expand Down
22 changes: 12 additions & 10 deletions src/src/exposureslider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@

#include <DFontSizeManager>
#include <DApplication>
#include <QParallelAnimationGroup>

Check warning on line 15 in src/src/exposureslider.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QParallelAnimationGroup> not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include <QDebug>

Check warning on line 17 in src/src/exposureslider.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QDebug> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "ddlog.h"
using namespace DDLog;

#define WIDTH 40
#define HEIGHT 192
Expand All @@ -28,7 +30,7 @@
,m_curValue(0)
,m_opacity(102) //UI默认
{
qDebug() << "Initializing ExposureSlider";
qCDebug(appLog) << "Initializing ExposureSlider";
resize(WIDTH, HEIGHT);
QVBoxLayout *vLayout = new QVBoxLayout(this);
vLayout->setContentsMargins(0, 0, 0, 0);
Expand All @@ -54,7 +56,7 @@
m_pLabShowValue->setPalette(pa);
//字体大小不随系统变化
connect(qApp, &QGuiApplication::fontChanged, this, [=](){
qDebug() << "Updating font settings for value display";
qCDebug(appLog) << "Updating font settings for value display";
QFont font("SourceHanSansSC");
font.setPixelSize(15);
font.setWeight(QFont::Medium);
Expand Down Expand Up @@ -82,19 +84,19 @@

m_pLabShowValue->hide();
m_slider->hide();
qDebug() << "ExposureSlider initialization completed";
qCDebug(appLog) << "ExposureSlider initialization completed";
}

void ExposureSlider::setOpacity(int opacity)
{
qDebug() << "Setting slider opacity to:" << opacity;
qCDebug(appLog) << "Setting slider opacity to:" << opacity;
m_opacity = opacity;
update();
}

void ExposureSlider::showContent(bool show, bool isShortCut)
{
qDebug() << "Showing exposure slider content:" << show << "isShortCut:" << isShortCut;
qCDebug(appLog) << "Showing exposure slider content:" << show << "isShortCut:" << isShortCut;
QGraphicsOpacityEffect *effectSlider = new QGraphicsOpacityEffect(m_slider);
m_slider->setGraphicsEffect(effectSlider);
QPropertyAnimation *opacity = new QPropertyAnimation(effectSlider, "opacity", this);
Expand All @@ -112,14 +114,14 @@
pGroup->addAnimation(opacity1);

if (show) {
qDebug() << "Condition check: Showing content (fade in)";
qCDebug(appLog) << "Condition check: Showing content (fade in)";
opacity->setStartValue(0);
opacity->setEndValue(1);
opacity1->setStartValue(0);
opacity1->setEndValue(1);

connect(pGroup, &QParallelAnimationGroup::finished, this, [=](){
qDebug() << "Animation finished, handling cleanup";
qCDebug(appLog) << "Animation finished, handling cleanup";
m_slider->slider()->setFocus();
pGroup->deleteLater();
});
Expand All @@ -128,23 +130,23 @@
m_slider->show();
pGroup->start();
} else {
qDebug() << "Condition check: Hiding content (fade out)";
qCDebug(appLog) << "Condition check: Hiding content (fade out)";
opacity->setStartValue(1);
opacity->setEndValue(0);
opacity1->setStartValue(1);
opacity1->setEndValue(0);

connect(pGroup, &QParallelAnimationGroup::finished, this, &ExposureSlider::contentHided);
connect(pGroup, &QParallelAnimationGroup::finished, this, [=](){
qDebug() << "Animation finished, hiding widgets";
qCDebug(appLog) << "Animation finished, hiding widgets";
m_pLabShowValue->hide();
m_slider->hide();
pGroup->deleteLater();
});

pGroup->start();
}
qDebug() << "Function completed: showContent";
qCDebug(appLog) << "Function completed: showContent";
}

void ExposureSlider::paintEvent(QPaintEvent *event)
Expand Down
52 changes: 27 additions & 25 deletions src/src/filterpreviewbutton.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// Copyright (C) 2020 - 2026 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#include "filterpreviewbutton.h"
#include "ddlog.h"
using namespace DDLog;

extern "C" {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Expand Down Expand Up @@ -32,11 +34,11 @@ DWIDGET_USE_NAMESPACE;
filterPreviewButton::filterPreviewButton(QWidget *parent, efilterType filter/* = filter_Normal*/): QWidget(parent)
, m_filterType(filter)
{
qDebug() << "Function started: filterPreviewButton constructor";
qCDebug(appLog) << "Function started: filterPreviewButton constructor";

QString objName = filterName_CUBE(filter);
if (objName.isEmpty()) {
qDebug() << "Condition check: Filter name empty, using 'normal'";
qCDebug(appLog) << "Condition check: Filter name empty, using 'normal'";
objName = "normal";
}
setObjectName(objName);
Expand All @@ -56,7 +58,7 @@ filterPreviewButton::filterPreviewButton(QWidget *parent, efilterType filter/* =
setAutoFillBackground(false);
resize(BUTTON_SIZE, BUTTON_SIZE);

qDebug() << "Function completed: filterPreviewButton constructor";
qCDebug(appLog) << "Function completed: filterPreviewButton constructor";
}

void filterPreviewButton::setbackground(QColor color)
Expand Down Expand Up @@ -286,44 +288,44 @@ QString filterPreviewButton::filterName(efilterType type)
QString name = tr("Normal");
switch (type) {
case filter_Normal:
qDebug() << "Condition check: Normal filter";
qCDebug(appLog) << "Condition check: Normal filter";
name = tr("Normal");
break;
case filter_Vivid:
qDebug() << "Condition check: Vivid filter";
qCDebug(appLog) << "Condition check: Vivid filter";
name = tr("Vivid");
break;
case filter_Warm:
qDebug() << "Condition check: Warm filter";
qCDebug(appLog) << "Condition check: Warm filter";
name = tr("Warm");
break;
case filter_Cold:
qDebug() << "Condition check: Cold filter";
qCDebug(appLog) << "Condition check: Cold filter";
name = tr("Cold");
break;
case filter_Retro:
qDebug() << "Condition check: Retro filter";
qCDebug(appLog) << "Condition check: Retro filter";
name = tr("Retro");
break;
case filter_Film:
qDebug() << "Condition check: Film filter";
qCDebug(appLog) << "Condition check: Film filter";
name = tr("Film");
break;
case filter_Gray:
qDebug() << "Condition check: Gray filter";
qCDebug(appLog) << "Condition check: Gray filter";
name = tr("Gray");
break;
case filter_BAndW:
qDebug() << "Condition check: B&W filter";
qCDebug(appLog) << "Condition check: B&W filter";
name = tr("B&W");
break;
default:
qDebug() << "Condition check: Unknown filter type, using Normal";
qCDebug(appLog) << "Condition check: Unknown filter type, using Normal";
name = tr("Normal");
break;
}

qDebug() << "Function completed: filterName:" << name;
qCDebug(appLog) << "Function completed: filterName:" << name;
return name;
}

Expand All @@ -333,43 +335,43 @@ QString filterPreviewButton::filterName_CUBE(efilterType type)
QString name = "";
switch (type) {
case filter_Normal:
qDebug() << "Condition check: Normal filter (no CUBE)";
qCDebug(appLog) << "Condition check: Normal filter (no CUBE)";
name = "";
break;
case filter_Vivid:
qDebug() << "Condition check: Vivid filter";
qCDebug(appLog) << "Condition check: Vivid filter";
name = "bright";
break;
case filter_Warm:
qDebug() << "Condition check: Warm filter";
qCDebug(appLog) << "Condition check: Warm filter";
name = "warm";
break;
case filter_Cold:
qDebug() << "Condition check: Cold filter";
qCDebug(appLog) << "Condition check: Cold filter";
name = "cold";
break;
case filter_Retro:
qDebug() << "Condition check: Retro filter";
qCDebug(appLog) << "Condition check: Retro filter";
name = "classic";
break;
case filter_Film:
qDebug() << "Condition check: Film filter";
qCDebug(appLog) << "Condition check: Film filter";
name = "print";
break;
case filter_Gray:
qDebug() << "Condition check: Gray filter";
qCDebug(appLog) << "Condition check: Gray filter";
name = "gray";
break;
case filter_BAndW:
qDebug() << "Condition check: B&W filter";
qCDebug(appLog) << "Condition check: B&W filter";
name = "black";
break;
default:
qDebug() << "Condition check: Unknown filter type, using empty";
qCDebug(appLog) << "Condition check: Unknown filter type, using empty";
name = "";
break;
}

qDebug() << "Function completed: filterName_CUBE:" << name;
qCDebug(appLog) << "Function completed: filterName_CUBE:" << name;
return name;
}
Loading
Loading