Standardize Doxygen documentation (#6885)

This commit is contained in:
DawnFire42 2026-05-21 16:58:07 -04:00 committed by GitHub
parent 03d54265fe
commit 33e0f8699b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
306 changed files with 539 additions and 487 deletions

View file

@ -1,8 +1,8 @@
/**
* @file abstract_game.h
* @ingroup GameLogic
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_ABSTRACT_GAME_H
#define COCKATRICE_ABSTRACT_GAME_H

View file

@ -1,8 +1,8 @@
/**
* @file abstract_card_drag_item.h
* @ingroup GameGraphicsCards
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef ABSTRACTCARDDRAGITEM_H
#define ABSTRACTCARDDRAGITEM_H

View file

@ -1,8 +1,8 @@
/**
* @file abstract_counter.h
* @ingroup GameGraphicsPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COUNTER_H
#define COUNTER_H

View file

@ -1,8 +1,8 @@
/**
* @file arrow_item.h
* @ingroup GameGraphics
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef ARROWITEM_H
#define ARROWITEM_H

View file

@ -1,8 +1,8 @@
/**
* @file arrow_target.h
* @ingroup GameGraphics
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef ARROWTARGET_H
#define ARROWTARGET_H

View file

@ -1,8 +1,8 @@
/**
* @file card_drag_item.h
* @ingroup GameGraphicsCards
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef CARDDRAGITEM_H
#define CARDDRAGITEM_H

View file

@ -1,8 +1,8 @@
/**
* @file card_item.h
* @ingroup GameGraphicsCards
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef CARDITEM_H
#define CARDITEM_H

View file

@ -1,8 +1,8 @@
/**
* @file card_list.h
* @ingroup GameLogicCards
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef CARDLIST_H
#define CARDLIST_H

View file

@ -1,8 +1,8 @@
/**
* @file counter_general.h
* @ingroup GameGraphicsPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COUNTER_GENERAL_H
#define COUNTER_GENERAL_H

View file

@ -1,8 +1,8 @@
/**
* @file translate_counter_name.h
* @ingroup GameGraphicsPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef TRANSLATECOUNTERNAME_H
#define TRANSLATECOUNTERNAME_H

View file

@ -12,16 +12,16 @@
*/
namespace CardDimensions
{
/// Card width in pixels
/** @brief Card width in pixels. */
constexpr int WIDTH = 72;
/// Card height in pixels
/** @brief Card height in pixels. */
constexpr int HEIGHT = 102;
/// Pre-converted for floating-point contexts (Z-value calculations)
/** @brief Pre-converted for floating-point contexts (Z-value calculations). */
constexpr qreal WIDTH_F = static_cast<qreal>(WIDTH);
constexpr qreal HEIGHT_F = static_cast<qreal>(HEIGHT);
/// Half-dimensions for centering and rotation transforms
/** @brief Half-dimensions for centering and rotation transforms. */
constexpr qreal WIDTH_HALF_F = WIDTH_F / 2;
constexpr qreal HEIGHT_HALF_F = HEIGHT_F / 2;
} // namespace CardDimensions

View file

@ -1,8 +1,8 @@
/**
* @file deck_view.h
* @ingroup Lobby
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DECKVIEW_H
#define DECKVIEW_H

View file

@ -1,8 +1,8 @@
/**
* @file deck_view_container.h
* @ingroup Lobby
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DECK_VIEW_CONTAINER_H
#define DECK_VIEW_CONTAINER_H

View file

@ -1,8 +1,8 @@
/**
* @file tabbed_deck_view_container.h
* @ingroup Lobby
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef TABBED_DECK_VIEW_CONTAINER_H
#define TABBED_DECK_VIEW_CONTAINER_H

View file

@ -1,8 +1,8 @@
/**
* @file dlg_create_token.h
* @ingroup GameDialogs
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DLG_CREATETOKEN_H
#define DLG_CREATETOKEN_H

View file

@ -1,8 +1,8 @@
/**
* @file dlg_move_top_cards_until.h
* @ingroup GameDialogs
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DLG_MOVE_TOP_CARDS_UNTIL_H
#define DLG_MOVE_TOP_CARDS_UNTIL_H

View file

@ -1,8 +1,8 @@
/**
* @file dlg_roll_dice.h
* @ingroup GameDialogs
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DLG_ROLL_DICE_H
#define DLG_ROLL_DICE_H

View file

@ -1,8 +1,8 @@
/**
* @file game.h
* @ingroup GameLogic
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_GAME_H
#define COCKATRICE_GAME_H

View file

@ -1,8 +1,8 @@
/**
* @file game_event_handler.h
* @ingroup GameLogic
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_GAME_EVENT_HANDLER_H
#define COCKATRICE_GAME_EVENT_HANDLER_H

View file

@ -1,8 +1,8 @@
/**
* @file game_meta_info.h
* @ingroup GameLogic
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef GAME_META_INFO_H
#define GAME_META_INFO_H

View file

@ -59,10 +59,12 @@ private:
*/
void updateHover(const QPointF &scenePos);
/// Activates hover state and escapes the card from its clip container so hover scaling is visible beyond zone
/// bounds.
/**
* @brief Activates hover state and escapes the card from its clip container
* so hover scaling is visible beyond zone bounds.
*/
void beginCardHover(CardItem *card);
/// Deactivates hover state and restores the card to its clip container.
/** @brief Deactivates hover state and restores the card to its clip container. */
void endCardHover(CardItem *card);
public:
@ -73,13 +75,13 @@ public:
*/
explicit GameScene(PhasesToolbar *_phasesToolbar, QObject *parent = nullptr);
/** Destructor, cleans up timer and zone views. */
/** @brief Destructor, cleans up timer and zone views. */
~GameScene() override;
/** Updates UI text for all zone views. */
/** @brief Updates UI text for all zone views. */
void retranslateUi();
/** Gets all selected CardItems */
/** @brief Gets all selected CardItems. */
QList<CardItem *> selectedCards() const;
/**
@ -100,7 +102,7 @@ public:
*/
void adjustPlayerRotation(int rotationAdjustment);
/** Recomputes the layout of players and the scene size. */
/** @brief Recomputes the layout of players and the scene size. */
void rearrange();
/**
@ -160,41 +162,41 @@ public:
*/
void resizeColumnsAndPlayers(const QList<qreal> &minWidthByColumn, qreal newWidth);
/** Finds the topmost card zone under the cursor. */
/** @brief Finds the topmost card zone under the cursor. */
static CardZone *findTopmostZone(const QList<QGraphicsItem *> &items);
/** Finds the topmost card in a given zone, considering attachments and Z-order. */
/** @brief Finds the topmost card in a given zone, considering attachments and Z-order. */
static CardItem *findTopmostCardInZone(const QList<QGraphicsItem *> &items, CardZone *zone);
/** Updates hovered card highlighting. */
/** @brief Updates hovered card highlighting. */
void updateHoveredCard(CardItem *newCard);
/** Registers a card for animation updates. */
/** @brief Registers a card for animation updates. */
void registerAnimationItem(AbstractCardItem *card);
/** Unregisters a card from animation updates. */
/** @brief Unregisters a card from animation updates. */
void unregisterAnimationItem(AbstractCardItem *card);
void startRubberBand(const QPointF &selectionOrigin);
void resizeRubberBand(const QPointF &cursorPoint, int selectedCount);
void stopRubberBand();
public slots:
/** Toggles a zone view for a player. */
/** @brief Toggles a zone view for a player. */
void toggleZoneView(PlayerLogic *player, const QString &zoneName, int numberCards, bool isReversed = false);
/** Adds a revealed zone view (for shown cards). */
/** @brief Adds a revealed zone view (for shown cards). */
void addRevealedZoneView(PlayerLogic *player,
CardZoneLogic *zone,
const QList<const ServerInfo_Card *> &cardList,
bool withWritePermission);
/** Removes a zone view widget from the scene. */
/** @brief Removes a zone view widget from the scene. */
void removeZoneView(ZoneViewWidget *item);
/** Closes all zone views. */
/** @brief Closes all zone views. */
void clearViews();
/** Closes the most recently added zone view. */
/** @brief Closes the most recently added zone view. */
void closeMostRecentZoneView();
QTransform getViewTransform() const;
QTransform getViewportTransform() const;
@ -205,10 +207,10 @@ public slots:
void clearArrowsForPlayer(int playerId);
protected:
/** Handles hover updates. */
/** @brief Handles hover updates. */
bool event(QEvent *event) override;
/** Handles animation timer updates. */
/** @brief Handles animation timer updates. */
void timerEvent(QTimerEvent *event) override;
signals:

View file

@ -1,8 +1,8 @@
/**
* @file game_state.h
* @ingroup GameLogic
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_GAME_STATE_H
#define COCKATRICE_GAME_STATE_H

View file

@ -1,8 +1,8 @@
/**
* @file game_view.h
* @ingroup GameGraphics
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef GAMEVIEW_H
#define GAMEVIEW_H

View file

@ -1,8 +1,8 @@
/**
* @file hand_counter.h
* @ingroup GameGraphicsPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef HANDCOUNTER_H
#define HANDCOUNTER_H

View file

@ -1,8 +1,8 @@
/**
* @file message_log_widget.h
* @ingroup GameWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef MESSAGELOGWIDGET_H
#define MESSAGELOGWIDGET_H

View file

@ -1,8 +1,8 @@
/**
* @file phase.h
* @ingroup GameLogic
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef PHASE_H
#define PHASE_H

View file

@ -2,8 +2,8 @@
* @file phases_toolbar.h
* @ingroup GameGraphics
* @ingroup GameWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef PHASESTOOLBAR_H
#define PHASESTOOLBAR_H

View file

@ -1,8 +1,8 @@
/**
* @file card_menu_action_type.h
* @ingroup GameMenusPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_CARD_MENU_ACTION_TYPE_H
#define COCKATRICE_CARD_MENU_ACTION_TYPE_H

View file

@ -1,8 +1,8 @@
/**
* @file event_processing_options.h
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_EVENT_PROCESSING_OPTIONS_H
#define COCKATRICE_EVENT_PROCESSING_OPTIONS_H

View file

@ -19,13 +19,13 @@ class AbstractPlayerComponent
public:
virtual ~AbstractPlayerComponent() = default;
/// Bind keyboard shortcuts. Called when this player gains focus.
/** @brief Bind keyboard shortcuts. Called when this player gains focus. */
virtual void setShortcutsActive() = 0;
/// Unbind keyboard shortcuts. Called when this player loses focus.
/** @brief Unbind keyboard shortcuts. Called when this player loses focus. */
virtual void setShortcutsInactive() = 0;
/// Retranslate all user-visible strings. Called on language change.
/** @brief Retranslate all user-visible strings. Called on language change. */
virtual void retranslateUi() = 0;
};

