コード例 #1
0
ファイル: homepage.cpp プロジェクト: JandunCN/AllInGithub
void Homepage::sltCx()
{
    if(g_transaction && !g_transaction->networkIsNormal())
    {
        YGMsgBox* box = Utility::msgBox(YGMsgBox::MsgType_Err, trUtf8("错误"), trUtf8("网络出现故障,请稍后再试."), this);
        box->show();
        return;
    }

    if(!checkTerminalConfig())
    {
        return;
    }

    QueryPage *query = new QueryPage(g_home);
    query->show();
    //Utility::pushPage(PageType_QueryPage, query);
    g_pageInfo.push(PageInfo(PageType_QueryPage, query));
}
コード例 #2
0
ファイル: utility.cpp プロジェクト: JandunCN/AllInGithub
void Utility::popPage()
{
    int top0 = g_pageInfo.top().type;
    g_pageInfo.pop();
    PageInfo info = g_pageInfo.top();
    if(top0 == PageType_None)
    {
        if(info.type != PageType_None)
        {
            return;
        }
        else
        {
            g_timer = g_pageInfo.top().pWgt->timerLabel();
        }
    }
    switch(info.type)
    {   
    case PageType_CourierLogIn:
        {
            LoginPage *login = new LoginPage(LoginPage::Courier_In ,g_home);
            login->show();
            g_pageInfo.top().pWgt = login;
            break;
        }
    case PageType_CourierPage:
        {
            CourierPage *courierPage = new CourierPage(g_home);
            courierPage->show();
            g_pageInfo.top().pWgt = courierPage;
            break;
        }
    case PageType_CourierVerifyPage:
        {
            CourierVerifyPage *page = new CourierVerifyPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_CourierInPage:
        {
            CourierInPage *page = new CourierInPage(false, g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_FastCourierInPage:
        {
            CourierInPage *page = new CourierInPage(true, g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_CabinetPage:
        {
//            CabinetPage *cabinetPage = new CabinetPage(g_transaction->courier().type, g_home);
//            cabinetPage->show();
//            g_pageInfo.top().pWgt = cabinetPage;
            // 无需处理;
            break;
        }
    case PageType_CourierInDoorOperatePage:
        {
            // 无需处理;
            break;
        }
    case PageType_CourierRechargePayPage:
        {
            break;
        }
    case PageType_FetchPage:
        {
            FetchPage *fetch = new FetchPage(g_home);
            fetch->show();
            g_pageInfo.top().pWgt = fetch;
            break;
        }
    case PageType_WechatQrcFetchPage:
        {
            WechatQrcFetchPage *page = new WechatQrcFetchPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_AppQrcFetchPage:
        {
            AppQrCodeFetchPage *page = new AppQrCodeFetchPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_ValidCodeFetchPage:
        {
            LoginPage *login = new LoginPage(LoginPage::Receiver_Out ,g_home);
            login->show();
            g_pageInfo.top().pWgt = login;
            break;
        }
    case PageType_QueryPage:
        {
            QueryPage *query = new QueryPage(g_home);
            query->show();
            g_pageInfo.top().pWgt = query;
            break;
        }
    case PageType_MailingPage:
        {
            MailPage *page = new MailPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_ReceiverOutDoorOperatePage:
        {
//            DoorOperateDlg *page = new DoorOperateDlg(DoorOperateDlg::DoorOperateType_ReceiverOut, g_home);
//            page->show();
//            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_ChangePasswdPage:
        {
            ModifyPasswdPage *page = new ModifyPasswdPage(g_home);
            page->show();
            g_pageInfo.top().pWgt = page;
            break;
        }
    case PageType_None:
        {
            info.pWgt->resetTimerLbl();
            break;
        }
    case PageType_SignupPage:
        {
            SignupPage *signupPage = new SignupPage(g_home);
            signupPage->show();
            g_pageInfo.top().pWgt = signupPage;
            break;
        }
    case PageType_Help:
        {
            HelpPage *helpPage = new HelpPage(g_home);
            helpPage->show();
            g_pageInfo.top().pWgt = helpPage;
        }
    case PageType_Homepage:
    {
            break;
    }
    case PageType_LjHelp:
    {
        YGWidget * wgt =Utility::addImageWgt(QSize(GL_WIDTH, GL_HEIGHT), QPoint(0,0),
                          g_appPath + "/data/pic/mailing/mailingpostinstruction.jpg",
                          g_appPath + "/data/piceng/mailing/mailingpostinstruction.jpg",
                          g_home);
        g_pageInfo.top().pWgt = wgt;
        break;
    }
    case PageType_JjHelp:
    {
        YGWidget * wgt = Utility::addImageWgt(QSize(GL_WIDTH, GL_HEIGHT), QPoint(0,0),
                         g_appPath + "/data/pic/mailing/mailinginstruction.jpg",
                         g_appPath + "/data/piceng/mailing/mailinginstruction.jpg",
                         g_home);
        g_pageInfo.top().pWgt = wgt;
        break;
    }
    default:
        break;
    }
}