/**
** This file is owned by VisualGear Technology Co., Ltd.
** Unauthorized copying of this file, via any medium is strictly prohibited
** Otherwise VisualGear Technology Co., Ltd. will have the right to pursue
** maximum responsibilities within scope of legal.
**
** Copyright 2018-2020 VisualGear All rights reserved.
**/

#pragma once
#include "UIGQWidgetBase.h"
#include <QtWidgets/QProgressBar>


namespace UIGQtLib
{
	class UIGQProgressBarImpl;
    class UIGEARSQTLIB_EXPORT UIGQProgressBar : public QProgressBar, public IUIGQWidgetBase
    {
        Q_OBJECT

	public:
		UIGQProgressBar(QWidget* pParent = nullptr);
        virtual ~UIGQProgressBar();

		UIG_QT_CTRL_DEF("qtprogressbar", UIGQProgressBar);

        void setBackground(UIGQtLib::CommonCtrlState state, const FillStyle& style);
		const FillStyle& getBackground(UIGQtLib::CommonCtrlState state);

		void setForeground(UIGQtLib::CommonCtrlState state, const FillStyle& style);
		const FillStyle& getForeground(UIGQtLib::CommonCtrlState state);

		void setShowText(bool showText);
		bool getShowText();
		
		void setCircleProgressBar(bool isRound);
		bool getIsCircleProgressBar();
		void setCircleAngleRange(int start, int stop);
		void getCirleAngleRange(int& start, int& stop);

	protected:
		void paintEvent(QPaintEvent *evt);

	private:
		UIGQProgressBarImpl* _ctrlImpl;

		UIGQT_GET_CONTROLBASE;
	};
}

