diff --git a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_average_deck_statistics.cpp b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_average_deck_statistics.cpp index 1685a6b03..74cce5322 100644 --- a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_average_deck_statistics.cpp +++ b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_average_deck_statistics.cpp @@ -1,6 +1,7 @@ #include "edhrec_commander_api_response_average_deck_statistics.h" -void EdhrecCommanderApiResponseAverageDeckStatistics::fromJson(const QJsonObject &json) { +void EdhrecCommanderApiResponseAverageDeckStatistics::fromJson(const QJsonObject &json) +{ creature = json.value("creature").toInt(0); instant = json.value("instant").toInt(0); sorcery = json.value("sorcery").toInt(0); diff --git a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_details.cpp b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_details.cpp index 4313f5fe3..2f2791de1 100644 --- a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_details.cpp +++ b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_details.cpp @@ -1,10 +1,14 @@ #include "edhrec_commander_api_response_card_details.h" + #include EdhrecCommanderApiResponseCardDetails::EdhrecCommanderApiResponseCardDetails() - : synergy(0.0), inclusion(0), numDecks(0), potentialDecks(0) {} + : synergy(0.0), inclusion(0), numDecks(0), potentialDecks(0) +{ +} -void EdhrecCommanderApiResponseCardDetails::fromJson(const QJsonObject &json) { +void EdhrecCommanderApiResponseCardDetails::fromJson(const QJsonObject &json) +{ // Parse the fields from the JSON object name = json.value("name").toString(); sanitized = json.value("sanitized").toString(); @@ -17,7 +21,8 @@ void EdhrecCommanderApiResponseCardDetails::fromJson(const QJsonObject &json) { potentialDecks = json.value("potential_decks").toInt(0); } -void EdhrecCommanderApiResponseCardDetails::debugPrint() const { +void EdhrecCommanderApiResponseCardDetails::debugPrint() const +{ // Print out all the fields for debugging qDebug() << "Name:" << name; qDebug() << "Sanitized:" << sanitized; diff --git a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_list.cpp b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_list.cpp index 97c13dd5c..5d3eebedd 100644 --- a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_list.cpp +++ b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_list.cpp @@ -1,4 +1,5 @@ #include "edhrec_commander_api_response_card_list.h" + #include EdhrecCommanderApiResponseCardList::EdhrecCommanderApiResponseCardList() diff --git a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_commander_details.cpp b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_commander_details.cpp index 4ef2a30ee..02b686e59 100644 --- a/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_commander_details.cpp +++ b/cockatrice/src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_commander_details.cpp @@ -1,6 +1,7 @@ #include "edhrec_commander_api_response_commander_details.h" -void EdhrecCommanderApiResponseCommanderDetails::fromJson(const QJsonObject &json) { +void EdhrecCommanderApiResponseCommanderDetails::fromJson(const QJsonObject &json) +{ // Parse card-related data aetherhubUri = json.value("aetherhub_uri").toString(); archidektUri = json.value("archidekt_uri").toString(); @@ -44,7 +45,8 @@ void EdhrecCommanderApiResponseCommanderDetails::fromJson(const QJsonObject &jso url = json.value("url").toString(); } -void EdhrecCommanderApiResponseCommanderDetails::debugPrint() const { +void EdhrecCommanderApiResponseCommanderDetails::debugPrint() const +{ qDebug() << "Card Data:"; qDebug() << "Aetherhub URI:" << aetherhubUri; qDebug() << "Archidekt URI:" << archidektUri; diff --git a/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.cpp b/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.cpp index 2be00146d..691c9d8b8 100644 --- a/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.cpp +++ b/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.cpp @@ -1,4 +1,5 @@ #include "edhrec_commander_api_response_card_details_display_widget.h" + #include "../../../../game/cards/card_database_manager.h" EdhrecCommanderApiResponseCardDetailsDisplayWidget::EdhrecCommanderApiResponseCardDetailsDisplayWidget( @@ -24,13 +25,13 @@ EdhrecCommanderApiResponseCardDetailsDisplayWidget::EdhrecCommanderApiResponseCa labelColor = QColor(255, 0, 0); // Red } else if (inclusionRate <= 60) { int red = 255 - ((inclusionRate - 30) * 2); - int green = (inclusionRate - 30) * 4; // Adjust green to make the transition smoother - labelColor = QColor(red, green, 0); // purple-ish + int green = (inclusionRate - 30) * 4; // Adjust green to make the transition smoother + labelColor = QColor(red, green, 0); // purple-ish } else if (inclusionRate <= 90) { - int green = (inclusionRate - 60) * 5; // Increase green - labelColor = QColor(100, green, 100); // Green shades + int green = (inclusionRate - 60) * 5; // Increase green + labelColor = QColor(100, green, 100); // Green shades } else { - labelColor = QColor(100, 200, 100); // Dark Green + labelColor = QColor(100, 200, 100); // Dark Green } label->setStyleSheet(QString("color: %1").arg(labelColor.name())); diff --git a/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.h b/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.h index e3db52fbb..1cd76989c 100644 --- a/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.h +++ b/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.h @@ -5,14 +5,15 @@ #include "api_response/edhrec_commander_api_response_card_details.h" #include -#include #include +#include class EdhrecCommanderApiResponseCardDetailsDisplayWidget : public QWidget { Q_OBJECT public: - explicit EdhrecCommanderApiResponseCardDetailsDisplayWidget(QWidget *parent, + explicit EdhrecCommanderApiResponseCardDetailsDisplayWidget( + QWidget *parent, const EdhrecCommanderApiResponseCardDetails &_toDisplay); private: diff --git a/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_display_widget.cpp b/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_display_widget.cpp index 77f483b7e..eee13d059 100644 --- a/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_display_widget.cpp +++ b/cockatrice/src/client/tabs/api/edhrec/edhrec_commander_api_response_display_widget.cpp @@ -31,7 +31,8 @@ EdhrecCommanderApiResponseDisplayWidget::EdhrecCommanderApiResponseDisplayWidget QStringList widgetNames; // Add commander details - auto commanderPicture = new EdhrecCommanderResponseCommanderDetailsDisplayWidget(this, response.container.getCommanderDetails()); + auto commanderPicture = + new EdhrecCommanderResponseCommanderDetailsDisplayWidget(this, response.container.getCommanderDetails()); cardDisplayLayout->addWidget(commanderPicture); widgetNames.append("Commander Details"); diff --git a/cockatrice/src/client/ui/widgets/general/display/banner_widget.cpp b/cockatrice/src/client/ui/widgets/general/display/banner_widget.cpp index 7c61deaa2..cf1959d7a 100644 --- a/cockatrice/src/client/ui/widgets/general/display/banner_widget.cpp +++ b/cockatrice/src/client/ui/widgets/general/display/banner_widget.cpp @@ -14,7 +14,7 @@ BannerWidget::BannerWidget(QWidget *parent, const QString &text, Qt::Orientation bannerLabel->setStyleSheet("font-size: 24px; font-weight: bold; color: white;"); // Layout to center the banner label - QVBoxLayout* layout = new QVBoxLayout(this); + QVBoxLayout *layout = new QVBoxLayout(this); layout->addWidget(bannerLabel); layout->setContentsMargins(0, 20, 0, 20); // Space for the gradient setLayout(layout); @@ -37,7 +37,7 @@ void BannerWidget::toggleBuddyVisibility() const } } -void BannerWidget::paintEvent(QPaintEvent* event) +void BannerWidget::paintEvent(QPaintEvent *event) { Q_UNUSED(event); @@ -55,7 +55,7 @@ void BannerWidget::paintEvent(QPaintEvent* event) } // Set neutral gradient colors with calculated transparency - gradient.setColorAt(0, QColor(200, 200, 200, alpha)); // Light grey with alpha + gradient.setColorAt(0, QColor(200, 200, 200, alpha)); // Light grey with alpha gradient.setColorAt(1, QColor(100, 100, 100, alpha / 1.5)); // Darker grey, slightly more transparent // Fill the widget background with the gradient diff --git a/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.h b/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.h index 99cd042f7..93a5410a6 100644 --- a/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.h +++ b/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.h @@ -6,8 +6,6 @@ #include #include #include -#include - inline Q_LOGGING_CATEGORY(FlowWidgetLog, "flow_widget"); inline Q_LOGGING_CATEGORY(FlowWidgetSizeLog, "flow_widget.size"); diff --git a/cockatrice/src/client/ui/window_main.h b/cockatrice/src/client/ui/window_main.h index 6da38b414..9910cf7fb 100644 --- a/cockatrice/src/client/ui/window_main.h +++ b/cockatrice/src/client/ui/window_main.h @@ -163,7 +163,7 @@ public: } ~MainWindow() override; - TabSupervisor* getTabSupervisor() const + TabSupervisor *getTabSupervisor() const { return tabSupervisor; }