ohos_arkui_binding/component/built_in_component/
progress.rs1impl super::Progress {
5 pub fn set_progress_value<T: Into<crate::ArkUINodeAttributeItem>>(
6 &self,
7 value: T,
8 ) -> crate::ArkUIResult<()> {
9 <Self as crate::ArkUICommonAttribute>::set_attribute(
10 self,
11 crate::ArkUINodeAttributeType::ProgressValue,
12 value.into(),
13 )
14 }
15
16 pub fn get_progress_value(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
17 <Self as crate::ArkUICommonAttribute>::get_attribute(
18 self,
19 crate::ArkUINodeAttributeType::ProgressValue,
20 )
21 }
22
23 pub fn set_progress_total<T: Into<crate::ArkUINodeAttributeItem>>(
24 &self,
25 value: T,
26 ) -> crate::ArkUIResult<()> {
27 <Self as crate::ArkUICommonAttribute>::set_attribute(
28 self,
29 crate::ArkUINodeAttributeType::ProgressTotal,
30 value.into(),
31 )
32 }
33
34 pub fn get_progress_total(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
35 <Self as crate::ArkUICommonAttribute>::get_attribute(
36 self,
37 crate::ArkUINodeAttributeType::ProgressTotal,
38 )
39 }
40
41 pub fn set_progress_color<T: Into<crate::ArkUINodeAttributeItem>>(
42 &self,
43 value: T,
44 ) -> crate::ArkUIResult<()> {
45 <Self as crate::ArkUICommonAttribute>::set_attribute(
46 self,
47 crate::ArkUINodeAttributeType::ProgressColor,
48 value.into(),
49 )
50 }
51
52 pub fn get_progress_color(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
53 <Self as crate::ArkUICommonAttribute>::get_attribute(
54 self,
55 crate::ArkUINodeAttributeType::ProgressColor,
56 )
57 }
58
59 pub fn set_progress_type<T: Into<crate::ArkUINodeAttributeItem>>(
60 &self,
61 value: T,
62 ) -> crate::ArkUIResult<()> {
63 <Self as crate::ArkUICommonAttribute>::set_attribute(
64 self,
65 crate::ArkUINodeAttributeType::ProgressType,
66 value.into(),
67 )
68 }
69
70 pub fn get_progress_type(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
71 <Self as crate::ArkUICommonAttribute>::get_attribute(
72 self,
73 crate::ArkUINodeAttributeType::ProgressType,
74 )
75 }
76
77 #[cfg(feature = "api-15")]
78 pub fn set_progress_linear_style<T: Into<crate::ArkUINodeAttributeItem>>(
79 &self,
80 value: T,
81 ) -> crate::ArkUIResult<()> {
82 <Self as crate::ArkUICommonAttribute>::set_attribute(
83 self,
84 crate::ArkUINodeAttributeType::ProgressLinearStyle,
85 value.into(),
86 )
87 }
88
89 #[cfg(feature = "api-15")]
90 pub fn get_progress_linear_style(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
91 <Self as crate::ArkUICommonAttribute>::get_attribute(
92 self,
93 crate::ArkUINodeAttributeType::ProgressLinearStyle,
94 )
95 }
96}
97