本文整理汇总了C++中Stat::getDesc方法的典型用法代码示例。如果您正苦于以下问题:C++ Stat::getDesc方法的具体用法?C++ Stat::getDesc怎么用?C++ Stat::getDesc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stat
的用法示例。
在下文中一共展示了Stat::getDesc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: keyPressEvent
//.........这里部分代码省略.........
imge->refreshWidget();
imge->statAdded = false;
currentSelectedStat = -1;
if (imge->getResource() != NULL) {
maDestroyObject(imge->getResource());
}
imge->setResource(Util::loadImageFromResource(RES_LOADING1));
imge->update();
imge->requestRepaint();
maUpdateScreen();
if (flip) {
if ((imageCacheBack != NULL)&&(imge != NULL)) {
Util::retrieveBack(imge, card, height-PADDING*2, imageCacheBack);
Util::retrieveFront(NULL, card, height-PADDING*2, imageCacheFront);
}
} else {
if ((imageCacheFront != NULL)&&(imge != NULL)) {
Util::retrieveFront(imge, card, height-PADDING*2, imageCacheFront);
Util::retrieveBack(NULL, card, height-PADDING*2, imageCacheBack);
}
}
flipOrSelect=0;
currentSelectedStat = -1;
tapped = false;
}else{
if (imge->getResource() != RES_TEMP) {
if(currentSelectedStat>-1){
if(flip==card->getStats()[currentSelectedStat]->getFrontOrBack()){
imge->refreshWidget();
imge->selectStat(card->getStats()[currentSelectedStat]->getLeft(),card->getStats()[currentSelectedStat]->getTop(),
card->getStats()[currentSelectedStat]->getWidth(),card->getStats()[currentSelectedStat]->getHeight(),
card->getStats()[currentSelectedStat]->getColorRed(), card->getStats()[currentSelectedStat]->getColorGreen(),
card->getStats()[currentSelectedStat]->getColorBlue(), MobImage::PORTRAIT);
Stat *stat = card->getStats()[currentSelectedStat];
if ((strcmp(stat->getDesc().c_str(), "Mobile No") == 0)||
(strcmp(stat->getDesc().c_str(), "Tel No") == 0) ){
if (next != NULL) {
feed->remHttp();
delete next;
next == NULL;
}
next = new OptionsScreen(feed, OptionsScreen::ST_NUMBER_OPTIONS, this, card, stat->getDisplay());
next->show();
} else if (strcmp(stat->getDesc().c_str(), "Email") == 0) {
String email = stat->getDisplay();
int ret = maPlatformRequest(("mailto:"+email).c_str());
if (ret < 0 ) {
ret = maPlatformRequest(email.c_str());
}
if (ret < 0) {
MenuScreen *confirmation = new MenuScreen(RES_BLANK, "Feature currently not supported on device.");
confirmation->setMenuWidth(170);
confirmation->setMarginX(5);
confirmation->setMarginY(5);
confirmation->setDock(MenuScreen::MD_CENTER);
confirmation->setListener(this);
confirmation->setMenuFontSel(Util::getDefaultFont());
confirmation->setMenuFontUnsel(Util::getDefaultFont());
confirmation->setMenuSkin(Util::getSkinDropDownItem());
confirmation->addItem("Ok");
confirmation->show();
}
}
else if ((strcmp(stat->getDesc().c_str(), "Web Address") == 0)||
(strcmp(stat->getDesc().c_str(), "Social Media Link 1") == 0)||
(strcmp(stat->getDesc().c_str(), "Social Media Link 1") == 0)||
(strcmp(stat->getDesc().c_str(), "Social Media Link 1") == 0)||
(strcmp(stat->getDesc().c_str(), "Social Media Link 1") == 0)||
(strcmp(stat->getDesc().c_str(), "Social Media Link 1") == 0)) {
String url = stat->getDisplay();
//maPlatformRequest will only work if the url starts with http://
//so we need to check for it, and add it if it isnt there
if (url.find("http://") != 0) {
url = "http://"+url;
}
int ret = maPlatformRequest(url.c_str());
if (ret < 0) {
MenuScreen *confirmation = new MenuScreen(RES_BLANK, "Feature currently not supported on device.");
confirmation->setMenuWidth(170);
confirmation->setMarginX(5);
confirmation->setMarginY(5);
confirmation->setDock(MenuScreen::MD_CENTER);
confirmation->setListener(this);
confirmation->setMenuFontSel(Util::getDefaultFont());
confirmation->setMenuFontUnsel(Util::getDefaultFont());
confirmation->setMenuSkin(Util::getSkinDropDownItem());
confirmation->addItem("Ok");
confirmation->show();
}
}
}
}
}
}
} else {
previous->show();
}
break;
}
}