#include #include #include #include #include #include #include #include "misc_settings.h" #include "mv_common.h" #include "uitypes.h" extern HostParms hostparm; static HostCheckBox *HostShowToolTips() { HostCheckBox *gc = new HostCheckBox("HostShowToolTips"); gc->setLabel(QObject::tr("Show shortcuts")); gc->setValue(true); gc->setHelpText(QObject::tr("Shows a popup window describing how to open a console and various other items.")); return gc; }; static HostComboBox *Hostupdateplan() { HostComboBox *gc = new HostComboBox("Hostupdateplan"); gc->setLabel(QObject::tr("Automatic updates")); gc->addSelection("None"); gc->addSelection("Myth_only"); gc->addSelection("All"); gc->setHelpText("Download and apply updates. None: Will not download any updates , Myth_only: automatic updates for MythTV, All: Automatic updates for the entire system."); return gc; } static HostLineEdit *HostZipcode() { HostLineEdit *gc = new HostLineEdit("HostZipcode"); gc->setLabel(QObject::tr("Zip Code")); gc->setHelpText(QObject::tr("The zipcode will be used to configure MythMovieTimes. Leave it blank to use the existing value. People located outside the U.S.A should probably leave this blank")); //gc->setRW(); //gc->setRO(); return gc; }; //_______________Misc main frame MiscMainFrame::MiscMainFrame(): VerticalConfigurationGroup(false,false,false,false) { bool MVAPP; #ifdef __MVAPP__ MVAPP = true ; #else MVAPP = false ; #endif bool showLabels; hostparm.ThisSystemType = gContext->GetSetting("HostSystemType"); if ( hostparm.ThisSystemType == "Standalone" || hostparm.ThisSystemType=="Master_backend") { showLabels = false; } else { showLabels = true; } TransLabelSetting *temptimezone = new TransLabelSetting(); temptimezone->setValue("Timezone: " + hostparm.ThisTimeZone ); TransLabelSetting *tempzipcode = new TransLabelSetting(); tempzipcode->setValue("Zipcode: " + hostparm.ThisHostZipcode ); GridConfigurationGroup* miscsettings_2 = new GridConfigurationGroup(1,true, true,false,false); if ( showLabels && ( hostparm.ThisHostZipcode != "" )) if (MVAPP) miscsettings_2->addChild(tempzipcode); else miscsettings_2->addChild(HostZipcode()); else miscsettings_2->addChild(HostZipcode()); TimezoneRegion *timezoneregion = new TimezoneRegion(); TimezoneButton *timezonebutton = new TimezoneButton(); VerticalConfigurationGroup* miscsettings = new VerticalConfigurationGroup(false, true,false,false); if ( showLabels && ( hostparm.ThisTimeZone != "" )) { if (MVAPP) { miscsettings->addChild(temptimezone); timezonebutton->disableButton(); } else miscsettings->addChild(timezoneregion); } else miscsettings->addChild(timezoneregion); miscsettings->addChild(timezonebutton); miscsettings->addChild(miscsettings_2); addChild(miscsettings); connect(timezonebutton, SIGNAL(mf_launch_tzgui()),timezoneregion ,SLOT(timezone_gathersettings())); connect(timezoneregion,SIGNAL(mf_show_tz(QString)),this,SLOT(mf_show_tz(QString))); connect(this,SIGNAL(update_timezone(QString)),timezoneregion,SLOT(update_timezone_values(QString))); autoLaunchTimer = new QTimer(this); connect(autoLaunchTimer, SIGNAL(timeout()), timezonebutton, SLOT(launch_tzgui())); autoLaunchTimer->start(0); } QString MiscMainFrame::mf_show_tz(QString tz) { QString GTimezone; int rc; if (autoLaunchTimer->isActive()) { autoLaunchTimer->stop(); // This was triggered by the timer. Only launch the timezone gui if the timezone is unknown. if (!timezone_unknown) return NULL; } cout << "MiscMainFrame::mf_show_tz " << tz << "\n"; if ((tz == "") || timezone_unknown) tz = "guess"; //launch tzgui and load output into Gtimezone int screenheight = 0, screenwidth = 0; float wmult = 0, hmult = 0; QString m_height , m_width , cmd; gContext->GetScreenSettings(screenwidth, wmult, screenheight, hmult); m_height.setNum(screenheight); m_width.setNum(screenwidth); QString tzpath; tzpath=MV_ROOT; tzpath.append("bin/timezone.bin"); //cmd="ACCEL=500 " + tzpath + " -z " + tz + " -h " + m_height + " -w " + m_width + " > /tmp/.selected_tz" ; cmd=tzpath + " -z " + tz + " -h " + m_height + " -w " + m_width + " > /tmp/.selected_tz" ; rc=myth_system(cmd); if ( rc == 0 ) { //read in value QString line; QFile file("/tmp/.selected_tz"); if ( file.open(IO_ReadOnly | IO_Translate) ) { QTextStream t( &file ); // use a text stream while ( !t.eof() ) { line = t.readLine(); if ( line.contains("/")) { GTimezone = line.simplifyWhiteSpace(); break; } } file.close(); } timezone_unknown = FALSE; emit update_timezone(GTimezone); } } //_______________Misc main frame MiscMainFrame2::MiscMainFrame2(): VerticalConfigurationGroup(false,false,false,false) { VerticalConfigurationGroup* miscsettings = new VerticalConfigurationGroup(false, true,false,false); GridConfigurationGroup* miscsettings_2 = new GridConfigurationGroup(1,false, false,false,false); miscsettings_2->addChild(HostShowToolTips()); miscsettings_2->addChild(Hostupdateplan()); NFSSettings *nfssettings = new NFSSettings(); miscsettings->addChild(nfssettings); miscsettings->addChild(miscsettings_2); addChild(miscsettings); } //_______________Misc time timezone TimezoneButton::TimezoneButton(): VerticalConfigurationGroup(false,false,false,false) { TZButton = new TransButtonSetting; TZButton->setLabel("Hitchhikers guide to timezones"); addChild(TZButton); connect(TZButton, SIGNAL(pressed()),this,SLOT(launch_tzgui())); }; void TimezoneButton::launch_tzgui() { emit mf_launch_tzgui(); } void TimezoneButton::disableButton() { TZButton->setEnabled(false); } //This is used for the timezone QStringList findFilesRecursively ( QStringList paths, QString fileTypes ) { if ( fileTypes.isEmpty() ) fileTypes = "*"; QStringList result, more; QStringList::Iterator it; for ( uint i = 0 ; i < paths.size() ; i++ ) { // inefficient...whatever QDir dir( paths[i] ); dir.setSorting( QDir::Reversed ); more = dir.entryList( fileTypes, QDir::Files ); for ( it = more.begin() ; it != more.end() ; ++it ) result.append( paths[i] + "/" + *it ); // reg exp in next line excludes . and .. dirs (and .* actually) more = dir.entryList( QDir::Dirs ).grep( QRegExp( "[^.]" ) ); for ( it = more.begin() ; it != more.end() ; ++it ) *it = paths[i] + "/" + *it; more = findFilesRecursively( more, fileTypes ); for ( it = more.begin() ; it != more.end() ; ++it ) result.append( *it ); } return result; // yields absolute paths } void TimezoneRegion::timezoneregion_fillselection_zone() { HostTimeZoneRegion->setLabel(QObject::tr("TimeZone")); HostTimeZoneRegion->addSelection("US"); HostTimeZoneRegion->addSelection("Pacific"); HostTimeZoneRegion->addSelection("Mideast"); HostTimeZoneRegion->addSelection("Mexico"); HostTimeZoneRegion->addSelection("Indian"); HostTimeZoneRegion->addSelection("Europe"); HostTimeZoneRegion->addSelection("Etc"); HostTimeZoneRegion->addSelection("Chile"); HostTimeZoneRegion->addSelection("Canada"); HostTimeZoneRegion->addSelection("Brazil"); HostTimeZoneRegion->addSelection("Australia"); HostTimeZoneRegion->addSelection("Atlantic"); HostTimeZoneRegion->addSelection("Asia"); HostTimeZoneRegion->addSelection("Arctic"); HostTimeZoneRegion->addSelection("Antarctica"); HostTimeZoneRegion->addSelection("America"); HostTimeZoneRegion->addSelection("Africa"); //--single region HostTimeZoneRegion->addSelection("Zulu"); HostTimeZoneRegion->addSelection("WET"); HostTimeZoneRegion->addSelection("W-SU"); HostTimeZoneRegion->addSelection("Universal"); HostTimeZoneRegion->addSelection("UTC"); HostTimeZoneRegion->addSelection("UCT"); HostTimeZoneRegion->addSelection("Turkey"); HostTimeZoneRegion->addSelection("Singapore"); HostTimeZoneRegion->addSelection("ROK"); HostTimeZoneRegion->addSelection("ROC"); HostTimeZoneRegion->addSelection("Portugal"); HostTimeZoneRegion->addSelection("Poland"); HostTimeZoneRegion->addSelection("PST8PDT"); HostTimeZoneRegion->addSelection("PRC"); HostTimeZoneRegion->addSelection("Navajo"); HostTimeZoneRegion->addSelection("NZ-CHAT"); HostTimeZoneRegion->addSelection("NZ"); HostTimeZoneRegion->addSelection("MST7MDT"); HostTimeZoneRegion->addSelection("MST"); HostTimeZoneRegion->addSelection("MET"); HostTimeZoneRegion->addSelection("Libya"); HostTimeZoneRegion->addSelection("Kwajalein"); HostTimeZoneRegion->addSelection("Japan"); HostTimeZoneRegion->addSelection("Jamaica"); HostTimeZoneRegion->addSelection("Israel"); HostTimeZoneRegion->addSelection("Iran"); HostTimeZoneRegion->addSelection("Iceland"); HostTimeZoneRegion->addSelection("Hongkong"); HostTimeZoneRegion->addSelection("HST"); HostTimeZoneRegion->addSelection("Greenwich"); HostTimeZoneRegion->addSelection("GMT0"); HostTimeZoneRegion->addSelection("GMT-0"); HostTimeZoneRegion->addSelection("GMT+0"); HostTimeZoneRegion->addSelection("GMT"); HostTimeZoneRegion->addSelection("GB-Eire"); HostTimeZoneRegion->addSelection("GB"); HostTimeZoneRegion->addSelection("Factory"); HostTimeZoneRegion->addSelection("Eire"); HostTimeZoneRegion->addSelection("Egypt"); HostTimeZoneRegion->addSelection("EST5EDT"); HostTimeZoneRegion->addSelection("EST"); HostTimeZoneRegion->addSelection("EET"); HostTimeZoneRegion->addSelection("Cuba"); HostTimeZoneRegion->addSelection("CST6CDT"); HostTimeZoneRegion->addSelection("CET"); HostTimeZoneRegion->setHelpText(QObject::tr("Timezone Region")); } void TimezoneRegion::timezoneregion_fillselection(QString tzonefile ) { QString currentitem; int foundtab; int foundslashes; QString timezonefile="/usr/share/zoneinfo/posix/"; timezonefile.append(tzonefile); QStringList answer = findFilesRecursively( timezonefile, "*" ); QStringList onlyfiles = ""; QStringList::Iterator it; for ( it = answer.begin(); it != answer.end(); ++it ) { currentitem = *it; foundtab=currentitem.contains(".tab"); if ( foundtab == 0 ) { foundslashes=currentitem.contains("/"); currentitem = currentitem.section( '/', 6, foundslashes ); if ( tzonefile == "US") HostTimezoneRegion_US->addSelection(currentitem); else if ( tzonefile == "Pacific") HostTimezoneRegion_Pacific->addSelection(currentitem); else if ( tzonefile == "Mideast") HostTimezoneRegion_Mideast->addSelection(currentitem); else if ( tzonefile == "Mexico") HostTimezoneRegion_Mexico->addSelection(currentitem); else if ( tzonefile == "Indian") HostTimezoneRegion_Indian->addSelection(currentitem); else if ( tzonefile == "Europe") HostTimezoneRegion_Europe->addSelection(currentitem); else if ( tzonefile == "Etc") HostTimezoneRegion_Etc->addSelection(currentitem); else if ( tzonefile == "Chile") HostTimezoneRegion_Chile->addSelection(currentitem); else if ( tzonefile == "Canada") HostTimezoneRegion_Canada->addSelection(currentitem); else if ( tzonefile == "Brazil") HostTimezoneRegion_Brazil->addSelection(currentitem); else if ( tzonefile == "Australia") HostTimezoneRegion_Australia->addSelection(currentitem); else if ( tzonefile == "Atlantic") HostTimezoneRegion_Atlantic->addSelection(currentitem); else if ( tzonefile == "Asia") HostTimezoneRegion_Asia->addSelection(currentitem); else if ( tzonefile == "Arctic") HostTimezoneRegion_Arctic->addSelection(currentitem); else if ( tzonefile == "Antarctica") HostTimezoneRegion_Antarctica->addSelection(currentitem); else if ( tzonefile == "America") HostTimezoneRegion_America->addSelection(currentitem); else if ( tzonefile == "Africa") HostTimezoneRegion_Africa->addSelection(currentitem); } } }; void TimezoneRegion::timezone_gathersettings() { QString tz; QString subregion; QString region=HostTimeZoneRegion->getValue(); if ( region == "US") subregion=HostTimezoneRegion_US->getValue(); else if ( region == "Pacific") subregion=HostTimezoneRegion_Pacific->getValue(); else if ( region == "Mideast") subregion=HostTimezoneRegion_Mideast->getValue(); else if ( region == "Mexico") subregion=HostTimezoneRegion_Mexico->getValue(); else if ( region == "Indian") subregion=HostTimezoneRegion_Indian->getValue(); else if ( region == "Europe") subregion=HostTimezoneRegion_Europe->getValue(); else if ( region == "Etc") subregion=HostTimezoneRegion_Etc->getValue(); else if ( region == "Chile") subregion=HostTimezoneRegion_Chile->getValue(); else if ( region == "Canada") subregion=HostTimezoneRegion_Canada->getValue(); else if ( region == "Brazil") subregion=HostTimezoneRegion_Brazil->getValue(); else if ( region == "Australia") subregion=HostTimezoneRegion_Australia->getValue(); else if ( region == "Atlantic") subregion=HostTimezoneRegion_Atlantic->getValue(); else if ( region == "Asia") subregion=HostTimezoneRegion_Asia->getValue(); else if ( region == "Arctic") subregion=HostTimezoneRegion_Arctic->getValue(); else if ( region == "Antarctica") subregion=HostTimezoneRegion_Antarctica->getValue(); else if ( region == "America") subregion=HostTimezoneRegion_America->getValue(); else if ( region == "Africa") subregion=HostTimezoneRegion_Africa->getValue(); tz=region+"/"+subregion; emit mf_show_tz(tz); } TimezoneRegion::TimezoneRegion(): TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) { SetVertical(false); HostTimeZoneRegion= new HostComboBox("HostTimeZoneRegion"); timezoneregion_fillselection_zone(); Setting* trigger = HostTimeZoneRegion; addChild(trigger); setTrigger(trigger); //define all the new comboboxes HostTimezoneRegion_US = new HostComboBox("HostTimezoneRegion_US"); HostTimezoneRegion_Pacific = new HostComboBox("HostTimezoneRegion_Pacific"); HostTimezoneRegion_Mideast = new HostComboBox("HostTimezoneRegion_Mideast"); HostTimezoneRegion_Mexico = new HostComboBox("HostTimezoneRegion_Mexico"); HostTimezoneRegion_Indian = new HostComboBox("HostTimezoneRegion_Indian"); HostTimezoneRegion_Europe = new HostComboBox("HostTimezoneRegion_Europe"); HostTimezoneRegion_Etc = new HostComboBox("HostTimezoneRegion_Etc"); HostTimezoneRegion_Chile = new HostComboBox("HostTimezoneRegion_Chile"); HostTimezoneRegion_Canada = new HostComboBox("HostTimezoneRegion_Canada"); HostTimezoneRegion_Brazil = new HostComboBox("HostTimezoneRegion_Brazil"); HostTimezoneRegion_Australia = new HostComboBox("HostTimezoneRegion_Australia"); HostTimezoneRegion_Atlantic = new HostComboBox("HostTimezoneRegion_Atlantic"); HostTimezoneRegion_Asia = new HostComboBox("HostTimezoneRegion_Asia"); HostTimezoneRegion_Arctic = new HostComboBox("HostTimezoneRegion_Arctic"); HostTimezoneRegion_Antarctica = new HostComboBox("HostTimezoneRegion_Antarctica"); HostTimezoneRegion_America = new HostComboBox("HostTimezoneRegion_America"); HostTimezoneRegion_Africa = new HostComboBox("HostTimezoneRegion_Africa"); //fill the new comboboxes timezoneregion_fillselection("US"); timezoneregion_fillselection("Pacific"); timezoneregion_fillselection("Mideast"); timezoneregion_fillselection("Mexico"); timezoneregion_fillselection("Indian"); timezoneregion_fillselection("Europe"); timezoneregion_fillselection("Etc"); timezoneregion_fillselection("Chile"); timezoneregion_fillselection("Canada"); timezoneregion_fillselection("Brazil"); timezoneregion_fillselection("Australia"); timezoneregion_fillselection("Atlantic"); timezoneregion_fillselection("Asia"); timezoneregion_fillselection("Arctic"); timezoneregion_fillselection("Antarctica"); timezoneregion_fillselection("America"); timezoneregion_fillselection("Africa"); // Add subregions to regions addTarget("US", HostTimezoneRegion_US ); addTarget("Pacific", HostTimezoneRegion_Pacific ); addTarget("Mideast", HostTimezoneRegion_Mideast ); addTarget("Mexico", HostTimezoneRegion_Mexico ); addTarget("Indian", HostTimezoneRegion_Indian ); addTarget("Europe", HostTimezoneRegion_Europe ); addTarget("Etc", HostTimezoneRegion_Etc ); addTarget("Chile", HostTimezoneRegion_Chile ); addTarget("Canada", HostTimezoneRegion_Canada ); addTarget("Brazil", HostTimezoneRegion_Brazil ); addTarget("Australia", HostTimezoneRegion_Australia ); addTarget("Atlantic", HostTimezoneRegion_Atlantic ); addTarget("Asia", HostTimezoneRegion_Asia ); addTarget("Arctic", HostTimezoneRegion_Arctic ); addTarget("Antarctica", HostTimezoneRegion_Antarctica ); addTarget("America", HostTimezoneRegion_America ); addTarget("Africa", HostTimezoneRegion_Africa ); //--single region addTarget("Zulu", new VerticalConfigurationGroup(false, false)); addTarget("WET", new VerticalConfigurationGroup(false, false)); addTarget("W-SU", new VerticalConfigurationGroup(false, false)); addTarget("Universal", new VerticalConfigurationGroup(false, false)); addTarget("UTC", new VerticalConfigurationGroup(false, false)); addTarget("UCT", new VerticalConfigurationGroup(false, false)); addTarget("Turkey", new VerticalConfigurationGroup(false, false)); addTarget("Singapore", new VerticalConfigurationGroup(false, false)); addTarget("ROK", new VerticalConfigurationGroup(false, false)); addTarget("ROC", new VerticalConfigurationGroup(false, false)); addTarget("Portugal", new VerticalConfigurationGroup(false, false)); addTarget("Poland", new VerticalConfigurationGroup(false, false)); addTarget("PST8PDT", new VerticalConfigurationGroup(false, false)); addTarget("PRC", new VerticalConfigurationGroup(false, false)); addTarget("Navajo", new VerticalConfigurationGroup(false, false)); addTarget("NZ-CHAT", new VerticalConfigurationGroup(false, false)); addTarget("NZ", new VerticalConfigurationGroup(false, false)); addTarget("MST7MDT", new VerticalConfigurationGroup(false, false)); addTarget("MST", new VerticalConfigurationGroup(false, false)); addTarget("MET", new VerticalConfigurationGroup(false, false)); addTarget("Libya", new VerticalConfigurationGroup(false, false)); addTarget("Kwajalein", new VerticalConfigurationGroup(false, false)); addTarget("Japan", new VerticalConfigurationGroup(false, false)); addTarget("Jamaica", new VerticalConfigurationGroup(false, false)); addTarget("Israel", new VerticalConfigurationGroup(false, false)); addTarget("Iran", new VerticalConfigurationGroup(false, false)); addTarget("Iceland", new VerticalConfigurationGroup(false, false)); addTarget("Hongkong", new VerticalConfigurationGroup(false, false)); addTarget("HST", new VerticalConfigurationGroup(false, false)); addTarget("Greenwich", new VerticalConfigurationGroup(false, false)); addTarget("GMT0", new VerticalConfigurationGroup(false, false)); addTarget("GMT-0", new VerticalConfigurationGroup(false, false)); addTarget("GMT+0", new VerticalConfigurationGroup(false, false)); addTarget("GMT", new VerticalConfigurationGroup(false, false)); addTarget("GB-Eire", new VerticalConfigurationGroup(false, false)); addTarget("GB", new VerticalConfigurationGroup(false, false)); addTarget("Factory", new VerticalConfigurationGroup(false, false)); addTarget("Eire", new VerticalConfigurationGroup(false, false)); addTarget("Egypt", new VerticalConfigurationGroup(false, false)); addTarget("EST5EDT", new VerticalConfigurationGroup(false, false)); addTarget("EST", new VerticalConfigurationGroup(false, false)); addTarget("EET", new VerticalConfigurationGroup(false, false)); addTarget("Cuba", new VerticalConfigurationGroup(false, false)); addTarget("CST6CDT", new VerticalConfigurationGroup(false, false)); addTarget("CET", new VerticalConfigurationGroup(false, false)); }; void TimezoneRegion::update_timezone_values(QString Gtimezone) { QString region; QString subregion; region=Gtimezone.section('/',0,0); subregion=Gtimezone.section('/',1,1); HostTimeZoneRegion->setValue(region); if ( region == "US") HostTimezoneRegion_US->setValue(subregion); else if ( region == "Pacific") HostTimezoneRegion_Pacific->setValue(subregion); else if ( region == "Mideast") HostTimezoneRegion_Mideast->setValue(subregion); else if ( region == "Mexico") HostTimezoneRegion_Mexico->setValue(subregion); else if ( region == "Indian") HostTimezoneRegion_Indian->setValue(subregion); else if ( region == "Europe") HostTimezoneRegion_Europe->setValue(subregion); else if ( region == "Etc") HostTimezoneRegion_Etc->setValue(subregion); else if ( region == "Chile") HostTimezoneRegion_Chile->setValue(subregion); else if ( region == "Canada") HostTimezoneRegion_Canada->setValue(subregion); else if ( region == "Brazil") HostTimezoneRegion_Brazil->setValue(subregion); else if ( region == "Australia") HostTimezoneRegion_Australia->setValue(subregion); else if ( region == "Atlantic") HostTimezoneRegion_Atlantic->setValue(subregion); else if ( region == "Asia") HostTimezoneRegion_Asia->setValue(subregion); else if ( region == "Arctic") HostTimezoneRegion_Arctic->setValue(subregion); else if ( region == "Antarctica") HostTimezoneRegion_Antarctica->setValue(subregion); else if ( region == "America") HostTimezoneRegion_America->setValue(subregion); else if ( region == "Africa") HostTimezoneRegion_Africa->setValue(subregion); } //________________Misc (NFS) Screen SETTINGS_________________________ static HostComboBox *HostHaveCentralNFS() { HostComboBox *gc = new HostComboBox("HostHaveCentralNFS"); gc->setLabel(QObject::tr("Central NFS server")); gc->addSelection("no"); gc->addSelection("yes") ; gc->setHelpText(QObject::tr("Select yes, if your media is stored on an NFS server different than the masterbackend. Say no if you are confused.")); return gc; } static HostComboBox *HostCentralNFSIP() { HostComboBox *gc = new HostComboBox("HostCentralNFSIP",true); gc->setLabel(QObject::tr("NFS server and sharename ")); gc->setHelpText(QObject::tr("Format should be IP:/SHARENAME, for example 192.168.1.6:/media. file:nfsmap will load shares from the nfsmap file")); gc->addSelection("file:nfsmap") ; gc->addSelection("") ; return gc; }; static HostComboBox *HostNFSmountpoint() { #ifdef __MVAPP__ HostComboBox *gc = new HostComboBox("HostNFSmountpoint"); gc->addSelection("/data/media"); #else HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true); gc->addSelection("/myth"); #endif gc->setLabel(QObject::tr("Local mount point of NFS share")); gc->addSelection("/mnt") ; gc->setHelpText(QObject::tr("")); return gc; } NFSSettings::NFSSettings(): TriggeredConfigurationGroup(false,false,false,true,true,false,false,true) { setLabel(QObject::tr("Misc Settings")); Setting* havenfs = HostHaveCentralNFS(); addChild(havenfs); setTrigger(havenfs); ConfigurationGroup* settings = new VerticalConfigurationGroup(); settings->addChild(HostCentralNFSIP()); settings->addChild(HostNFSmountpoint()); addTarget("no", new VerticalConfigurationGroup()); addTarget("yes", settings); };