From 4328ce7d9164ae83fc41010e2da54f0afa2f40d7 Mon Sep 17 00:00:00 2001 From: Exeldro Date: Mon, 29 Jul 2024 16:46:37 +0200 Subject: [PATCH] clang format --- config-utils.cpp | 26 +++++++++++++------------- config-utils.hpp | 6 +----- multistream.hpp | 1 - 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/config-utils.cpp b/config-utils.cpp index fde3319..996f9e9 100644 --- a/config-utils.cpp +++ b/config-utils.cpp @@ -15,27 +15,29 @@ #include "obs-frontend-api.h" #include - // Generate buttons for default/custom stuff -QPushButton *ConfigUtils::generateButton(QString buttonText) { +QPushButton *ConfigUtils::generateButton(QString buttonText) +{ auto styles = QString::fromUtf8("QPushButton[unselected=\"true\"] { background: pink; }"); - + auto button = new QPushButton(buttonText); button->setStyleSheet(styles); - + return button; } // Generate settings groupbox -QGroupBox *ConfigUtils::generateSettingsGroupBox(QString headingText) { +QGroupBox *ConfigUtils::generateSettingsGroupBox(QString headingText) +{ auto group = headingText == nullptr ? new QGroupBox : new QGroupBox(headingText); -// group->setProperty("altColor", QVariant(true)); - + // group->setProperty("altColor", QVariant(true)); + return group; } // Generate menu button -QToolButton *ConfigUtils::generateMenuButton(QString title, QIcon icon) { +QToolButton *ConfigUtils::generateMenuButton(QString title, QIcon icon) +{ auto button = new QToolButton; button->setText(title); @@ -48,21 +50,19 @@ QToolButton *ConfigUtils::generateMenuButton(QString title, QIcon icon) { return button; } - - // For setting the active property stuff on buttons -void ConfigUtils::updateButtonStyles(QPushButton *defaultButton, QPushButton *customButton, int activeIndex) { +void ConfigUtils::updateButtonStyles(QPushButton *defaultButton, QPushButton *customButton, int activeIndex) +{ defaultButton->setProperty("unselected", activeIndex != 0 ? true : false); customButton->setProperty("unselected", activeIndex != 1 ? true : false); } - // Platform icons deciphered from endpoints QIcon ConfigUtils::getPlatformIconFromEndpoint(QString endpoint) { if (endpoint.contains(QString::fromUtf8(".contribute.live-video.net")) || - endpoint.contains(QString::fromUtf8(".twitch.tv"))) { // twitch + endpoint.contains(QString::fromUtf8(".twitch.tv"))) { // twitch return QIcon(":/aitum/media/twitch.png"); } else if (endpoint.contains(QString::fromUtf8(".youtube.com"))) { // youtube return QIcon(":/aitum/media/youtube.png"); diff --git a/config-utils.hpp b/config-utils.hpp index e67acb8..4a319c6 100644 --- a/config-utils.hpp +++ b/config-utils.hpp @@ -17,12 +17,8 @@ public: static QPushButton *generateButton(QString buttonText); static QGroupBox *generateSettingsGroupBox(QString headingText); static QToolButton *generateMenuButton(QString title, QIcon icon); - - - - - static void updateButtonStyles(QPushButton *defaultButton, QPushButton *customButton, int activeIndex); + static void updateButtonStyles(QPushButton *defaultButton, QPushButton *customButton, int activeIndex); static QIcon getPlatformIconFromEndpoint(QString endpoint); }; diff --git a/multistream.hpp b/multistream.hpp index 0cac932..d84ee0c 100644 --- a/multistream.hpp +++ b/multistream.hpp @@ -50,7 +50,6 @@ private: QIcon streamActiveIcon = QIcon(":/aitum/media/streaming.svg"); QIcon streamInactiveIcon = QIcon(":/aitum/media/stream.svg"); - static void frontend_event(enum obs_frontend_event event, void *private_data); static void stream_output_stop(void *data, calldata_t *calldata);