本文整理汇总了C++中CHintBox::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ CHintBox::hide方法的具体用法?C++ CHintBox::hide怎么用?C++ CHintBox::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHintBox
的用法示例。
在下文中一共展示了CHintBox::hide方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testCHintBox
void CTestMenu::testCHintBox()
{
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "HintBox");
hintBox->paint();
sleep(3);
hintBox->hide();
delete hintBox;
}
示例2: exec
int CFavorites::exec(CMenuTarget* parent, const std::string & actionKey)
{
int status;
std::string str;
int res = menu_return::RETURN_EXIT_ALL;
bool show_list;
//printf("[favorites] key %s\n", actionKey.c_str());
show_list = (actionKey == "showlist");
if (parent)
parent->hide();
if (!bouquetList) {
ShowLocalizedMessage(LOCALE_FAVORITES_BOUQUETNAME, LOCALE_FAVORITES_NOBOUQUETS, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO);
return res;
}
CHintBox* hintBox = new CHintBox(LOCALE_FAVORITES_BOUQUETNAME, g_Locale->getText(LOCALE_FAVORITES_ADDCHANNEL), 380); // UTF-8
if(!show_list)
hintBox->paint();
status = addChannelToFavorites(show_list);
hintBox->hide();
delete hintBox;
// -- Display result
//printf("[favorites] status %d\n", status);
if(status < 0)
return menu_return::RETURN_REPAINT;
str = "";
if(show_list)
{
if (status & 2) str += g_Locale->getText(LOCALE_EXTRA_CHADDED);
else str += g_Locale->getText(LOCALE_EXTRA_CHALREADYINBQ);
ShowMsgUTF(LOCALE_EXTRA_ADD_TO_BOUQUET, str, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); // UTF-8
}
else
{
if (status & 1) str += g_Locale->getText(LOCALE_FAVORITES_BQCREATED);
if (status & 2) str += g_Locale->getText(LOCALE_FAVORITES_CHADDED);
else str += g_Locale->getText(LOCALE_FAVORITES_CHALREADYINBQ);
if (status) str += g_Locale->getText(LOCALE_FAVORITES_FINALHINT);
ShowMsgUTF(LOCALE_FAVORITES_BOUQUETNAME, str, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); // UTF-8
}
// if (status) {
// g_RCInput->postMsg( NeutrinoMessages::EVT_BOUQUETSCHANGED, 0 );
// }
return res;
}
示例3: exec
int CNetworkSettings::exec(CMenuTarget* parent, const std::string& actionKey)
{
dprintf(DEBUG_NORMAL, "CNetworkSettings::exec: actionKey: %s\n", actionKey.c_str());
int ret = menu_return::RETURN_REPAINT;
if(parent)
parent->hide();
if(actionKey == "savesettings")
{
networkConfig->automatic_start = (network_automatic_start == 1);
networkConfig->commitConfig();
CNeutrinoApp::getInstance()->exec(NULL, "savesettings");
return ret;
}
else if(actionKey == "network")
{
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_NETWORKMENU_SETUPNOW)); // UTF-8
hintBox->paint();
networkConfig->automatic_start = (network_automatic_start == 1);
networkConfig->stopNetwork();
networkConfig->commitConfig();
networkConfig->startNetwork();
hintBox->hide();
delete hintBox;
hintBox = NULL;
return ret;
}
else if(actionKey == "networktest")
{
dprintf(DEBUG_INFO, "CNeutrinoApp::exec: doing network test...\n");
testNetworkSettings(networkConfig->address.c_str(), networkConfig->netmask.c_str(), networkConfig->broadcast.c_str(), networkConfig->gateway.c_str(), networkConfig->nameserver.c_str(), networkConfig->inet_static);
return ret;
}
else if(actionKey == "networkshow")
{
dprintf(DEBUG_INFO, "CNeutrinoApp::exec: showing current network settings...\n");
showCurrentNetworkSettings();
return ret;
}
showMenu();
return ret;
}
示例4: SaveAndRestart
void CPersonalizeGui::SaveAndRestart()
{
// Save the settings and restart Neutrino, if user wants to!
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_MAINSETTINGS_SAVESETTINGSNOW_HINT)); // UTF-8
hintBox->paint();
CNeutrinoApp::getInstance()->saveSetup();
hintBox->hide();
delete hintBox;
CNeutrinoApp::getInstance()->exec(NULL, "restart");
}
示例5: applyNetworkSettings
//saves settings and apply, reboot not required
void CNetworkSetup::applyNetworkSettings()
{
printf("[network setup] apply network settings...\n");
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_NETWORKMENU_APPLY_SETTINGS)); // UTF-8
hintBox->paint();
prepareSettings();
networkConfig->stopNetwork();
networkConfig->commitConfig();
networkConfig->startNetwork();
hintBox->hide();
delete hintBox;
}
示例6: selectDevice
void CUpnpBrowserGui::selectDevice()
{
bool loop = true;
bool changed = true;
neutrino_msg_t msg;
neutrino_msg_data_t data;
CHintBox *scanBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_UPNPBROWSER_SCANNING)); // UTF-8
scanBox->paint();
#if 0
try {
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
}
catch (std::runtime_error error)
{
delete scanBox;
ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, error.what(), CMessageBox::mbrBack, CMessageBox::mbBack, "info.raw");
return;
}
#endif
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
scanBox->hide();
if (!m_devices.size())
{
ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_UPNPBROWSER_NOSERVERS, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_UPDATE);
delete scanBox;
return;
}
// control loop
while (loop)
{
if (changed)
{
paintDevice();
changed=false;
}
g_RCInput->getMsg(&msg, &data, 10); // 1 sec timeout to update play/stop state display
neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat;
if( msg == CRCInput::RC_timeout)
{
// nothing
}
else if( msg == CRCInput::RC_home)
{
loop = false;
}
else if (msg_repeatok == CRCInput::RC_up && m_selecteddevice > 0)
{
m_selecteddevice--;
if (m_selecteddevice < m_indexdevice)
m_indexdevice-=m_listmaxshow;
changed = true;
}
else if (msg_repeatok == CRCInput::RC_down && m_selecteddevice + 1 < m_devices.size())
{
m_selecteddevice++;
if (m_selecteddevice + 1 > m_indexdevice + m_listmaxshow)
m_indexdevice+=m_listmaxshow;
changed=true;
}
else if( msg == CRCInput::RC_right || msg == CRCInput::RC_ok)
{
m_folderplay = false;
selectItem("0");
changed=true;
}
else if( msg == CRCInput::RC_blue)
{
scanBox->paint();
#if 0
try {
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
}
catch (std::runtime_error error)
{
delete scanBox;
ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, error.what(), CMessageBox::mbrBack, CMessageBox::mbBack, "info.raw");
return;
}
#endif
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
scanBox->hide();
if (!m_devices.size())
{
ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_UPNPBROWSER_NOSERVERS, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_UPDATE);
delete scanBox;
return;
}
changed=true;
}
else if(msg == NeutrinoMessages::RECORD_START ||
msg == NeutrinoMessages::ZAPTO ||
msg == NeutrinoMessages::STANDBY_ON ||
msg == NeutrinoMessages::SHUTDOWN ||
//.........这里部分代码省略.........
示例7: Screenshot
void CVCRControl::Screenshot(const t_channel_id channel_id, char * fname)
{
char filename[512]; // UTF-8
char cmd[512];
std::string channel_name;
CEPGData epgData;
event_id_t epgid = 0;
unsigned int pos;
if(!fname) {
if(safe_mkdir((char *) "/hdd/screenshots/"))
return;
strcpy(filename, "/hdd/screenshots/");
pos = strlen(filename);
channel_name = g_Zapit->getChannelName(channel_id);
if (!(channel_name.empty())) {
strcpy(&(filename[pos]), UTF8_TO_FILESYSTEM_ENCODING(channel_name.c_str()));
char * p_act = &(filename[pos]);
do {
p_act += strcspn(p_act, "/ \"%&-\t`'´!,:;");
if (*p_act) {
*p_act++ = '_';
}
} while (*p_act);
strcat(filename, "_");
}
pos = strlen(filename);
//if (g_Sectionsd->getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData))
if(sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData));
epgid = epgData.eventID;
if(epgid != 0) {
CShortEPGData epgdata;
//if (g_Sectionsd->getEPGidShort(epgid, &epgdata)) {
if(sectionsd_getEPGidShort(epgid, &epgdata)) {
if (!(epgdata.title.empty())) {
strcpy(&(filename[pos]), epgdata.title.c_str());
char * p_act = &(filename[pos]);
do {
p_act += strcspn(p_act, "/ \"%&-\t`'~<>!,:;?^°$\\=*#@¤|");
if (*p_act) {
*p_act++ = '_';
}
} while (*p_act);
}
}
}
pos = strlen(filename);
time_t t = time(NULL);
strftime(&(filename[pos]), sizeof(filename) - pos - 1, "%Y%m%d_%H%M%S", localtime(&t));
strcat(filename, ".bmp");
} else
strcpy(filename, fname);
sprintf(cmd, "grab -v %s", filename);
printf("Executing %s\n", cmd);
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Saving screenshot..");
hintBox->paint();
system(cmd);
hintBox->hide();
delete hintBox;
}
示例8: readChannellist
//.........这里部分代码省略.........
parser = parseXmlFile(filename.c_str());
if (parser)
{
xmlNodePtr l0 = NULL;
xmlNodePtr l1 = NULL;
l0 = xmlDocGetRootElement(parser);
l1 = l0->xmlChildrenNode;
neutrino_msg_t msg;
neutrino_msg_data_t data;
CHintBox* hintBox = NULL;
hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_SERVICEMENU_RELOAD_HINT));
g_RCInput->getMsg(&msg, &data, 0);
if (l1)
{
while ( ((xmlGetNextOccurence(l1, "webtv")) || (xmlGetNextOccurence(l1, "station"))) && msg != CRCInput::RC_home)
{
char * title;
char * url;
char * description;
// title
if(xmlGetNextOccurence(l1, "webtv"))
{
title = xmlGetAttribute(l1, (char *)"title");
// url
url = xmlGetAttribute(l1, (char *)"url");
description = xmlGetAttribute(l1, (char *)"description");
addUrl2Playlist(url, title, description);
}
else if (xmlGetNextOccurence(l1, "station"))
{
hintBox->paint();
title = xmlGetAttribute(l1, (char *)"name");
url = xmlGetAttribute(l1, (char *)"url");
description = "stream";
processPlaylistUrl(url, title, description) ;
}
l1 = l1->xmlNextNode;
g_RCInput->getMsg(&msg, &data, 0);
}
}
hintBox->hide();
delete hintBox;
hintBox = NULL;
return true;
}
xmlFreeDoc(parser);
}
else if(playlist)
{
std::ifstream infile;
char cLine[1024];
char name[1024] = { 0 };
int duration;
std::string description;
infile.open(filename.c_str(), std::ifstream::in);
while (infile.good())
{
infile.getline(cLine, sizeof(cLine));
// remove CR
if(cLine[strlen(cLine) - 1] == '\r')
cLine[strlen(cLine) - 1] = 0;
sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &duration, name);
if(strlen(cLine) > 0 && cLine[0] != '#')
{
char *url = NULL;
if ((url = strstr(cLine, "http://")) || (url = strstr(cLine, "rtmp://")) || (url = strstr(cLine, "rtsp://")) || (url = strstr(cLine, "mmsh://")) )
{
if (url != NULL)
{
description = "stream";
addUrl2Playlist(url, name, description.c_str());
}
}
}
}
infile.close();
}
return false;
}