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

namespace UIGQtLib
{
	class UIGQLCDNumberImpl;
	class UIGEARSQTLIB_EXPORT UIGQLCDNumber : public QLCDNumber, public IUIGQWidgetBase
	{
        Q_OBJECT

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

		UIG_QT_CTRL_DEF("qtlcdnumber", UIGQLCDNumber);

		void setColor(const QColor& color);
		QColor getColor();

		void setBackground(CommonCtrlState state, const FillStyle& fillStyle);
		const FillStyle& getBackground(CommonCtrlState state);

		void setNumText(const QString& text);
		QString getNumText();
		
	protected:
		void paintEvent(QPaintEvent * evt);

	private:
		UIGQLCDNumberImpl* _ctrlImpl;

		UIGQT_GET_CONTROLBASE;
	};
}