View file

@ -1,8 +1,8 @@
/**
* @file card_menu.h
* @ingroup GameMenusCards
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_CARD_MENU_H
#define COCKATRICE_CARD_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file custom_zone_menu.h
* @ingroup GameMenusZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_CUSTOM_ZONE_MENU_H
#define COCKATRICE_CUSTOM_ZONE_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file grave_menu.h
* @ingroup GameMenusZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_GRAVE_MENU_H
#define COCKATRICE_GRAVE_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file hand_menu.h
* @ingroup GameMenusZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_HAND_MENU_H
#define COCKATRICE_HAND_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file library_menu.h
* @ingroup GameMenusZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_LIBRARY_MENU_H
#define COCKATRICE_LIBRARY_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file move_menu.h
* @ingroup GameMenusZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_MOVE_MENU_H
#define COCKATRICE_MOVE_MENU_H

View file

@ -41,7 +41,7 @@ private slots:
public:
explicit PlayerMenu(PlayerLogic *player);
/// Lifecycle methods: delegate to all managedComponents, plus counters separately via player->getCounters().
/** @brief Retranslate all user-visible strings. Called on language change. */
void retranslateUi();
QMenu *updateCardMenu(const CardItem *card);
@ -71,9 +71,9 @@ public:
return shortcutsActive;
}
/// Delegates to all managedComponents, plus counters separately.
/** @brief Bind keyboard shortcuts. Called when this player gains focus. */
void setShortcutsActive();
/// Delegates to all managedComponents, plus counters separately.
/** @brief Unbind keyboard shortcuts. Called when this player loses focus. */
void setShortcutsInactive();
private:
@ -89,11 +89,13 @@ private:
SayMenu *sayMenu;
CustomZoneMenu *customZonesMenu;
/// Drives AbstractPlayerComponent lifecycle delegation. Counters are iterated separately via player->getCounters().
/** @brief Drives AbstractPlayerComponent lifecycle delegation. Counters are iterated separately via
* player->getCounters().
*/
QList<AbstractPlayerComponent *> managedComponents;
bool shortcutsActive = false;
/// Creates component, adds it as a submenu of playerMenu, and registers in managedComponents.
/** @brief Creates component, adds it as a submenu of playerMenu, and registers in managedComponents. */
template <typename MenuT, typename... Args> MenuT *addManagedMenu(Args &&...args)
{
auto *menu = new MenuT(std::forward<Args>(args)...);
@ -102,7 +104,7 @@ private:
return menu;
}
/// Creates component and registers in managedComponents, but does NOT add it as a submenu.
/** @brief Creates component and registers in managedComponents, but does NOT add it as a submenu. */
template <typename ComponentT, typename... Args> ComponentT *createManagedComponent(Args &&...args)
{
auto *component = new ComponentT(std::forward<Args>(args)...);

View file

@ -1,8 +1,8 @@
/**
* @file pt_menu.h
* @ingroup GameMenusCards
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PT_MENU_H
#define COCKATRICE_PT_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file rfg_menu.h
* @ingroup GameMenusZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_RFG_MENU_H
#define COCKATRICE_RFG_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file say_menu.h
* @ingroup GameMenusPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_SAY_MENU_H
#define COCKATRICE_SAY_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file sideboard_menu.h
* @ingroup GameMenusZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_SIDEBOARD_MENU_H
#define COCKATRICE_SIDEBOARD_MENU_H

View file

@ -1,8 +1,8 @@
/**
* @file utility_menu.h
* @ingroup GameMenusPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_UTILITY_MENU_H
#define COCKATRICE_UTILITY_MENU_H

View file

@ -2,8 +2,8 @@
* @file player_actions.h
* @ingroup GameLogicActions
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PLAYER_ACTIONS_H
#define COCKATRICE_PLAYER_ACTIONS_H

View file

@ -1,8 +1,8 @@
/**
* @file player_area.h
* @ingroup GameGraphicsPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PLAYER_AREA_H
#define COCKATRICE_PLAYER_AREA_H

View file

@ -1,8 +1,8 @@
/**
* @file player_event_handler.h
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PLAYER_EVENT_HANDLER_H
#define COCKATRICE_PLAYER_EVENT_HANDLER_H

View file

@ -1,8 +1,8 @@
/**
* @file player_graphics_item.h
* @ingroup GameGraphicsPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PLAYER_GRAPHICS_ITEM_H
#define COCKATRICE_PLAYER_GRAPHICS_ITEM_H

View file

@ -1,8 +1,8 @@
/**
* @file player_info.h
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PLAYER_INFO_H
#define COCKATRICE_PLAYER_INFO_H

View file

@ -1,8 +1,8 @@
/**
* @file player_list_widget.h
* @ingroup GameWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef PLAYERLISTWIDGET_H
#define PLAYERLISTWIDGET_H

View file

@ -1,8 +1,8 @@
/**
* @file player.h
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef PLAYER_H
#define PLAYER_H

View file

@ -1,8 +1,8 @@
/**
* @file player_manager.h
* @ingroup GameLogicPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PLAYER_MANAGER_H
#define COCKATRICE_PLAYER_MANAGER_H

View file

@ -1,8 +1,8 @@
/**
* @file player_target.h
* @ingroup GameGraphicsPlayers
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef PLAYERTARGET_H
#define PLAYERTARGET_H

View file

@ -2,8 +2,8 @@
* @file replay.h
* @ingroup GameLogic
* @ingroup Replay
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_REPLAY_H
#define COCKATRICE_REPLAY_H

View file

@ -66,12 +66,9 @@ namespace ZValueLayerManager
*/
enum class Layer
{
/// Zone-level elements like backgrounds and containers
Zone,
/// Cards rendered in zones (uses sequential Z-values)
Card,
/// Temporary UI elements like hovered cards and drag items
Overlay
Zone, ///< Zone-level elements like backgrounds and containers.
Card, ///< Cards rendered in zones (uses sequential Z-values).
Overlay ///< Temporary UI elements like hovered cards and drag items.
};
/**

View file

@ -1,8 +1,8 @@
/**
* @file card_zone_logic.h
* @ingroup GameLogicZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_CARD_ZONE_LOGIC_H
#define COCKATRICE_CARD_ZONE_LOGIC_H

View file

@ -1,8 +1,8 @@
/**
* @file hand_zone_logic.h
* @ingroup GameLogicZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_HAND_ZONE_LOGIC_H
#define COCKATRICE_HAND_ZONE_LOGIC_H

View file

@ -1,8 +1,8 @@
/**
* @file pile_zone_logic.h
* @ingroup GameLogicZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_PILE_ZONE_LOGIC_H
#define COCKATRICE_PILE_ZONE_LOGIC_H

View file

@ -1,8 +1,8 @@
/**
* @file stack_zone_logic.h
* @ingroup GameLogicZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_STACK_ZONE_LOGIC_H
#define COCKATRICE_STACK_ZONE_LOGIC_H

View file

@ -1,8 +1,8 @@
/**
* @file table_zone_logic.h
* @ingroup GameLogicZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_TABLE_ZONE_LOGIC_H
#define COCKATRICE_TABLE_ZONE_LOGIC_H

View file

@ -1,8 +1,8 @@
/**
* @file view_zone_logic.h
* @ingroup GameLogicZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_VIEW_ZONE_LOGIC_H
#define COCKATRICE_VIEW_ZONE_LOGIC_H