跳转至

ui/components/material/cfmaterial_animation_strategy.cpp

Animation Strategy Implementation. More...

Namespaces

Name
cf
cf::ui
cf::ui::components
cf::ui::components::material

Detailed Description

Animation Strategy Implementation.

Author: Charliechen114514 (chengh1922@mails.jlu.edu.cn)

Version: 0.1

Date: 2026-02-28

Copyright: Copyright © 2026

Implements the AnimationStrategy interface methods.

Source code

#include "cfmaterial_animation_strategy.h"

namespace cf::ui::components::material {

// =============================================================================
// AnimationStrategy
// =============================================================================

bool AnimationStrategy::shouldEnable(QWidget* widget) const {
    (void)widget; // Suppress unused parameter warning
    return globalEnabled_;
}

void AnimationStrategy::setGlobalEnabled(bool enabled) {
    globalEnabled_ = enabled;
}

// =============================================================================
// DefaultAnimationStrategy
// =============================================================================

AnimationDescriptor DefaultAnimationStrategy::adjust(const AnimationDescriptor& descriptor,
                                                     QWidget* widget) {

    // Return descriptor unchanged - this is a no-op strategy
    (void)widget; // Suppress unused parameter warning
    return descriptor;
}

} // namespace cf::ui::components::material

Updated on 2026-03-09 at 10:14:01 +0000