void Desktop::createItem() { //g_musicplay=new MusicPlayer; g_videoplay=new VideoPlayer; g_setting=new Setting; g_photoview=new PhotoViewer; g_fullimage=new ImageWidget; m_launchitemtimer=new QTimer; connect(m_launchitemtimer,SIGNAL(timeout()), this, SLOT(createMusic())); m_launchitemtimer->start(1000); }
bool GfuiMenuCreateStaticControls(void* hscr, void* hparm) { if (!hparm) { GfLogError("Failed to create static controls (XML menu descriptor not yet loaded)\n"); return false; } char buf[32]; for (int i = 1; i <= GfParmGetEltNb(hparm, GFMNU_SECT_STATIC_CONTROLS); i++) { snprintf(buf, sizeof(buf), GFMNU_SECT_STATIC_CONTROLS"/%d", i); const char* pszType = GfParmGetStr(hparm, buf, GFMNU_ATTR_TYPE, ""); if (!strcmp(pszType, GFMNU_TYPE_LABEL)) { createLabel(hscr, hparm, buf); } else if (!strcmp(pszType, GFMNU_TYPE_STATIC_IMAGE)) { createStaticImage(hscr, hparm, buf); } else if (!strcmp(pszType, GFMNU_TYPE_BACKGROUND_IMAGE)) { createBackgroundImage(hscr, hparm, buf); } else { GfLogWarning("Failed to create static control '%s' of unknown type '%s'\n", buf, pszType); } } // while not truly a static control (visually), each menu/screen can have // background music. As 'GfuiMenuCreateStaticControls()' is called on load // of each menu, this was deemed the least intrusive place to add the // music filename to the screen's struct. createMusic(hscr,hparm); return true; }