Fluent-Qt

API 레퍼런스

FluentElement

QWidget 기반 컴포넌트에 공유 Fluent 디자인 토큰과 테마 콜백을 제공합니다.

fluent::FluentElement

열거형

enum Theme

디자인 토큰을 해석할 때 사용되는 전역 시각적 테마.

  • Light = 0
  • Dark = 1
  • HighContrast = 2

메서드

static void setTheme(Theme theme)

전역 테마를 업데이트하고 활성 FluentElement 인스턴스에 알립니다.

static void setThemeDeferred(Theme theme)

현재 상호 작용을 차단하지 않고 보이는 항목 우선의 일괄 테마 새로 고침을 예약합니다.

static Theme currentTheme()

현재 활성화된 전역 테마를 반환합니다.

static bool themeUsesDarkAppearance(Theme theme)

테마가 어두운 배경의 크롬 및 머티리얼 토큰을 사용하는지 여부를 반환합니다.

static void refreshTheme()

디자인 토큰 변경 후 다시 그리도록 현재 테마를 재브로드캐스트합니다.

static int themeGeneration()

유효성 검사를 위해 테마가 변경될 때마다 증가하는 단조 카운터.

Theme effectiveTheme() const

상속된 QWidget 재정의를 준수하여 이 요소에서 사용하는 테마를 확인합니다.

bool effectiveThemeUsesDarkAppearance() const

이 요소의 유효 테마가 어두운 배경의 크롬을 사용하는지 여부를 반환합니다.

bool setThemeOverrides(const QJsonObject& overrides)

이 요소의 희소 색상, 반경 및 글꼴 토큰 재정의를 교체합니다.

QJsonObject themeOverrides() const

이 요소에 지정된 재정의 설정을 반환합니다.

void clearThemeOverrides()

모든 토큰 필드를 전역 테마 기본값으로 복원합니다.

const Colors& themeColorsRef() const

빈번한 그리기 경로를 위한 활성 색상 세트의 무복사 접근.

Material::AcrylicToken themeAcrylic() const

재질, 고도 (elevation) 및 적응형 레이아웃 토큰.

QColor themeBackdrop(bool active) const

지정된 활성화 상태에 대한 창 chrome 배경색.

virtual void onThemeUpdated()

전역 테마가 변경된 후 호출됩니다.

타입 및 별칭

struct Colors

컴포넌트에 반환되는 디자인 토큰 스냅샷.

보호된 멤버

생성자

소멸자

필드

FluentElementPrivate* d_ptr

1.x 소스 호환성을 위해 예약되었습니다.

fluent::FluentElement::Colors

컴포넌트에 반환되는 디자인 토큰 스냅샷.

필드

QColor strokeFocusOuter, strokeFocusInner

2중 레이어 포커스 링 테두리 선.

QColor textOnAccent

강조 배경 위의 텍스트 (흰색/검은색).

QColor textAccentPrimary

일반 배경 위의 강조 텍스트 (진한 파랑/밝은 파랑).

QColor systemCritical, systemCriticalBg

시스템 / 시맨틱 색상

QColor bgLayerOverlay

반투명 창을 위한 계층화된 콘텐츠 마스크.

fluent::FluentElement::FontStyle

필드

QString styleName

정확한 정적 글꼴 페이스 (예: "Regular" 또는 "Semibold").

int lineHeight

Figma에서 측정한 px 단위 절대 줄 높이.

메서드

fluent::FluentElement::Radius

필드

int none

0: 직각 모서리.

int control

4: 페이지 내 컨트롤.

int overlay

8: 오버레이 컨테이너 (Dialog, ToolTip, Flyout).

fluent::FluentElement::Spacing

필드

controlHeight

표준 컨트롤 높이입니다.

fluent::FluentElement::Animation

필드