Exemplo n.º 1
0
/*
 * 功能:
 * 	  槽函数, send the pointer of current widget;
 * 参数: QString
 * 返回值: none
 */
void SlidingScreen::slotSendCurrentWidgetPointer(QString currentFrameIndex)
{
    switch (currentFrameIndex.toInt()) {
    case 0:
        emit sigCurrentIndex(p_widgetBuf->at(m_layOut[0]->objectName().toInt())); //objectName().toInt() == addWidgetItem(int widgetIndex, QWidget *pw)
        break;
    case 1:
        emit sigCurrentIndex(p_widgetBuf->at(m_layOut[1]->objectName().toInt()));
        break;
    case 2:
        emit sigCurrentIndex(p_widgetBuf->at(m_layOut[2]->objectName().toInt()));
        break;
    default:
        break;
    }
}
Exemplo n.º 2
0
WinTrendGroupPanel::WinTrendGroupPanel(QGraphicsView*parent) :
    SlidingScreen(parent,false,true)
{
    p_messageBar = new DisPlayMessage(this);
    p_messageBar->setSize(DESKTOP_WIDTH, DESKTOP_HEIGHT * 0.94);
    p_messageBar->resieWidget();
    p_handWritePad = new HandWritePad(this);
    p_messageBar->setVisible(false);
    p_handWritePad->setVisible(false);

    connect(this,SIGNAL(sigCurrentIndex(quint32)),this,SLOT(slotGroupIndexChanged(quint32)));
    slotGroupConfigChanged();
    connect(CfgChannel::instance(), SIGNAL(sigGroupConfigChanged()), this, SLOT(slotGroupConfigChanged()));

    slotTrendConfigChanged(ID_Disp_Trend_Set_Direction);
    connect(CfgChannel::instance(), SIGNAL(sigNormalConfigChanged(quint32)), this, SLOT(slotTrendConfigChanged(quint32)));

    //TODO----测试按钮,待删除
//    m_pb_testStart.setParent(this);
//    m_pb_testStart.setText("testStart");
//    m_pb_testStart.move(0,0);
//    m_pb_testStop.setParent(this);
//    m_pb_testStop.setText("testStop");
//    m_pb_testStop.move(500,0);
//    m_pb_testReconfig.setParent(this);
//    m_pb_testReconfig.setText("testReconfig");
//    m_pb_testReconfig.move(200, 0);
//    connect(&m_pb_testStart, SIGNAL(clicked()), this, SLOT(slotTestStart()));
//    connect(&m_pb_testStop, SIGNAL(clicked()), this, SLOT(slotTestStop()));
//    connect(&m_pb_testReconfig, SIGNAL(clicked()), this, SLOT(slotTestReconfig()));
}