summaryrefslogtreecommitdiffstats
path: root/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp')
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp1871
1 files changed, 912 insertions, 959 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp
index 5eb8717..462aaf9 100755
--- a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp
@@ -18,14 +18,10 @@
#include "vnc.h"
#include "fileshare.h"
-
-
int timezone_unknown = false;
extern HostParms hostparm;
//extern DDCinfo ddcinfo;
-
-
bool displaymysqlonly = false ;
bool displayshownetwork =false ;
bool displayshowhostype = false ;
@@ -49,30 +45,28 @@ bool displayvnc = false;
bool displayfileshare = false;
-static HostComboBox *ThemePainter()
+static HostComboBoxSetting *ThemePainter()
{
- HostComboBox *gc = new HostComboBox("ThemePainter");
+ HostComboBoxSetting *gc = new HostComboBoxSetting("ThemePainter");
gc->setLabel(QObject::tr("Paint Engine"));
gc->addSelection(QObject::tr("Qt"), "qt");
gc->addSelection(QObject::tr("OpenGL"), "opengl");
gc->setHelpText(QObject::tr("This selects what Myth uses to draw. If you have decent hardware, select OpenGL. Changing this requires a restart."));
return gc;
-
}
-
-static HostLineEdit *HostDDnslogin()
+static HostTextEditSetting *HostDDnslogin()
{
- HostLineEdit *gc = new HostLineEdit("HostDDnslogin");
+ HostTextEditSetting *gc = new HostTextEditSetting("HostDDnslogin");
gc->setLabel(QObject::tr("Login"));
gc->setValue("");
gc->setHelpText(QObject::tr("Login for DDNS account."));
return gc;
};
-static HostLineEdit *HostDDnspassword()
+static HostTextEditSetting *HostDDnspassword()
{
- HostLineEdit *gc = new HostLineEdit("HostDDnspassword");
+ HostTextEditSetting *gc = new HostTextEditSetting("HostDDnspassword");
gc->setLabel(QObject::tr("Password"));
gc->setValue("");
gc->SetPasswordEcho(true);
@@ -80,28 +74,29 @@ static HostLineEdit *HostDDnspassword()
return gc;
};
-static HostLineEdit *HostDDnshostname()
+static HostTextEditSetting *HostDDnshostname()
{
- HostLineEdit *gc = new HostLineEdit("HostDDnshostname");
+ HostTextEditSetting *gc = new HostTextEditSetting("HostDDnshostname");
gc->setLabel(QObject::tr("DDNS hostname"));
gc->setValue("");
gc->setHelpText(QObject::tr("Hostname used for DDNS."));
return gc;
};
-static HostCheckBox *HostDDnsEnable()
+static HostCheckBoxSetting *HostDDnsEnable()
{
- HostCheckBox *gc = new HostCheckBox("HostDDnsEnable");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostDDnsEnable");
gc->setLabel(QObject::tr("Enable DDNS"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Update DDNS records at dyndns.com. Visit http://dyndns.com to setup your account."));
return gc;
};
-class DDnssettings: public TriggeredConfigurationGroup {
+/*
+class DDnssettings: public GroupSetting {
public:
DDnssettings():
- TriggeredConfigurationGroup(false,false,false,false) {
+ GroupSetting(false,false,false,false) {
setLabel(QObject::tr("DDNS Settings"));
SetVertical(true);
Setting* trigger = HostDDnsEnable() ;
@@ -117,7 +112,7 @@ public:
addTarget("1", settings);
};
};
-
+*/
QString findnet()
@@ -186,9 +181,9 @@ QString findnet_wireless()
return netdev;
}
-static HostComboBox *HostNetDevice()
+static HostComboBoxSetting *HostNetDevice()
{
- HostComboBox *gc = new HostComboBox("HostNetDevice");
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostNetDevice");
gc->setLabel(QObject::tr("Device"));
QString foundnet=findnet();
@@ -214,37 +209,36 @@ static HostComboBox *HostNetDevice()
if (foundnet.contains("ath0"))
gc->addSelection("ath0");
- int findoldnetdevice=gc->findSelection(hostparm.ThisHostnetOLD);
+ //int findoldnetdevice=gc->findSelection(hostparm.ThisHostnetOLD);
+ QString findoldnetdevice = gCoreContext->GetSetting("ThisHostnetOLD");
gc->setValue(findoldnetdevice);
-
-
gc->setHelpText(QObject::tr("Network interface"));
return gc;
};
/*
-static HostCheckBox *HostActiveonboot()
+static HostCheckBoxSetting *HostActiveonboot()
{
- HostCheckBox *gc = new HostCheckBox("HostActiveonboot");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostActiveonboot");
gc->setLabel(QObject::tr("Device is active on boot"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Network is started on boot"));
return gc;
};
-static HostCheckBox *HostServiceSamba()
+static HostCheckBoxSetting *HostServiceSamba()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba");
gc->setLabel(QObject::tr("Windows sharing"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Allow window machines to access recorded files"));
return gc;
};
-static HostCheckBox *HostServiceSamba_write()
+static HostCheckBoxSetting *HostServiceSamba_write()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_write");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_write");
gc->setLabel(QObject::tr("Readonly"));
gc->setValue(false);
gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. "));
@@ -252,27 +246,27 @@ static HostCheckBox *HostServiceSamba_write()
};
-static HostCheckBox *HostServiceSamba_writehome()
+static HostCheckBoxSetting *HostServiceSamba_writehome()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_writehome");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_writehome");
gc->setLabel(QObject::tr("Readonly"));
gc->setValue(false);
gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. "));
return gc;
};
-static HostCheckBox *HostServiceSamba_media()
+static HostCheckBoxSetting *HostServiceSamba_media()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_media");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_media");
gc->setLabel(QObject::tr("share media"));
gc->setValue(true);
gc->setHelpText(QObject::tr(" "));
return gc;
};
-static HostCheckBox *HostServiceSamba_home()
+static HostCheckBoxSetting *HostServiceSamba_home()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_home");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_home");
gc->setLabel(QObject::tr("share home"));
gc->setValue(true);
gc->setHelpText(QObject::tr(" "));
@@ -281,9 +275,9 @@ static HostCheckBox *HostServiceSamba_home()
-static HostComboBox *HostServiceSamba_domain()
+static HostComboBoxSetting *HostServiceSamba_domain()
{
- HostComboBox *gc = new HostComboBox("HostServiceSamba_domain",true);
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostServiceSamba_domain",true);
gc->setLabel(QObject::tr("Workgroup"));
gc->setHelpText(QObject::tr("Workgroup for smb share"));
gc->addSelection("WORKGROUP");
@@ -309,18 +303,18 @@ static HostComboBox *HostServiceSamba_domain()
return gc;
};
-static HostCheckBox *HostLircWait()
+static HostCheckBoxSetting *HostLircWait()
{
- HostCheckBox *gc = new HostCheckBox("HostLircWait");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostLircWait");
gc->setLabel(QObject::tr("Wait for lirc"));
gc->setValue(false);
gc->setHelpText(QObject::tr("System will wait for lirc before starting the UI "));
return gc;
};
*/
-static HostCheckBox *HostBEWait()
+static HostCheckBoxSetting *HostBEWait()
{
- HostCheckBox *gc = new HostCheckBox("HostBEWait");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostBEWait");
gc->setLabel(QObject::tr("Delay starting mythfrontend until mythbackend is running"));
gc->setValue(true);
gc->setHelpText(QObject::tr("The system will check if mythbackend is online before starting mythfrontend. This will avoid connection errors and configuration screens."));
@@ -329,9 +323,9 @@ static HostCheckBox *HostBEWait()
-// static HostComboBox *HostEvrouterConfig()
+// static HostComboBoxSetting *HostEvrouterConfig()
// {
-// HostComboBox *gc = new HostComboBox("HostEvrouterConfig",true);
+// HostComboBoxSetting *gc = new HostComboBoxSetting("HostEvrouterConfig",true);
// gc->setLabel(QObject::tr("Key Configuration"));
// gc->setHelpText(QObject::tr("Choose the key definations that will be used by the event router"));
// QString dirtxt;
@@ -357,9 +351,9 @@ static HostCheckBox *HostBEWait()
// };
-// static HostCheckBox *HostServiceNFS()
+// static HostCheckBoxSetting *HostServiceNFS()
// {
-// HostCheckBox *gc = new HostCheckBox("HostServiceNFS");
+// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceNFS");
// gc->setLabel(QObject::tr("Standard file sharing"));
// gc->setValue(true);
// gc->setHelpText(QObject::tr("Allow all machines to access recorded files with nfs"));
@@ -367,18 +361,18 @@ static HostCheckBox *HostBEWait()
// };
-static HostCheckBox *HostServiceMythWEB()
+static HostCheckBoxSetting *HostServiceMythWEB()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceMythWEB");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceMythWEB");
gc->setLabel(QObject::tr("Enable MythWeb"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Allow MythTV scheduling using a web browser."));
return gc;
};
-
-static HostCheckBox *HostServiceHobbitclient()
+/*
+static HostCheckBoxSetting *HostServiceHobbitclient()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceHobbitclient");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceHobbitclient");
gc->setLabel(QObject::tr("Hobbit-client"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Report stats and other stuff to the master backend"));
@@ -394,54 +388,54 @@ static GlobalCheckBox *GlobalServiceHobbitserver()
return gc;
};
-static HostCheckBox *HostServiceRRD()
+static HostCheckBoxSetting *HostServiceRRD()
{
- HostCheckBox *gc = new HostCheckBox("HostServiceRRD");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceRRD");
gc->setLabel(QObject::tr("rrd_stats"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Collect stats and create graphs of various system resources."));
return gc;
};
-
-static HostCheckBox *HostUseDHCP()
+*/
+static HostCheckBoxSetting *HostUseDHCP()
{
- HostCheckBox *gc = new HostCheckBox("HostUseDHCP");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseDHCP");
gc->setLabel(QObject::tr("Static ip address"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
return gc;
};
-static HostCheckBox *HostRunDHCP()
+static HostCheckBoxSetting *HostRunDHCP()
{
- HostCheckBox *gc = new HostCheckBox("HostRunDHCP");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRunDHCP");
gc->setLabel(QObject::tr("DHCP Server"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Only one DHCP server should run on a network. Leave this unchecked if you are not sure."));
return gc;
};
-// static HostCheckBox *HostRunEvrouter()
+// static HostCheckBoxSetting *HostRunEvrouter()
// {
-// HostCheckBox *gc = new HostCheckBox("HostRunEvrouter");
+// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRunEvrouter");
// gc->setLabel(QObject::tr("Use evrouter"));
// gc->setValue(false);
// gc->setHelpText(QObject::tr("Evrouter will run custom actions, based on the user defined events."));
// return gc;
// };
-static HostCheckBox *HostUsemythfrontend()
+static HostCheckBoxSetting *HostUsemythfrontend()
{
- HostCheckBox *gc = new HostCheckBox("HostUseMythWelcome");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseMythWelcome");
gc->setLabel(QObject::tr("Run MythWelcome"));
gc->setValue(false);
gc->setHelpText(QObject::tr("If checked mythwelcome will be started instead of mythfrontend."));
return gc;
};
-static HostCheckBox *HostRunFrontend()
+static HostCheckBoxSetting *HostRunFrontend()
{
- HostCheckBox *gc = new HostCheckBox("HostRunFrontend");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRunFrontend");
gc->setLabel(QObject::tr("Run Frontend"));
gc->setValue(true);
gc->setHelpText(QObject::tr("If checked the frontend X windows GUI will start. Most people will want this checked. Disable the frontend if you want the system to run without a display connected."));
@@ -449,9 +443,9 @@ static HostCheckBox *HostRunFrontend()
};
-static HostComboBox *HostMysqlserverip_listbox()
+static HostComboBoxSetting *HostMysqlserverip_listbox()
{
- HostComboBox *gc = new HostComboBox("HostMysqlServer",true);
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostMysqlServer",true);
gc->setLabel(QObject::tr("MySQL Server"));
myth_system("avahi-browse -l -r -t _mysql._tcp > /tmp/mysqllist");
@@ -495,9 +489,9 @@ static HostComboBox *HostMysqlserverip_listbox()
-static HostCheckBox *HostRemoteBackup()
+static HostCheckBoxSetting *HostRemoteBackup()
{
- HostCheckBox *gc = new HostCheckBox("HostRemoteBackup");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRemoteBackup");
gc->setLabel(QObject::tr("Remote Backup"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Copy the system backup file to another directory or host."));
@@ -505,11 +499,11 @@ static HostCheckBox *HostRemoteBackup()
};
-static HostComboBox *HostRemoteBackupDir()
+static HostComboBoxSetting *HostRemoteBackupDir()
{
QString tempItem;
- HostComboBox *gc = new HostComboBox("HostRemoteBackupDir",true);
- gc->setLabel(QObject::tr(" Dir or Host" ));
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostRemoteBackupDir",true);
+ gc->setLabel(QObject::tr("Dir or Host" ));
gc->addSelection("dir:/data/storage/disk0");
MSqlQuery query(MSqlQuery::InitCon());
@@ -530,29 +524,26 @@ static HostComboBox *HostRemoteBackupDir()
return gc;
};
-class Backupsettings: public TriggeredConfigurationGroup {
+class Backupsettings: public GroupSetting {
public:
- Backupsettings():
- TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
- SetVertical(false);
+ Backupsettings(): GroupSetting()
+ {
+// SetVertical(false);
setLabel(QObject::tr("Backup Settings"));
- Setting* trigger = HostRemoteBackup();
- addChild(trigger);
- setTrigger(trigger);
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
- settings->addChild(HostRemoteBackupDir());
-
- addTarget("0", new VerticalConfigurationGroup(false, false));
- addTarget("1", settings);
-
+// Setting* trigger = HostRemoteBackup();
+ addChild(HostRemoteBackup());
+// setTrigger(trigger);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
+// addTargetedChild(HostRemoteBackupDir(),true);
+// addTarget("0", new VerticalConfigurationGroup(false, false));
+// addTarget("1", settings);
};
};
-
-// static HostCheckBox *HostPKG_MIRROR()
+// static HostCheckBoxSetting *HostPKG_MIRROR()
// {
-// HostCheckBox *gc = new HostCheckBox("HostPKG_MIRROR");
+// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostPKG_MIRROR");
// gc->setLabel(QObject::tr("Use Local mirror"));
// gc->setValue(false);
// gc->setHelpText(QObject::tr("Master Backend will be used as the repo source."));
@@ -570,27 +561,27 @@ public:
-static HostCheckBox *HostncidClient()
+static HostCheckBoxSetting *HostncidClient()
{
- HostCheckBox *gc = new HostCheckBox("HostncidClient");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostncidClient");
gc->setLabel(QObject::tr("Show CallerID"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Show CallerID popup. The backend must be running the CallerID program."));
return gc;
};
-static HostCheckBox *HostncidDaemon()
+static HostCheckBoxSetting *HostncidDaemon()
{
- HostCheckBox *gc = new HostCheckBox("HostncidDaemon");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostncidDaemon");
gc->setLabel(QObject::tr("Run CallerID"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Run daemon to collect CallerID information."));
return gc;
};
-static HostComboBox *HostSerialPortncid()
+static HostComboBoxSetting *HostSerialPortncid()
{
- HostComboBox *gc = new HostComboBox("HostSerialPortncid",false);
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostSerialPortncid",false);
gc->setLabel(QObject::tr("Serial Port"));
gc->addSelection("ttyS0");
gc->addSelection("ttyS1");
@@ -601,9 +592,9 @@ static HostComboBox *HostSerialPortncid()
return gc;
}
-static HostCheckBox *HostNcidDeviceNetCallerID()
+static HostCheckBoxSetting *HostNcidDeviceNetCallerID()
{
- HostCheckBox *gc = new HostCheckBox("HostNcidDeviceNetCallerID");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostNcidDeviceNetCallerID");
gc->setLabel(QObject::tr("Using a NetCallerID"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Instead of a typical modem, the serial device is a NetCallerID"));
@@ -611,9 +602,9 @@ static HostCheckBox *HostNcidDeviceNetCallerID()
};
-static HostCheckBox *Hostbootsplash()
+static HostCheckBoxSetting *Hostbootsplash()
{
- HostCheckBox *gc = new HostCheckBox("Hostbootsplash");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostbootsplash");
gc->setLabel(QObject::tr("Enable Boot Splash"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Covers up boot messages with LinHES logo."));
@@ -621,10 +612,10 @@ static HostCheckBox *Hostbootsplash()
};
//-------------------------------------screensaver settings-------------------
-
-static HostComboBox *HostScreensaverType()
+/*
+static HostComboBoxSetting *HostScreensaverType()
{
- HostComboBox *gc = new HostComboBox("HostScreensaverType");
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostScreensaverType");
gc->setLabel(QObject::tr("Screensaver Program"));
gc->addSelection("xscreensaver");
//gc->addSelection("gscreensaver");
@@ -635,7 +626,7 @@ static HostComboBox *HostScreensaverType()
return gc;
};
-static HostSpinBox *HostScreensaverIdle()
+static HostSpinBoxSetting *HostScreensaverIdle()
{
HostSpinBox *gc = new HostSpinBox("HostScreensaverIdle", 5, 60, 1, true);
gc->setLabel(QObject::tr("Idle Time"));
@@ -644,18 +635,18 @@ static HostSpinBox *HostScreensaverIdle()
return gc;
}
-static HostCheckBox *HostScreensaverBlank()
+static HostCheckBoxSetting *HostScreensaverBlank()
{
- HostCheckBox *gc = new HostCheckBox("HostScreensaverBlank");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostScreensaverBlank");
gc->setLabel(QObject::tr("Blank"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Blank the screen instead of using a screensaver"));
return gc;
};
-static HostCheckBox *HostScreensaverRandom()
+static HostCheckBoxSetting *HostScreensaverRandom()
{
- HostCheckBox *gc = new HostCheckBox("HostScreensaverRandom");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostScreensaverRandom");
gc->setLabel(QObject::tr("Random"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Use a random screensaver."));
@@ -664,9 +655,9 @@ static HostCheckBox *HostScreensaverRandom()
-static HostComboBox *HostGScreensaverTheme()
+static HostComboBoxSetting *HostGScreensaverTheme()
{
- HostComboBox *gc = new HostComboBox("HostGScreensaverTheme");
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostGScreensaverTheme");
gc->setLabel(QObject::tr("Screensaver"));
gc->setHelpText(QObject::tr("Screen saver program to use."));
QString line;
@@ -686,9 +677,9 @@ static HostComboBox *HostGScreensaverTheme()
return gc;
};
-static HostComboBox *HostXScreensaverTheme()
+static HostComboBoxSetting *HostXScreensaverTheme()
{
- HostComboBox *gc = new HostComboBox("HostXScreensaverTheme");
+ HostComboBoxSetting *gc = new HostComboBoxSetting("HostXScreensaverTheme");
gc->setLabel(QObject::tr("Screensaver"));
gc->setHelpText(QObject::tr("Screensaver to display."));
QString dirtxt;
@@ -710,11 +701,11 @@ static HostComboBox *HostXScreensaverTheme()
return gc;
};
-class Screensaverhostsettings: public TriggeredConfigurationGroup {
+class Screensaverhostsettings: public GroupSetting {
public:
Screensaverhostsettings():
- TriggeredConfigurationGroup() {
+ GroupSetting() {
SetVertical(true);
setLabel(QObject::tr("Screensaver Settings"));
Setting* trigger = HostScreensaverType() ;
@@ -735,8 +726,6 @@ public:
gscreensaversettings->addChild(HostScreensaverIdle());
gscreensaversettings->addChild(HostGScreensaverTheme());
-
-
addTarget("tinker", new VerticalConfigurationGroup(false, false));
addTarget("none", new VerticalConfigurationGroup(false, false));
addTarget("gscreensaver", gscreensaversettings);
@@ -744,139 +733,139 @@ public:
};
};
-
+*/
//-------------------------------------access setting----------------------
-static HostCheckBox *Hostaccessnetwork()
+static HostCheckBoxSetting *Hostaccessnetwork()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessnetwork");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessnetwork");
gc->setLabel(QObject::tr("Network"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Control access to Network Settings. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccesshostype()
+static HostCheckBoxSetting *Hostaccesshostype()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccesshostype");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesshostype");
gc->setLabel(QObject::tr("Host"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Host Settings. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *HostaccesshostypeSystemtype()
+static HostCheckBoxSetting *HostaccesshostypeSystemtype()
{
- HostCheckBox *gc = new HostCheckBox("HostaccesshostypeSystemtype");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostaccesshostypeSystemtype");
gc->setLabel(QObject::tr("Change System Type"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Ability to change the System Type in Host Settings. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccessmisc()
+static HostCheckBoxSetting *Hostaccessmisc()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessmisc");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessmisc");
gc->setLabel(QObject::tr("Miscellanous"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Miscellanous Settings. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccesssleep()
+static HostCheckBoxSetting *Hostaccesssleep()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccesssleep");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesssleep");
gc->setLabel(QObject::tr("Shutdown"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Shutdown Settings. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccessadvanced()
+static HostCheckBoxSetting *Hostaccessadvanced()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessadvanced");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessadvanced");
gc->setLabel(QObject::tr("Advanced"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Advanced Settings. Checked means the screen is enabled. "));
return gc;
};
-static HostCheckBox *HostaccessadvancedX()
+static HostCheckBoxSetting *HostaccessadvancedX()
{
- HostCheckBox *gc = new HostCheckBox("HostaccessadvancedX");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostaccessadvancedX");
gc->setLabel(QObject::tr("Display"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Display Settings. Checked means the screen is enabled. "));
return gc;
};
-static HostCheckBox *Hostaccessddns()
+static HostCheckBoxSetting *Hostaccessddns()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessddns");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessddns");
gc->setLabel(QObject::tr("Dynamic DNS"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to DDNS Settings. Checked means the screen is enabled. "));
return gc;
};
-static HostCheckBox *Hostaccesssound()
+static HostCheckBoxSetting *Hostaccesssound()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccesssound");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesssound");
gc->setLabel(QObject::tr("Audio"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Audio Settings. Checked means the screen is enabled."));
return gc;
};
-
-static HostCheckBox *Hostaccessscreensaver()
+/*
+static HostCheckBoxSetting *Hostaccessscreensaver()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessscreensaver");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessscreensaver");
gc->setLabel(QObject::tr("Screensaver"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Screensaver Settings. Checked means the screen is enabled."));
return gc;
};
-
-static HostCheckBox *Hostaccessir()
+*/
+static HostCheckBoxSetting *Hostaccessir()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessir");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessir");
gc->setLabel(QObject::tr("Remotes"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Remotes Settings. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccessplugins()
+static HostCheckBoxSetting *Hostaccessplugins()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessplugins");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessplugins");
gc->setLabel(QObject::tr("Programs"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Programs. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccessuser()
+static HostCheckBoxSetting *Hostaccessuser()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessuser");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessuser");
gc->setLabel(QObject::tr("User Accounts"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Control access to User Accounts. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccesswebuser()
+static HostCheckBoxSetting *Hostaccesswebuser()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccesswebuser");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesswebuser");
gc->setLabel(QObject::tr("Web Security"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Web Security Settings. Checked means the screen is enabled."));
return gc;
};
-static HostCheckBox *Hostaccessvnc()
+static HostCheckBoxSetting *Hostaccessvnc()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessvnc");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessvnc");
gc->setLabel(QObject::tr("Screen Sharing"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to Screen Sharing Settings. Checked means the screen is enabled."));
@@ -884,20 +873,20 @@ static HostCheckBox *Hostaccessvnc()
};
-static HostCheckBox *Hostaccessfileshare()
+static HostCheckBoxSetting *Hostaccessfileshare()
{
- HostCheckBox *gc = new HostCheckBox("Hostaccessfileshare");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessfileshare");
gc->setLabel(QObject::tr("File Sharing"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Control access to File Sharing Settings. Checked means the screen is enabled."));
return gc;
};
-
-class ACCESShostsettings: public TriggeredConfigurationGroup {
+/*
+class ACCESShostsettings: public GroupSetting {
public:
ACCESShostsettings():
- TriggeredConfigurationGroup(false,false,false,false) {
+ GroupSetting(false,false,false,false) {
SetVertical(false);
Setting* trigger = Hostaccesshostype () ;
addChild(trigger);
@@ -912,13 +901,13 @@ public:
addTarget("1", settings);
};
};
-
+*/
//---------------------------------- PLUGINS ----------------------
-static HostCheckBox *Hostpluginmytharchive()
+static HostCheckBoxSetting *Hostpluginmytharchive()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmytharchive");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmytharchive");
gc->setLabel(QObject::tr("MythArchive"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Check to enable MythArchive."));
@@ -926,9 +915,9 @@ static HostCheckBox *Hostpluginmytharchive()
};
-static HostCheckBox *Hostpluginmythbrowser()
+static HostCheckBoxSetting *Hostpluginmythbrowser()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythbrowser");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythbrowser");
gc->setLabel(QObject::tr("MythBrowser"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Check to enable MythBrowser."));
@@ -936,9 +925,9 @@ static HostCheckBox *Hostpluginmythbrowser()
};
-static HostCheckBox *Hostpluginmythnetvision()
+static HostCheckBoxSetting *Hostpluginmythnetvision()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythnetvision");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythnetvision");
gc->setLabel(QObject::tr("MythNetvision"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Check to enable MythNetvision."));
@@ -946,9 +935,9 @@ static HostCheckBox *Hostpluginmythnetvision()
};
-static HostCheckBox *Hostpluginmythgallery()
+static HostCheckBoxSetting *Hostpluginmythgallery()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythgallery");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgallery");
gc->setLabel(QObject::tr("MythGallery"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Check to enable MythGallery."));
@@ -956,81 +945,81 @@ static HostCheckBox *Hostpluginmythgallery()
};
-static HostCheckBox *Hostpluginmythgame()
+static HostCheckBoxSetting *Hostpluginmythgame()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythgame");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgame");
gc->setLabel(QObject::tr("MythGame"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Check to enable MythGame."));
return gc;
};
-static HostCheckBox *Hostpluginmythgamesnes9x()
+static HostCheckBoxSetting *Hostpluginmythgamesnes9x()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamesnes9x");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgamesnes9x");
gc->setLabel(QObject::tr("snes9x"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Super Nintendo emulator"));
return gc;
};
-static HostCheckBox *Hostpluginmythgamefceux()
+static HostCheckBoxSetting *Hostpluginmythgamefceux()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamefceux");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgamefceux");
gc->setLabel(QObject::tr("fceux"));
gc->setValue(false);
gc->setHelpText(QObject::tr("NES emulator"));
return gc;
};
-static HostCheckBox *HostpluginmythgameMame()
+static HostCheckBoxSetting *HostpluginmythgameMame()
{
- HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMame");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameMame");
gc->setLabel(QObject::tr("mame"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Mame, Multiple Arcade Machine Emulator"));
return gc;
};
-static HostCheckBox *HostpluginmythgameMednafen()
+static HostCheckBoxSetting *HostpluginmythgameMednafen()
{
- HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMednafen");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameMednafen");
gc->setLabel(QObject::tr("Mednafen"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Mednafen is a portable, utilizing OpenGL and SDL, command-line driven multi-system emulator with many advanced features."));
return gc;
};
-static HostCheckBox *HostpluginmythgameROMDB()
+static HostCheckBoxSetting *HostpluginmythgameROMDB()
{
- HostCheckBox *gc = new HostCheckBox("HostpluginmythgameROMDB");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameROMDB");
gc->setLabel(QObject::tr("RomDB"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Table used my MythGame to store information about games. If you are into games, this is recommended."));
return gc;
};
-static HostCheckBox *Hostpluginmythgamemupen64()
+static HostCheckBoxSetting *Hostpluginmythgamemupen64()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamemupen64");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgamemupen64");
gc->setLabel(QObject::tr("mupen64"));
gc->setValue(false);
gc->setHelpText(QObject::tr("n64 emulator"));
return gc;
};
-static HostCheckBox *HostpluginmythgameDolphin()
+static HostCheckBoxSetting *HostpluginmythgameDolphin()
{
- HostCheckBox *gc = new HostCheckBox("HostpluginmythgameDolphin");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameDolphin");
gc->setLabel(QObject::tr("Dolphin"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Nintendo Wii emulator"));
return gc;
};
-static HostCheckBox *HostpluginmythgameXe()
+static HostCheckBoxSetting *HostpluginmythgameXe()
{
- HostCheckBox *gc = new HostCheckBox("HostpluginmythgameXe");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameXe");
gc->setLabel(QObject::tr("Xe"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Xe is a multisystem emulator. http://www.xe-emulator.com/ for the complete list."));
@@ -1038,9 +1027,9 @@ static HostCheckBox *HostpluginmythgameXe()
};
-static HostCheckBox *Hostpluginmythmusic()
+static HostCheckBoxSetting *Hostpluginmythmusic()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythmusic");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythmusic");
gc->setLabel(QObject::tr("MythMusic"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Check to enable MythMusic."));
@@ -1048,9 +1037,9 @@ static HostCheckBox *Hostpluginmythmusic()
};
-static HostCheckBox *Hostpluginmythnews()
+static HostCheckBoxSetting *Hostpluginmythnews()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythnews");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythnews");
gc->setLabel(QObject::tr("MythNews"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Check to enable MythNews."));
@@ -1058,9 +1047,9 @@ static HostCheckBox *Hostpluginmythnews()
};
-static HostCheckBox *Hostpluginmythvideo_dvdcss()
+static HostCheckBoxSetting *Hostpluginmythvideo_dvdcss()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythvideo_dvdcss");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythvideo_dvdcss");
gc->setLabel(QObject::tr("dvdcss"));
gc->setValue(false);
gc->setHelpText(QObject::tr("libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption."));
@@ -1069,9 +1058,9 @@ static HostCheckBox *Hostpluginmythvideo_dvdcss()
-static HostCheckBox *Hostpluginmythappletrailers()
+static HostCheckBoxSetting *Hostpluginmythappletrailers()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythappletrailers");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythappletrailers");
gc->setLabel(QObject::tr("MythAppleTrailers"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Stream trailer's from Apple's website."));
@@ -1079,9 +1068,9 @@ static HostCheckBox *Hostpluginmythappletrailers()
};
-static HostCheckBox *Hostpluginmythweather()
+static HostCheckBoxSetting *Hostpluginmythweather()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythweather");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythweather");
gc->setLabel(QObject::tr("MythWeather"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Check to enable MythWeather."));
@@ -1089,9 +1078,9 @@ static HostCheckBox *Hostpluginmythweather()
};
-static HostCheckBox *Hostwebmin()
+static HostCheckBoxSetting *Hostwebmin()
{
- HostCheckBox *gc = new HostCheckBox("Hostwebmin");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostwebmin");
gc->setLabel(QObject::tr("Webmin"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Webmin is a web-based interface for system administration. Once installed, access it at https://ip.of.back.end:10000 using your root password."));
@@ -1099,9 +1088,9 @@ static HostCheckBox *Hostwebmin()
};
-static HostCheckBox *Hostfoldingathome()
+static HostCheckBoxSetting *Hostfoldingathome()
{
- HostCheckBox *gc = new HostCheckBox("Hostfoldingathome");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostfoldingathome");
gc->setLabel(QObject::tr("Folding@home"));
gc->setValue(false);
gc->setHelpText(QObject::tr("A distributed computing project which studies protein folding, misfolding, aggregation, and related diseases."));
@@ -1110,52 +1099,43 @@ static HostCheckBox *Hostfoldingathome()
-static HostCheckBox *Hostwebonlinhes()
+static HostCheckBoxSetting *Hostwebonlinhes()
{
- HostCheckBox *gc = new HostCheckBox("Hostwebonlinhes");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostwebonlinhes");
gc->setLabel(QObject::tr("Web On LinHES"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Includes Google Chrome and multiple websites with 10' UIs in Media Library --> Online Content."));
return gc;
};
-static HostCheckBox *HostHuluDesktop()
+static HostCheckBoxSetting *HostXBMC()
{
- HostCheckBox *gc = new HostCheckBox("HostHuluDesktop");
- gc->setLabel(QObject::tr("Hulu Desktop"));
- gc->setValue(false);
- gc->setHelpText(QObject::tr("Hulu Desktop for Linux."));
- return gc;
-};
-
-static HostCheckBox *HostXBMC()
-{
- HostCheckBox *gc = new HostCheckBox("HostXBMC");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostXBMC");
gc->setLabel(QObject::tr("Kodi"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Kodi (formerly known as XBMC) is an award-winning free and open source (GPL) software media player and entertainment hub, featuring a 10-foot user interface for use with televisions and remote controls."));
return gc;
};
-static HostCheckBox *HostPLEXHT()
+static HostCheckBoxSetting *HostPLEXHT()
{
- HostCheckBox *gc = new HostCheckBox("HostPLEXHT");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostPLEXHT");
gc->setLabel(QObject::tr("OpenPHT"));
gc->setValue(false);
gc->setHelpText(QObject::tr("OpenPHT is a community driven fork of Plex Home Theater. OpenPHT is a full-featured, powerful App that connects to Plex Media Server and is designed to be used in the living room from the comfort of your lounge."));
return gc;
};
-static HostCheckBox *HostPLEXMS()
+static HostCheckBoxSetting *HostPLEXMS()
{
- HostCheckBox *gc = new HostCheckBox("HostPLEXMS");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostPLEXMS");
gc->setLabel(QObject::tr("Plex Media Server"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Plex is a centralized home media playback system with a powerful central server - the Plex Media Server - that streams its media to many Plex player Apps."));
return gc;
};
-static HostComboBox *Hostfoldingusername()
+static HostComboBoxSetting *Hostfoldingusername()
{
// If there is an old R5.5 style folding directory /myth/folding@home, attempt
// to retrieve the old username.
@@ -1184,7 +1164,7 @@ static HostComboBox *Hostfoldingusername()
pclose (username_pipe);
}
- HostComboBox *gc = new HostComboBox("Hostfoldingusername",true);
+ HostComboBoxSetting *gc = new HostComboBoxSetting("Hostfoldingusername",true);
gc->setLabel(QObject::tr("Folding Username"));
gc->setValue("");
@@ -1192,9 +1172,9 @@ static HostComboBox *Hostfoldingusername()
return gc;
};
-static HostComboBox *Hostfoldingworksize()
+static HostComboBoxSetting *Hostfoldingworksize()
{
- HostComboBox *gc = new HostComboBox("Hostfoldingworksize");
+ HostComboBoxSetting *gc = new HostComboBoxSetting("Hostfoldingworksize");
gc->setLabel(QObject::tr("Work Packet Size"));
gc->addSelection("Big", "big");
gc->addSelection("Normal", "normal");
@@ -1203,9 +1183,9 @@ static HostComboBox *Hostfoldingworksize()
return gc;
};
-// static HostCheckBox *HostXscreensaver()
+// static HostCheckBoxSetting *HostXscreensaver()
// {
-// HostCheckBox *gc = new HostCheckBox("HostXscreensaver");
+// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostXscreensaver");
// gc->setLabel(QObject::tr("Screensaver"));
// gc->setValue(false);
// gc->setHelpText(QObject::tr("Run screensaver after 10 minutes of inactivity."));
@@ -1213,9 +1193,9 @@ static HostComboBox *Hostfoldingworksize()
// };
-static HostCheckBox *Hostpluginmythzoneminder()
+static HostCheckBoxSetting *Hostpluginmythzoneminder()
{
- HostCheckBox *gc = new HostCheckBox("Hostpluginmythzoneminder");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythzoneminder");
gc->setLabel(QObject::tr("MythZoneMinder"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Check to enable MythZoneMinder."));
@@ -1226,11 +1206,11 @@ static HostCheckBox *Hostpluginmythzoneminder()
// -------------End plugins--------------------------------
-
-class NCIDsettings: public TriggeredConfigurationGroup {
+/*
+class NCIDsettings: public GroupSetting {
public:
NCIDsettings():
- TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ GroupSetting(false, false, true, true,false, false, true, true) {
SetVertical(true);
Setting* trigger = HostncidDaemon() ;
addChild(trigger);
@@ -1242,11 +1222,11 @@ public:
addTarget("1", settings);
};
};
-
-// class SAMBAsettings: public TriggeredConfigurationGroup {
+*/
+// class SAMBAsettings: public GroupSetting {
// public:
// SAMBAsettings():
-// TriggeredConfigurationGroup(false, true, true, true,false, false, true, true) {
+// GroupSetting(false, true, true, true,false, false, true, true) {
// SetVertical(false);
// Setting* trigger = HostServiceSamba() ;
// addChild(trigger);
@@ -1266,10 +1246,10 @@ public:
// };
-// class Evroutersettings: public TriggeredConfigurationGroup {
+// class Evroutersettings: public GroupSetting {
// public:
// Evroutersettings():
-// TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+// GroupSetting(false, false, true, true,false, false, true, true) {
// setLabel(QObject::tr("Evrouter config"));
// Setting* trigger = HostRunEvrouter() ;
// addChild(trigger);
@@ -1283,39 +1263,30 @@ public:
// };
// };
-class MythGamesettings: public TriggeredConfigurationGroup {
+class MythGamesettings: public GroupSetting {
public:
- MythGamesettings():
- TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
- setLabel(QObject::tr("Programs - Games"));
- Setting* trigger = Hostpluginmythgame() ;
+ MythGamesettings(): GroupSetting()
+ {
+ //setLabel(QObject::tr("Programs - Games"));
+ HostCheckBoxSetting* trigger = Hostpluginmythgame();
addChild(trigger);
- setTrigger(trigger);
-
- ConfigurationGroup* settings = new GridConfigurationGroup(3,true,true);
- settings->addChild(HostpluginmythgameROMDB());
- settings->addChild(Hostpluginmythgamesnes9x());
- settings->addChild(Hostpluginmythgamefceux());
- settings->addChild(HostpluginmythgameMame());
- settings->addChild(HostpluginmythgameMednafen());
- settings->addChild(Hostpluginmythgamemupen64());
- settings->addChild(HostpluginmythgameDolphin());
- settings->addChild(HostpluginmythgameXe());
-
-
- addTarget("0", new VerticalConfigurationGroup(false, false));
- addTarget("1", settings);
+ trigger->addTargetedChild("1", HostpluginmythgameROMDB());
+ trigger->addTargetedChild("1", Hostpluginmythgamesnes9x());
+ trigger->addTargetedChild("1", Hostpluginmythgamefceux());
+ trigger->addTargetedChild("1", HostpluginmythgameMame());
+ trigger->addTargetedChild("1", HostpluginmythgameMednafen());
+ trigger->addTargetedChild("1", Hostpluginmythgamemupen64());
+ trigger->addTargetedChild("1", HostpluginmythgameDolphin());
+ trigger->addTargetedChild("1", HostpluginmythgameXe());
};
};
-
//____________________________________________________________________________
-class eth0_settings: public TriggeredConfigurationGroup {
+class eth0_settings: public GroupSetting {
public:
- eth0_settings():
- TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
-
- HostComboBox *HOSTESSIDeth0 = new HostComboBox("HOSTESSIDeth0",true);
+ eth0_settings(): GroupSetting()
+ {
+ HostComboBoxSetting *HOSTESSIDeth0 = new HostComboBoxSetting("HOSTESSIDeth0");
HOSTESSIDeth0->setLabel(QObject::tr("ESSID"));
HOSTESSIDeth0->addSelection("MythVantage");
HOSTESSIDeth0->addSelection("home_lan");
@@ -1323,39 +1294,33 @@ public:
HOSTESSIDeth0->setHelpText(QObject::tr("ESSID"));
addChild(HOSTESSIDeth0);
- HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0");
+// HostCheckBoxSetting* HostUseEncryption = HostUseEncryptioneth0;
+// addChild(HostUseEncryption);
+
+ HostComboBoxSetting *HostUseEncryptioneth0 = new HostComboBoxSetting("HostUseEncryptioneth0");
HostUseEncryptioneth0->setLabel(QObject::tr("Encryption"));
HostUseEncryptioneth0->setHelpText(QObject::tr("WPA uses a shared key phrase this is the most secure. For WEP use the generated key, this type of encryption is not recommended."));
- HostUseEncryptioneth0->addSelection("none");
+ HostUseEncryptioneth0->addSelection("None");
HostUseEncryptioneth0->addSelection("WPA");
HostUseEncryptioneth0->addSelection("WEP");
- Setting* HostUseEncryption = HostUseEncryptioneth0;
- addChild(HostUseEncryption);
- setTrigger(HostUseEncryption);
-
- HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0");
- Hostkeyeth0->setLabel(QObject::tr("key"));
+ HostTextEditSetting *Hostkeyeth0 = new HostTextEditSetting("Hostkeyeth0");
+ Hostkeyeth0->setLabel(QObject::tr("Encryption Key"));
Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption."));
-
- ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
- settings->addChild(Hostkeyeth0);
- addTarget("none", new GridConfigurationGroup(1,false));
- addTarget("WPA", settings);
- addTarget("WEP", settings);
+ addChild(Hostkeyeth0);
};
};
-NetworkSettingseth0::NetworkSettingseth0():
- TriggeredConfigurationGroup(false,false,false,false) {
+NetworkSettingseth0::NetworkSettingseth0()
+{
setLabel(QObject::tr("Network Settings"));
- HostLineEdit *HostIPeth0 = new HostLineEdit("HostIPeth0");
+ HostTextEditSetting *HostIPeth0 = new HostTextEditSetting("HostIPeth0");
HostIPeth0->setLabel(QObject::tr("IP Address"));
HostIPeth0->setValue("192.168.1.12");
HostIPeth0->setHelpText(QObject::tr("IP address of the new installation."));
- HostComboBox *HostNETMASKeth0 = new HostComboBox("HostNETMASKeth0");
+ HostComboBoxSetting *HostNETMASKeth0 = new HostComboBoxSetting("HostNETMASKeth0");
HostNETMASKeth0->setLabel(QObject::tr("Netmask"));
HostNETMASKeth0->addSelection("/0 0.0.0.0");
HostNETMASKeth0->addSelection("/1 128.0.0.0");
@@ -1393,65 +1358,67 @@ NetworkSettingseth0::NetworkSettingseth0():
HostNETMASKeth0->setHelpText(QObject::tr("Netmask"));
HostNETMASKeth0->setValue(24);
- HostLineEdit *HostGWeth0 = new HostLineEdit("HostGWeth0");
+ HostTextEditSetting *HostGWeth0 = new HostTextEditSetting("HostGWeth0");
HostGWeth0->setLabel(QObject::tr("Gateway"));
HostGWeth0->setValue("192.168.1.1");
HostGWeth0->setHelpText(QObject::tr("This is the default route."));
-
- HostLineEdit *HostDNSeth0 = new HostLineEdit("HostDNSeth0");
+ HostTextEditSetting *HostDNSeth0 = new HostTextEditSetting("HostDNSeth0");
HostDNSeth0->setLabel(QObject::tr("Name Server"));
HostDNSeth0->setValue("192.168.1.1");
HostDNSeth0->setHelpText(QObject::tr("Name server"));
-
- HostCheckBox *HostActiveonbooteth0 = new HostCheckBox("HostActiveonbooteth0");
+ HostCheckBoxSetting *HostActiveonbooteth0 = new HostCheckBoxSetting("HostActiveonbooteth0");
HostActiveonbooteth0->setLabel(QObject::tr("Active"));
HostActiveonbooteth0->setValue(true);
HostActiveonbooteth0->setHelpText(QObject::tr("Network is started on boot."));
- HostDefaulteth0 = new HostCheckBox("HostDefaulteth0");
+ HostDefaulteth0 = new HostCheckBoxSetting("HostDefaulteth0");
HostDefaulteth0->setLabel(QObject::tr("Default"));
HostDefaulteth0->setValue(true);
HostDefaulteth0->setHelpText(QObject::tr("Will be used as the primary interface."));
- connect(HostDefaulteth0, SIGNAL(valueChanged(bool)), this, SLOT(eth0_disable_others()));
+ connect(HostDefaulteth0, SIGNAL(valueChanged(bool)), this,
+ SLOT(eth0_disable_others()));
- HostCheckBox *HostUseDHCPeth0 = new HostCheckBox("HostUseDHCPeth0");
- HostUseDHCPeth0 ->setLabel(QObject::tr("Static IP Address"));
- HostUseDHCPeth0 ->setValue(false);
- HostUseDHCPeth0 ->setHelpText(QObject::tr("Enable to use a static IP address, otherwise DHCP will be used."));
+ HostCheckBoxSetting *HostUseDHCPeth0 = new HostCheckBoxSetting("HostUseDHCPeth0");
+ HostUseDHCPeth0->setLabel(QObject::tr("Static IP Address"));
+ HostUseDHCPeth0->setValue(false);
+ HostUseDHCPeth0->setHelpText(QObject::tr("Enable to use a static IP address, otherwise DHCP will be used."));
- wirelessbuttoneth0 = new TransButtonSetting();
- wirelessbuttoneth0->setLabel(tr("Wireless Settings"));
- connect(wirelessbuttoneth0, SIGNAL(pressed()), this, SLOT(eth0_wireless_settings()));
+ wirelessbuttoneth0 = new ButtonStandardSetting("Wireless Settings");
+ connect(wirelessbuttoneth0, SIGNAL(pressed()), this,
+ SLOT(eth0_wireless_settings()));
- ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, true, true);
- settings1->addChild(HostActiveonbooteth0);
- settings1->addChild(HostDefaulteth0);
- settings1-> addChild(wirelessbuttoneth0);
- addChild(settings1);
+ HostDNSeth0->setLabel(QObject::tr("Name Server"));
+ HostDNSeth0->setValue("192.168.1.1");
+ HostDNSeth0->setHelpText(QObject::tr("Name server"));
+// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, true, true);
+ addChild(HostActiveonbooteth0);
+ addChild(HostDefaulteth0);
+ addChild(wirelessbuttoneth0);
+// addChild(settings1);
- Setting* dhcpEnabled = HostUseDHCPeth0;
- addChild(dhcpEnabled);
- setTrigger(dhcpEnabled);
+// Setting* dhcpEnabled = HostUseDHCPeth0;
+ addChild(HostUseDHCPeth0);
+// setTrigger(dhcpEnabled);
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false, false, false);
- settings->addChild(HostIPeth0);
- settings->addChild(HostNETMASKeth0);
- settings->addChild(HostGWeth0);
- settings->addChild(HostDNSeth0);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false, false, false);
+ HostUseDHCPeth0->addTargetedChild("1", HostIPeth0);
+ HostUseDHCPeth0->addTargetedChild("1", HostNETMASKeth0);
+ HostUseDHCPeth0->addTargetedChild("1", HostGWeth0);
+ HostUseDHCPeth0->addTargetedChild("1", HostDNSeth0);
- addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
- addTarget("1", settings);
+// addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+// addTarget("1", settings);
};
eth0options::eth0options()
{
-
- VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
- rec->setLabel(QObject::tr("Wireless configuration for eth0"));
+// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ GroupSetting* rec = new GroupSetting;
+ rec->setLabel(QObject::tr("Wireless Configuration for eth0"));
//rec->setUseLabel(true);
rec->addChild(new eth0_settings);
addChild(rec);
@@ -1467,14 +1434,16 @@ void NetworkSettingseth0::eth0_disable_others()
emit eth0_is_default();
}
}
+
void NetworkSettingseth0::eth0_disabled()
{
HostDefaulteth0->setValue(0);
}
+
void NetworkSettingseth0::eth0_wireless_settings(void)
{
eth0options eth0screen;
- eth0screen.exec();
+// eth0screen.exec();
}
void NetworkSettingseth0::eth0_wireless_disable()
@@ -1482,51 +1451,42 @@ void NetworkSettingseth0::eth0_wireless_disable()
wirelessbuttoneth0->setEnabled(false);
}
-class eth1_settings: public TriggeredConfigurationGroup {
+class eth1_settings: public GroupSetting {
public:
- eth1_settings():
- TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
-
- HostComboBox *HOSTESSIDeth1 = new HostComboBox("HOSTESSIDeth1",true);
+ eth1_settings(): GroupSetting()
+ {
+ HostComboBoxSetting *HOSTESSIDeth1 = new HostComboBoxSetting("HOSTESSIDeth1");
HOSTESSIDeth1->setLabel(QObject::tr("ESSID"));
HOSTESSIDeth1->addSelection("MythVantage");
HOSTESSIDeth1->addSelection("home_lan");
HOSTESSIDeth1->addSelection("type_it_here");
HOSTESSIDeth1->setHelpText(QObject::tr("ESSID"));
addChild(HOSTESSIDeth1);
- HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0");
- HostUseEncryptioneth0->setLabel(QObject::tr("Encryption"));
- HostUseEncryptioneth0->setHelpText(QObject::tr("WPA, WEP, none"));
- HostUseEncryptioneth0->addSelection("none");
- HostUseEncryptioneth0->addSelection("WPA");
- HostUseEncryptioneth0->addSelection("WEP");
-
- Setting* HostUseEncryption = HostUseEncryptioneth0;
- addChild(HostUseEncryption);
- setTrigger(HostUseEncryption);
-
- HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0");
- Hostkeyeth0->setLabel(QObject::tr("key"));
- Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption"));
-
- ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
- settings->addChild(Hostkeyeth0);
- addTarget("none", new GridConfigurationGroup(1,false));
- addTarget("WPA", settings);
- addTarget("WEP", settings);
+// HostComboBoxSetting *HostUseEncryptioneth0 = new HostComboBoxSetting("HostUseEncryptioneth0");
+
+ HostComboBoxSetting *HostUseEncryptioneth1 = new HostComboBoxSetting("HostUseEncryptioneth1");
+ HostUseEncryptioneth1->setLabel(QObject::tr("Encryption"));
+ HostUseEncryptioneth1->setHelpText(QObject::tr("WPA, WEP, none"));
+ HostUseEncryptioneth1->addSelection("none");
+ HostUseEncryptioneth1->addSelection("WPA");
+ HostUseEncryptioneth1->addSelection("WEP");
+
+ HostTextEditSetting *Hostkeyeth1 = new HostTextEditSetting("Hostkeyeth1");
+ Hostkeyeth1->setLabel(QObject::tr("Encryption Key"));
+ Hostkeyeth1->setHelpText(QObject::tr("Key to use for encryption."));
+ addChild(Hostkeyeth1);
};
};
-
-NetworkSettingseth1::NetworkSettingseth1():
- TriggeredConfigurationGroup(false,false,false,false) {
+NetworkSettingseth1::NetworkSettingseth1()
+{
setLabel(QObject::tr("Network Settings"));
- HostLineEdit *HostIPeth1 = new HostLineEdit("HostIPeth1");
- HostIPeth1->setLabel(QObject::tr("Ip address"));
+ HostTextEditSetting *HostIPeth1 = new HostTextEditSetting("HostIPeth1");
+ HostIPeth1->setLabel(QObject::tr("IP Address"));
HostIPeth1->setValue("192.168.1.12");
HostIPeth1->setHelpText(QObject::tr("IP address of the new installation"));
- HostComboBox *HostNETMASKeth1 = new HostComboBox("HostNETMASKeth1");
+ HostComboBoxSetting *HostNETMASKeth1 = new HostComboBoxSetting("HostNETMASKeth1");
HostNETMASKeth1->setLabel(QObject::tr("Netmask"));
HostNETMASKeth1->addSelection("/0 0.0.0.0");
HostNETMASKeth1->addSelection("/1 128.0.0.0");
@@ -1564,62 +1524,63 @@ NetworkSettingseth1::NetworkSettingseth1():
HostNETMASKeth1->setHelpText(QObject::tr("Netmask"));
HostNETMASKeth1->setValue(24);
- HostLineEdit *HostGWeth1 = new HostLineEdit("HostGWeth1");
+ HostTextEditSetting *HostGWeth1 = new HostTextEditSetting("HostGWeth1");
HostGWeth1->setLabel(QObject::tr("Gateway"));
HostGWeth1->setValue("192.168.1.1");
HostGWeth1->setHelpText(QObject::tr("This is the default route"));
-
- HostLineEdit *HostDNSeth1 = new HostLineEdit("HostDNSeth1");
- HostDNSeth1->setLabel(QObject::tr("Name server"));
+ HostTextEditSetting *HostDNSeth1 = new HostTextEditSetting("HostDNSeth1");
+ HostDNSeth1->setLabel(QObject::tr("Name Server"));
HostDNSeth1->setValue("192.168.1.1");
HostDNSeth1->setHelpText(QObject::tr("Name server"));
-
- HostCheckBox *HostActiveonbooteth1 = new HostCheckBox("HostActiveonbooteth1");
+ HostCheckBoxSetting *HostActiveonbooteth1 = new HostCheckBoxSetting("HostActiveonbooteth1");
HostActiveonbooteth1->setLabel(QObject::tr("Active"));
HostActiveonbooteth1->setValue(false);
HostActiveonbooteth1->setHelpText(QObject::tr("Network is started on boot"));
- HostDefaulteth1 = new HostCheckBox("HostDefaulteth1");
+ HostDefaulteth1 = new HostCheckBoxSetting("HostDefaulteth1");
HostDefaulteth1->setLabel(QObject::tr("Default"));
HostDefaulteth1->setValue(false);
HostDefaulteth1->setHelpText(QObject::tr("Will be used as the primary interface"));
- connect(HostDefaulteth1, SIGNAL(valueChanged(bool)), this, SLOT(eth1_disable_others()));
- HostCheckBox *HostUseDHCPeth1 = new HostCheckBox("HostUseDHCPeth1");
- HostUseDHCPeth1 ->setLabel(QObject::tr("Static ip address"));
+ connect(HostDefaulteth1, SIGNAL(valueChanged(bool)), this,
+ SLOT(eth1_disable_others()));
+
+ HostCheckBoxSetting *HostUseDHCPeth1 = new HostCheckBoxSetting("HostUseDHCPeth1");
+ HostUseDHCPeth1 ->setLabel(QObject::tr("Static IP Address"));
HostUseDHCPeth1 ->setValue(false);
HostUseDHCPeth1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
- wirelessbuttoneth1 = new TransButtonSetting();
- wirelessbuttoneth1->setLabel(tr("Wireless Settings"));
- connect(wirelessbuttoneth1, SIGNAL(pressed()), this, SLOT(eth1_wireless_settings()));
-
- ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
- settings1->addChild(HostActiveonbooteth1);
- settings1->addChild(HostDefaulteth1);
- settings1-> addChild(wirelessbuttoneth1);
+ wirelessbuttoneth1 = new ButtonStandardSetting("Wireless Settings");
+ connect(wirelessbuttoneth1, SIGNAL(pressed()), this,
+ SLOT(eth1_wireless_settings()));
- addChild(settings1);
+// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
+ addChild(HostActiveonbooteth1);
+ addChild(HostDefaulteth1);
+ addChild(wirelessbuttoneth1);
+// addChild(settings1);
- Setting* dhcpEnabled = HostUseDHCPeth1;
- addChild(dhcpEnabled);
- setTrigger(dhcpEnabled);
+// Setting* dhcpEnabled = HostUseDHCPeth1;
+ addChild(HostUseDHCPeth1);
+// setTrigger(dhcpEnabled);
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
- settings->addChild(HostIPeth1);
- settings->addChild(HostNETMASKeth1);
- settings->addChild(HostGWeth1);
- settings->addChild(HostDNSeth1);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ HostUseDHCPeth1->addTargetedChild("1", HostIPeth1);
+ HostUseDHCPeth1->addTargetedChild("1", HostNETMASKeth1);
+ HostUseDHCPeth1->addTargetedChild("1", HostGWeth1);
+ HostUseDHCPeth1->addTargetedChild("1", HostDNSeth1);
- addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
- addTarget("1", settings);
+// addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+// addTarget("1", settings);
};
eth1options::eth1options()
{
- VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
- rec->setLabel(QObject::tr("Wireless configuration for eth1"));
+// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ GroupSetting* rec = new GroupSetting;
+ rec->setLabel(QObject::tr("Wireless Configuration for eth1"));
+ //rec->setUseLabel(true);
rec->addChild(new eth1_settings);
addChild(rec);
}
@@ -1634,6 +1595,7 @@ void NetworkSettingseth1::eth1_disable_others()
emit eth1_is_default();
}
}
+
void NetworkSettingseth1::eth1_disabled()
{
HostDefaulteth1->setValue(0);
@@ -1642,7 +1604,7 @@ void NetworkSettingseth1::eth1_disabled()
void NetworkSettingseth1::eth1_wireless_settings(void)
{
eth1options eth1screen;
- eth1screen.exec();
+// eth1screen.exec();
}
void NetworkSettingseth1::eth1_wireless_disable()
@@ -1651,51 +1613,45 @@ void NetworkSettingseth1::eth1_wireless_disable()
}
-class wlan0_settings: public TriggeredConfigurationGroup {
+class wlan0_settings: public GroupSetting {
public:
- wlan0_settings():
- TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
-
- HostComboBox *HOSTESSIDwlan0 = new HostComboBox("HOSTESSIDwlan0",true);
+ wlan0_settings(): GroupSetting()
+ {
+ HostComboBoxSetting *HOSTESSIDwlan0 = new HostComboBoxSetting("HOSTESSIDwlan0",true);
HOSTESSIDwlan0->setLabel(QObject::tr("ESSID"));
HOSTESSIDwlan0->addSelection("MythVantage");
HOSTESSIDwlan0->addSelection("home_lan");
HOSTESSIDwlan0->addSelection("type_it_here");
HOSTESSIDwlan0->setHelpText(QObject::tr("ESSID"));
addChild(HOSTESSIDwlan0);
- HostComboBox *HostUseEncryptionwlan0 = new HostComboBox("HostUseEncryptionwlan0");
+ HostComboBoxSetting *HostUseEncryptionwlan0 = new HostComboBoxSetting("HostUseEncryptionwlan0");
HostUseEncryptionwlan0->setLabel(QObject::tr("Encryption"));
HostUseEncryptionwlan0->setHelpText(QObject::tr("WPA, WEP, none"));
HostUseEncryptionwlan0->addSelection("none");
HostUseEncryptionwlan0->addSelection("WPA");
HostUseEncryptionwlan0->addSelection("WEP");
- Setting* HostUseEncryption = HostUseEncryptionwlan0;
- addChild(HostUseEncryption);
- setTrigger(HostUseEncryption);
+// Setting* HostUseEncryption = HostUseEncryptionwlan0;
+// addChild(HostUseEncryption);
+// setTrigger(HostUseEncryption);
- HostLineEdit *Hostkeywlan0 = new HostLineEdit("Hostkeywlan0");
- Hostkeywlan0->setLabel(QObject::tr("key"));
+ HostTextEditSetting *Hostkeywlan0 = new HostTextEditSetting("Hostkeywlan0");
+ Hostkeywlan0->setLabel(QObject::tr("Encryption Key"));
Hostkeywlan0->setHelpText(QObject::tr("Key to use for encryption"));
-
- ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
- settings->addChild(Hostkeywlan0);
- addTarget("none", new GridConfigurationGroup(1,false));
- addTarget("WPA", settings);
- addTarget("WEP", settings);
+ addChild(Hostkeywlan0);
};
};
-NetworkSettingswlan0::NetworkSettingswlan0():
- TriggeredConfigurationGroup(false,false,false,false) {
+NetworkSettingswlan0::NetworkSettingswlan0()
+{
setLabel(QObject::tr("Network Settings"));
- HostIPwlan0 = new HostLineEdit("HostIPwlan0");
- HostIPwlan0->setLabel(QObject::tr("Ip address"));
+ HostIPwlan0 = new HostTextEditSetting("HostIPwlan0");
+ HostIPwlan0->setLabel(QObject::tr("IP Address"));
HostIPwlan0->setValue("192.168.1.12");
HostIPwlan0->setHelpText(QObject::tr("IP address of the new installation"));
- HostNETMASKwlan0 = new HostComboBox("HostNETMASKwlan0");
+ HostNETMASKwlan0 = new HostComboBoxSetting("HostNETMASKwlan0");
HostNETMASKwlan0->setLabel(QObject::tr("Netmask"));
HostNETMASKwlan0->addSelection("/0 0.0.0.0");
HostNETMASKwlan0->addSelection("/1 128.0.0.0");
@@ -1733,64 +1689,65 @@ NetworkSettingswlan0::NetworkSettingswlan0():
HostNETMASKwlan0->setHelpText(QObject::tr("Netmask"));
HostNETMASKwlan0->setValue(24);
- HostGWwlan0 = new HostLineEdit("HostGWwlan0");
+ HostGWwlan0 = new HostTextEditSetting("HostGWwlan0");
HostGWwlan0->setLabel(QObject::tr("Gateway"));
HostGWwlan0->setValue("192.168.1.1");
HostGWwlan0->setHelpText(QObject::tr("This is the default route"));
-
- HostDNSwlan0 = new HostLineEdit("HostDNSwlan0");
+ HostDNSwlan0 = new HostTextEditSetting("HostDNSwlan0");
HostDNSwlan0->setLabel(QObject::tr("Name server"));
HostDNSwlan0->setValue("192.168.1.1");
HostDNSwlan0->setHelpText(QObject::tr("Name server"));
-
- HostActiveonbootwlan0 = new HostCheckBox("HostActiveonbootwlan0");
+ HostActiveonbootwlan0 = new HostCheckBoxSetting("HostActiveonbootwlan0");
HostActiveonbootwlan0->setLabel(QObject::tr("Active"));
HostActiveonbootwlan0->setValue(false);
HostActiveonbootwlan0->setHelpText(QObject::tr("Network is started on boot"));
- HostDefaultwlan0 = new HostCheckBox("HostDefaultwlan0");
+ HostDefaultwlan0 = new HostCheckBoxSetting("HostDefaultwlan0");
HostDefaultwlan0->setLabel(QObject::tr("Default"));
HostDefaultwlan0->setValue(false);
HostDefaultwlan0->setHelpText(QObject::tr("Will be used as the primary interface"));
- connect(HostDefaultwlan0, SIGNAL(valueChanged(bool)), this, SLOT(wlan0_disable_others()));
+ connect(HostDefaultwlan0, SIGNAL(valueChanged(bool)), this,
+ SLOT(wlan0_disable_others()));
- HostUseDHCPwlan0 = new HostCheckBox("HostUseDHCPwlan0");
- HostUseDHCPwlan0 ->setLabel(QObject::tr("Static ip address"));
+ HostUseDHCPwlan0 = new HostCheckBoxSetting("HostUseDHCPwlan0");
+ HostUseDHCPwlan0 ->setLabel(QObject::tr("Static IP Address"));
HostUseDHCPwlan0 ->setValue(false);
HostUseDHCPwlan0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
- wirelessbuttonwlan0 = new TransButtonSetting();
- wirelessbuttonwlan0->setLabel(tr("Wireless Settings"));
- connect(wirelessbuttonwlan0, SIGNAL(pressed()), this, SLOT(wlan0_wireless_settings()));
+ wirelessbuttonwlan0 = new ButtonStandardSetting("Wireless Settings");
+ connect(wirelessbuttonwlan0, SIGNAL(pressed()), this,
+ SLOT(wlan0_wireless_settings()));
- ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
- settings1->addChild(HostActiveonbootwlan0);
- settings1->addChild(HostDefaultwlan0);
- settings1-> addChild(wirelessbuttonwlan0);
- addChild(settings1);
+// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false)
+ addChild(HostActiveonbootwlan0);
+ addChild(HostDefaultwlan0);
+ addChild(wirelessbuttonwlan0);
+// addChild(settings1);
- Setting* dhcpEnabled = HostUseDHCPwlan0;
- addChild(dhcpEnabled);
- setTrigger(dhcpEnabled);
+// Setting* dhcpEnabled = HostUseDHCPwlan0;
+ addChild(HostUseDHCPwlan0);
+// setTrigger(dhcpEnabled);
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
- settings->addChild(HostIPwlan0);
- settings->addChild(HostNETMASKwlan0);
- settings->addChild(HostGWwlan0);
- settings->addChild(HostDNSwlan0);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ HostUseDHCPwlan0->addTargetedChild("1", HostIPwlan0);
+ HostUseDHCPwlan0->addTargetedChild("1", HostNETMASKwlan0);
+ HostUseDHCPwlan0->addTargetedChild("1", HostGWwlan0);
+ HostUseDHCPwlan0->addTargetedChild("1", HostDNSwlan0);
- addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
- addTarget("1", settings);
+// addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+// addTarget("1", settings);
};
Wlan0options::Wlan0options()
{
- VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
- rec->setLabel(QObject::tr("Wireless configuration for wlan0"));
+// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ GroupSetting* rec = new GroupSetting;
+ rec->setLabel(QObject::tr("Wireless Configuration for wlan0"));
+ //rec->setUseLabel(true);
rec->addChild(new wlan0_settings);
addChild(rec);
}
@@ -1804,75 +1761,63 @@ void NetworkSettingswlan0::wlan0_disable_others()
hostparm.ThisHostDefaultInterface="wlan0";
emit wlan0_is_default();
}
-
-
-
}
+
void NetworkSettingswlan0::wlan0_disabled()
{
HostDefaultwlan0->setValue(0);
}
-
void NetworkSettingswlan0::wlan0_wireless_settings(void)
{
Wlan0options wlan0screen;
- wlan0screen.exec();
+// wlan0screen.exec();
}
+
void NetworkSettingswlan0::wlan0_wireless_disable()
{
wirelessbuttonwlan0->setEnabled(false);
}
-
-class wlan1_settings: public TriggeredConfigurationGroup {
+class wlan1_settings: public GroupSetting {
public:
- wlan1_settings():
- TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
-
- HostComboBox *HOSTESSIDwlan1 = new HostComboBox("HOSTESSIDwlan1",true);
+ wlan1_settings(): GroupSetting()
+ {
+ HostComboBoxSetting *HOSTESSIDwlan1 = new HostComboBoxSetting("HOSTESSIDwlan1");
HOSTESSIDwlan1->setLabel(QObject::tr("ESSID"));
HOSTESSIDwlan1->addSelection("MythVantage");
HOSTESSIDwlan1->addSelection("home_lan");
HOSTESSIDwlan1->addSelection("type_it_here");
HOSTESSIDwlan1->setHelpText(QObject::tr("ESSID"));
addChild(HOSTESSIDwlan1);
-
-
- HostComboBox *HostUseEncryptionwlan1 = new HostComboBox("HostUseEncryptionwlan1");
+ HostComboBoxSetting *HostUseEncryptionwlan1 = new HostComboBoxSetting("HostUseEncryptionwlan1");
HostUseEncryptionwlan1->setLabel(QObject::tr("Encryption"));
HostUseEncryptionwlan1->setHelpText(QObject::tr("WPA, WEP, none"));
HostUseEncryptionwlan1->addSelection("none");
HostUseEncryptionwlan1->addSelection("WPA");
HostUseEncryptionwlan1->addSelection("WEP");
- Setting* HostUseEncryption = HostUseEncryptionwlan1;
- addChild(HostUseEncryption);
- setTrigger(HostUseEncryption);
+// Setting* HostUseEncryption = HostUseEncryptionwlan1;
+// addChild(HostUseEncryption);
+// setTrigger(HostUseEncryption);
- HostLineEdit *Hostkeywlan1 = new HostLineEdit("Hostkeywlan1");
- Hostkeywlan1->setLabel(QObject::tr("key"));
+ HostTextEditSetting *Hostkeywlan1 = new HostTextEditSetting("Hostkeywlan1");
+ Hostkeywlan1->setLabel(QObject::tr("Encryption Key"));
Hostkeywlan1->setHelpText(QObject::tr("Key to use for encryption"));
-
- ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
- settings->addChild(Hostkeywlan1);
- addTarget("none", new GridConfigurationGroup(1,false));
- addTarget("WPA", settings);
- addTarget("WEP", settings);
-
+ addChild(Hostkeywlan1);
};
};
-NetworkSettingswlan1::NetworkSettingswlan1():
- TriggeredConfigurationGroup(false,false,false,false) {
+NetworkSettingswlan1::NetworkSettingswlan1()
+{
setLabel(QObject::tr("Network Settings"));
- HostIPwlan1 = new HostLineEdit("HostIPwlan1");
- HostIPwlan1->setLabel(QObject::tr("Ip address"));
+ HostIPwlan1 = new HostTextEditSetting("HostIPwlan1");
+ HostIPwlan1->setLabel(QObject::tr("IP Address"));
HostIPwlan1->setValue("192.168.1.12");
HostIPwlan1->setHelpText(QObject::tr("IP address of the new installation"));
- HostNETMASKwlan1 = new HostComboBox("HostNETMASKwlan1");
+ HostNETMASKwlan1 = new HostComboBoxSetting("HostNETMASKwlan1");
HostNETMASKwlan1->setLabel(QObject::tr("Netmask"));
HostNETMASKwlan1->addSelection("/0 0.0.0.0");
HostNETMASKwlan1->addSelection("/1 128.0.0.0");
@@ -1910,64 +1855,64 @@ NetworkSettingswlan1::NetworkSettingswlan1():
HostNETMASKwlan1->setHelpText(QObject::tr("Netmask"));
HostNETMASKwlan1->setValue(24);
- HostGWwlan1 = new HostLineEdit("HostGWwlan1");
+ HostGWwlan1 = new HostTextEditSetting("HostGWwlan1");
HostGWwlan1->setLabel(QObject::tr("Gateway"));
HostGWwlan1->setValue("192.168.1.1");
HostGWwlan1->setHelpText(QObject::tr("This is the default route"));
-
- HostDNSwlan1 = new HostLineEdit("HostDNSwlan1");
+ HostDNSwlan1 = new HostTextEditSetting("HostDNSwlan1");
HostDNSwlan1->setLabel(QObject::tr("Name server"));
HostDNSwlan1->setValue("192.168.1.1");
HostDNSwlan1->setHelpText(QObject::tr("Name server"));
-
- HostActiveonbootwlan1 = new HostCheckBox("HostActiveonbootwlan1");
+ HostActiveonbootwlan1 = new HostCheckBoxSetting("HostActiveonbootwlan1");
HostActiveonbootwlan1->setLabel(QObject::tr("Active"));
HostActiveonbootwlan1->setValue(false);
HostActiveonbootwlan1->setHelpText(QObject::tr("Network is started on boot"));
- HostUseDHCPwlan1 = new HostCheckBox("HostUseDHCPwlan1");
+ HostUseDHCPwlan1 = new HostCheckBoxSetting("HostUseDHCPwlan1");
HostUseDHCPwlan1 ->setLabel(QObject::tr("Static ip address"));
HostUseDHCPwlan1 ->setValue(false);
HostUseDHCPwlan1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
- wirelessbuttonwlan1 = new TransButtonSetting();
- wirelessbuttonwlan1->setLabel(tr("Wireless Settings"));
- connect(wirelessbuttonwlan1, SIGNAL(pressed()), this, SLOT(wlan1_wireless_settings()));
+ wirelessbuttonwlan1 = new ButtonStandardSetting("Wireless Settings");
+ connect(wirelessbuttonwlan1, SIGNAL(pressed()), this,
+ SLOT(wlan1_wireless_settings()));
- HostDefaultwlan1 = new HostCheckBox("HostDefaultwlan1");
+ HostDefaultwlan1 = new HostCheckBoxSetting("HostDefaultwlan1");
HostDefaultwlan1->setLabel(QObject::tr("Default"));
HostDefaultwlan1->setValue(false);
HostDefaultwlan1->setHelpText(QObject::tr("Will be used as the primary interface"));
- connect(HostDefaultwlan1, SIGNAL(valueChanged(bool)), this, SLOT(wlan1_disable_others()));
-
+ connect(HostDefaultwlan1, SIGNAL(valueChanged(bool)), this,
+ SLOT(wlan1_disable_others()));
- ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false, false);
- settings1->addChild(HostActiveonbootwlan1);
- settings1->addChild(HostDefaultwlan1);
- settings1-> addChild(wirelessbuttonwlan1);
+// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false, false);
+ addChild(HostActiveonbootwlan1);
+ addChild(HostDefaultwlan1);
+ addChild(wirelessbuttonwlan1);
- addChild(settings1);
+// addChild(settings1);
- Setting* dhcpEnabled = HostUseDHCPwlan1;
- addChild(dhcpEnabled);
- setTrigger(dhcpEnabled);
+// Setting* dhcpEnabled = HostUseDHCPwlan1;
+ addChild(HostDefaultwlan1);
+// setTrigger(dhcpEnabled);
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
- settings->addChild(HostIPwlan1);
- settings->addChild(HostNETMASKwlan1);
- settings->addChild(HostGWwlan1);
- settings->addChild(HostDNSwlan1);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ HostDefaultwlan1->addTargetedChild("1", HostIPwlan1);
+ HostDefaultwlan1->addTargetedChild("1", HostNETMASKwlan1);
+ HostDefaultwlan1->addTargetedChild("1", HostGWwlan1);
+ HostDefaultwlan1->addTargetedChild("1", HostDNSwlan1);
- addTarget("0", new VerticalConfigurationGroup(true));
- addTarget("1", settings);
+// addTarget("0", new VerticalConfigurationGroup(true));
+// addTarget("1", settings);
};
wlan1options::wlan1options()
{
- VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
- rec->setLabel(QObject::tr("Wireless configuration for wlan1"));
+// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ GroupSetting* rec = new GroupSetting;
+ rec->setLabel(QObject::tr("Wireless Configuration for wlan1"));
+ //rec->setUseLabel(true);
rec->addChild(new wlan1_settings);
addChild(rec);
}
@@ -1986,6 +1931,7 @@ void NetworkSettingswlan1::wlan1_disabled()
{
HostDefaultwlan1->setValue(0);
}
+
void NetworkSettingswlan1::wlan1_wireless_disable()
{
wirelessbuttonwlan1->setEnabled(false);
@@ -1994,17 +1940,16 @@ void NetworkSettingswlan1::wlan1_wireless_disable()
void NetworkSettingswlan1::wlan1_wireless_settings(void)
{
wlan1options wlan1screen;
- wlan1screen.exec();
+// wlan1screen.exec();
}
//---
-class ath0_settings: public TriggeredConfigurationGroup {
+class ath0_settings: public GroupSetting {
public:
- ath0_settings():
- TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
-
- HostComboBox *HOSTESSIDath0 = new HostComboBox("HOSTESSIDath0",true);
+ ath0_settings(): GroupSetting()
+ {
+ HostComboBoxSetting *HOSTESSIDath0 = new HostComboBoxSetting("HOSTESSIDath0",true);
HOSTESSIDath0->setLabel(QObject::tr("ESSID"));
HOSTESSIDath0->addSelection("MythVantage");
HOSTESSIDath0->addSelection("home_lan");
@@ -2012,41 +1957,34 @@ public:
HOSTESSIDath0->setHelpText(QObject::tr("ESSID"));
addChild(HOSTESSIDath0);
- HostComboBox *HostUseEncryptionath0 = new HostComboBox("HostUseEncryptionath0");
+ HostComboBoxSetting *HostUseEncryptionath0 = new HostComboBoxSetting("HostUseEncryptionath0");
HostUseEncryptionath0->setLabel(QObject::tr("Encryption"));
HostUseEncryptionath0->setHelpText(QObject::tr("WPA, WEP, none"));
HostUseEncryptionath0->addSelection("none");
HostUseEncryptionath0->addSelection("WPA");
HostUseEncryptionath0->addSelection("WEP");
- Setting* HostUseEncryption = HostUseEncryptionath0;
- addChild(HostUseEncryption);
- setTrigger(HostUseEncryption);
+// Setting* HostUseEncryption = HostUseEncryptionath0;
+// addChild(HostUseEncryption);
+// setTrigger(HostUseEncryption);
- HostLineEdit *Hostkeyath0 = new HostLineEdit("Hostkeyath0");
- Hostkeyath0->setLabel(QObject::tr("key"));
+ HostTextEditSetting *Hostkeyath0 = new HostTextEditSetting("Hostkeyath0");
+ Hostkeyath0->setLabel(QObject::tr("Encryption Key"));
Hostkeyath0->setHelpText(QObject::tr("Key to use for encryption"));
-
- ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
- settings->addChild(Hostkeyath0);
- addTarget("none", new GridConfigurationGroup(1,false));
- addTarget("WPA", settings);
- addTarget("WEP", settings);
- //-
-
+ addChild(Hostkeyath0);
};
};
-NetworkSettingsath0::NetworkSettingsath0():
- TriggeredConfigurationGroup(false,false,false,false) {
+NetworkSettingsath0::NetworkSettingsath0()
+{
setLabel(QObject::tr("Network Settings"));
- HostLineEdit *HostIPath0 = new HostLineEdit("HostIPath0");
- HostIPath0->setLabel(QObject::tr("Ip address"));
+ HostTextEditSetting *HostIPath0 = new HostTextEditSetting("HostIPath0");
+ HostIPath0->setLabel(QObject::tr("IP Address"));
HostIPath0->setValue("192.168.1.12");
HostIPath0->setHelpText(QObject::tr("IP address of the new installation"));
- HostComboBox *HostNETMASKath0 = new HostComboBox("HostNETMASKath0");
+ HostComboBoxSetting *HostNETMASKath0 = new HostComboBoxSetting("HostNETMASKath0");
HostNETMASKath0->setLabel(QObject::tr("Netmask"));
HostNETMASKath0->addSelection("/0 0.0.0.0");
HostNETMASKath0->addSelection("/1 128.0.0.0");
@@ -2084,63 +2022,65 @@ NetworkSettingsath0::NetworkSettingsath0():
HostNETMASKath0->setHelpText(QObject::tr("Netmask"));
HostNETMASKath0->setValue(24);
- HostLineEdit *HostGWath0 = new HostLineEdit("HostGWath0");
+ HostTextEditSetting *HostGWath0 = new HostTextEditSetting("HostGWath0");
HostGWath0->setLabel(QObject::tr("Gateway"));
HostGWath0->setValue("192.168.1.1");
HostGWath0->setHelpText(QObject::tr("This is the default route"));
- HostLineEdit *HostDNSath0 = new HostLineEdit("HostDNSath0");
+ HostTextEditSetting *HostDNSath0 = new HostTextEditSetting("HostDNSath0");
HostDNSath0->setLabel(QObject::tr("Name server"));
HostDNSath0->setValue("192.168.1.1");
HostDNSath0->setHelpText(QObject::tr("Name server"));
- HostCheckBox *HostActiveonbootath0 = new HostCheckBox("HostActiveonbootath0");
+ HostCheckBoxSetting *HostActiveonbootath0 = new HostCheckBoxSetting("HostActiveonbootath0");
HostActiveonbootath0->setLabel(QObject::tr("Active"));
HostActiveonbootath0->setValue(false);
HostActiveonbootath0->setHelpText(QObject::tr("Network is started on boot"));
- HostDefaultath0 = new HostCheckBox("HostDefaultath0");
+ HostDefaultath0 = new HostCheckBoxSetting("HostDefaultath0");
HostDefaultath0->setLabel(QObject::tr("Default"));
HostDefaultath0->setValue(false);
HostDefaultath0->setHelpText(QObject::tr("Will be used as the primary interface"));
- connect(HostDefaultath0, SIGNAL(valueChanged(bool)), this, SLOT(ath0_disable_others()));
+ connect(HostDefaultath0, SIGNAL(valueChanged(bool)), this,
+ SLOT(ath0_disable_others()));
- HostCheckBox *HostUseDHCPath0 = new HostCheckBox("HostUseDHCPath0");
+ HostCheckBoxSetting *HostUseDHCPath0 = new HostCheckBoxSetting("HostUseDHCPath0");
HostUseDHCPath0 ->setLabel(QObject::tr("Static ip address"));
HostUseDHCPath0 ->setValue(false);
HostUseDHCPath0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
- wirelessbuttonath0 = new TransButtonSetting();
- wirelessbuttonath0->setLabel(tr("Wireless Settings"));
- connect(wirelessbuttonath0, SIGNAL(pressed()), this, SLOT(ath0_wireless_settings()));
+ wirelessbuttonath0 = new ButtonStandardSetting("Wireless Settings");
+ connect(wirelessbuttonath0, SIGNAL(pressed()), this,
+ SLOT(ath0_wireless_settings()));
- ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
- settings1->addChild(HostActiveonbootath0);
- settings1->addChild(HostDefaultath0);
- settings1-> addChild(wirelessbuttonath0);
+// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
+ addChild(HostActiveonbootath0);
+ addChild(HostDefaultath0);
+ addChild(wirelessbuttonath0);
- addChild(settings1);
+// addChild(settings1);
- Setting* dhcpEnabled = HostUseDHCPath0;
- addChild(dhcpEnabled);
- setTrigger(dhcpEnabled);
+// Setting* dhcpEnabled = HostUseDHCPath0;
+ addChild(HostUseDHCPath0);
+// setTrigger(dhcpEnabled);
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
- settings->addChild(HostIPath0);
- settings->addChild(HostNETMASKath0);
- settings->addChild(HostGWath0);
- settings->addChild(HostDNSath0);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ HostUseDHCPath0->addTargetedChild("1", HostIPath0);
+ HostUseDHCPath0->addTargetedChild("1", HostNETMASKath0);
+ HostUseDHCPath0->addTargetedChild("1", HostGWath0);
+ HostUseDHCPath0->addTargetedChild("1", HostDNSath0);
- addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
- addTarget("1", settings);
+// addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+// addTarget("1", settings);
};
ath0options::ath0options()
{
-
- VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
- rec->setLabel(QObject::tr("Wireless configuration for ath0"));
+// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ GroupSetting* rec = new GroupSetting;
+ rec->setLabel(QObject::tr("Wireless Configuration for ath0"));
+ //rec->setUseLabel(true);
rec->addChild(new ath0_settings);
addChild(rec);
}
@@ -2155,6 +2095,7 @@ void NetworkSettingsath0::ath0_disable_others()
emit ath0_is_default();
}
}
+
void NetworkSettingsath0::ath0_disabled()
{
HostDefaultath0->setValue(0);
@@ -2163,7 +2104,7 @@ void NetworkSettingsath0::ath0_disabled()
void NetworkSettingsath0::ath0_wireless_settings(void)
{
ath0options ath0screen;
- ath0screen.exec();
+// ath0screen.exec();
}
void NetworkSettingsath0::ath0_wireless_disable()
@@ -2175,14 +2116,15 @@ void NetworkSettingsath0::ath0_wireless_disable()
//--
class NetworkSettingsFrame:
- public TriggeredConfigurationGroup {
+ public GroupSetting {
public:
- NetworkSettingsFrame():
- TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
- setLabel(QObject::tr("Network Settings (1/2)"));
- Setting* netdevice = HostNetDevice();
+ NetworkSettingsFrame(): GroupSetting()
+ {
+ setLabel(QObject::tr("Network Settings"));
+// Setting* netdevice = HostNetDevice();
+ HostComboBoxSetting* netdevice = HostNetDevice();
addChild(netdevice);
- setTrigger(netdevice);
+// setTrigger(netdevice);
NetworkSettingswlan0 *Nwlan0 = new NetworkSettingswlan0 ;
NetworkSettingswlan1 *Nwlan1 = new NetworkSettingswlan1 ;
@@ -2267,67 +2209,67 @@ public:
connect(Nath0, SIGNAL(ath0_is_default(void)), Neth0, SLOT(eth0_disabled()));
- HostLineEdit *HostMTUeth0 = new HostLineEdit("HostMTUeth0");
+ HostTextEditSetting *HostMTUeth0 = new HostTextEditSetting("HostMTUeth0");
HostMTUeth0->setLabel(QObject::tr("MTU"));
HostMTUeth0->setValue("");
HostMTUeth0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
- ConfigurationGroup* settingseth0 = new GridConfigurationGroup(1,false, false, false, false);
- settingseth0->addChild(Neth0);
- settingseth0->addChild(HostMTUeth0);
+// ConfigurationGroup* settingseth0 = new GridConfigurationGroup(1,false, false, false, false);
+ addChild(Neth0);
+ addChild(HostMTUeth0);
- HostLineEdit *HostMTUeth1 = new HostLineEdit("HostMTUeth1");
+ HostTextEditSetting *HostMTUeth1 = new HostTextEditSetting("HostMTUeth1");
HostMTUeth1->setLabel(QObject::tr("MTU"));
HostMTUeth1->setValue("");
HostMTUeth1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
- ConfigurationGroup* settingseth1 = new GridConfigurationGroup(1,false, false, true, true);
- settingseth1->addChild(Neth1);
- settingseth1->addChild(HostMTUeth1);
+// ConfigurationGroup* settingseth1 = new GridConfigurationGroup(1,false, false, true, true);
+ addChild(Neth1);
+ addChild(HostMTUeth1);
- HostLineEdit *HostMTUwlan0 = new HostLineEdit("HostMTUwlan0");
+ HostTextEditSetting *HostMTUwlan0 = new HostTextEditSetting("HostMTUwlan0");
HostMTUwlan0->setLabel(QObject::tr("MTU"));
HostMTUwlan0->setValue("");
HostMTUwlan0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
- ConfigurationGroup* settingswlan0 = new GridConfigurationGroup(1,false, false, false, false);
- settingswlan0->addChild(Nwlan0);
- settingswlan0->addChild(HostMTUwlan0);
+// ConfigurationGroup* settingswlan0 = new GridConfigurationGroup(1,false, false, false, false);
+ addChild(Nwlan0);
+ addChild(HostMTUwlan0);
- HostLineEdit *HostMTUwlan1 = new HostLineEdit("HostMTUwlan1");
+ HostTextEditSetting *HostMTUwlan1 = new HostTextEditSetting("HostMTUwlan1");
HostMTUwlan1->setLabel(QObject::tr("MTU"));
HostMTUwlan1->setValue("");
HostMTUwlan1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
- ConfigurationGroup* settingswlan1 = new GridConfigurationGroup(1,false, false, false, false);
- settingswlan1->addChild(Nwlan1);
- settingswlan1->addChild(HostMTUwlan1);
+// ConfigurationGroup* settingswlan1 = new GridConfigurationGroup(1,false, false, false, false);
+ addChild(Nwlan1);
+ addChild(HostMTUwlan1);
- HostLineEdit *HostMTUath0 = new HostLineEdit("HostMTUath0");
+ HostTextEditSetting *HostMTUath0 = new HostTextEditSetting("HostMTUath0");
HostMTUath0->setLabel(QObject::tr("MTU"));
HostMTUath0->setValue("");
HostMTUath0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
- ConfigurationGroup* settingsath0 = new GridConfigurationGroup(1,false, false, false, false);
- settingsath0->addChild(Nath0);
- settingsath0->addChild(HostMTUath0);
-
+// ConfigurationGroup* settingsath0 = new GridConfigurationGroup(1,false, false, false, false);
+ addChild(Nath0);
+ addChild(HostMTUath0);
+/*
addTarget("wlan0", settingswlan0);
addTarget("wlan1", settingswlan1);
addTarget("eth0", settingseth0);
addTarget("eth1", settingseth1);
addTarget("ath0", settingsath0);
+*/
};
};
-NetworkOptionsFrame::NetworkOptionsFrame():
- VerticalConfigurationGroup(false,false,false,false)
+NetworkOptionsFrame::NetworkOptionsFrame(): GroupSetting()
{
setLabel(QObject::tr("Network Settings (2/2)"));
- HostMyhostname = new HostComboBox("HostMyhostname",true);
+ HostMyhostname = new HostComboBoxSetting("HostMyhostname",true);
HostMyhostname->setLabel(QObject::tr("Hostname"));
HostMyhostname->addSelection("Envy");
HostMyhostname->addSelection("Greed");
@@ -2346,22 +2288,19 @@ NetworkOptionsFrame::NetworkOptionsFrame():
HostMyhostname->addSelection("type_hostname_here");
HostMyhostname->setHelpText(QObject::tr("The hostname must resolve via DNS. If DNS is not available then append .local to the end of the hostname. When using .local, names must not include an additional ."));
- FetchDhcpHostnameButton = new TransButtonSetting();
- FetchDhcpHostnameButton ->setLabel(tr("Ask DHCP server for hostname"));
- connect(FetchDhcpHostnameButton, SIGNAL(pressed()), this, SLOT(fetch_hostname()));
+ FetchDhcpHostnameButton = new ButtonStandardSetting("Ask DHCP Server for Hostname");
+ connect(FetchDhcpHostnameButton, SIGNAL(pressed()), this,
+ SLOT(fetch_hostname()));
- networklabel = new TransLabelSetting();
QString labelstring;
- labelstring = "Will use " + hostparm.ThisHostDefaultInterface + " to check for hostname";
- networklabel->setValue(labelstring);
+ labelstring = "Will use " + hostparm.ThisHostDefaultInterface + " to check for hostname.";
+ FetchDhcpHostnameButton->setHelpText(labelstring);
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
- settings->addChild(HostMyhostname);
- settings->addChild(networklabel);
- settings->addChild(FetchDhcpHostnameButton);
-
- addChild(settings);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ addChild(HostMyhostname);
+ addChild(FetchDhcpHostnameButton);
+// addChild(settings);
}
QString NetworkOptionsFrame::find_hostname()
@@ -2402,23 +2341,25 @@ void NetworkOptionsFrame::fetch_hostname()
new_host=find_hostname();
if ( new_host != "null" )
{
- networklabel->setValue("Updated the hostname.");
+// networklabel->setValue("Updated the hostname.");
+// FIXME Need dialog ok box
HostMyhostname->addSelection(new_host);
HostMyhostname->setValue(new_host);
}
- else
- networklabel->setValue("DHCP server did not return a hostname.");
+// else
+// FIXME Need dialog ok box
+// networklabel->setValue("DHCP server did not return a hostname.");
}
-
-static HostCheckBox *HostAutodown()
+/*
+static HostCheckBoxSetting *HostAutodown()
{
- HostCheckBox *gc = new HostCheckBox("HostAutodown");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostAutodown");
gc->setLabel(QObject::tr("Turn off machine at a specified time"));
gc->setValue(false);
gc->setHelpText(QObject::tr("Will turn off this system."));
return gc;
};
-
+*/
//static HostSpinBox *HostWakeupTime()
//{
// HostSpinBox *gc = new HostSpinBox("HostWakeupTime", -1, 23, 1, true);
@@ -2427,7 +2368,7 @@ static HostCheckBox *HostAutodown()
// gc->setHelpText(QObject::tr("Select the hour to auto poweron this system. Use -1 to disable" ));
// return gc;
//}
-
+/*
static HostSpinBox *HostShutdownTime()
{
HostSpinBox *gc = new HostSpinBox("HostShutdownTime", -1, 23, 1, true);
@@ -2437,29 +2378,29 @@ static HostSpinBox *HostShutdownTime()
return gc;
}
-static HostSpinBox *HostShutdownTime2()
+static HostSpinBoxSetting *HostShutdownTime2()
{
- HostSpinBox *gc = new HostSpinBox("HostShutdownTime2", -1, 23, 1, true);
+ HostSpinBoxSetting *gc = new HostSpinBoxSetting("HostShutdownTime2", -1, 23, 1, true);
gc->setLabel(QObject::tr("2nd auto Shutdown time"));
gc->setValue(2);
gc->setHelpText(QObject::tr("Select the hour to poweroff this syste. Times are in 24hour format. Use -1 to disable" ));
return gc;
}
+*/
-
-//static HostCheckBox *HostUseWOL()
+//static HostCheckBoxSetting *HostUseWOL()
//{
-// HostCheckBox *gc = new HostCheckBox("HostUseWOL");
+// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseWOL");
// gc->setLabel(QObject::tr("Use Wake on Lan to turn on system"));
// gc->setValue(true);
// gc->setHelpText(QObject::tr("Unless you know what your doing leave it checked"));
// return gc;
//};
-//static HostCheckBox *HostUseNVRAM()
+//static HostCheckBoxSetting *HostUseNVRAM()
//{
-// HostCheckBox *gc = new HostCheckBox("HostUseNVRAM");
+// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseNVRAM");
// gc->setLabel(QObject::tr("Use nvram to turn on system"));
// gc->setValue(true);
// gc->setHelpText(QObject::tr("Leaved checked unless nvram causes problems."));
@@ -2467,9 +2408,9 @@ static HostSpinBox *HostShutdownTime2()
//};
-static HostCheckBox *HostUseXLargeMouse()
+static HostCheckBoxSetting *HostUseXLargeMouse()
{
- HostCheckBox *gc = new HostCheckBox("HostUseXLargeMouse");
+ HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseXLargeMouse");
gc->setLabel(QObject::tr("Large Mouse Pointer"));
gc->setValue(true);
gc->setHelpText(QObject::tr("Use an extra large mouse pointer. This takes effect the next time the frontend is started."));
@@ -2477,12 +2418,12 @@ static HostCheckBox *HostUseXLargeMouse()
};
-
-class WakeSettings: public TriggeredConfigurationGroup {
+/*
+class WakeSettings: public GroupSetting {
public:
WakeSettings():
- TriggeredConfigurationGroup(true) {
+ GroupSetting(true) {
setLabel(QObject::tr("Shutdown Settings"));
Setting* Autodown = HostAutodown();
addChild(Autodown);
@@ -2497,78 +2438,78 @@ public:
addTarget("1", settings);
};
};
+*/
-class Frontend_settings_group: public TriggeredConfigurationGroup {
+class Frontend_settings_group: public GroupSetting {
public:
- Frontend_settings_group():
- TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
- Setting* fe = HostRunFrontend();
+ Frontend_settings_group(): GroupSetting()
+{
+ HostCheckBoxSetting* fe = HostRunFrontend();
addChild(fe);
- setTrigger(fe);
- ConfigurationGroup* setting1 = new GridConfigurationGroup(2,false);
+// ConfigurationGroup* setting1 = new GridConfigurationGroup(2,false);
- setting1->addChild(HostUseXLargeMouse());
- setting1->addChild(HostUsemythfrontend());
+ fe->addTargetedChild("1", HostUseXLargeMouse());
+ fe->addTargetedChild("1", HostUsemythfrontend());
// setting1->addChild(HostXres());
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
- settings->addChild(setting1);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+// settings->addChild(setting1);
// settings->addChild(new HostRemoteType);
- addTarget("0", new VerticalConfigurationGroup(false));
- addTarget("1", settings);
+// addTarget("0", new VerticalConfigurationGroup(false));
+// addTarget("1", settings);
};
};
-SystemtypeGroup::SystemtypeGroup(): TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+SystemtypeGroup::SystemtypeGroup()
+{
setLabel(QObject::tr("System Type"));
- HostSystemType = new HostComboBox("HostSystemType");
+ HostSystemType = new HostComboBoxSetting("HostSystemType");
HostSystemType->setLabel(QObject::tr("System Type"));
HostSystemType->addSelection("Master_backend");
HostSystemType->addSelection("Frontend_only");
// HostSystemType->addSelection("Standalone");
HostSystemType->addSelection("Slave_backend");
- if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" ))
+ if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" ) )
HostSystemType->setEnabled(false);
addChild(HostSystemType);
- setTrigger(HostSystemType);
- ConfigurationGroup* fe1 = new GridConfigurationGroup(2,false,false,true,true);
- fe1->addChild(HostUseXLargeMouse());
- fe1->addChild(HostUsemythfrontend());
+// ConfigurationGroup* fe1 = new GridConfigurationGroup(2,false,false,true,true);
+ HostSystemType->addTargetedChild("Master_backend", HostUseXLargeMouse());
+ HostSystemType->addTargetedChild("Master_backend", HostUsemythfrontend());
- ConfigurationGroup* standalone = new VerticalConfigurationGroup(false,false,true,true);
+// ConfigurationGroup* standalone = new VerticalConfigurationGroup(false,false,true,true);
// standalone->addChild(HostXres());
//FIXME
// standalone->addChild(new HostRemoteType);
- standalone->addChild(fe1);
- ConfigurationGroup* frontend = new VerticalConfigurationGroup(false,false,true,true);
- frontend->addChild(HostMysqlserverip_listbox());
+// ConfigurationGroup* frontend = new VerticalConfigurationGroup(false,false,true,true);
+ HostSystemType->addTargetedChild("Frontend_only", HostMysqlserverip_listbox());
// frontend->addChild(HostXres());
//FIXME
// frontend->addChild(new HostRemoteType);
- frontend->addChild(fe1);
+ HostSystemType->addTargetedChild("Frontend_only", HostUseXLargeMouse());
+ HostSystemType->addTargetedChild("Frontend_only", HostUsemythfrontend());
- ConfigurationGroup* backend = new VerticalConfigurationGroup(false,false,false,false);
- backend->addChild( new Frontend_settings_group);
+// ConfigurationGroup* backend = new VerticalConfigurationGroup(false,false,false,false);
+ HostSystemType->addTargetedChild("Slave_backend", new Frontend_settings_group);
- ConfigurationGroup* slave = new VerticalConfigurationGroup(false,false,true,true);
- slave->addChild(HostMysqlserverip_listbox());
- slave->addChild( new Frontend_settings_group);
+// ConfigurationGroup* slave = new VerticalConfigurationGroup(false,false,true,true);
+ HostSystemType->addTargetedChild("Slave_backend", HostMysqlserverip_listbox());
+ HostSystemType->addTargetedChild("Slave_backend", new Frontend_settings_group);
- addTarget("Standalone", standalone);
- addTarget("Frontend_only", frontend);
- addTarget("Master_backend", backend);
- addTarget("Slave_backend", slave);
- connect(HostSystemType, SIGNAL(valueChanged(const QString&)),
- this, SLOT(SystemtypeHelp()));
+// addTarget("Standalone", standalone);
+// addTarget("Frontend_only", frontend);
+// addTarget("Master_backend", backend);
+// addTarget("Slave_backend", slave);
+// connect(HostSystemType, SIGNAL(valueChanged(const QString&)), this,
+// SLOT(SystemtypeHelp()));
};
@@ -2639,70 +2580,70 @@ void SystemtypeGroup::SystemtypeHelp(void)
//
// }
-class AdvancedSettings: public TriggeredConfigurationGroup {
+class AdvancedSettings: public GroupSetting {
public:
- AdvancedSettings():
- TriggeredConfigurationGroup(true,true,true,true,true,true,true,true)
+ AdvancedSettings(): GroupSetting()
{
-
setLabel(QObject::tr("Advanced Settings (1/2)"));
- Setting* Autodown = HostAutodown();
- setTrigger(Autodown);
- hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
- ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false);
- checkbox->addChild(HostServiceMythWEB());
+// Setting* Autodown = HostAutodown();
+// setTrigger(Autodown);
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+// ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false);
+ // addChild(HostServiceMythWEB());
// checkbox->addChild(HostServiceNFS());
- checkbox->addChild(Hostbootsplash());
- checkbox->addChild(HostncidClient());
+ // addChild(Hostbootsplash());
+ //addChild(HostncidClient());
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
- if ( hostparm.ThisSystemType == "Standalone" )
- {
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+// if ( hostparm.ThisSystemType == "Standalone" )
+// {
// smb_busy_box();
- settings->addChild(new NCIDsettings);
+// settings->addChild(new NCIDsettings);
// settings->addChild(new SAMBAsettings);
// checkbox->addChild(HostServiceRRD() );
- settings->addChild(checkbox) ;
- }
- else if (hostparm.ThisSystemType == "Master_backend" )
+// settings->addChild(checkbox) ;
+// }
+ if ( hostparm.ThisSystemType == "Master_backend" )
{
// smb_busy_box();
// checkbox->addChild(GlobalPKG_MIRROR());
- settings->addChild(new NCIDsettings);
+ //settings->addChild(new NCIDsettings);
// settings->addChild(new SAMBAsettings);
// checkbox->addChild(HostServiceRRD() );
- settings->addChild(checkbox) ;
+ addChild(HostServiceMythWEB());
+ addChild(Hostbootsplash());
+// addChild(checkbox) ;
}
- else if (hostparm.ThisSystemType == "Frontend_only" )
+ else if ( hostparm.ThisSystemType == "Frontend_only" )
{
- settings->addChild(Hostbootsplash());
- settings->addChild(HostncidClient());
+ addChild(Hostbootsplash());
+ //settings->addChild(HostncidClient());
// settings->addChild(HostServiceRRD() );
}
- else if (hostparm.ThisSystemType == "Slave_backend" )
+ else if ( hostparm.ThisSystemType == "Slave_backend" )
{
- settings->addChild(Hostbootsplash());
- settings->addChild(HostncidClient());
+ addChild(Hostbootsplash());
+ //settings->addChild(HostncidClient());
// settings->addChild(HostServiceRRD() );
// if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR")) == "1")
// settings->addChild(HostPKG_MIRROR());
};
- addTarget("", settings);
+ //addTarget("", settings);
};
};
-class AdvancedSettings_2: public TriggeredConfigurationGroup {
+class AdvancedSettings_2: public GroupSetting {
public:
- AdvancedSettings_2():
- TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+ AdvancedSettings_2(): GroupSetting()
+ {
setLabel(QObject::tr("Advanced Settings (2/2)"));
- Setting* Autodown = HostAutodown();
- setTrigger(Autodown);
- hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+// Setting* Autodown = HostAutodown();
+// setTrigger(Autodown);
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
/*
ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false);
checkbox->addChild(HostServiceMythWEB());
@@ -2710,76 +2651,76 @@ public:
checkbox->addChild(Hostbootsplash());
checkbox->addChild(HostncidClient());*/
- ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
if ( hostparm.ThisSystemType == "Standalone" )
{
- settings->addChild(HostRunDHCP());
- settings->addChild(HostBEWait());
+ addChild(HostRunDHCP());
+ addChild(HostBEWait());
//settings->addChild(new Evroutersettings);
}
else if (hostparm.ThisSystemType == "Master_backend" )
{
- settings->addChild(new Backupsettings);
- settings->addChild(HostRunDHCP());
- settings->addChild(HostBEWait());
+ addChild(new Backupsettings);
+ addChild(HostRunDHCP());
+ addChild(HostBEWait());
//settings->addChild(new Evroutersettings);
}
else if (hostparm.ThisSystemType == "Frontend_only" )
{
//settings->addChild(new Evroutersettings);
- settings->addChild(HostBEWait());
+ addChild(HostBEWait());
}
else if (hostparm.ThisSystemType == "Slave_backend" )
{
//settings->addChild(new Evroutersettings);
- settings->addChild(HostBEWait());
+ addChild(HostBEWait());
};
- addTarget("", settings);
+ //addTarget("", settings);
};
};
/*_______________________________Sound settings ____________________*/
-SoundSettings::SoundSettings():
- TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+SoundSettings::SoundSettings(): GroupSetting()
+ {
setLabel(QObject::tr("Audio Settings"));
- HostAudiotype = new HostComboBox("HostAudiotype",false);
- HostAudiotype->setLabel(QObject::tr("Sound Card Driver"));
- HostAudiotype->addSelection("OSS");
- HostAudiotype->addSelection("ALSA");
+// HostAudiotype = new HostComboBoxSetting("HostAudiotype",false);
+// HostAudiotype->setLabel(QObject::tr("Sound Card Driver"));
+// HostAudiotype->addSelection("OSS");
+// HostAudiotype->addSelection("ALSA");
- HostAudiotype->setHelpText(QObject::tr("Select the sound driver, ALSA or OSS." ) );
- addChild(HostAudiotype);
- setTrigger(HostAudiotype);
+// HostAudiotype->setHelpText(QObject::tr("Select the sound driver, ALSA or OSS." ) );
+// addChild(HostAudiotype);
+// setTrigger(HostAudiotype);
- HorizontalConfigurationGroup *lp = new HorizontalConfigurationGroup(false, false, true, true);
- HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true);
+// HorizontalConfigurationGroup *lp = new HorizontalConfigurationGroup(false, false, true, true);
+// HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true);
- TransButtonSetting *LoadOSSbutton = new TransButtonSetting();
- LoadOSSbutton->setLabel(tr("Load OSS Driver"));
- TransButtonSetting *LoadALSAbutton = new TransButtonSetting();
- LoadALSAbutton->setLabel(tr("Load ALSA Driver"));
+// TransButtonSetting *LoadOSSbutton = new TransButtonSetting();
+// LoadOSSbutton->setLabel(tr("Load OSS Driver"));
+ ButtonStandardSetting *LoadALSAbutton = new ButtonStandardSetting("Load ALSA Driver");
+// LoadALSAbutton->setLabel(tr("Load ALSA Driver"));
- TransButtonSetting *TestAudiobutton = new TransButtonSetting();
- TestAudiobutton->setLabel(tr("Test Device"));
- TestAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device."));
- lp->addChild(TestAudiobutton);
- lp->addChild(LoadOSSbutton);
+// ButtonStandardSetting *TestAudiobutton = new TransButtonSetting();
+// TestAudiobutton->setLabel(tr("Test Device"));
+// TestAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device."));
+// addChild(TestAudiobutton);
+// lp->addChild(LoadOSSbutton);
- TransButtonSetting *TestALSAAudiobutton = new TransButtonSetting();
- TestALSAAudiobutton->setLabel(tr("Test Device"));
+ ButtonStandardSetting *TestALSAAudiobutton = new ButtonStandardSetting(tr("Test Device"));
+// TestALSAAudiobutton->setLabel(tr("Test Device"));
TestALSAAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device."));
- lpalsa->addChild(TestALSAAudiobutton);
- lpalsa->addChild(LoadALSAbutton);
-
- TransLabelSetting *osslabel = new TransLabelSetting();
- osslabel->setValue("OSS- Open Sound System\nhttp://opensound.com\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n");
+ addChild(TestALSAAudiobutton);
+ addChild(LoadALSAbutton);
- TransLabelSetting *AlsaLabel = new TransLabelSetting();
- AlsaLabel->setValue("ALSA - Advanced Linux Sound Architecture\nhttp://alsa-project.org\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n");
+// TransLabelSetting *osslabel = new TransLabelSetting();
+// osslabel->setValue("OSS- Open Sound System\nhttp://opensound.com\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n");
+// TransLabelSetting *AlsaLabel = new TransLabelSetting();
+// AlsaLabel->setValue("ALSA - Advanced Linux Sound Architecture\nhttp://alsa-project.org\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n");
+/*
// OSS GROUP
SoundOSSsettings *OSS = new SoundOSSsettings ;
ConfigurationGroup* osssettings = new VerticalConfigurationGroup(false);
@@ -2792,13 +2733,13 @@ SoundSettings::SoundSettings():
this, SLOT(soundossgathersettings_1()));
connect(LoadOSSbutton, SIGNAL(pressed()),
OSS, SLOT(loadossdriver()));
-
+*/
// ALSA GROUP
- SoundALSAsettings *ALSA = new SoundALSAsettings ;
- ConfigurationGroup* alsasettings = new VerticalConfigurationGroup(false);
- alsasettings->addChild(AlsaLabel);
- alsasettings->addChild(ALSA);
- alsasettings->addChild(lpalsa);
+ SoundALSAsettings *ALSA = new SoundALSAsettings ;
+// ConfigurationGroup* alsasettings = new VerticalConfigurationGroup(false);
+// addChild(AlsaLabel);
+ addChild(ALSA);
+// alsasettings->addChild(lpalsa);
connect(this, SIGNAL(alsa_sig()),
ALSA, SLOT(soundalsagathersettings()));
@@ -2806,16 +2747,15 @@ SoundSettings::SoundSettings():
this, SLOT(soundalsagathersettings_1()));
connect(LoadALSAbutton, SIGNAL(pressed()),
ALSA, SLOT(loadalsadriver()));
- addTarget("ALSA", alsasettings);
- addTarget("OSS", osssettings);
+// addTarget("ALSA", alsasettings);
+// addTarget("OSS", osssettings);
};
-
-SoundOSSsettings::SoundOSSsettings():
- TriggeredConfigurationGroup(true,false,true,true,true,true,true,true)
+/*
+SoundOSSsettings::SoundOSSsettings(): GroupSetting()
{
SetVertical(true);
- HostSoundOssAll = new HostComboBox("HostSoundOssAll");
+ HostSoundOssAll = new HostComboBoxSetting("HostSoundOssAll");
HostSoundOssAll->setLabel(QObject::tr("Default Device"));
HostSoundOssAll->setHelpText(QObject::tr("Select the default audio output device for the system."));
fillossselection();
@@ -2823,20 +2763,19 @@ SoundOSSsettings::SoundOSSsettings():
HostSoundOssAll->setValue(findossall);
addTarget("All", HostSoundOssAll);
};
-
-SoundALSAsettings::SoundALSAsettings():
- TriggeredConfigurationGroup(true,false,true,true,true,true,true,true)
+*/
+SoundALSAsettings::SoundALSAsettings(): GroupSetting()
{
- SetVertical(true);
- HostSoundALSAAll = new HostComboBox("HostSoundALSAAll");
+// SetVertical(true);
+ HostSoundALSAAll = new HostComboBoxSetting("HostSoundALSAAll");
HostSoundALSAAll->setLabel(QObject::tr("Default Device"));
HostSoundALSAAll->setHelpText(QObject::tr("Select the default audio output device for the system. Chrome, aplay and other programs that use the default system device for audio will use this device. Mplayer will be set to use this device."));
fillALSAselection();
- int findalsaall=HostSoundALSAAll->findSelection(hostparm.OLDHostSoundALSAAll );
- HostSoundALSAAll->setValue(findalsaall);
- addTarget("All", HostSoundALSAAll);
+// int findalsaall=HostSoundALSAAll->findSelection(hostparm.OLDHostSoundALSAAll );
+// HostSoundALSAAll->setValue(findalsaall);
+ addChild( HostSoundALSAAll);
};
-
+/*
void SoundOSSsettings::loadossdriver()
{
// Add info popup right here
@@ -2901,6 +2840,7 @@ void SoundOSSsettings::loadossdriver()
fillossselection();
}
+
void SoundALSAsettings::loadalsadriver()
{
QString cmdtxt;
@@ -3005,7 +2945,7 @@ void SoundOSSsettings::fillossselection()
}
return ;
};
-
+*/
void SoundALSAsettings::fillALSAselection()
{
@@ -3075,13 +3015,14 @@ void SoundALSAsettings::fillALSAselection()
}
return ;
}
-
+/*
void SoundSettings::soundossgathersettings_1 (void)
{
hostparm.ThisHostAudiotype = HostAudiotype->getValue();
// emit the signal to call soundossgathersetting.
emit oss_sig();
};
+*/
void SoundSettings::soundalsagathersettings_1 (void)
{
hostparm.ThisHostAudiotype = HostAudiotype->getValue();
@@ -3089,7 +3030,7 @@ void SoundSettings::soundalsagathersettings_1 (void)
emit alsa_sig();
};
-
+/*
void SoundOSSsettings::soundossgathersettings(void)
{
hostparm.ThisHostSoundOSSAll = HostSoundOssAll->getValue();
@@ -3155,7 +3096,7 @@ void SoundOSSsettings::soundossgathersettings(void)
}
};
-
+*/
void SoundALSAsettings::soundalsagathersettings(void)
{
@@ -3186,7 +3127,7 @@ void SoundALSAsettings::soundalsagathersettings(void)
delete busyPopup;
busyPopup = NULL;
}
-
+/*
int progressbar=1;
MythProgressDialog *popupProgress = NULL;
popupProgress = new MythProgressDialog(msgtext, 50);
@@ -3194,14 +3135,14 @@ void SoundALSAsettings::soundalsagathersettings(void)
{
popupProgress->setProgress(progressbar);
}
-
+*/
while ( return_code == 0 )
{
- progressbar++;
- popupProgress->setProgress(progressbar);
- if (progressbar > 50 )
- progressbar = 10;
+// progressbar++;
+// popupProgress->setProgress(progressbar);
+// if (progressbar > 50 )
+// progressbar = 10;
return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null");
@@ -3214,13 +3155,13 @@ void SoundALSAsettings::soundalsagathersettings(void)
busyPopup->Close();
busyPopup = NULL;
}
-
+/*
if (popupProgress)
{
popupProgress->Close();
popupProgress->deleteLater();
}
-
+*/
};
@@ -3395,9 +3336,9 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand)
cmdtxt.append("bin/systemconfig.sh " + modulelist + " &");
myth_system(cmdtxt);
int return_code = 0;
- QString msgtext = "Please wait while " ;
+ QString msgtext = "Configuring " ;
msgtext.append(gCoreContext->GetSetting("HostMyhostname"));
- msgtext.append(" is configured");
+ msgtext.append("...");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
if (busyPopup->Create())
@@ -3409,7 +3350,7 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand)
delete busyPopup;
busyPopup = NULL;
}
- while ( return_code == 0 )
+ while ( return_code == 0 )
{
return_code = myth_system("ps -ef|grep systemconfig.sh|grep -v grep > /dev/null");
qApp->processEvents ();
@@ -3422,17 +3363,16 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand)
busyPopup = NULL;
}
-
-
if (restart)
{
return_code = 1;
int loopnumber=0 ;
bool doloop = true;
- QString msgtext = "Transferring database settings" ;
+ QString msgtext = "Transferring Database Settings..." ;
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
- MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,
+ "installbusy");
if (busyPopup->Create())
{
popupStack->AddScreen(busyPopup, false);
@@ -3443,9 +3383,6 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand)
busyPopup = NULL;
}
-
-
-
while ( doloop )
{
return_code = myth_system(dbcommand);
@@ -3463,10 +3400,19 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand)
};
-
-
}
+void settingsWait()
+{
+ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+ //mainStack->AddScreen(ssd);
+ // Block by running an event loop until last screen is removed
+ QEventLoop block;
+ QObject::connect(mainStack, &MythScreenStack::topScreenChanged,
+ &block, [&](MythScreenType* screen)
+ { if (!screen) block.quit(); });
+ block.exec();
+}
int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
@@ -3478,16 +3424,16 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
bool showremotesonly, bool showvnc, bool showfileshare)
{
displaymysqlonly = false ;
- displayshownetwork =false ;
+ displayshownetwork = false ;
displayshowhostype = false ;
- displayshowmisc =false ;
- displayshowshutdown =false ;
+ displayshowmisc = false ;
+ displayshowshutdown = false ;
displayshowadvanced = false;
displayshowsound = false ;
displayshowadvancedX = false;
- displayaccesscontrol= false;
- displayplugins= false;
- displaysoftware= false;
+ displayaccesscontrol = false;
+ displayplugins = false;
+ displaysoftware = false;
displayuser = false;
displaywebuser = false;
displayddns = false;
@@ -3495,47 +3441,47 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
displayscreensaver = false;
displaysupplemental = false;
displayremotesonly = false;
- displayvnc = false;
+ displayvnc = false;
displayfileshare = false;
//gCoreContext->ActivateSettingsCache(true);
//gCoreContext->ClearSettingsCache();
- bool runothers=false;
- bool continuerun=true;
+ bool runothers = false;
+ bool continuerun = true;
int retc = 0 ;
displaymysqlonly = mysqlonly;
- if (displaymysqlonly)
+ if ( displaymysqlonly )
{
MythInstallSettings mysqlsettings;
- mysqlsettings.Load();
- mysqlsettings.Save();
- if ( mysqlsettings.exec() == QDialog::Accepted )
- {
- retc = 1;
- }
- else
- {
- retc=2;
- };
+// mysqlsettings.Load();
+// mysqlsettings.Save();
+// if ( mysqlsettings.exec() == QDialog::Accepted )
+// {
+// retc = 1;
+// }
+// else
+// {
+// retc = 2;
+// };
};
if ( shownetwork )
{
displayshownetwork = shownetwork;
MythInstallSettings settings;
- settings.Load();
- settings.Save();
- if ( settings.exec() == QDialog::Accepted )
- {
- retc = 1;
- }
- else
- {
- continuerun=false;
- retc=2;
- };
- displayshownetwork = false;
+// settings.Load();
+// settings.Save();
+// if ( settings.exec() == QDialog::Accepted )
+// {
+// retc = 1;
+// }
+// else
+// {
+// continuerun=false;
+// retc = 2;
+// };
+// displayshownetwork = false;
};
if ( showhostype && continuerun )
@@ -3545,21 +3491,24 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
if (sysRet < 0)
LOG(VB_GENERAL, LOG_ERR, "Error running avahi-browse");
MythInstallSettings settings1;
- settings1.Load();
- settings1.Save();
- if ( settings1.exec() == QDialog::Accepted )
- {
- retc = 1;
- }
- else
- {
- continuerun=false;
- retc=2;
- };
+// settings1.Load();
+// settings1.Save();
+// if ( settings1.exec() == QDialog::Accepted )
+// {
+// retc = 1;
+// }
+// else
+// {
+// continuerun=false;
+// retc = 2;
+// };
displayshowhostype=false;
}
- if ( showmisc || showshutdown || showsound || showadvancedX || showadvanced || showaccesscontrol || showplugins || showsoftware || showuser || showwebuser || showddns || showinfrared || showscreensaver || showsupplemental || showremotesonly || showvnc || showfileshare)
+ if ( showmisc || showshutdown || showsound || showadvancedX || showadvanced ||
+ showaccesscontrol || showplugins || showsoftware || showuser || showwebuser ||
+ showddns || showinfrared || showscreensaver || showsupplemental ||
+ showremotesonly || showvnc || showfileshare)
{
runothers=true;
displayshowmisc = showmisc;
@@ -3593,7 +3542,7 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
pre_writesettings();
//FINDME
DatabaseParams params = gContext->GetDatabaseParams();
- QString cmdtxt=MV_ROOT ;
+ QString cmdtxt=MV_ROOT;
cmdtxt.append("bin/timezip.py -m ");
QString zipcommand=cmdtxt;
zipcommand.append(hostparm.ThisDBhost);
@@ -3602,31 +3551,31 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
//cout << zipcommand << endl;
myth_system(zipcommand);
//hostparm.ThisHostZipcode = gCoreContext->GetSetting("HostZipcode");
- hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone");
+ hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone");
// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient");
// if ( hostparm.ThisHostServiceHobbit == "1" )
// install_hobbit = true;
MythInstallSettings settings2;
- settings2.Load();
- settings2.Save();
-// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit );
- if ( settings2.exec() == QDialog::Accepted )
- {
- retc = 1;
- }
- else
- {
- continuerun=false;
- retc=2;
- };
+// settings2.Load();
+// settings2.Save();
+ // gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit );
+// if ( settings2.exec() == QDialog::Accepted )
+// {
+// retc = 1;
+// }
+// else
+// {
+// continuerun=false;
+// retc = 2;
+// };
};
pre_writesettings();
if ( mysqlonly )
{
QString cmdtxt;
cmdtxt=MV_ROOT ;
- cmdtxt.append("bin/systemconfig.sh Mysql_only " + hostparm.ThisDBhost);
+ cmdtxt.append("bin/systemconfig.sh Mysql_only " + hostparm.ThisDBhost);
myth_system(cmdtxt);
}
else
@@ -3639,33 +3588,33 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
-void writesettings ()
+void writesettings()
{
// ofstream myfile;
- gCoreContext->ClearSettingsCache();
+ //gCoreContext->ClearSettingsCache();
//gCoreContext->ActivateSettingsCache(false);
- hostparm.language = gCoreContext->GetSetting("language");
+ hostparm.language = gCoreContext->GetSetting("language");
hostparm.ThisHostName = gCoreContext->GetSetting("HostMyhostname").toLower();
hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone");
- hostparm.ThisHostIPeth0 = gCoreContext->GetSetting("HostIPeth0");
- hostparm.ThisHostNETMASKeth0 = gCoreContext->GetSetting("HostNETMASKeth0");
- hostparm.ThisHostDNSeth0 = gCoreContext->GetSetting("HostDNSeth0");
- hostparm.ThisHostUSEDHCPeth0 = gCoreContext->GetSetting("HostUseDHCPeth0");
- hostparm.ThisHostGWeth0 = gCoreContext->GetSetting("HostGWeth0");
- hostparm.ThisHostActiveonbooteth0 = gCoreContext->GetSetting("HostActiveonbooteth0");
- hostparm.ThisHOSTESSIDeth0 = gCoreContext->GetSetting("HOSTESSIDeth0");
+ hostparm.ThisHostIPeth0 = gCoreContext->GetSetting("HostIPeth0");
+ hostparm.ThisHostNETMASKeth0 = gCoreContext->GetSetting("HostNETMASKeth0");
+ hostparm.ThisHostDNSeth0 = gCoreContext->GetSetting("HostDNSeth0");
+ hostparm.ThisHostUSEDHCPeth0 = gCoreContext->GetSetting("HostUseDHCPeth0");
+ hostparm.ThisHostGWeth0 = gCoreContext->GetSetting("HostGWeth0");
+ hostparm.ThisHostActiveonbooteth0 = gCoreContext->GetSetting("HostActiveonbooteth0");
+ hostparm.ThisHOSTESSIDeth0 = gCoreContext->GetSetting("HOSTESSIDeth0");
hostparm.ThisHostUseEncryptioneth0 = gCoreContext->GetSetting("HostUseEncryptioneth0");
hostparm.ThisHostkeyeth0 = gCoreContext->GetSetting("Hostkeyeth0");
hostparm.ThisHostMTUeth0 = gCoreContext->GetSetting("HostMTUeth0");
- hostparm.ThisHostIPeth1 = gCoreContext->GetSetting("HostIPeth1");
- hostparm.ThisHostNETMASKeth1 = gCoreContext->GetSetting("HostNETMASKeth1");
- hostparm.ThisHostDNSeth1 = gCoreContext->GetSetting("HostDNSeth1");
- hostparm.ThisHostUSEDHCPeth1 = gCoreContext->GetSetting("HostUseDHCPeth1");
- hostparm.ThisHostGWeth1 = gCoreContext->GetSetting("HostGWeth1");
- hostparm.ThisHostActiveonbooteth1 = gCoreContext->GetSetting("HostActiveonbooteth1");
- hostparm.ThisHOSTESSIDeth1 = gCoreContext->GetSetting("HOSTESSIDeth1");
+ hostparm.ThisHostIPeth1 = gCoreContext->GetSetting("HostIPeth1");
+ hostparm.ThisHostNETMASKeth1 = gCoreContext->GetSetting("HostNETMASKeth1");
+ hostparm.ThisHostDNSeth1 = gCoreContext->GetSetting("HostDNSeth1");
+ hostparm.ThisHostUSEDHCPeth1 = gCoreContext->GetSetting("HostUseDHCPeth1");
+ hostparm.ThisHostGWeth1 = gCoreContext->GetSetting("HostGWeth1");
+ hostparm.ThisHostActiveonbooteth1 = gCoreContext->GetSetting("HostActiveonbooteth1");
+ hostparm.ThisHOSTESSIDeth1 = gCoreContext->GetSetting("HOSTESSIDeth1");
hostparm.ThisHostUseEncryptioneth1 = gCoreContext->GetSetting("HostUseEncryptioneth1");
hostparm.ThisHostkeyeth1 = gCoreContext->GetSetting("Hostkeyeth1");
hostparm.ThisHostMTUeth1 = gCoreContext->GetSetting("HostMTUeth1");
@@ -3703,7 +3652,6 @@ void writesettings ()
hostparm.ThisHostkeyath0 = gCoreContext->GetSetting("Hostkeyath0");
hostparm.ThisHostMTUath0 = gCoreContext->GetSetting("HostMTUath0");
-
// hostparm.ThisHostServiceRRD = gCoreContext->GetSetting("HostServiceRRD");
hostparm.ThisSamba = gCoreContext->GetSetting("HostServiceSamba");
hostparm.ThisHostServiceSamba_media = gCoreContext->GetSetting("HostServiceSamba_media");
@@ -3808,9 +3756,9 @@ void writesettings ()
}
-//*********************************************************************************************
+//--------------------------------------------------------------------------------
// AUDIO SETTINGS
-//******************************************************************************************
+//--------------------------------------------------------------------------------
hostparm.ThisHostAudiotype = gCoreContext->GetSetting("HostAudiotype");
hostparm.ThisHostSoundOSSAll = gCoreContext->GetSetting("HostSoundOssAll");
hostparm.ThisHostSoundALSAAll = gCoreContext->GetSetting("HostSoundALSAAll");
@@ -3873,7 +3821,6 @@ void writesettings ()
hostparm.ThisHostpluginmythgameROMDB= gCoreContext->GetSetting("HostpluginmythgameROMDB");
hostparm.ThisHostpluginmythgameMupen64= gCoreContext->GetSetting("HostpluginmythgameMupen64");
hostparm.ThisHostwebmin = gCoreContext->GetSetting("Hostwebmin");
- hostparm.ThisHostHuluDesktop = gCoreContext->GetSetting("HostHuluDesktop");
hostparm.ThisHostwebonlinhes = gCoreContext->GetSetting("HostWebonlinhes");
hostparm.ThisHostXBMC = gCoreContext->GetSetting("HostXBMC");
hostparm.ThisHostPLEXHT = gCoreContext->GetSetting("HostPLEXHT");
@@ -3939,11 +3886,8 @@ void writesettings ()
hostparm.ThisHostTransmitSend_after_4 =
gCoreContext->GetSetting("HostTransmitSend_after_4");
-
hostparm.ThisHOSTrootSSH = gCoreContext->GetSetting("HOSTrootSSH");
-
-
hostparm.ThisHostSupplemental = gCoreContext->GetSetting("HostSupplemental");
hostparm.ThisHostWindowManager = gCoreContext->GetSetting("HostWindowManager");
hostparm.ThisHostEnhancedWMStyle = gCoreContext->GetSetting("HostEnhancedWMStyle");
@@ -3954,9 +3898,6 @@ void writesettings ()
hostparm.ThisHostXVNCpassword = gCoreContext->GetSetting("HostXVNCpassword");
-
-
-
//______________________WRITE OUT THE FILE__________________________
QString systemheader;
QString divider;
@@ -4203,7 +4144,6 @@ void writesettings ()
myfile << "mythappletrailers=\"" + hostparm.ThisHostpluginmythappletrailers + "\"\n";
myfile << "webonlinhes=\"" + hostparm.ThisHostwebonlinhes + "\"\n";
- myfile << "huludesktop=\"" + hostparm.ThisHostHuluDesktop + "\"\n";
myfile << "kodi=\"" + hostparm.ThisHostXBMC + "\"\n";
myfile << "plexhometheater=\"" + hostparm.ThisHostPLEXHT + "\"\n";
myfile << "plexmediaserver=\"" + hostparm.ThisHostPLEXMS + "\"\n";
@@ -4212,7 +4152,6 @@ void writesettings ()
myfile << "foldingworksize=\"" + hostparm.ThisHostfoldingworksize + "\"\n";
myfile << "webmin=\"" + hostparm.ThisHostwebmin + "\"\n";
-
systemheader="\n# ddns settings\n" ;
myfile << systemheader ;
myfile << divider ;
@@ -4258,7 +4197,6 @@ void writesettings ()
myfile << "Hostnumblaster=\"" + hostparm.ThisHostnumblaster + "\"\n";
myfile << "LCDtype=\"" + hostparm.ThisHostLCDType + "\"\n";
-
systemheader="\n# user settings\n" ;
myfile << systemheader ;
myfile << divider ;
@@ -4285,25 +4223,23 @@ void writesettings ()
myfile << "UseMythWEB_auth=\"" + hostparm.ThisHostwebauth + "\"\n";
-
f.close();
-
}
-MythInstallSettings::MythInstallSettings()
+MythInstallSettings::MythInstallSettings() : GroupSetting()
{
- VerticalConfigurationGroup* vcg = new VerticalConfigurationGroup(false,false,true,true);
- VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true);
- TransLabelSetting *deniedlabel = new TransLabelSetting();
- deniedlabel->setValue(" Access to these settings is disabled.\n Access can be enabled in Access Settings." );
- denied->addChild(deniedlabel);
+// VerticalConfigurationGroup* vcg = new VerticalConfigurationGroup(false,false,true,true);
+// VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true);
+// TransLabelSetting *deniedlabel = new TransLabelSetting();
+// deniedlabel->setValue(" Access to these settings is disabled.\n Access can be enabled in Access Settings." );
+// denied->addChild(deniedlabel);
if ( displaymysqlonly )
{
- vcg->setLabel(QObject::tr("Run MythFrontend Settings"));
- vcg->addChild(HostMysqlserverip_listbox());
- vcg->addChild(ThemePainter());
- addChild(vcg);
+ //vcg->setLabel(QObject::tr("Run MythFrontend Settings"));
+ //vcg->addChild(HostMysqlserverip_listbox());
+ //vcg->addChild(ThemePainter());
+ //addChild(vcg);
}
else
{
@@ -4331,15 +4267,15 @@ MythInstallSettings::MythInstallSettings()
- vcg->setLabel(QObject::tr("Host Settings"));
+ //vcg->setLabel(QObject::tr("Host Settings"));
// Check to see if screen should appear
if ( displayshownetwork )
{
//Check to see if screen is allowed to appear
if ( ((gCoreContext->GetSetting("Hostaccessnetwork")) == "0" ) )
{
- denied ->setLabel(QObject::tr("Network Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Network Settings"));
+ //addChild(denied);
}
else
{
@@ -4379,8 +4315,8 @@ MythInstallSettings::MythInstallSettings()
NetworkOptionsFrame *networkoptionsframe = new NetworkOptionsFrame();
NetworkSettingsFrame *netsettingsframe = new NetworkSettingsFrame();
- addChild(netsettingsframe);
- addChild(networkoptionsframe);
+// addChild(netsettingsframe);
+// addChild(networkoptionsframe);
};
}
@@ -4389,14 +4325,14 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccesshostype")) =="0" ))
{
- denied ->setLabel(QObject::tr("Host Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Host Settings"));
+ //addChild(denied);
}
else
{
SystemtypeGroup *systemtypegroup = new SystemtypeGroup();
- vcg->addChild(systemtypegroup);
- addChild(vcg);
+ //vcg->addChild(systemtypegroup);
+ //addChild(vcg);
}
}
@@ -4404,13 +4340,13 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" ))
{
- denied ->setLabel(QObject::tr("Remotes Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Remotes Settings"));
+ //addChild(denied);
}
else
{
IRFrame *irframe = new IRFrame();
- addChild(irframe);
+// addChild(irframe);
}
}
@@ -4418,13 +4354,13 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("HostaccessadvancedX")) == "0" ))
{
- denied ->setLabel(QObject::tr("Display Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Display Settings"));
+ //addChild(denied);
}
else
{
AdvancedXSettings *advancedXsettings = new AdvancedXSettings();
- addChild(advancedXsettings);
+// addChild(advancedXsettings);
}
}
@@ -4432,13 +4368,31 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccessvnc")) == "0" ))
{
- denied ->setLabel(QObject::tr("VNC Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("VNC Settings"));
+ //addChild(denied);
}
else
{
- VNChostsettings* vnchostsettings= new VNChostsettings();
- addChild(vnchostsettings);
+ //VNChostsettings* vnchostsettings= new VNChostsettings();
+ //addChild(vnchostsettings);
+
+ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+ StandardSettingDialog *ssd =
+ new StandardSettingDialog(mainStack, "vncsettings",
+ new VNChostsettings());
+ if (ssd->Create())
+ {
+ mainStack->AddScreen(ssd);
+ settingsWait();
+ // Block by running an event loop until last screen is removed
+ //QEventLoop block;
+ //QObject::connect(mainStack, &MythScreenStack::topScreenChanged,
+ // &block, [&](MythScreenType* screen)
+ //{ if (!screen) block.quit(); });
+ // block.exec();
+ }
+ else
+ delete ssd;
}
}
@@ -4446,16 +4400,16 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccessfileshare")) == "0" ))
{
- denied ->setLabel(QObject::tr("File Sharing Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("File Sharing Settings"));
+ //addChild(denied);
}
else
{
FileShareMainFrameClient *nfsclient = new FileShareMainFrameClient();
- addChild(nfsclient);
+// addChild(nfsclient);
FileShareMainFrameServer *fileserver = new FileShareMainFrameServer();
- addChild(fileserver);
+// addChild(fileserver);
}
}
@@ -4463,14 +4417,14 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccessmisc")) == "0" ))
{
- denied ->setLabel(QObject::tr("Miscellanous"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Miscellanous"));
+ //addChild(denied);
}
else
{
MiscMainFrame *miscsettings = new MiscMainFrame();
// MiscMainFrame2 *miscsettings2 = new MiscMainFrame2();
- addChild(miscsettings);
+// addChild(miscsettings);
// addChild(miscsettings2);
}
}
@@ -4479,20 +4433,20 @@ MythInstallSettings::MythInstallSettings()
{
//JM VERBOSE(VB_IMPORTANT, "screensaver");
Supplementalhostsettings *supplemental = new Supplementalhostsettings();
- addChild(supplemental);
+// addChild(supplemental);
}
if ( displayshowshutdown )
{
if ( ((gCoreContext->GetSetting("Hostaccesssleep")) == "0" ))
{
- denied ->setLabel(QObject::tr("Shutdown Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Shutdown Settings"));
+ //addChild(denied);
}
else
{
- WakeSettings *wakesettings = new WakeSettings();
- addChild(wakesettings);
+// WakeSettings *wakesettings = new WakeSettings();
+// addChild(wakesettings);
}
}
@@ -4500,16 +4454,16 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccessadvanced")) == "0" ) )
{
- denied ->setLabel(QObject::tr("Advanced Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Advanced Settings"));
+ //addChild(denied);
}
else
{
AdvancedSettings *advancedsettings = new AdvancedSettings();
AdvancedSettings_2 *advancedsettings_2 = new AdvancedSettings_2();
- addChild(advancedsettings);
- addChild(advancedsettings_2);
+// addChild(advancedsettings);
+// addChild(advancedsettings_2);
}
}
@@ -4517,8 +4471,8 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccesssound")) =="0") )
{
- denied ->setLabel(QObject::tr("Audio Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Audio Settings"));
+ //addChild(denied);
}
else
{
@@ -4556,71 +4510,71 @@ MythInstallSettings::MythInstallSettings()
SoundSettings *soundsettings = new SoundSettings();
- addChild(soundsettings);
+ // addChild(soundsettings);
}
}
if ( displayaccesscontrol )
{
- VerticalConfigurationGroup* accessettings =
- new VerticalConfigurationGroup(false,true,false,false);
- ConfigurationGroup *GridAccess =
- new GridConfigurationGroup(2,false,false,false,false);
-
- GridAccess->addChild(Hostaccessadvanced());
- GridAccess->addChild(Hostaccesssound());
- GridAccess->addChild(HostaccessadvancedX());
- GridAccess->addChild(Hostaccessddns());
- GridAccess->addChild(Hostaccessfileshare());
- GridAccess->addChild(Hostaccessmisc());
- GridAccess->addChild(Hostaccessnetwork());
- GridAccess->addChild(Hostaccessplugins());
- GridAccess->addChild(Hostaccessir());
- GridAccess->addChild(Hostaccessscreensaver());
+// VerticalConfigurationGroup* accessettings =
+// new VerticalConfigurationGroup(false,true,false,false);
+// ConfigurationGroup *GridAccess =
+// new GridConfigurationGroup(2,false,false,false,false);
+
+ addChild(Hostaccessadvanced());
+ addChild(Hostaccesssound());
+ addChild(HostaccessadvancedX());
+ addChild(Hostaccessddns());
+ addChild(Hostaccessfileshare());
+ addChild(Hostaccessmisc());
+ addChild(Hostaccessnetwork());
+ addChild(Hostaccessplugins());
+ addChild(Hostaccessir());
+// addChild(Hostaccessscreensaver());
//screensaver
- GridAccess->addChild(Hostaccessvnc());
- GridAccess->addChild(Hostaccesssleep());
+ addChild(Hostaccessvnc());
+ addChild(Hostaccesssleep());
// GridAccess->addChild(Hostaccessuser());
- GridAccess->addChild(Hostaccesswebuser());
+ addChild(Hostaccesswebuser());
// accessettings->addChild(Hostaccessnetwork());
- accessettings->addChild(new ACCESShostsettings);
- accessettings->addChild(GridAccess);
- accessettings ->setLabel(QObject::tr("Access Settings"));
- addChild(accessettings);
+// addChild(new ACCESShostsettings);
+// addChild(GridAccess);
+// accessettings ->setLabel(QObject::tr("Access Settings"));
+// addChild(accessettings);
}
if ( displayplugins )
{
if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" ))
{
- denied ->setLabel(QObject::tr("Programs"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Programs"));
+ //addChild(denied);
}
else
{
- ConfigurationGroup *GridShowPlugin = new GridConfigurationGroup(2,false);
- GridShowPlugin->setLabel(QObject::tr("Programs (1/4)"));
- GridShowPlugin->addChild(Hostpluginmytharchive());
- GridShowPlugin->addChild(Hostpluginmythbrowser());
- GridShowPlugin->addChild(Hostpluginmythnetvision());
- GridShowPlugin->addChild(Hostpluginmythgallery());
+// ConfigurationGroup *GridShowPlugin = new GridConfigurationGroup(2,false);
+ setLabel(QObject::tr("Programs (1/4)"));
+ addChild(Hostpluginmytharchive());
+ addChild(Hostpluginmythbrowser());
+ addChild(Hostpluginmythnetvision());
+ addChild(Hostpluginmythgallery());
//ConfigurationGroup *GridShowPlugin2 = new GridConfigurationGroup(2);
- GridShowPlugin->addChild(Hostpluginmythmusic());
- GridShowPlugin->addChild(Hostpluginmythnews());
- GridShowPlugin->addChild(Hostpluginmythweather());
- GridShowPlugin->addChild(Hostpluginmythzoneminder());
+ addChild(Hostpluginmythmusic());
+ addChild(Hostpluginmythnews());
+ addChild(Hostpluginmythweather());
+ addChild(Hostpluginmythzoneminder());
- ConfigurationGroup *GridShowPlugin3 = new VerticalConfigurationGroup(false,true);
- GridShowPlugin3->setLabel(QObject::tr("Programs (2/4)"));
- GridShowPlugin3->addChild(new MythGamesettings);
- GridShowPlugin3->addChild(Hostpluginmythvideo_dvdcss());
+ //ConfigurationGroup *GridShowPlugin3 = new VerticalConfigurationGroup(false,true);
+ setLabel(QObject::tr("Programs (2/4)"));
+ addChild(new MythGamesettings);
+ addChild(Hostpluginmythvideo_dvdcss());
- addChild(GridShowPlugin);
+// addChild(GridShowPlugin);
// addChild(GridShowPlugin2);
- addChild(GridShowPlugin3);
+// addChild(GridShowPlugin3);
}
}
@@ -4628,45 +4582,44 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" ))
{
- denied ->setLabel(QObject::tr("Programs"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Programs"));
+ //addChild(denied);
}
else
{
- ConfigurationGroup *GridShowPlugin4 = new GridConfigurationGroup(2,false);
- GridShowPlugin4->setLabel(QObject::tr("Programs (3/4)"));
- GridShowPlugin4->addChild(Hostpluginmythappletrailers());
- GridShowPlugin4->addChild(HostHuluDesktop());
- GridShowPlugin4->addChild(HostPLEXHT());
- GridShowPlugin4->addChild(HostPLEXMS());
- GridShowPlugin4->addChild(Hostwebmin());
- GridShowPlugin4->addChild(Hostwebonlinhes());
- GridShowPlugin4->addChild(HostXBMC());
+ //ConfigurationGroup *GridShowPlugin4 = new GridConfigurationGroup(2,false);
+ setLabel(QObject::tr("Programs (3/4)"));
+ addChild(Hostpluginmythappletrailers());
+ addChild(HostPLEXHT());
+ addChild(HostPLEXMS());
+ addChild(Hostwebmin());
+ addChild(Hostwebonlinhes());
+ addChild(HostXBMC());
//ConfigurationGroup *GridShowPlugin5 = new GridConfigurationGroup(2);
- ConfigurationGroup *GridShowPlugin6 = new VerticalConfigurationGroup(false,true);
- GridShowPlugin6->setLabel(QObject::tr("Programs (4/4)"));
- GridShowPlugin6->addChild(Hostfoldingathome());
- GridShowPlugin6->addChild(Hostfoldingusername());
- GridShowPlugin6->addChild(Hostfoldingworksize());
+ //ConfigurationGroup *GridShowPlugin6 = new VerticalConfigurationGroup(false,true);
+ //GridShowPlugin6->setLabel(QObject::tr("Programs (4/4)"));
+ //addChild(Hostfoldingathome());
+ //addChild(Hostfoldingusername());
+ //addChild(Hostfoldingworksize());
- addChild(GridShowPlugin4);
+// addChild(GridShowPlugin4);
//addChild(GridShowPlugin5);
- addChild(GridShowPlugin6);
+// addChild(GridShowPlugin6);
}
}
if ( displayuser )
{
if ( ((gCoreContext->GetSetting("Hostaccessuser")) == "0" ))
{
- denied ->setLabel(QObject::tr("User Accounts"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("User Accounts"));
+ //addChild(denied);
}
else
{
UserManagement *usermanagement = new UserManagement();
- addChild(usermanagement);
+// addChild(usermanagement);
}
}
@@ -4674,46 +4627,46 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccesswebuser")) == "0" ))
{
- denied ->setLabel(QObject::tr("Web Security Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Web Security Settings"));
+ //addChild(denied);
}
else
{
WebPasswordFrame *webpasswordframe = new WebPasswordFrame();
- addChild(webpasswordframe);
+// addChild(webpasswordframe);
}
}
-
+/*
if ( displayddns )
{
if ( ((gCoreContext->GetSetting("Hostaccessddns")) == "0" ))
{
- denied ->setLabel(QObject::tr("DDNS Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("DDNS Settings"));
+ //addChild(denied);
}
else
{
DDnssettings *ddnsframe = new DDnssettings();
- addChild(ddnsframe);
+// addChild(ddnsframe);
}
}
-
+*/
if ( displayinfrared )
{
if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" ))
{
- denied ->setLabel(QObject::tr("Remotes Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Remotes Settings"));
+ //addChild(denied);
}
else
{
IRFrame *irframe = new IRFrame();
IR_TransmitFrame *transmitframe = new IR_TransmitFrame();
LCDFrame *lcdframe = new LCDFrame();
- addChild(irframe);
- addChild(transmitframe);
- addChild(lcdframe);
+// addChild(irframe);
+// addChild(transmitframe);
+// addChild(lcdframe);
}
}
@@ -4721,14 +4674,14 @@ MythInstallSettings::MythInstallSettings()
{
if ( ((gCoreContext->GetSetting("Hostaccessscreensaver")) =="0" ))
{
- denied ->setLabel(QObject::tr("Screensaver Settings"));
- addChild(denied);
+ //denied ->setLabel(QObject::tr("Screensaver Settings"));
+ //addChild(denied);
}
else
{
//JM VERBOSE(VB_IMPORTANT, "screensaver");
- Screensaverhostsettings *screensaver = new Screensaverhostsettings();
- addChild(screensaver);
+// Screensaverhostsettings *screensaver = new Screensaverhostsettings();
+// addChild(screensaver);
}
}