Ejemplo n.º 1
0
void ZMEvents::playerExited(void)
{
    // refresh the grid and restore the saved position

    if (m_savedPosition > (int)m_eventList->size() - 1)
        m_savedPosition = m_eventList->size() - 1;

    updateUIList();
    m_eventGrid->SetItemCurrent(m_savedPosition);
}
Ejemplo n.º 2
0
void ZMEvents::setGridLayout(int layout)
{
    if (layout < 1 || layout > 3)
        layout = 1;

    if (layout == m_layout)
        return;

    if (m_eventGrid)
        m_eventGrid->Reset();

    m_layout = layout;

    // iterate though the children showing/hiding them as appropriate
    QString name;
    QString layoutName = QString("layout%1").arg(layout);
    QList<MythUIType *> *children = GetAllChildren();

    for (int x = 0; x < children->size(); x++)
    {
        MythUIType *type = children->at(x);
        name = type->objectName();
        if (name.startsWith("layout"))
        {
            if (name.startsWith(layoutName))
                type->SetVisible(true);
            else
                type->SetVisible(false);
        }
    }

    // get the correct grid
    m_eventGrid = dynamic_cast<MythUIButtonList *> (GetChild(layoutName + "_eventlist"));

    if (m_eventGrid)
    {
        connect(m_eventGrid, SIGNAL(itemSelected( MythUIButtonListItem*)),
                this, SLOT(eventChanged(MythUIButtonListItem*)));
        connect(m_eventGrid, SIGNAL(itemClicked( MythUIButtonListItem*)),
                this, SLOT(playPressed()));
        connect(m_eventGrid, SIGNAL(itemVisible(MythUIButtonListItem*)),
             this, SLOT(eventVisible(MythUIButtonListItem*)));

        updateUIList();

        BuildFocusList();

        SetFocusWidget(m_eventGrid);
    }
    else
    {
Ejemplo n.º 3
0
void ZMEvents::getEventList(void)
{
    if (ZMClient *zm = ZMClient::get())
    {
        QString monitorName = "<ANY>";
        QString date = "<ANY>";

        if (m_cameraSelector->GetValue() != tr("All Cameras"))
            monitorName = m_cameraSelector->GetValue();

        if (m_dateSelector->GetValue() != tr("All Dates"))
            date = m_dateList[m_dateSelector->GetCurrentPos() - 1];

        zm->getEventList(monitorName, m_oldestFirst, date, m_eventList);

        updateUIList();
    }
}
Ejemplo n.º 4
0
void ViewScheduleDiff::Init()
{
    updateUIList();
}