#ifndef SPLASHSCREEN_H #define SPLASHSCREEN_H #include #include #include #include #include class SplashScreen : public QSplashScreen { Q_OBJECT public: explicit SplashScreen(QWidget *parent = nullptr); ~SplashScreen(); void setStatus(const QString &message); void setProgress(int value, int max = 100); void startAnimation(); void stopAnimation(); void finish(QWidget *mainWindow); protected: void drawContents(QPainter *painter) override; void mousePressEvent(QMouseEvent *event) override; void keyPressEvent(QKeyEvent *event) override; private slots: void onAnimationTick(); private: void drawBackground(QPainter *painter); void drawGolfBall(QPainter *painter, int x, int y, int radius); void drawPowerupIcons(QPainter *painter); void drawTitle(QPainter *painter); void drawProgressBar(QPainter *painter); void drawStatusText(QPainter *painter); QString mStatus; int mProgress = 0; int mProgressMax = 100; QTimer *mAnimationTimer; float mAnimationPhase = 0.0f; // For bouncing golf ball animation // Theme colors - golf course green theme QColor mGreenLight = QColor("#4CAF50"); // Light green QColor mGreenDark = QColor("#2E7D32"); // Dark green QColor mGold = QColor("#FFD700"); // Golden yellow for progress QColor mWhite = QColor("#FFFFFF"); // White text QColor mLightGray = QColor("#E0E0E0"); // Light gray for muted text static constexpr int WIDTH = 480; static constexpr int HEIGHT = 300; }; #endif // SPLASHSCREEN_H