#include "VImage.h" VImage::VImage(QWidget *parent, CONTROL_PROPERTY* pProperty) : HWndUnit(parent) , VControlObject(pProperty) { //// 设置默认属性 //QRadioButton::setEnabled(m_Property.m_bEnable); //style()->unpolish(this); m_pWidget = this; m_Type = VALUE_TYPE::Control_Image; } VImage::~VImage() { } // 属性的实现函数 void VImage::setEnable(const bool enable) { if (this->m_Property.m_bEnable != enable) { this->m_Property.m_bEnable = enable; //QRadioButton::setEnabled(enable); } } void VImage::paintEvent(QPaintEvent*) { QPainter painter(this); painter.drawPixmap(rect(), QPixmap(":/image/Vimage.jpeg"), QRect()); } /// /// /// /// void VImage::ShowImage(HImage image) { HWndUnit::ShowImage(image); } /// /// /// /// /// /// /// void VImage::ShowObj(HObject obj, QColor color, double fTransparency , int nLinsWhite) { HWndUnit::ShowObj(obj, color, fTransparency, nLinsWhite); } /// /// /// /// /// /// /// /// void VImage::ShowMsg(HTuple msg, QString strColor, int nX, int nY, int nSize) { HWndUnit::ShowMsg(msg, strColor, nX, nY, nSize); } /// /// /// void VImage::Refresh() { HWndUnit::Refresh(); }