Skip to content

Commit

Permalink
Modified the Terminology of the CircleProgress
Browse files Browse the repository at this point in the history
Signed-off-by: jiajia_deng <[email protected]>
  • Loading branch information
nmgwddj committed Sep 10, 2019
1 parent 6e35909 commit addfe38
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions tool_kits/duilib/Control/CircleProgress.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file CircleProgress.h
* @brief 圆环型滚动条控件,圆环中间可以有文本(如85%)
* @brief 环型进度条控件,圆环中间可以有文本(如85%)
* @copyright (c) 2019-2022, NetEase Inc. All rights reserved
* @author Xuhuajie
* @date 2019/8/14
Expand All @@ -24,41 +24,47 @@ class UILIB_API CircleProgress : public Progress
virtual void ClearImageCache() override;

/**
* @brief 设置圆形滚动条,默认为普通进度条
* @param[in] bCircular 为 true 时设置为圆形滚动条,false 时设置为父级滚动条,默认为 true
* @brief 设置环型进度条,默认为普通进度条
* @param[in] bCircular 为 true 时设置为环型进度条,false 时设置为父级进度条样式,默认为 true
* @return 无
*/
void SetCircular(bool bCircular = true);

/**
* @brief 设置递增方向
* @param[in] bClockwise 为 true 时设置为顺时针,false 时设置为逆时针,默认为 true
* @return 无
*/
void SetClockwiseRotation(bool bClockwise = true);

/**
* @brief 设置圆环宽度
* @param[in] nCircleWidth 宽度数值
* @return 无
*/
void SetCircleWidth(int nCircleWidth);

/**
* @brief 设置进度条背景颜色
* @param[in] strColor要设置的背景颜色字符串,该字符串必须在 global.xml 中存在
* @return 无
*/
void SetBackgroudColor(const std::wstring& strColor);

/**
* @brief 设置进度条前景颜色
* @param[in] strColor要设置的前景颜色字符串,该字符串必须在 global.xml 中存在
* @return 无
*/
void SetForegroudColor(const std::wstring& strColor);

/**
* @brief 设置进度条前景渐变颜色,与 SetForegroudColor 同时使用,可以不设置,则无渐变效果
* @param[in] strColor要设置的前景渐变颜色字符串,该字符串必须在 global.xml 中存在
* @return 无
*/
void SetCircleGradientColor(const std::wstring& strColor);

/**
* @brief 设置进度指示移动图标
* @param[in] sIndicatorImage 要设置的图片
Expand All @@ -67,15 +73,14 @@ class UILIB_API CircleProgress : public Progress
void SetIndicator(const std::wstring& sIndicatorImage);

protected:
bool m_bCircular;
bool m_bClockwise;
int m_nCircleWidth;
DWORD m_dwBackgroundColor;
DWORD m_dwForegroundColor;
DWORD m_dwGradientColor;
//Image m_IndicatorImage; //使用image对象,无法满足需求,需要设置矩阵变换
Gdiplus::Image* m_pIndicator; //此类目前维护资源管理
std::wstring m_sIndicatorImage;
bool m_bCircular;
bool m_bClockwise;
int m_nCircleWidth;
DWORD m_dwBackgroundColor;
DWORD m_dwForegroundColor;
DWORD m_dwGradientColor;
Gdiplus::Image* m_pIndicator; //此类目前维护资源管理
std::wstring m_sIndicatorImage;

};

Expand Down

0 comments on commit addfe38

Please sign in to comment.