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 deck_stats_interface.h
* @ingroup ApiInterfaces
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DECKSTATS_INTERFACE_H
#define DECKSTATS_INTERFACE_H

View file

@ -1,8 +1,8 @@
/**
* @file tapped_out_interface.h
* @ingroup ApiInterfaces
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef TAPPEDOUT_INTERFACE_H
#define TAPPEDOUT_INTERFACE_H

View file

@ -1,8 +1,8 @@
/**
* @file deck_link_to_api_transformer.h
* @ingroup ApiInterfaces
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DECK_LINK_TO_API_TRANSFORMER_H
#define DECK_LINK_TO_API_TRANSFORMER_H

View file

@ -1,8 +1,8 @@
/**
* @file interface_json_deck_parser.h
* @ingroup ApiInterfaces
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef INTERFACE_JSON_DECK_PARSER_H
#define INTERFACE_JSON_DECK_PARSER_H

View file

@ -1,8 +1,8 @@
/**
* @file spoiler_background_updater.h
* @ingroup Client
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_SPOILER_DOWNLOADER_H
#define COCKATRICE_SPOILER_DOWNLOADER_H

View file

@ -1,8 +1,8 @@
/**
* @file client_update_checker.h
* @ingroup ClientUpdate
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef CLIENT_UPDATE_CHECKER_H
#define CLIENT_UPDATE_CHECKER_H

View file

@ -1,8 +1,8 @@
/**
* @file release_channel.h
* @ingroup ClientUpdate
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef RELEASECHANNEL_H
#define RELEASECHANNEL_H

View file

@ -1,8 +1,8 @@
/**
* @file update_downloader.h
* @ingroup ClientUpdate
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COCKATRICE_UPDATEDOWNLOADER_H
#define COCKATRICE_UPDATEDOWNLOADER_H

View file

@ -1,8 +1,8 @@
/**
* @file cache_settings.h
* @ingroup Settings
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef SETTINGSCACHE_H
#define SETTINGSCACHE_H

View file

@ -1,8 +1,8 @@
/**
* @file card_counter_settings.h
* @ingroup GameSettings
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef CARD_COUNTER_SETTINGS_H
#define CARD_COUNTER_SETTINGS_H

View file

@ -1,8 +1,8 @@
/**
* @file shortcut_treeview.h
* @ingroup CoreSettings
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef SHORTCUT_TREEVIEW_H
#define SHORTCUT_TREEVIEW_H

View file

@ -64,8 +64,13 @@ ShortcutsSettings::ShortcutsSettings(const QString &settingsPath, QObject *paren
}
}
/// PR 5079 changes Textbox/unfocusTextBox to Player/unfocusTextBox and tab_game/aFocusChat to Player/aFocusChat.
/// A migration is necessary to let players keep their already configured shortcuts.
/**
* @brief Migrates legacy shortcut key names to current naming scheme.
*
* PR 5079 changed Textbox/unfocusTextBox to Player/unfocusTextBox and
* tab_game/aFocusChat to Player/aFocusChat. This migration allows players
* to keep their already configured shortcuts.
*/
void ShortcutsSettings::migrateShortcuts()
{
if (QFile(settingsFilePath).exists()) {
@ -236,9 +241,7 @@ bool ShortcutsSettings::isValid(const QString &name, const QString &sequences) c
return findOverlaps(name, sequences).isEmpty();
}
/**
* Checks if the shortcut is a shortcut that is active in all windows
*/
/** @brief Checks if the shortcut is a shortcut that is active in all windows. */
static bool isAlwaysActiveShortcut(const QString &shortcutName)
{
return shortcutName.startsWith("MainWindow") || shortcutName.startsWith("Tabs");

View file

@ -1,8 +1,8 @@
/**
* @file shortcuts_settings.h
* @ingroup CoreSettings
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef SHORTCUTSSETTINGS_H
#define SHORTCUTSSETTINGS_H

View file

@ -1,8 +1,8 @@
/**
* @file sound_engine.h
* @ingroup Core
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef SOUNDENGINE_H
#define SOUNDENGINE_H

View file

@ -1,8 +1,8 @@
/**
* @file deck_filter_string.h
* @ingroup DeckStorageWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DECK_FILTER_STRING_H
#define DECK_FILTER_STRING_H

View file

@ -1,8 +1,8 @@
/**
* @file filter_builder.h
* @ingroup CardDatabaseModelFilters
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef FILTERBUILDER_H
#define FILTERBUILDER_H

View file

@ -1,8 +1,8 @@
/**
* @file filter_tree_model.h
* @ingroup CardDatabaseModelFilters
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef FILTERTREEMODEL_H
#define FILTERTREEMODEL_H

View file

@ -2,8 +2,8 @@
* @file syntax_help.h
* @ingroup CardDatabaseModelFilters
* @ingroup DeckStorageWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef SEARCH_SYNTAX_HELP_H
#define SEARCH_SYNTAX_HELP_H

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

View file

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

View file

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

View file

@ -40,9 +40,12 @@ protected:
}
public slots:
bool showContextMenu(const QPoint &screenPos);
/// @brief Called when a card is added to this zone. Default: reparents card to this item.
/// Virtual so subclasses (e.g. SelectZone) can override parenting behavior — the Qt signal
/// connection in CardZone's constructor dispatches through the vtable.
/**
* @brief Called when a card is added to this zone. Default: reparents card to this item.
*
* Virtual so subclasses (e.g. SelectZone) can override parenting behavior the Qt signal
* connection in CardZone's constructor dispatches through the vtable.
*/
virtual void onCardAdded(CardItem *addedCard);
public:

View file

@ -1,8 +1,8 @@
/**
* @file pile_zone.h
* @ingroup GameGraphicsZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef PILEZONE_H
#define PILEZONE_H

View file

@ -21,33 +21,41 @@ class SelectZone : public CardZone
{
Q_OBJECT
public:
/// Finds the SelectZone that owns a card, regardless of whether the card is parented
/// to the zone directly or to its clip container. Returns nullptr if not in a SelectZone.
/**
* @brief Finds the SelectZone that owns a card, regardless of whether the card is parented
* to the zone directly or to its clip container. Returns nullptr if not in a SelectZone.
*/
static SelectZone *findOwningSelectZone(const QGraphicsItem *card);
SelectZone(CardZoneLogic *logic, QGraphicsItem *parent = nullptr);
~SelectZone() override;
void onCardAdded(CardItem *addedCard) override;
/// @brief Temporarily reparents a card from the clip container to this zone so hover scaling is visible beyond clip
/// bounds. Safe no-op if no clip container exists. Coordinates are preserved (clip container is at (0,0) with no
/// transform).
/**
* @brief Temporarily reparents a card from the clip container to this zone so hover scaling is visible beyond clip
* bounds. Safe no-op if no clip container exists. Coordinates are preserved (clip container is at (0,0) with no
* transform).
*/
void escapeClipForHover(QGraphicsItem *card);
/// @brief Restores a hover-escaped card back to the clip container. Guards against zone transitions that already
/// reparented the card.
/**
* @brief Restores a hover-escaped card back to the clip container. Guards against zone transitions that already
* reparented the card.
*/
void restoreClipAfterHover(QGraphicsItem *card);
private:
QPointF selectionOrigin;
QSet<CardItem *> cardsInSelectionRect;
/// Invisible clipping parent for cards; owned by Qt parent-child tree (parented to this zone).
/// Created by setupClipContainer(); null when no clip container is active.
/**
* @brief Invisible clipping parent for cards; owned by Qt parent-child tree (parented to this zone).
* Created by setupClipContainer(); null when no clip container is active.
*/
QGraphicsRectItem *cardClipContainer = nullptr;
protected:
// -- Layout computation --
/// Parameters describing a vertical card stack's geometry.
/** @brief Parameters describing a vertical card stack's geometry. */
struct StackLayoutParams
{
int cardCount; ///< Number of cards in the stack
@ -55,21 +63,23 @@ protected:
qreal cardHeight; ///< Height of a single card
qreal desiredOffset; ///< Preferred vertical offset between card tops
qreal minOffset = 0.0; ///< Minimum offset to preserve (0 allows full compression)
/// When false (default), reserves full cardHeight for the bottom card, ensuring
/// all cards remain within zone bounds. When true, allows the bottom card to
/// partially overflow using sqrt-scaled allowance. Use with setupClipContainer()
/// for zones too short to fit a full card.
/**
* @brief When false (default), reserves full cardHeight for the bottom card, ensuring
* all cards remain within zone bounds. When true, allows the bottom card to
* partially overflow using sqrt-scaled allowance. Use with setupClipContainer()
* for zones too short to fit a full card.
*/
bool allowBottomOverflow = false;
};
/// Result of computing a vertical stack layout.
/** @brief Result of computing a vertical stack layout. */
struct ZoneLayout
{
qreal effectiveOffset; ///< Actual offset between card tops (may be compressed)
qreal start; ///< Y coordinate of the first card's top edge
};
/// Minimum visible pixels of each card's top edge when stacking compresses offsets in tight zones.
/** @brief Minimum visible pixels of each card's top edge when stacking compresses offsets in tight zones. */
static constexpr qreal MIN_CARD_VISIBLE = 10.0;
/**
@ -88,11 +98,13 @@ protected:
*/
static ZoneLayout computeZoneLayout(const StackLayoutParams &params);
/// Builds StackLayoutParams from the current card list and zone geometry.
/** @brief Builds StackLayoutParams from the current card list and zone geometry. */
StackLayoutParams buildStackParams(qreal minOffset = 0.0) const;
/// Computes the card index at a given y-coordinate within the zone's vertical layout.
/// Returns 0 if the zone has no cards or the offset is zero.
/**
* @brief Computes the card index at a given y-coordinate within the zone's vertical layout.
* Returns 0 if the zone has no cards or the offset is zero.
*/
int calcDropIndexFromY(qreal dropY, qreal minOffset = 0.0) const;
/**
@ -111,17 +123,21 @@ protected:
// (e.g., zones too short to fit a full card). To enable: call setupClipContainer() in the
// zone's constructor, and set allowBottomOverflow=true in layout params.
/// Restores any cards that were hover-escaped but whose hover state was not properly cleaned up.
/// Call at the start of reorganizeCards() in zones that use a clip container.
/**
* @brief Restores any cards that were hover-escaped but whose hover state was not properly cleaned up.
* Call at the start of reorganizeCards() in zones that use a clip container.
*/
void restoreStaleEscapedCards();
/// Creates a clip container child item that clips card overflow to zone bounds.
/// Cards entering this zone are reparented to this container by the onCardAdded override.
/// Disables zone-level child clipping; clipping is delegated to the container.
/// @param zValue Optional z-value for the clip container (e.g. ZValues::CARD_BASE)
/**
* @brief Creates a clip container child item that clips card overflow to zone bounds.
* Cards entering this zone are reparented to this container by the onCardAdded override.
* Disables zone-level child clipping; clipping is delegated to the container.
* @param zValue Optional z-value for the clip container (e.g. ZValues::CARD_BASE)
*/
void setupClipContainer(std::optional<qreal> zValue = std::nullopt);
/// Updates the clip container rect to match this zone's current boundingRect().
/** @brief Updates the clip container rect to match this zone's current boundingRect(). */
void updateClipRect();
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;

View file

@ -20,7 +20,7 @@ private slots:
public:
StackZone(StackZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent);
/// @brief Resizes the stack zone height, e.g. when sharing vertical space with the command zone.
/** @brief Resizes the stack zone height, e.g. when sharing vertical space with the command zone. */
void setHeight(qreal newHeight);
void
handleDropEvent(const QList<CardDragItem *> &dragItems, CardZoneLogic *startZone, const QPoint &dropPoint) override;

View file

@ -1,8 +1,8 @@
/**
* @file table_zone.h
* @ingroup GameGraphicsZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef TABLEZONE_H
#define TABLEZONE_H
@ -11,13 +11,12 @@
#include "../../game/zones/table_zone_logic.h"
#include "select_zone.h"
/*
* TableZone is the grid based rect where CardItems may be placed.
* It is the main play zone and can be customized with background images.
/**
* @brief TableZone is the grid based rect where CardItems may be placed.
*
* TODO: Refactor methods to make more readable, extract some logic to
* private methods (Im looking at you TableZone::reorganizeCards())
* It is the main play zone and can be customized with background images.
*/
//! \todo Refactor methods to make more readable, extract logic to private methods (especially reorganizeCards()).
class TableZone : public SelectZone
{
Q_OBJECT

View file

@ -1,8 +1,8 @@
/**
* @file view_zone.h
* @ingroup GameGraphicsZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef ZONEVIEWERZONE_H
#define ZONEVIEWERZONE_H

View file

@ -1,8 +1,8 @@
/**
* @file view_zone_widget.h
* @ingroup GameGraphicsZones
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef ZONEVIEWWIDGET_H
#define ZONEVIEWWIDGET_H

View file

@ -53,12 +53,12 @@ QList<CardSetPtr> CardPictureToLoad::extractSetsSorted(const ExactCard &card)
* PrintingInfo for the set is returned.
*
* This method only exists to maintain existing behavior.
* TODO: check if going through all sets is still necessary after the ExactCard refactor.
*
* @param card The card to look in
* @param setName The set's short name
* @return A PrintingInfo, or a default-constructed PrintingInfo if the set name is not in the CardInfo.
*/
//! \todo Check if going through all sets is still necessary after the ExactCard refactor.
static PrintingInfo findPrintingForSet(const ExactCard &card, const QString &setName)
{
SetToPrintingsMap setsToPrintings = card.getInfo().getSets();

View file

@ -1,8 +1,8 @@
/**
* @file deck_loader.h
* @ingroup ImportExport
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef DECK_LOADER_H
#define DECK_LOADER_H

View file

@ -2,8 +2,8 @@
* @file key_signals.h
* @ingroup Core
* @ingroup UI
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef KEYSIGNALS_H
#define KEYSIGNALS_H

View file

@ -4,6 +4,7 @@
* @brief A QLayout subclass that arranges child widgets in wrapping rows (horizontal flow)
* or wrapping columns (vertical flow).
*/
//! \todo Document this file.
#ifndef FLOW_LAYOUT_H
#define FLOW_LAYOUT_H

View file

@ -223,7 +223,7 @@ void OverlapLayout::setGeometry(const QRect &rect)
const int yPos = rect.top() + currentRow * (maxItemHeight - overlapOffsetHeight);
item->setGeometry(QRect(xPos, yPos, maxItemWidth, maxItemHeight));
// TODO: Figure this out properly or maybe adjust size hint to account for this?
//! \todo Figure this out properly or maybe adjust size hint to account for this.
// Update row and column indices based on the layout direction.
if (overlapDirection == Qt::Horizontal) {
currentColumn++;

View file

@ -1,8 +1,8 @@
/**
* @file overlap_layout.h
* @ingroup UI
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef OVERLAP_LAYOUT_H
#define OVERLAP_LAYOUT_H

View file

@ -1,8 +1,8 @@
/**
* @file logger.h
* @ingroup Core
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef LOGGER_H
#define LOGGER_H

View file

@ -1,8 +1,8 @@
/**
* @file pixel_map_generator.h
* @ingroup UI
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef PIXMAPGENERATOR_H
#define PIXMAPGENERATOR_H

View file

@ -92,7 +92,7 @@ struct PaletteColorInfo
ThemeManager::ThemeManager(QObject *parent) : QObject(parent)
{
defaultStyleName = qApp->style()->objectName();
// FIXME workaround for windows11 style being broken
//! \todo Workaround for windows11 style being broken.
if (defaultStyleName == "windows11") {
defaultStyleName = "windowsvista";
}

View file

@ -1,8 +1,8 @@
/**
* @file theme_manager.h
* @ingroup CoreSettings
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef THEMEMANAGER_H
#define THEMEMANAGER_H

View file

@ -1,8 +1,8 @@
/**
* @file color_identity_widget.h
* @ingroup CardExtraInfoWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef COLOR_IDENTITY_WIDGET_H
#define COLOR_IDENTITY_WIDGET_H

View file

@ -1,8 +1,8 @@
/**
* @file mana_cost_widget.h
* @ingroup CardExtraInfoWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef MANA_COST_WIDGET_H
#define MANA_COST_WIDGET_H

View file

@ -1,8 +1,8 @@
/**
* @file mana_symbol_widget.h
* @ingroup CardExtraInfoWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef MANA_SYMBOL_WIDGET_H
#define MANA_SYMBOL_WIDGET_H

View file

@ -1,8 +1,8 @@
/**
* @file card_group_display_widget.h
* @ingroup DeckEditorCardGroupWidgets
* @brief TODO: Document this.
*/
//! \todo Document this file.
#ifndef CARD_GROUP_DISPLAY_WIDGET_H
#define CARD_GROUP_DISPLAY_WIDGET_H

Some files were not shown because too many files have changed in this diff Show more