Example #1
0
//infobar settings
int COsdSetup::showOsdInfobarSetup()
{
	CMenuWidget * oibs = new CMenuWidget(menue_title, menue_icon, width);

	//prepare items
	CMenuOptionChooser *oibs_sat_display_ch = new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_SAT_DISPLAY, &g_settings.infobar_sat_display, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	CMenuOptionChooser *oibs_subchanpos_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true);
	CMenuOptionChooser *oibs_vzap_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_VIRTUAL_ZAP_MODE, &g_settings.virtual_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
	CMenuOptionChooser *oibs_epgshow_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_SHOW, &g_settings.infobar_show, INFOBAR_EPG_SHOW_OPTIONS, INFOBAR_EPG_SHOW_OPTIONS_COUNT, true);

#ifdef ENABLE_RADIOTEXT
	CMenuOptionChooser *oibs_radiotext_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOVIEWER_RADIOTEXT, &g_settings.radiotext_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
#endif
	CMenuSeparator     *oibs_chanlogo_sep 	= new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO);
	
	
	//channel logo
	bool activ_logo_opts = g_settings.infobar_show_channellogo != INFOBAR_NO_LOGO ? true : false; 
	CMenuForwarder 	   *oibs_chanlogo_fw 	= new CMenuForwarder(LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO_LOGODIR, activ_logo_opts, g_settings.infobar_channel_logodir, this, "channel_logodir");
	CMenuOptionChooser *oibs_chanlogo_bg_ch = new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO_BACKGROUND, &g_settings.infobar_channellogo_background, INFOBAR_CHANNELLOGO_BACKGROUND_SHOW_OPTIONS, INFOBAR_CHANNELLOGO_BACKGROUND_SHOW_OPTIONS_COUNT, activ_logo_opts);

	COnOffNotifier channelLogoNotifier;
	channelLogoNotifier.addItem(oibs_chanlogo_fw);
	channelLogoNotifier.addItem(oibs_chanlogo_bg_ch);
	CMenuOptionChooser *oibs_chanlogo_ch 	= new CMenuOptionChooser(LOCALE_OSDSETTINGS_INFOBAR_CHANNELLOGO_SHOW, &g_settings.infobar_show_channellogo, INFOBAR_CHANNELLOGO_SHOW_OPTIONS, INFOBAR_CHANNELLOGO_SHOW_OPTIONS_COUNT, true, &channelLogoNotifier);
	


	//show items
	oibs->addIntroItems(LOCALE_OSDSETTINGS_INFOBAR);
	//-------------------------------------------------
	oibs->addItem(oibs_sat_display_ch);
	oibs->addItem(oibs_subchanpos_ch);
	oibs->addItem(oibs_vzap_ch);
	oibs->addItem(oibs_epgshow_ch);
#ifdef ENABLE_RADIOTEXT
	oibs->addItem(oibs_radiotext_ch);
