Exemplo n.º 1
0
void PSV_ChartItem::updateItem()
{
    m_curveZValue = 1;
//    QRectF m_rect = getBoundingRect();

//    m_staFont.setPointSizeF(m_rect.height() * 0.008);
//    m_titleFont.setPointSizeF(m_rect.height() * 0.038);
    beforeUpdateItem();
    if(!m_chartRect.isValid())
    {
        return;
    }
    m_staStartPoint = m_chartRect.bottomLeft();
    createAxisi();
    createTitle(getData(PSV::titleText,"").toString());

    if(m_axisParam_left.m_isShow)
    {
        m_staStartPoint.setX(m_leftAxisItem->validRect().right());
    }
    if(m_axisParam_down.m_isShow)
    {
        m_staStartPoint.setY(m_downAxisItem->validRect().bottom() + getData(PSV::margin,3).toInt());
    }
    createHVLine();
    afterUpdateItem();
}
Exemplo n.º 2
0
PSV_ChartRealItem::PSV_ChartRealItem(const QMap<PSV::ATTRIBUTE_ROLE, QVariant> &param, QGraphicsItem *parent)
    : PSV_ChartItem(param,parent)
{
    m_axisParam_left.m_isShow = true;
    m_axisParam_down.m_isShow = true;
    m_axisParam_up.m_isShow = true;
    m_axisParam_right.m_isShow = true;
    createAxisi();
    m_isCurrentMessHidden = false;
}
Exemplo n.º 3
0
//=================================================
PSV_TreeItem::PSV_TreeItem(const QMap<int, QVariant> &param, PSV_TreeItemData *itemData, QGraphicsItem *parent)
//    : PSV_Item(param,parent)
    : PSV_ChartItem(param,parent)
    , m_itemData(itemData)
    , m_dw(0)
    , m_dhRatio(0)
{
    setAcceptHoverEvents(false);
    m_axisParam_left.m_isShow = true;
    createAxisi();
}
PSV_ChartDateTimeItem::PSV_ChartDateTimeItem(const QMap<int, QVariant> &param, QGraphicsItem *parent)
    : PSV_ChartItem(param,parent)
{
    m_beginDateTime = PSV_BEGIN_DATETIME;
    m_min_x = m_beginDateTime;
    m_max_x = QDateTime::currentDateTime();
    m_max_dateTime = m_beginDateTime;
    m_min_dateTime = m_beginDateTime;

    m_axisParam_left.m_isShow = true;
    m_axisParam_down.m_isShow = true;
    createAxisi();
    m_isCurrentMessHidden = false;
}