64 Q_PROPERTY(qml_material::token::
WindowClassItem medium MEMBER medium CONSTANT FINAL)
66 Q_PROPERTY(qml_material::token::
WindowClassItem expanded MEMBER expanded CONSTANT FINAL)
68 Q_PROPERTY(qml_material::token::
WindowClassItem large MEMBER large CONSTANT FINAL)
70 Q_PROPERTY(qml_material::token::
WindowClassItem extra_large MEMBER extra_large CONSTANT FINAL)
76 std::array wcs { &compact, &medium, &expanded, &large, &extra_large };
77 for (
auto& el : wcs) {
78 if (el->contains(w))
return *el;
83 std::array wcs { &compact, &medium, &expanded, &large, &extra_large };
84 for (
auto& el : wcs) {
85 if (el->contains(w))
return el->type;
89 WindowClassItem compact { 0, 600, Type::WindowClassCompact };
90 WindowClassItem medium { 600, 840, Type::WindowClassMedium };
91 WindowClassItem expanded { 840, 1200, Type::WindowClassExpanded };
92 WindowClassItem large { 1200, 1600, Type::WindowClassLarge };
93 WindowClassItem extra_large { 1600,
94 std::numeric_limits<i32>::max(),
95 Type::WindowClassExtraLarge };
137 Q_PROPERTY(QEasingCurve emphasized READ emphasized CONSTANT FINAL)
139 Q_PROPERTY(QEasingCurve emphasized_accelerate READ emphasized_accelerate CONSTANT FINAL)
141 Q_PROPERTY(QEasingCurve emphasized_decelerate READ emphasized_decelerate CONSTANT FINAL)
143 Q_PROPERTY(QEasingCurve standard READ standard CONSTANT FINAL)
145 Q_PROPERTY(QEasingCurve standard_accelerate READ standard_accelerate CONSTANT FINAL)
147 Q_PROPERTY(QEasingCurve standard_decelerate READ standard_decelerate CONSTANT FINAL)
149 Q_PROPERTY(QEasingCurve legacy READ legacy CONSTANT FINAL)
151 Q_PROPERTY(QEasingCurve legacy_accelerate READ legacy_accelerate CONSTANT FINAL)
153 Q_PROPERTY(QEasingCurve legacy_decelerate READ legacy_decelerate CONSTANT FINAL)
155 Q_PROPERTY(QEasingCurve linear READ linear CONSTANT FINAL)
158 auto emphasized() const noexcept -> QEasingCurve {
return anim::emphasized(); }
159 auto emphasized_accelerate() const noexcept -> QEasingCurve {
160 return anim::emphasized_accelerate();
162 auto emphasized_decelerate() const noexcept -> QEasingCurve {
163 return anim::emphasized_decelerate();
165 auto standard() const noexcept -> QEasingCurve {
return anim::standard(); }
166 auto standard_accelerate() const noexcept -> QEasingCurve {
167 return anim::standard_accelerate();
169 auto standard_decelerate() const noexcept -> QEasingCurve {
170 return anim::standard_decelerate();
172 auto legacy() const noexcept -> QEasingCurve {
return anim::legacy(); }
173 auto legacy_accelerate() const noexcept -> QEasingCurve {
return anim::legacy_accelerate(); }
174 auto legacy_decelerate() const noexcept -> QEasingCurve {
return anim::legacy_decelerate(); }
175 auto linear() const noexcept -> QEasingCurve {
return anim::linear(); }
186 Q_PROPERTY(qreal short1 MEMBER short1 CONSTANT FINAL)
188 Q_PROPERTY(qreal short2 MEMBER short2 CONSTANT FINAL)
190 Q_PROPERTY(qreal short3 MEMBER short3 CONSTANT FINAL)
192 Q_PROPERTY(qreal short4 MEMBER short4 CONSTANT FINAL)
194 Q_PROPERTY(qreal medium1 MEMBER medium1 CONSTANT FINAL)
196 Q_PROPERTY(qreal medium2 MEMBER medium2 CONSTANT FINAL)
198 Q_PROPERTY(qreal medium3 MEMBER medium3 CONSTANT FINAL)
200 Q_PROPERTY(qreal medium4 MEMBER medium4 CONSTANT FINAL)
202 Q_PROPERTY(qreal long1 MEMBER long1 CONSTANT FINAL)
204 Q_PROPERTY(qreal long2 MEMBER long2 CONSTANT FINAL)
206 Q_PROPERTY(qreal long3 MEMBER long3 CONSTANT FINAL)
208 Q_PROPERTY(qreal long4 MEMBER long4 CONSTANT FINAL)
210 Q_PROPERTY(qreal extra_long1 MEMBER extra_long1 CONSTANT FINAL)
212 Q_PROPERTY(qreal extra_long2 MEMBER extra_long2 CONSTANT FINAL)
214 Q_PROPERTY(qreal extra_long3 MEMBER extra_long3 CONSTANT FINAL)
216 Q_PROPERTY(qreal extra_long4 MEMBER extra_long4 CONSTANT FINAL)
220 qreal short2 { 100 };
221 qreal short3 { 150 };
222 qreal short4 { 200 };
223 qreal medium1 { 250 };
224 qreal medium2 { 300 };
225 qreal medium3 { 350 };
226 qreal medium4 { 400 };
231 qreal extra_long1 { 700 };
232 qreal extra_long2 { 800 };
233 qreal extra_long3 { 900 };
234 qreal extra_long4 { 1000 };
310 Q_PROPERTY(qreal outer_stroke_width MEMBER outer_stroke_width CONSTANT FINAL)
311 Q_PROPERTY(qreal inner_stroke_width MEMBER inner_stroke_width CONSTANT FINAL)
312 Q_PROPERTY(qreal inner_stroke_inset MEMBER inner_stroke_inset CONSTANT FINAL)
313 Q_PROPERTY(qreal outer_offset MEMBER outer_offset CONSTANT FINAL)
315 qreal outer_stroke_width { 2 };
316 qreal inner_stroke_width { 3 };
317 qreal inner_stroke_inset { 1 };
318 qreal outer_offset { 2 };
333 Q_PROPERTY(qml_material::token::
StateItem pressed MEMBER pressed CONSTANT FINAL)
335 Q_PROPERTY(qml_material::token::
StateItem focus MEMBER focus CONSTANT FINAL)
337 Q_PROPERTY(qml_material::token::
StateItem dragged MEMBER dragged CONSTANT FINAL)
340 Q_PROPERTY(qml_material::token::
FocusRing focus_ring MEMBER focus_ring CONSTANT FINAL)
343 Q_PROPERTY(
double disabled_content MEMBER disabled_content CONSTANT FINAL)
345 Q_PROPERTY(
double disabled_container MEMBER disabled_container CONSTANT FINAL)
350 StateItem focus { 0.1 };
351 StateItem dragged { 0.16 };
353 FocusRing focus_ring;
355 double disabled_content { 0.38 };
356 double disabled_container { 0.12 };
369 Q_PROPERTY(qint32 pressDelay READ pressDelay NOTIFY pressDelayChanged FINAL)
372 double flickDeceleration READ flickDeceleration NOTIFY flickDecelerationChanged FINAL)
374 Q_PROPERTY(
double maximumFlickVelocity READ maximumFlickVelocity NOTIFY
375 maximumFlickVelocityChanged FINAL)
377 Flick(QObject* parent =
nullptr);
379 auto pressDelay() const -> qint32;
380 auto flickDeceleration() const ->
double;
381 auto maximumFlickVelocity() const ->
double;
383 Q_SIGNAL
void pressDelayChanged();
384 Q_SIGNAL
void flickDecelerationChanged();
385 Q_SIGNAL
void maximumFlickVelocityChanged();
388 qint32 m_press_delay;
389 double m_flick_deceleration;
390 double m_maximum_flickVelocity;
399 Q_PROPERTY(qreal item_spacing MEMBER item_spacing CONSTANT FINAL)
400 Q_PROPERTY(qreal container_height_horizontal MEMBER container_height_horizontal CONSTANT FINAL)
401 Q_PROPERTY(qreal default_item_extent MEMBER default_item_extent CONSTANT FINAL)
402 Q_PROPERTY(qreal small_item_min MEMBER small_item_min CONSTANT FINAL)
403 Q_PROPERTY(qreal small_item_max MEMBER small_item_max CONSTANT FINAL)
404 Q_PROPERTY(qreal container_padding_vertical MEMBER container_padding_vertical CONSTANT FINAL)
405 Q_PROPERTY(qreal small_item_min_ratio MEMBER small_item_min_ratio CONSTANT FINAL)
406 Q_PROPERTY(qreal small_item_max_ratio MEMBER small_item_max_ratio CONSTANT FINAL)
407 Q_PROPERTY(qreal large_item_max_aspect MEMBER large_item_max_aspect CONSTANT FINAL)
408 Q_PROPERTY(qreal min_item_aspect MEMBER min_item_aspect CONSTANT FINAL)
409 Q_PROPERTY(qreal max_item_aspect MEMBER max_item_aspect CONSTANT FINAL)
410 Q_PROPERTY(qint32 item_corner MEMBER item_corner CONSTANT FINAL)
411 Q_PROPERTY(qint32 snap_duration MEMBER snap_duration CONSTANT FINAL)
412 Q_PROPERTY(qreal title_fade_span MEMBER title_fade_span CONSTANT FINAL)
413 Q_PROPERTY(qreal chrome_row_height MEMBER chrome_row_height CONSTANT FINAL)
414 Q_PROPERTY(qreal chrome_row_spacing MEMBER chrome_row_spacing CONSTANT FINAL)
415 Q_PROPERTY(qreal default_width MEMBER default_width CONSTANT FINAL)
416 Q_PROPERTY(qreal default_height_vertical MEMBER default_height_vertical CONSTANT FINAL)
417 Q_PROPERTY(qreal min_peek_px MEMBER min_peek_px CONSTANT FINAL)
418 Q_PROPERTY(qreal parallax_ratio MEMBER parallax_ratio CONSTANT FINAL)
419 Q_PROPERTY(qreal parallax_ratio_uncontained MEMBER parallax_ratio_uncontained CONSTANT FINAL)
421 qreal item_spacing { 8 };
422 qreal container_height_horizontal { 196 };
423 qreal default_item_extent { 180 };
424 qreal small_item_min { 40 };
425 qreal small_item_max { 56 };
426 qreal container_padding_vertical { 8 };
427 qreal small_item_min_ratio { 0.45 };
428 qreal small_item_max_ratio { 0.55 };
429 qreal large_item_max_aspect { 2.0 };
430 qreal min_item_aspect { 9.0 / 16.0 };
431 qreal max_item_aspect { 16.0 / 9.0 };
432 i32 item_corner { 28 };
433 i32 snap_duration { 400 };
434 qreal title_fade_span { 80 };
435 qreal chrome_row_height { 40 };
436 qreal chrome_row_spacing { 8 };
437 qreal default_width { 480 };
438 qreal default_height_vertical { 320 };
439 qreal min_peek_px { 16 };
440 qreal parallax_ratio { 0.35 };
441 qreal parallax_ratio_uncontained { 0.5 };
450 Q_PROPERTY(qreal active_track_height MEMBER active_track_height CONSTANT FINAL)
451 Q_PROPERTY(qreal inactive_track_height MEMBER inactive_track_height CONSTANT FINAL)
452 Q_PROPERTY(qreal active_track_height_xsmall MEMBER active_track_height_xsmall CONSTANT FINAL)
453 Q_PROPERTY(qreal active_track_height_small MEMBER active_track_height_small CONSTANT FINAL)
454 Q_PROPERTY(qreal active_track_height_medium MEMBER active_track_height_medium CONSTANT FINAL)
455 Q_PROPERTY(qreal active_track_height_large MEMBER active_track_height_large CONSTANT FINAL)
456 Q_PROPERTY(qreal active_track_height_xlarge MEMBER active_track_height_xlarge CONSTANT FINAL)
457 Q_PROPERTY(qreal stop_indicator_size MEMBER stop_indicator_size CONSTANT FINAL)
458 Q_PROPERTY(qreal thumb_track_gap MEMBER thumb_track_gap CONSTANT FINAL)
459 Q_PROPERTY(qreal track_inside_corner MEMBER track_inside_corner CONSTANT FINAL)
460 Q_PROPERTY(qreal inset_icon_size MEMBER inset_icon_size CONSTANT FINAL)
461 Q_PROPERTY(qreal inset_icon_padding MEMBER inset_icon_padding CONSTANT FINAL)
462 Q_PROPERTY(qint32 handle_height MEMBER handle_height CONSTANT FINAL)
463 Q_PROPERTY(qint32 handle_width MEMBER handle_width CONSTANT FINAL)
465 qreal active_track_height { 16 };
466 qreal inactive_track_height { 4 };
467 qreal active_track_height_xsmall { 16 };
468 qreal active_track_height_small { 24 };
469 qreal active_track_height_medium { 40 };
470 qreal active_track_height_large { 56 };
471 qreal active_track_height_xlarge { 96 };
472 qreal stop_indicator_size { 4 };
473 qreal thumb_track_gap { 6 };
474 qreal track_inside_corner { 2 };
475 qreal inset_icon_size { 24 };
476 qreal inset_icon_padding { 8 };
477 i32 handle_height { 44 };
478 i32 handle_width { 12 };
491 Q_PROPERTY(qint32 none MEMBER none CONSTANT FINAL)
493 Q_PROPERTY(qint32 extra_small MEMBER extra_small CONSTANT FINAL)
495 Q_PROPERTY(qint32 small MEMBER small CONSTANT FINAL)
497 Q_PROPERTY(qint32 medium_small MEMBER medium_small CONSTANT FINAL)
499 Q_PROPERTY(qint32 medium MEMBER medium CONSTANT FINAL)
501 Q_PROPERTY(qint32 large_medium MEMBER large_medium CONSTANT FINAL)
503 Q_PROPERTY(qint32 large MEMBER large CONSTANT FINAL)
505 Q_PROPERTY(qint32 extra_large MEMBER extra_large CONSTANT FINAL)
508 i32 extra_small { 4 };
510 i32 medium_small { 12 };
512 i32 large_medium { 24 };
514 i32 extra_large { 48 };
525 Q_PROPERTY(QQmlListProperty<QObject> datas READ datas FINAL)
526 Q_CLASSINFO(
"DefaultProperty",
"datas")
527 QML_NAMED_ELEMENT(TokenImpl)
529 Q_PROPERTY(QString version READ version CONSTANT FINAL)
530 Q_PROPERTY(QString iconFontUrl READ icon_font_url CONSTANT FINAL)
531 Q_PROPERTY(QString iconFill0FontUrl READ icon_fill_0_font_url CONSTANT FINAL)
532 Q_PROPERTY(QString iconFill1FontUrl READ icon_fill_1_font_url CONSTANT FINAL)
535 Q_PROPERTY(qml_material::token::
TypeScale* typescale READ typescale CONSTANT FINAL)
537 Q_PROPERTY(qml_material::token::
IconToken* icon READ icon CONSTANT FINAL)
539 Q_PROPERTY(qml_material::token::
Flick* flick READ flick CONSTANT FINAL)
541 Q_PROPERTY(qml_material::token::
Elevation elevation READ elevation CONSTANT FINAL)
543 Q_PROPERTY(qml_material::token::
Duration duration READ duration CONSTANT FINAL)
545 Q_PROPERTY(qml_material::token::
Easing easing READ easing CONSTANT FINAL)
547 Q_PROPERTY(qml_material::token::
State state READ state CONSTANT FINAL)
549 Q_PROPERTY(qml_material::token::
Shape shape READ shape CONSTANT FINAL)
551 Q_PROPERTY(qml_material::token::
WindowClass window_class READ window_class CONSTANT FINAL)
553 Q_PROPERTY(qml_material::token::
Spacing spacing READ spacing CONSTANT FINAL)
555 Q_PROPERTY(qml_material::token::
SplitButtonSize split_button READ split_button CONSTANT FINAL)
557 Q_PROPERTY(qml_material::token::
ButtonSize button READ button CONSTANT FINAL)
559 Q_PROPERTY(qml_material::token::
SegmentedButtonSize segmented_button READ segmented_button CONSTANT FINAL)
561 Q_PROPERTY(qml_material::token::
IconButtonSize icon_button READ icon_button CONSTANT FINAL)
563 Q_PROPERTY(qml_material::token::ComboBoxSize combo_box READ combo_box CONSTANT FINAL)
565 Q_PROPERTY(qml_material::token::TextFieldSize text_field READ text_field CONSTANT FINAL)
567 Q_PROPERTY(qml_material::token::BadgeSize badge READ badge CONSTANT FINAL)
569 Q_PROPERTY(qml_material::token::
Carousel carousel READ carousel CONSTANT FINAL)
570 Q_PROPERTY(qml_material::token::
Slider slider READ slider CONSTANT FINAL)
572 Token(QObject* =
nullptr);
575 auto version() const -> QString;
576 auto icon_font_url() const -> QString;
577 auto icon_fill_0_font_url() const -> QString;
578 auto icon_fill_1_font_url() const -> QString;
582 auto flick() const ->
Flick*;
583 auto elevation() const -> const
Elevation&;
584 auto state() const -> const
State&;
585 auto shape() const -> const
Shape&;
587 auto duration() const -> const
Duration&;
588 auto easing() const -> const
Easing&;
589 auto spacing() const -> const
Spacing&;
594 auto combo_box() const -> const ComboBoxSize&;
595 auto text_field() const -> const TextFieldSize&;
596 auto badge() const -> const BadgeSize&;
597 auto carousel() const -> const
Carousel&;
598 auto slider() const -> const
Slider&;
600 auto datas() -> QQmlListProperty<QObject>;
602 Q_INVOKABLE
double cal_curve_scale(
double dpr) const;
619 ComboBoxSize m_combo_box;
620 TextFieldSize m_text_field;
625 QList<QObject*> m_datas;