How snippetsh/dontgocat works
DontGoCat is a Qt desktop-pet application: it scans the desktop, spawns a sprite cat, and runs a timed loop that updates its behavior and renders it. The central domain stages are desktop-surface discovery, route planning and locomotion, and interactive cat behavior; separate branches handle tray-based quit protection, sound, and activity statistics. The README is brief, so feature details come primarily from source comments and declarations. Some internal calls are not shown; uncertain connections are omitted rather than inferred.
Main entry points: CatApp.cpp App coordinator · TrayController.cpp Tray controller · Locomotion.cpp Cat locomotion · CatBrain.cpp Behavior brain
Components 21
App runtime
- Application entry
src/app/main.cpp - App coordinator
src/module/CatApp.cpp
Desktop world
- Desktop scanner
src/module/DesktopScanner.cpp - Surface model
src/include/Surface.hpp - Route planner
src/module/PathPlanner.cpp
Cat behavior
- Cat locomotion
src/module/Locomotion.cpp - Behavior brain
src/module/CatBrain.cpp
User interaction
- Mouse watcher
src/module/MouseWatcher.cpp - Tray controller
src/module/TrayController.cpp - Settings and quit popup
src/module/QuitPopup.cpp - Quit guard
src/module/QuitGuard.cpp - Auto-start
src/module/AutoStart.cpp
Presentation and state
- Runtime settings
src/include/Config.hpp - Cat sprite
src/module/CatSprite.cpp - Animation
src/module/CatAnim.cpp - Cat overlay
src/module/CatOverlay.cpp - Cat widget
src/module/CatWidget.cpp - Cat voice
src/module/CatVoice.cpp - Activity statistics
src/module/CatStats.cpp
Other components
- Desktop user
- Desktop OS
Connections 28
- Desktop user → Application entry: launches
src/app/main.cpp - Application entry → App coordinator: starts
src/app/main.cpp - App coordinator → Desktop scanner: scans desktop
- Desktop scanner → Surface model: builds snapshot
- App coordinator → Behavior brain: ticks behavior
- App coordinator → Cat locomotion: updates movement
- App coordinator → Route planner: coordinates routes
- App coordinator → Mouse watcher: tracks pointer
- App coordinator → Tray controller: coordinates tray
- App coordinator → Cat overlay: renders cat
- App coordinator → Cat voice: controls sound
- App coordinator → Activity statistics: updates statistics
- Behavior brain → Cat locomotion: commands movement
src/module/CatBrain.cpp - Behavior brain → Mouse watcher: uses pointer state
src/module/CatBrain.cpp - Behavior brain → Route planner: plans routes
- Route planner → Cat locomotion: applies route steps
- Cat locomotion → Surface model: uses attachments
- Cat locomotion → Animation: plays frames
- Animation → Cat sprite: supplies poses
- Cat overlay → Cat widget: displays cat
- App coordinator → Cat sprite: renders frames
- Desktop user → Tray controller: uses tray
- Tray controller → Settings and quit popup: opens and configures
src/module/TrayController.cpp - Tray controller → Quit guard: checks quit attempts
- Tray controller → Auto-start: sets auto-start
src/module/TrayController.cpp - Settings and quit popup → Activity statistics: shows statistics
- Desktop OS → Desktop scanner: provides desktop state
- App coordinator → Runtime settings: reads settings
src/module/CatApp.cpp