#include "envResultItem.h"
#include "ui_envResultItem.h"

#include "CAppInfo.h"

envResultItem::envResultItem(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::envResultItem)
{
    ui->setupUi(this);

    setStyleSheet(g_appInfoPtr->m_sQssStr);
}

envResultItem::~envResultItem()
{
    delete ui;
}

int envResultItem::setUI(int nWidth)
{
    setGeometry(0, 0, nWidth, g_appInfoPtr->m_fRate*19);
    ui->label_resultItemIcon->setGeometry(0, g_appInfoPtr->m_fRate*3, g_appInfoPtr->m_fRate*14, g_appInfoPtr->m_fRate*14);
    ui->label_resultItemText->setGeometry(ui->label_resultItemIcon->x() + ui->label_resultItemIcon->width() + g_appInfoPtr->m_fRate*10,
                                          g_appInfoPtr->m_fRate*1, width(), g_appInfoPtr->m_fRate*17);
    return g_appInfoPtr->m_fRate*19;
}

void envResultItem::setText(QString sText)
{
    ui->label_resultItemText->setText(sText);
}