#endif
	oibs->addItem(oibs_chanlogo_sep);
	//-------------------------------------------------	
	oibs->addItem(oibs_chanlogo_ch);
	oibs->addItem(oibs_chanlogo_fw);
	oibs->addItem(oibs_chanlogo_bg_ch);

	int res = oibs->exec(NULL, "");
	delete oibs;

	return res;
}
int CZapitSetup::showMenu()
{
	//menue init
	CMenuWidget *zapit = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_ZAPIT);
	zapit->addIntroItems(LOCALE_ZAPITSETUP_INFO);
	COnOffNotifier* miscZapitNotifier = new COnOffNotifier(1);
	//zapit
	CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_ZAPITSETUP_LAST_USE, &g_settings.uselastchannel, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, miscZapitNotifier, CRCInput::RC_red);
	mc->setHint("", LOCALE_MENU_HINT_LAST_USE);

	CSelectChannelWidget select;

	CMenuForwarder 	*zapit1 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_TV    , !g_settings.uselastchannel, g_settings.StartChannelTV, &select, "tv", CRCInput::RC_green);
	zapit1->setHint("", LOCALE_MENU_HINT_LAST_TV);

	CMenuForwarder 	*zapit2 = new CMenuForwarder(LOCALE_ZAPITSETUP_LAST_RADIO , !g_settings.uselastchannel, g_settings.StartChannelRadio, &select, "radio", CRCInput::RC_yellow);
	zapit2->setHint("", LOCALE_MENU_HINT_LAST_RADIO);

	#define CHANNEL_LIST_MODE_OPTION_COUNT 5
	const CMenuOptionChooser::keyval CHANNEL_LIST_MODE_OPTIONS[CHANNEL_LIST_MODE_OPTION_COUNT] = {
		  { -1,			LOCALE_CHANNELLIST_REMEMBER	}
		, { LIST_MODE_FAV,	LOCALE_CHANNELLIST_FAVS		}
		, { LIST_MODE_PROV,	LOCALE_CHANNELLIST_PROVS	}
		, { LIST_MODE_SAT,	LOCALE_CHANNELLIST_SATS		}
		, { LIST_MODE_ALL,	LOCALE_CHANNELLIST_HEAD		}
	};

	CMenuOptionChooser *channel_mode = new CMenuOptionChooser(LOCALE_ZAPITSETUP_CHANNELMODE, &g_settings.channel_mode_initial, CHANNEL_LIST_MODE_OPTIONS, CHANNEL_LIST_MODE_OPTION_COUNT, true, NULL, CRCInput::RC_1, NULL, true);
	channel_mode->setHint("", LOCALE_MENU_HINT_CHANNELLIST_MODE);
	CMenuOptionChooser *channel_mode_radio = new CMenuOptionChooser(LOCALE_ZAPITSETUP_CHANNELMODE_RADIO, &g_settings.channel_mode_initial_radio, CHANNEL_LIST_MODE_OPTIONS, CHANNEL_LIST_MODE_OPTION_COUNT, true, NULL, CRCInput::RC_2, NULL, true);
	channel_mode_radio->setHint("", LOCALE_MENU_HINT_CHANNELLIST_MODE_RADIO);

	miscZapitNotifier->addItem(zapit1);
	miscZapitNotifier->addItem(zapit2);

	zapit->addItem(mc);
	zapit->addItem(GenericMenuSeparatorLine);
	zapit->addItem(zapit1);
	zapit->addItem(zapit2);
	zapit->addItem(GenericMenuSeparatorLine);
	zapit->addItem(channel_mode);
	zapit->addItem(channel_mode_radio);

	int res = zapit->exec(NULL, "");
	delete miscZapitNotifier;
	delete zapit;
	return res;
}
Example #3
0
//energy and shutdown settings
int CMiscMenue::showMiscSettingsMenuEnergy()
{
	CMenuWidget *ms_energy = new CMenuWidget(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_ENERGY);
	ms_energy->addIntroItems(LOCALE_MISCSETTINGS_ENERGY);

	CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real);
	m1->setHint("", LOCALE_MENU_HINT_SHUTDOWN_RCDELAY);

	std::string shutdown_count = to_string(g_settings.shutdown_count);
	if (shutdown_count.length() < 3)
		shutdown_count.insert(0, 3 - shutdown_count.length(), ' ');
	CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, &shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 ");
	CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, shutdown_count, miscSettings_shutdown_count);
	m2->setHint("", LOCALE_MENU_HINT_SHUTDOWN_COUNT);

	COnOffNotifier * miscNotifier = new COnOffNotifier(1);
	miscNotifier->addItem(m1);
	miscNotifier->addItem(m2);

	CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier);
	mc->setHint("", LOCALE_MENU_HINT_SHUTDOWN_REAL);

	ms_energy->addItem(mc);
	ms_energy->addItem(m1);
	ms_energy->addItem(m2);

	m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, NULL, new CSleepTimerWidget(true));
	m2->setHint("", LOCALE_MENU_HINT_INACT_TIMER);
	ms_energy->addItem(m2);

	CMenuOptionChooser * m4 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SLEEPTIMER_MIN, &g_settings.sleeptimer_min, SLEEPTIMER_MIN_OPTIONS, SLEEPTIMER_MIN_OPTION_COUNT, true);
	m4->setHint("", LOCALE_MENU_HINT_SLEEPTIMER_MIN);
	ms_energy->addItem(m4);

	if (g_settings.easymenu) {
		CMenuOptionChooser *cec_ch = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC, &g_settings.hdmi_cec_mode, VIDEOMENU_HDMI_CEC_MODE_OPTIONS, VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT, true, this);
		cec_ch->setHint("", LOCALE_MENU_HINT_CEC_MODE);
		ms_energy->addItem(cec_ch);
	}

	int res = ms_energy->exec(NULL, "");

	g_settings.shutdown_count = atoi(shutdown_count.c_str());

	delete ms_energy;
	delete miscNotifier;
	return res;
}
int CProgressbarSetup::showMenu()
{
	//menue init
	CMenuWidget *progress = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PROGRESSBAR);

	//intros: back ande save
	progress->addIntroItems(LOCALE_MISCSETTINGS_PROGRESSBAR);

	COnOffNotifier* miscProgressNotifier = new COnOffNotifier(0);

	//color on/off
	CMenuOptionChooser *color;
	color = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_COLOR, &g_settings.progressbar_color, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, miscProgressNotifier);
	color->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_COLOR);

	//design
	CMenuOptionChooser *design;
	design = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN, &g_settings.progressbar_design, PROGRESSBAR_DESIGN_OPTIONS, PROGRESSBAR_DESIGN_COUNT, g_settings.progressbar_color);
	design->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_DESIGN);

	//infobar position
	CMenuOptionChooser *infobar_position;
	infobar_position = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION, &g_settings.infobar_progressbar, PROGRESSBAR_INFOBAR_POSITION_OPTIONS, PROGRESSBAR_INFOBAR_POSITION_COUNT, true);
	infobar_position->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_INFOBAR_POSITION);

	miscProgressNotifier->addItem(design);

	//paint items
	progress->addItem(color);
	progress->addItem(design);
	progress->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MISCSETTINGS_INFOBAR));
	progress->addItem(infobar_position);

	int res = progress->exec (NULL, "");
	delete miscProgressNotifier;
	delete progress;

	return res;
}