跳转至

ui/core/material/material_factory_class.h

Material Design 3 Theme Factory. More...

Namespaces

Name
cf
cf::ui
cf::ui::core

Classes

Name
class cf::ui::core::MaterialFactory
Material Design 3 Theme Factory.

Detailed Description

Material Design 3 Theme Factory.

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

Version: 0.1

Date: 2026-02-27

Copyright: Copyright © 2026

MaterialFactory implements ThemeFactory interface for Material Design 3. Supports creating themes by name (light/dark) and from JSON.

Source code

#pragma once

#include <QByteArray>
#include <memory>

#include "../export.h"
#include "../theme_factory.h"

namespace cf::ui::core {

class CF_UI_EXPORT MaterialFactory : public ThemeFactory {
  public:
    ~MaterialFactory() override = default;

    std::unique_ptr<ICFTheme> fromName(const char* name) override;

    std::unique_ptr<ICFTheme> fromJson(const QByteArray& json) override;

    QByteArray toJson(ICFTheme* raw_theme) override;
};

} // namespace cf::ui::core

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