/**
** 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 <QtWidgets/QLabel>
#include "UIGQWidgetBase.h"

namespace UIGQtLib
{
	class UIGQLabelImpl;

	class UIGEARSQTLIB_EXPORT UIGQLabel : public QLabel, public IUIGQWidgetBase
	{
        Q_OBJECT

	public:
		UIGQLabel(QWidget* pParent = nullptr);
		~UIGQLabel();

		UIG_QT_CTRL_DEF("qtlabel", UIGQLabel);

		void setText(const QString& text);
		void setColor(const QColor& color);
		void setDisableColor(const QColor& color);

		const TextStyleDesc& getTextStyle(CtrlState eState);
		void setTextStyle(CtrlState eState, const UIGQtLib::TextStyleDesc& textStyle);

		const QColor& getColor();
		const QColor& getDisableColor();
		
	protected:
		void paintEvent(QPaintEvent * evt);
		void resizeEvent(QResizeEvent * event);

	private:
		UIGQLabelImpl* _ctrlImpl;

		UIGQT_GET_CONTROLBASE;
	};
}
