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

namespace UIGQtLib
{
	class UIGQGroupBoxImpl;
	class UIGEARSQTLIB_EXPORT UIGQGroupBox : public QWidget, public IUIGQWidgetBase
	{
        Q_OBJECT

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

		UIG_QT_CTRL_DEF("qtgroupbox", UIGQGroupBox);

		void setText(const QString& text);
		const QString& getText();

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

		void setTextStyle(CommonCtrlState state, const TextStyleDesc& textStyle);
		const TextStyleDesc& getTextStyle(CommonCtrlState state);

		void setLineColor(QColor color);
		QColor getLineColor();
		
		void setLineSize(int size);
		int getLineSize();
		
		void setShowText(bool show);
		bool getShowText();

	protected:
		void paintEvent(QPaintEvent * evt);

	private:
		UIGQGroupBoxImpl* _ctrlImpl;

		UIGQT_GET_CONTROLBASE;
	};
}
