diff --git a/qt/DetectorTableModel.cpp b/qt/DetectorTableModel.cpp index 40b16f99..2bac1e00 100644 --- a/qt/DetectorTableModel.cpp +++ b/qt/DetectorTableModel.cpp @@ -1,5 +1,13 @@ -#include "DetectorTableModel.h" +/*---------------------------------------------------------*\ +| DetectorTableModel.cpp | +| | +| Table model for detector list | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ +#include "DetectorTableModel.h" #include "SettingsManager.h" DetectorTableModel::DetectorTableModel(QObject* parent) : QAbstractTableModel(parent) diff --git a/qt/DetectorTableModel.h b/qt/DetectorTableModel.h index 1f47beec..7bbde2e7 100644 --- a/qt/DetectorTableModel.h +++ b/qt/DetectorTableModel.h @@ -1,5 +1,13 @@ -#ifndef DETECTORTABLEMODEL_H -#define DETECTORTABLEMODEL_H +/*---------------------------------------------------------*\ +| DetectorTableModel.h | +| | +| Table model for detector list | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once #include #include @@ -31,5 +39,3 @@ public slots: void applySettings(); void toggleAll(const bool state, QSortFilterProxyModel* detectorSortModel); }; - -#endif // DETECTORTABLEMODEL_H diff --git a/qt/DeviceView.cpp b/qt/DeviceView.cpp index f034db31..2f3ce8fe 100644 --- a/qt/DeviceView.cpp +++ b/qt/DeviceView.cpp @@ -1,22 +1,25 @@ -/*-----------------------------------------------------*\ -| DeviceView.cpp | -| | -| OpenRGB Device view widget for Qt | -| | -| Adam Honse (calcprogrammer1@gmail.com) | -\*-----------------------------------------------------*/ +/*---------------------------------------------------------*\ +| DeviceView.cpp | +| | +| OpenRGB Device view widget for Qt | +| | +| Adam Honse (calcprogrammer1@gmail.com) | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ -#include "DeviceView.h" -#include "ResourceManager.h" -#include "RGBControllerKeyNames.h" -#include "RGBController.h" -#include "SettingsManager.h" #include #include #include #include #include #include +#include "DeviceView.h" +#include "ResourceManager.h" +#include "RGBControllerKeyNames.h" +#include "RGBController.h" +#include "SettingsManager.h" #define MAX_COLS 20 #define PAD_LED 0.1f diff --git a/qt/DeviceView.h b/qt/DeviceView.h index 6f775d92..e0f7f3ee 100644 --- a/qt/DeviceView.h +++ b/qt/DeviceView.h @@ -1,5 +1,15 @@ -#ifndef DEVICEVIEW_H -#define DEVICEVIEW_H +/*---------------------------------------------------------*\ +| DeviceView.h | +| | +| OpenRGB Device view widget for Qt | +| | +| Adam Honse (calcprogrammer1@gmail.com) | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once #include #include "RGBController.h" @@ -74,5 +84,3 @@ public slots: void clearSelection(); // Same as selecting the entire device void setSelectionColor(RGBColor); }; - -#endif // DEVICEVIEW_H diff --git a/qt/OpenRGBFont.cpp b/qt/OpenRGBFont.cpp index 15768b15..9913c7bc 100644 --- a/qt/OpenRGBFont.cpp +++ b/qt/OpenRGBFont.cpp @@ -1,10 +1,21 @@ -#include "OpenRGBFont.h" +/*---------------------------------------------------------*\ +| OpenRGBFont.cpp | +| | +| Functionality for OpenRGB custom font icons | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include #include +#include "OpenRGBFont.h" OpenRGBFont* OpenRGBFont::instance; -OpenRGBFont::OpenRGBFont(){} +OpenRGBFont::OpenRGBFont() +{ +} OpenRGBFont *OpenRGBFont::Get() { diff --git a/qt/OpenRGBFont.h b/qt/OpenRGBFont.h index 1563a774..415b1d0c 100644 --- a/qt/OpenRGBFont.h +++ b/qt/OpenRGBFont.h @@ -1,5 +1,13 @@ -#ifndef OPENRGBFONT_H -#define OPENRGBFONT_H +/*---------------------------------------------------------*\ +| OpenRGBFont.h | +| | +| Functionality for OpenRGB custom font icons | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once #include #include @@ -9,7 +17,8 @@ class OpenRGBFont public: static OpenRGBFont* Get(); - enum Glyph { + enum Glyph + { bulb = 0xF001, controller = 0xF002, cooler = 0xF003, @@ -50,5 +59,3 @@ private: int fontId = -1; QFont font; }; - -#endif // OPENRGBFONT_H diff --git a/qt/OpenRGBThemeManager.cpp b/qt/OpenRGBThemeManager.cpp index 1164b42d..4f3c992a 100644 --- a/qt/OpenRGBThemeManager.cpp +++ b/qt/OpenRGBThemeManager.cpp @@ -1,7 +1,12 @@ -#include "OpenRGBThemeManager.h" -#include "ResourceManager.h" -#include "PluginManager.h" -#include "SettingsManager.h" +/*---------------------------------------------------------*\ +| OpenRGBThemeManager.cpp | +| | +| Functionality for managing dark theme mode | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include #include #include @@ -12,6 +17,11 @@ #include #endif +#include "OpenRGBThemeManager.h" +#include "ResourceManager.h" +#include "PluginManager.h" +#include "SettingsManager.h" + void OpenRGBThemeManager::Init() { diff --git a/qt/OpenRGBThemeManager.h b/qt/OpenRGBThemeManager.h index f885338d..334da2fe 100644 --- a/qt/OpenRGBThemeManager.h +++ b/qt/OpenRGBThemeManager.h @@ -1,5 +1,13 @@ -#ifndef OPENRGBTHEMEMANAGER_H -#define OPENRGBTHEMEMANAGER_H +/*---------------------------------------------------------*\ +| OpenRGBThemeManager.h | +| | +| Functionality for managing dark theme mode | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once #include @@ -10,5 +18,3 @@ public: static void SetDarkTheme(); static bool IsDarkTheme(); }; - -#endif // OPENRGBTHEMEMANAGER_H diff --git a/qt/QTooltipedSlider.cpp b/qt/QTooltipedSlider.cpp index 97bdfe07..ad7117e4 100644 --- a/qt/QTooltipedSlider.cpp +++ b/qt/QTooltipedSlider.cpp @@ -1,9 +1,18 @@ -#include "QTooltipedSlider.h" +/*---------------------------------------------------------*\ +| QTooltipedSlider.cpp | +| | +| Qt widget for OpenRGB tooltiped slider | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include +#include "QTooltipedSlider.h" QTooltipedSlider::QTooltipedSlider(QWidget *parent) : QSlider(parent) -{ +{ connect(this, &QSlider::sliderMoved,[&](int value) { QToolTip::showText(QCursor::pos(), QString("%1").arg(value), nullptr); }); diff --git a/qt/QTooltipedSlider.h b/qt/QTooltipedSlider.h index 95e67426..6ae5e523 100644 --- a/qt/QTooltipedSlider.h +++ b/qt/QTooltipedSlider.h @@ -1,5 +1,13 @@ -#ifndef QTOOLTIPEDSLIDER_H -#define QTOOLTIPEDSLIDER_H +/*---------------------------------------------------------*\ +| QTooltipedSlider.h | +| | +| Qt widget for OpenRGB tooltiped slider | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once #include @@ -10,5 +18,3 @@ class QTooltipedSlider : public QSlider public: explicit QTooltipedSlider(QWidget *parent = nullptr); }; - -#endif // QTOOLTIPEDSLIDER_H diff --git a/qt/TabLabel.cpp b/qt/TabLabel.cpp index fb8078ff..2e0c2813 100644 --- a/qt/TabLabel.cpp +++ b/qt/TabLabel.cpp @@ -1,5 +1,14 @@ -#include "TabLabel.h" +/*---------------------------------------------------------*\ +| TabLabel.cpp | +| | +| Qt widget for OpenRGB tab label | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #include +#include "TabLabel.h" #include "OpenRGBFont.h" Ui::TabLabel::TabLabel(int icon, QString name, char* original, char* context) : diff --git a/qt/TabLabel.h b/qt/TabLabel.h index 40ab2f63..6ca8e868 100644 --- a/qt/TabLabel.h +++ b/qt/TabLabel.h @@ -1,11 +1,20 @@ -#ifndef TABLABEL_H -#define TABLABEL_H +/*---------------------------------------------------------*\ +| TabLabel.h | +| | +| Qt widget for OpenRGB tab label | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once #include #include "ui_TabLabel.h" -namespace Ui { -class TabLabel; +namespace Ui +{ + class TabLabel; } class Ui::TabLabel : public QWidget @@ -24,5 +33,3 @@ private: private slots: void changeEvent(QEvent *event); }; - -#endif // TABLABEL_H diff --git a/qt/macutils.h b/qt/macutils.h index 53d6ece9..8cdec335 100644 --- a/qt/macutils.h +++ b/qt/macutils.h @@ -1,3 +1,12 @@ +/*---------------------------------------------------------*\ +| macutils.h | +| | +| Utility function for dockless mode in MacOS | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #ifndef MACUTILS_H #define MACUTILS_H diff --git a/qt/macutils.mm b/qt/macutils.mm index 10f299dc..11226d8a 100644 --- a/qt/macutils.mm +++ b/qt/macutils.mm @@ -1,3 +1,12 @@ +/*---------------------------------------------------------*\ +| macutils.mm | +| | +| Utility function for dockless mode in MacOS | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #import #include "macutils.h"